blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
721
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 5
91
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 321
values | visit_date
timestamp[ns]date 2016-08-12 09:31:09
2023-09-06 10:45:07
| revision_date
timestamp[ns]date 2010-09-28 14:01:40
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 2010-09-28 14:01:40
2023-09-06 06:22:19
| github_id
int64 426
681M
| star_events_count
int64 101
243k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 23
values | gha_event_created_at
timestamp[ns]date 2012-06-28 18:51:49
2023-09-14 21:59:16
⌀ | gha_created_at
timestamp[ns]date 2008-02-11 22:55:26
2023-08-10 11:14:58
⌀ | gha_language
stringclasses 147
values | src_encoding
stringclasses 26
values | language
stringclasses 2
values | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 6
10.2M
| extension
stringclasses 115
values | filename
stringlengths 3
113
| content
stringlengths 6
10.2M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6bc8ef02db09626fcdb33a59f3ae2954c96ce57f
|
44ad9d2de0fd2113501820e814511b355979e3de
|
/tests/doc/capi/chfl_selection/string.c
|
7fa5c9e7216621cf83d418cef86171eadc99b3a2
|
[
"GPL-1.0-or-later",
"MPL-2.0",
"BSD-3-Clause",
"MPL-1.0"
] |
permissive
|
chemfiles/chemfiles
|
eae2760c50f01d225ddbf70c6bc7e9be8bd62f65
|
501b7cbb767899aa1e2e23eb8e23787ab5bbcc3b
|
refs/heads/master
| 2023-09-01T07:15:14.741611
| 2023-08-16T09:16:29
| 2023-08-22T14:18:55
| 30,712,631
| 148
| 67
|
BSD-3-Clause
| 2023-09-07T13:58:54
| 2015-02-12T16:50:09
|
C++
|
UTF-8
|
C
| false
| false
| 552
|
c
|
string.c
|
// Chemfiles, a modern library for chemistry file reading and writing
// Copyright (C) Guillaume Fraux and contributors -- BSD license
#include <chemfiles.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
int main() {
// [example]
CHFL_SELECTION* selection = chfl_selection("pairs: name(#1) O and name(#2) H");
char string[64]= {0};
chfl_selection_string(selection, string, sizeof(string));
assert(strcmp(string, "pairs: name(#1) O and name(#2) H") == 0);
chfl_free(selection);
// [example]
return 0;
}
|
ad02355b2342256cc26ad8c62797e4cf080b895c
|
c9bc99866cfab223c777cfb741083be3e9439d81
|
/product/morello/include/morello_pik_mcp.h
|
b79957e6ea54baa345e8598e0b47a9f4493bdc3f
|
[
"BSD-3-Clause"
] |
permissive
|
ARM-software/SCP-firmware
|
4738ca86ce42d82588ddafc2226a1f353ff2c797
|
f6bcca436768359ffeadd84d65e8ea0c3efc7ef1
|
refs/heads/master
| 2023-09-01T16:13:36.962036
| 2023-08-17T13:00:20
| 2023-08-31T07:43:37
| 134,399,880
| 211
| 165
|
NOASSERTION
| 2023-09-13T14:27:10
| 2018-05-22T10:35:56
|
C
|
UTF-8
|
C
| false
| false
| 1,586
|
h
|
morello_pik_mcp.h
|
/*
* Arm SCP/MCP Software
* Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Description:
* MCP PIK registers
*/
#ifndef MORELLO_PIK_MCP_H
#define MORELLO_PIK_MCP_H
#include <fwk_macros.h>
#include <stdint.h>
/*!
* \brief MCP PIK register definitions
*/
struct pik_mcp_reg {
uint8_t RESERVED0[0x10 - 0x0];
FWK_RW uint32_t RESET_SYNDROME;
uint8_t RESERVED1[0x20 - 0x14];
FWK_RW uint32_t SURVIVAL_RESET_STATUS;
uint8_t RESERVED2[0x34 - 0x24];
FWK_RW uint32_t ADDR_TRANS;
FWK_RW uint32_t DBG_ADDR_TRANS;
uint8_t RESERVED3[0x40 - 0x3C];
FWK_RW uint32_t WS1_TIMER_MATCH;
FWK_RW uint32_t WS1_TIMER_EN;
uint8_t RESERVED4[0x200 - 0x48];
FWK_R uint32_t SS_RESET_STATUS;
FWK_W uint32_t SS_RESET_SET;
FWK_W uint32_t SS_RESET_CLR;
uint8_t RESERVED5[0x810 - 0x20C];
FWK_RW uint32_t CORECLK_CTRL;
FWK_RW uint32_t CORECLK_DIV1;
uint8_t RESERVED6[0x820 - 0x818];
FWK_RW uint32_t ACLK_CTRL;
FWK_RW uint32_t ACLK_DIV1;
uint8_t RESERVED7[0xA10 - 0x828];
FWK_R uint32_t PLL_STATUS0;
uint8_t RESERVED8[0xFC0 - 0xA14];
FWK_R uint32_t PWR_CTRL_CONFIG;
uint8_t RESERVED18[0xFD0 - 0xFC4];
FWK_R uint32_t PID4;
FWK_R uint32_t PID5;
FWK_R uint32_t PID6;
FWK_R uint32_t PID7;
FWK_R uint32_t PID0;
FWK_R uint32_t PID1;
FWK_R uint32_t PID2;
FWK_R uint32_t PID3;
FWK_R uint32_t ID0;
FWK_R uint32_t ID1;
FWK_R uint32_t ID2;
FWK_R uint32_t ID3;
};
#endif /* MORELLO_PIK_MCP_H */
|
c7951f6573454b134c0d076d950fc4d0f0798b8f
|
537ee21156abb410a49c9a908b499d62396c965e
|
/src/include/srpc/ckms_quantiles.h
|
dbaf437f3e5e608d6a09acf58b0500a0b6345102
|
[
"Apache-2.0"
] |
permissive
|
sogou/srpc
|
b5ee496f72235558f50ee6eaf111c86403d58dbd
|
b3c738650ec63b45aac341f2a117e473f932691d
|
refs/heads/master
| 2023-09-05T11:12:31.860614
| 2023-09-04T12:56:46
| 2023-09-04T12:56:46
| 295,369,297
| 1,756
| 372
|
Apache-2.0
| 2023-09-04T12:56:47
| 2020-09-14T09:35:14
|
C++
|
UTF-8
|
C
| false
| false
| 26
|
h
|
ckms_quantiles.h
|
../../var/ckms_quantiles.h
|
3eaff1f2a4a811219ac73453f601fca141247d5b
|
f3eed0234b4d0ad2bbb2abd700cf1e2c7a0e8a1d
|
/AKWF-c/AKWF_bitreduced/AKWF_bitreduced_0022.h
|
dbe97cf51317af25f308c4e74f2f9a123b90dd0c
|
[
"CC0-1.0"
] |
permissive
|
KristofferKarlAxelEkstrand/AKWF-FREE
|
b2defa1a2d389d309be6dd2e9f968923daf80d1b
|
cf8171df36e9fec25416b5f568b72a6e2cb69194
|
refs/heads/master
| 2023-07-23T18:22:36.939705
| 2023-07-10T17:14:40
| 2023-07-10T17:14:40
| 145,817,187
| 359
| 59
|
CC0-1.0
| 2023-07-10T17:14:41
| 2018-08-23T07:26:56
| null |
UTF-8
|
C
| false
| false
| 4,694
|
h
|
AKWF_bitreduced_0022.h
|
/* Adventure Kid Waveforms (AKWF) converted for use with Teensy Audio Library
*
* Adventure Kid Waveforms(AKWF) Open waveforms library
* https://www.adventurekid.se/akrt/waveforms/adventure-kid-waveforms/
*
* This code is in the public domain, CC0 1.0 Universal (CC0 1.0)
* https://creativecommons.org/publicdomain/zero/1.0/
*
* Converted by Brad Roy, https://github.com/prosper00
*/
/* AKWF_bitreduced_0022 256 samples
+-----------------------------------------------------------------------------------------------------------------+
| * * * |
| * * * |
| * * * |
| * * * |
| * **** ********** * *********|
| * * * * * * |
| * * * * * * |
| * * * * * * |
| * * * * * * |
| * * * * * * |
| * ********** * *********** *** |
| * * * * |
| * * * * |
| * * * * |
| * * * * |
+-----------------------------------------------------------------------------------------------------------------+
*/
const uint16_t AKWF_bitreduced_0022 [] = {
43959, 50509, 48367, 49709, 48720, 49499, 48864, 49390, 48950, 49320, 49009, 49269, 49053, 49232, 49085, 49205,
49108, 49185, 49124, 49170, 49137, 49159, 49148, 49148, 49160, 49134, 49176, 49116, 49196, 49093, 49224, 49064,
49256, 49028, 49292, 48990, 49332, 48951, 49369, 48915, 49403, 48886, 49424, 48873, 49428, 48882, 49404, 48924,
49342, 49011, 49222, 49170, 49010, 49460, 48597, 50094, 47488, 52649, 15745, 0, 2431, 0, 1300, 0,
832, 0, 548, 0, 343, 0, 190, 0, 72, 0, 0, 46, 0, 91, 0, 115,
0, 121, 0, 112, 1, 95, 1, 72, 0, 51, 0, 31, 0, 19, 0, 15,
0, 19, 0, 35, 0, 61, 0, 95, 0, 138, 0, 189, 0, 248, 0, 330,
0, 498, 0, 2134, 16073, 16525, 16225, 16568, 16188, 16591, 16175, 16590, 16186, 16572, 16215, 16532,
16267, 16468, 16347, 16366, 16481, 16177, 16784, 15552, 19529, 33324, 32538, 32751, 33045, 32109, 34220, 7679,
0, 1339, 0, 755, 0, 523, 0, 388, 0, 295, 0, 221, 0, 157, 0, 89,
0, 0, 81, 0, 13828, 17208, 15869, 16784, 16047, 16686, 16105, 16649, 16129, 16636, 16135, 16636,
16130, 16648, 16111, 16675, 16073, 16732, 15982, 16897, 15589, 18789, 32750, 32744, 32743, 32832, 32678, 32878,
32641, 32909, 32614, 32936, 32586, 32966, 32552, 33006, 32502, 33071, 32412, 33201, 32206, 33573, 31331, 38573,
50529, 48438, 49609, 48832, 49379, 48991, 49256, 49096, 49157, 49193, 49057, 49302, 48934, 49447, 48756, 49677,
48439, 50158, 47591, 52146, 34665, 13121, 18189, 15114, 17420, 15364, 18319, 31919, 33135, 32502, 32979, 32599,
32902, 32662, 32850, 32708, 32809, 32742, 32781, 32766, 32762, 32782, 32748, 32791, 32743, 32795, 32739, 32795,
};
|
0b10e51029865a1e8713c566b80e5c61b12fd767
|
f3eed0234b4d0ad2bbb2abd700cf1e2c7a0e8a1d
|
/AKWF-c/AKWF_hvoice/AKWF_hvoice_0042.h
|
6715380c89b5d2df0f722676796710db8887411d
|
[
"CC0-1.0"
] |
permissive
|
KristofferKarlAxelEkstrand/AKWF-FREE
|
b2defa1a2d389d309be6dd2e9f968923daf80d1b
|
cf8171df36e9fec25416b5f568b72a6e2cb69194
|
refs/heads/master
| 2023-07-23T18:22:36.939705
| 2023-07-10T17:14:40
| 2023-07-10T17:14:40
| 145,817,187
| 359
| 59
|
CC0-1.0
| 2023-07-10T17:14:41
| 2018-08-23T07:26:56
| null |
UTF-8
|
C
| false
| false
| 4,686
|
h
|
AKWF_hvoice_0042.h
|
/* Adventure Kid Waveforms (AKWF) converted for use with Teensy Audio Library
*
* Adventure Kid Waveforms(AKWF) Open waveforms library
* https://www.adventurekid.se/akrt/waveforms/adventure-kid-waveforms/
*
* This code is in the public domain, CC0 1.0 Universal (CC0 1.0)
* https://creativecommons.org/publicdomain/zero/1.0/
*
* Converted by Brad Roy, https://github.com/prosper00
*/
/* AKWF_hvoice_0042 256 samples
+-----------------------------------------------------------------------------------------------------------------+
| ****** |
| * ** **** **** |
| ** * ** **** **** *** ** |
|* * *** ** ** *** ** **** |
|* * ** * ** *** ** ** |
|* ** ** *** *** * ** ** |
| ** * *** *** ** ** ** |
| * * ** ** * * ** *|
| * ** *** ** * * *** **|
| * ** ***** ** * ******** |
| ** * ** * * |
| * * ** ** |
| ** * ** ** |
| ** ** ***** |
| ** *** |
+-----------------------------------------------------------------------------------------------------------------+
*/
const uint16_t AKWF_hvoice_0042 [] = {
33964, 38009, 42364, 46625, 49899, 49679, 49928, 53362, 56811, 57062, 56068, 56798, 57021, 58214, 60468, 60567,
58744, 57411, 56917, 54399, 51347, 48307, 44466, 40553, 37585, 35393, 32768, 28682, 24253, 21885, 20464, 17867,
14096, 11343, 9424, 7744, 5688, 3247, 1216, 793, 1088, 635, 47, 394, 1519, 2251, 2762, 3075,
4234, 5945, 7838, 9487, 11395, 13631, 15219, 17266, 19892, 23092, 25218, 26382, 27745, 29787, 33059, 35349,
36567, 37589, 39646, 42288, 44412, 45893, 46643, 47773, 49366, 51230, 52064, 52200, 51871, 51782, 52098, 52519,
52425, 51231, 50777, 50829, 51280, 51365, 50783, 49528, 48097, 47512, 46276, 43946, 41220, 39133, 38338, 37667,
36662, 35152, 33604, 33409, 32939, 31779, 29859, 28308, 27372, 26793, 26173, 24574, 23711, 23419, 24552, 24270,
24439, 23675, 22362, 23158, 24457, 26426, 25367, 26055, 29009, 32556, 35739, 34898, 33924, 34497, 38406, 41059,
38908, 38084, 39491, 42845, 44525, 45401, 46211, 46628, 48491, 49610, 50391, 50935, 49672, 46916, 46004, 47903,
47726, 44926, 42337, 40643, 40729, 41713, 40556, 36718, 35387, 35836, 34170, 30827, 28171, 26008, 23707, 22298,
20435, 18550, 16808, 15107, 13701, 12535, 11419, 9625, 8720, 8269, 7785, 6986, 6260, 6252, 6663, 7943,
8537, 8887, 9883, 11537, 13031, 14025, 15226, 16520, 18286, 20737, 22954, 24434, 25667, 27791, 30298, 32182,
33456, 34659, 37041, 39426, 40752, 41330, 42690, 44876, 46172, 46875, 47483, 48609, 50023, 50914, 51116, 51409,
52128, 52415, 52219, 52014, 51640, 50543, 49186, 48006, 47307, 47029, 46291, 45209, 44700, 45028, 44642, 42487,
40606, 39106, 37633, 35566, 33147, 31282, 29711, 28743, 27929, 27394, 26759, 25307, 24350, 23864, 23756, 23074,
21692, 21158, 21666, 23063, 22560, 21804, 20749, 21822, 23462, 23881, 23413, 22832, 25029, 27260, 29161, 30772,
};
|
477d3cd6be1695443cf65ce4a8239dd5be2edc1c
|
8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a
|
/Installation/Windows/Plugins/EnVar_plugin/Contrib/EnVar/nsis/nsis_tchar.h
|
e622063dc1276d95723cd00f0187265a3aee7f4a
|
[
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"BSL-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode-public-domain",
"JSON",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSD-4-Clause",
"Python-2.0",
"LGPL-2.1-or-later"
] |
permissive
|
arangodb/arangodb
|
0980625e76c56a2449d90dcb8d8f2c485e28a83b
|
43c40535cee37fc7349a21793dc33b1833735af5
|
refs/heads/devel
| 2023-08-31T09:34:47.451950
| 2023-08-31T07:25:02
| 2023-08-31T07:25:02
| 2,649,214
| 13,385
| 982
|
Apache-2.0
| 2023-09-14T17:02:16
| 2011-10-26T06:42:00
|
C++
|
UTF-8
|
C
| false
| false
| 5,054
|
h
|
nsis_tchar.h
|
/*
* nsis_tchar.h
*
* This file is a part of NSIS.
*
* Copyright (C) 1999-2013 Nullsoft and Contributors
*
* This software is provided 'as-is', without any express or implied
* warranty.
*
* For Unicode support by Jim Park -- 08/30/2007
*/
// Jim Park: Only those we use are listed here.
#pragma once
#ifdef _UNICODE
#ifndef _T
#define __T(x) L ## x
#define _T(x) __T(x)
#define _TEXT(x) __T(x)
#endif
#ifndef _TCHAR_DEFINED
#define _TCHAR_DEFINED
#if !defined(_NATIVE_WCHAR_T_DEFINED) && !defined(_WCHAR_T_DEFINED)
typedef unsigned short TCHAR;
#else
typedef wchar_t TCHAR;
#endif
#endif
// program
#define _tenviron _wenviron
#define __targv __wargv
// printfs
#define _ftprintf fwprintf
#define _sntprintf _snwprintf
#if (defined(_MSC_VER) && (_MSC_VER<=1310||_MSC_FULL_VER<=140040310)) || defined(__MINGW32__)
# define _stprintf swprintf
#else
# define _stprintf _swprintf
#endif
#define _tprintf wprintf
#define _vftprintf vfwprintf
#define _vsntprintf _vsnwprintf
#if defined(_MSC_VER) && (_MSC_VER<=1310)
# define _vstprintf vswprintf
#else
# define _vstprintf _vswprintf
#endif
// scanfs
#define _tscanf wscanf
#define _stscanf swscanf
// string manipulations
#define _tcscat wcscat
#define _tcschr wcschr
#define _tcsclen wcslen
#define _tcscpy wcscpy
#define _tcsdup _wcsdup
#define _tcslen wcslen
#define _tcsnccpy wcsncpy
#define _tcsncpy wcsncpy
#define _tcsrchr wcsrchr
#define _tcsstr wcsstr
#define _tcstok wcstok
// string comparisons
#define _tcscmp wcscmp
#define _tcsicmp _wcsicmp
#define _tcsncicmp _wcsnicmp
#define _tcsncmp wcsncmp
#define _tcsnicmp _wcsnicmp
// upper / lower
#define _tcslwr _wcslwr
#define _tcsupr _wcsupr
#define _totlower towlower
#define _totupper towupper
// conversions to numbers
#define _tcstoi64 _wcstoi64
#define _tcstol wcstol
#define _tcstoul wcstoul
#define _tstof _wtof
#define _tstoi _wtoi
#define _tstoi64 _wtoi64
#define _ttoi _wtoi
#define _ttoi64 _wtoi64
#define _ttol _wtol
// conversion from numbers to strings
#define _itot _itow
#define _ltot _ltow
#define _i64tot _i64tow
#define _ui64tot _ui64tow
// file manipulations
#define _tfopen _wfopen
#define _topen _wopen
#define _tremove _wremove
#define _tunlink _wunlink
// reading and writing to i/o
#define _fgettc fgetwc
#define _fgetts fgetws
#define _fputts fputws
#define _gettchar getwchar
// directory
#define _tchdir _wchdir
// environment
#define _tgetenv _wgetenv
#define _tsystem _wsystem
// time
#define _tcsftime wcsftime
#else // ANSI
#ifndef _T
#define _T(x) x
#define _TEXT(x) x
#endif
#ifndef _TCHAR_DEFINED
#define _TCHAR_DEFINED
typedef char TCHAR;
#endif
// program
#define _tenviron environ
#define __targv __argv
// printfs
#define _ftprintf fprintf
#define _sntprintf _snprintf
#define _stprintf sprintf
#define _tprintf printf
#define _vftprintf vfprintf
#define _vsntprintf _vsnprintf
#define _vstprintf vsprintf
// scanfs
#define _tscanf scanf
#define _stscanf sscanf
// string manipulations
#define _tcscat strcat
#define _tcschr strchr
#define _tcsclen strlen
#define _tcscnlen strnlen
#define _tcscpy strcpy
#define _tcsdup _strdup
#define _tcslen strlen
#define _tcsnccpy strncpy
#define _tcsrchr strrchr
#define _tcsstr strstr
#define _tcstok strtok
// string comparisons
#define _tcscmp strcmp
#define _tcsicmp _stricmp
#define _tcsncmp strncmp
#define _tcsncicmp _strnicmp
#define _tcsnicmp _strnicmp
// upper / lower
#define _tcslwr _strlwr
#define _tcsupr _strupr
#define _totupper toupper
#define _totlower tolower
// conversions to numbers
#define _tcstol strtol
#define _tcstoul strtoul
#define _tstof atof
#define _tstoi atoi
#define _tstoi64 _atoi64
#define _tstoi64 _atoi64
#define _ttoi atoi
#define _ttoi64 _atoi64
#define _ttol atol
// conversion from numbers to strings
#define _i64tot _i64toa
#define _itot _itoa
#define _ltot _ltoa
#define _ui64tot _ui64toa
// file manipulations
#define _tfopen fopen
#define _topen _open
#define _tremove remove
#define _tunlink _unlink
// reading and writing to i/o
#define _fgettc fgetc
#define _fgetts fgets
#define _fputts fputs
#define _gettchar getchar
// directory
#define _tchdir _chdir
// environment
#define _tgetenv getenv
#define _tsystem system
// time
#define _tcsftime strftime
#endif
// is functions (the same in Unicode / ANSI)
#define _istgraph isgraph
#define _istascii __isascii
#define __TFILE__ _T(__FILE__)
#define __TDATE__ _T(__DATE__)
#define __TTIME__ _T(__TIME__)
|
5e8d5799d1821f68fe5cc48734d33416d7bf6d79
|
8380b5eb12e24692e97480bfa8939a199d067bce
|
/Carberp Botnet/source - absource/pro/all source/RemoteCtl/hvnc/libs/minizip/minizip/decompress_wrap.h
|
29df48b9e276d36da2bef5b163503816c58d28fa
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
RamadhanAmizudin/malware
|
788ee745b5bb23b980005c2af08f6cb8763981c2
|
62d0035db6bc9aa279b7c60250d439825ae65e41
|
refs/heads/master
| 2023-02-05T13:37:18.909646
| 2023-01-26T08:43:18
| 2023-01-26T08:43:18
| 53,407,812
| 873
| 291
| null | 2023-01-26T08:43:19
| 2016-03-08T11:44:21
|
C++
|
UTF-8
|
C
| false
| false
| 484
|
h
|
decompress_wrap.h
|
#ifndef DECOMPRESS_WRAP_H_INCLUDED
#define DECOMPRESS_WRAP_H_INCLUDED
typedef struct
{
byte bHandleType;
unzFile hZip;
bool bInMem;
WCHAR strOutputDir[MAX_PATH];
WCHAR strZipFile[MAX_PATH];
bool bEncrypted;
char szPassword[260];
bool bOnlyEnum;
bool bEnumAnsi;
ARCHENUMNAMESCALLBACKW *lpEnumProc;
bool bExctractToMem;
LPVOID lpMem;
int dwSize;
} ZIPDECOMPRESSION;
#endif // DECOMPRESS_WRAP_H_INCLUDED
|
d0e78084cd509265e33231e8ca02fca09a258970
|
fff6d13af91db925a94b3e3474108fafd519bba0
|
/src/Dss/sithMulti.c
|
f71d82d6eb398db8873c642c49c499194e5fd471
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
shinyquagsire23/OpenJKDF2
|
94f1364628924ac944466107606b91c6faeec3df
|
b79b8c210878b6f276ed3d1a5dad91d9219e6ce1
|
refs/heads/master
| 2023-07-08T16:41:38.986577
| 2023-06-28T08:47:39
| 2023-06-28T08:47:39
| 139,542,792
| 381
| 34
|
NOASSERTION
| 2023-06-28T08:47:40
| 2018-07-03T07:09:45
|
C
|
UTF-8
|
C
| false
| false
| 48,810
|
c
|
sithMulti.c
|
#include "sithMulti.h"
#include "Win95/stdComm.h"
#include "Gameplay/sithEvent.h"
#include "World/sithWorld.h"
#include "Gameplay/sithPlayer.h"
#include "Cog/sithCog.h"
#include "Engine/sithCollision.h"
#include "jk.h"
#include "General/sithStrTable.h"
#include "General/stdString.h"
#include "Devices/sithConsole.h"
#include "Dss/sithDSSThing.h"
#include "Dss/sithDSS.h"
#include "Dss/sithDSSCog.h"
#include "World/sithSoundClass.h"
#include "stdPlatform.h"
#include "World/sithSector.h"
#include "World/sithSurface.h"
#include "Main/sithMain.h"
#include "Main/Main.h"
#include "AI/sithAI.h"
#include "Devices/sithComm.h"
#include "stdPlatform.h"
#define sithMulti_infoPrintf(fmt, ...) stdPlatform_Printf(fmt, ##__VA_ARGS__)
#define sithMulti_verbosePrintf(fmt, ...) if (Main_bVerboseNetworking) \
{ \
stdPlatform_Printf(fmt, ##__VA_ARGS__); \
} \
;
static wchar_t sithMulti_chatWStrTmp[256]; // Added
void sithMulti_SetHandleridk(sithMultiHandler_t a1)
{
sithMulti_handlerIdk = a1;
}
void sithMulti_SendChat(char *pStr, int arg0, int arg1)
{
unsigned int pStr_len; // esi
pStr_len = strlen(pStr) + 1;
if ( pStr_len >= 0x80 )
pStr_len = 128;
NETMSG_START;
NETMSG_PUSHS32(arg0);
NETMSG_PUSHS32(arg1);
NETMSG_PUSHS32(pStr_len);
NETMSG_PUSHSTR(pStr, pStr_len);
NETMSG_END(DSS_CHAT);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, -1, 1, 1);
}
// MOTS altered
int sithMulti_ProcessChat(sithCogMsg *msg)
{
// Added: 132 -> 256
char v5[256];
NETMSG_IN_START(msg);
int arg0 = NETMSG_POPS32();
int arg1 = NETMSG_POPS32();
int arg2 = NETMSG_POPS32();
if ( arg2 >= 0x80 )
arg2 = 128;
NETMSG_POPSTR(v5, arg2);
v5[arg2 + 1] = 0;
if ( arg1 < 0 )
jk_snwprintf(sithMulti_chatWStrTmp, 256, L"%S", v5); // Added: char -> wchar
else
jk_snwprintf(sithMulti_chatWStrTmp, 256, L"%s says '%S'", jkPlayer_playerInfos[arg1].player_name, v5); // Added: char -> wchar
sithConsole_AlertSound();
sithConsole_PrintUniStr(sithMulti_chatWStrTmp); // Added: char -> wchar
return 1;
}
HRESULT sithMulti_CreatePlayer(const wchar_t *a1, const wchar_t *a2, const char *a3, const char *a4, int maxPlayers, int sessionFlags, int multiModeFlags, int rate, int maxRank)
{
HRESULT result; // eax
jkMultiEntry multiEntry; // [esp+Ch] [ebp-F0h] BYREF
_memset(&multiEntry, 0, sizeof(multiEntry));
stdString_SafeWStrCopy(multiEntry.serverName, a1, 0x20);
stdString_SafeStrCopy(multiEntry.episodeGobName, a3, 0x20);
stdString_SafeStrCopy(multiEntry.mapJklFname, a4, 0x20);
stdString_SafeWStrCopy(multiEntry.wPassword, a2, 0x20);
multiEntry.maxPlayers = maxPlayers;
idx_13b4_related = maxPlayers;
multiEntry.maxRank = maxRank;
multiEntry.multiModeFlags = multiModeFlags;
multiEntry.tickRateMs = rate;
multiEntry.sessionFlags = sessionFlags;
if ( stdComm_dword_8321E0 )
result = stdComm_seed_idk(&multiEntry);
else
result = stdComm_CreatePlayer(&multiEntry);
if ( !result )
{
sithNet_dword_83262C = stdComm_dplayIdSelf;
sithNet_dword_8C4BA8 = 0;
sithNet_serverNetId = stdComm_dplayIdSelf;
sithNet_isServer = 1;
sithNet_isMulti = 1;
sithNet_MultiModeFlags = multiModeFlags;
sithMulti_multiModeFlags = multiModeFlags;
sithMulti_multiplayerTimelimit = sithNet_multiplayer_timelimit;
stdComm_dword_832204 = sithNet_scorelimit;
sithNet_tickrate = rate;
sithEvent_RegisterFunc(2, sithMulti_ServerLeft, rate, 1); // TODO enum
result = 0;
}
return result;
}
int sithMulti_Startup()
{
sithWorld *v0; // ebp
int *v1; // esi
int v2; // eax
int v3; // edi
int v4; // ebx
sithThing **v5; // ebp
sithThing *v6; // eax
int v7; // ecx
unsigned int i; // edi
v0 = sithWorld_pCurrentWorld;
g_submodeFlags |= 1u;
v1 = &sithWorld_pCurrentWorld->numThings;
v2 = sithWorld_pCurrentWorld->numThings;
v3 = 0;
v4 = 0;
sithMulti_leaveJoinType = 0;
sithMulti_bTimelimitMet = 0;
sithComm_multiplayerFlags |= 1u;
sithComm_bSyncMultiplayer |= 1u;
sithMulti_dword_83265C = 0;
// Remove all actor things from the world
if (!(sithMulti_multiModeFlags & MULTIMODEFLAG_COOP) && v2 >= 0 ) // Added: Co-op
{
v5 = &sithWorld_pCurrentWorld->things;
do
{
v6 = &(*v5)[v3];
if ( v6->type == SITH_THING_ACTOR )
{
sithThing_FreeEverythingNet(&(*v5)[v3]);
}
else if ( !sithNet_isServer )
{
v6->thingflags |= SITH_TF_INVULN;
}
++v4;
++v3;
}
while ( v4 <= *v1 );
v0 = sithWorld_pCurrentWorld;
}
sithNet_checksum = sithWorld_CalcChecksum(v0, 0/*jkGuiMultiplayer_checksumSeed*/); // Added: TODO fix the checksum seed
sithNet_syncIdx = 0;
sithSurface_numSurfaces_0 = 0;
sithSector_numSync = 0;
sithNet_bNeedsFullThingSyncForLeaveJoin = 0;
sithComm_ClearMsgTmpBuf();
if ( stdComm_bIsServer )
{
sithNet_MultiModeFlags = sithMulti_multiModeFlags;
sithNet_scorelimit = stdComm_dword_832204;
sithNet_multiplayer_timelimit = sithMulti_multiplayerTimelimit;
for ( i = 0; i < 32; ++i )
{
sithPlayer_sub_4C8910(i);
sithPlayer_Startup(i);
}
sithNet_teamScore[0] = 0;
sithNet_teamScore[1] = 0;
sithNet_teamScore[2] = 0;
sithNet_teamScore[3] = 0;
sithNet_teamScore[4] = 0;
sithPlayer_sub_4C87C0(0, stdComm_dplayIdSelf);
sithPlayer_idk(0);
sithPlayer_ResetPalEffects();
// Added: dedicated server
if (jkGuiNetHost_bIsDedicated) {
jkPlayer_playerInfos[0].flags = 6;
jkPlayer_playerInfos[0].playerThing->thingflags |= SITH_TF_DISABLED;
jkPlayer_playerInfos[0].playerThing->attach_flags = 0;
}
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_100) != 0 )
{
jkPlayer_playerInfos[0].teamNum = 1;
stdComm_DoReceive();
return 1;
}
}
else
{
sithNet_isServer = 0;
sithNet_isMulti = 1;
for (int i = 0; i < 32; i++)
{
sithPlayer_sub_4C8910(i);
sithPlayer_Startup(i);
}
sithNet_teamScore[0] = 0;
sithNet_teamScore[1] = 0;
sithNet_teamScore[2] = 0;
sithNet_teamScore[3] = 0;
sithNet_teamScore[4] = 0;
}
stdComm_DoReceive();
return 1;
}
void sithMulti_FreeThing(int a1)
{
if ( sithMulti_dword_83265C < 0x100 )
{
sithMulti_arr_832218[sithMulti_dword_83265C++] = a1;
}
}
void sithMulti_Shutdown()
{
sithComm_multiplayerFlags &= ~1u;
sithNet_isMulti = 0;
sithNet_isServer = 0;
sithComm_bSyncMultiplayer &= ~1u;
sithEvent_RegisterFunc(2, 0, 0, 0);
stdComm_Close();
stdComm_CloseConnection();
}
int sithMulti_SendJoinRequest(int sendto_id)
{
NETMSG_START;
NETMSG_PUSHSTR(sithWorld_pCurrentWorld->map_jkl_fname, 0x20);
NETMSG_PUSHWSTR(jkPlayer_playerShortName, 0x10);
NETMSG_PUSHWSTR(sithMulti_name, 0x20);
NETMSG_PUSHU32(sithNet_checksum);
NETMSG_END(DSS_JOINREQUEST);
return sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sendto_id, 1, 0);
}
int sithMulti_GetSpawnIdx(sithThing *pPlayerThing)
{
unsigned int v2; // ebp
unsigned int v3; // ecx
int *v4; // eax
int v5; // edx
unsigned int v7; // ebx
int v8; // edi
sithCollisionSearchEntry *i; // esi
sithThing *v10; // eax
unsigned int v11; // [esp+10h] [ebp-90h]
int v12[32]; // [esp+20h] [ebp-80h] BYREF
int realMaxSpawns = jkPlayer_maxPlayers;
// Added: Spawn at start in co-op.
if (sithNet_MultiModeFlags & MULTIMODEFLAG_COOP) {
return 0;
}
// Added: zero out v12
memset(v12, 0, sizeof(v12));
v2 = 0;
v11 = 0;
v4 = v12;
v5 = pPlayerThing->actorParams.playerinfo->respawnMask;
for (v3 = 0; v3 < jkPlayer_maxPlayers; v3++)
{
// Added: HACK for weird maps w/ <32 spawn points
if (!jkPlayer_playerInfos[v3].pSpawnSector && v3 < realMaxSpawns) {
realMaxSpawns = v3;
}
if ( ((1 << v3) & v5) == 0 )
{
*v4 = v3;
++v2;
++v4;
}
}
if ( !v2 )
return 0;
if ( v2 == 1 )
return v12[0];
v7 = (__int64)(_frand() * (double)v2);
if ( v7 > v2 - 1 )
v7 = v2 - 1;
while ( 1 )
{
v8 = v12[v7];
v8 = v8 % realMaxSpawns; // Added: HACK for weird maps w/ <32 spawn points
sithCollision_SearchRadiusForThings(
jkPlayer_playerInfos[v8].pSpawnSector,
0,
&jkPlayer_playerInfos[v8].spawnPosOrient.scale,
&rdroid_zeroVector3,
0.0,
pPlayerThing->moveSize,
1154);
for ( i = sithCollision_NextSearchResult(); i; i = sithCollision_NextSearchResult() )
{
if ( (i->hitType & SITHCOLLISION_THING) != 0 )
{
v10 = i->receiver;
if ( v10->type == SITH_THING_PLAYER && (v10->thingflags & (SITH_TF_DEAD|SITH_TF_WILLBEREMOVED)) == 0 )
break;
}
}
sithCollision_SearchClose();
if ( !i || v11 >= v2 )
break;
++v11;
v7 = (v7 + 1) % v2;
}
return v8;
}
void sithMulti_SyncScores()
{
sithNet_bSyncScores = 1;
}
void sithMulti_HandleDeath(sithPlayerInfo *pPlayerInfo, sithThing *pKilledThing, sithThing *pKilledByThing)
{
double v3; // st7
wchar_t *v4; // eax
wchar_t *v5; // eax
wchar_t *v6; // eax
wchar_t *v7; // [esp-8h] [ebp-114h]
wchar_t *v8; // [esp-8h] [ebp-114h]
sithPlayerInfo *v9; // [esp-4h] [ebp-110h]
sithPlayerInfo *v10; // [esp-4h] [ebp-110h]
wchar_t a1a[128]; // [esp+Ch] [ebp-100h] BYREF
++pPlayerInfo->numKilled;
if ( !pKilledByThing || pKilledByThing->type != SITH_THING_PLAYER )
{
v6 = sithStrTable_GetUniStringWithFallback("%s_DIED");
jk_snwprintf(a1a, 0x80u, v6, pPlayerInfo);
sithConsole_PrintUniStr(a1a);
goto LABEL_15;
}
if ( pKilledByThing != pKilledThing )
{
v10 = pKilledByThing->actorParams.playerinfo;
v5 = sithStrTable_GetUniStringWithFallback("%s_WAS_KILLED_BY_%s");
jk_snwprintf(a1a, 0x80u, v5, pPlayerInfo, v10);
sithConsole_PrintUniStr(a1a);
++pKilledByThing->actorParams.playerinfo->numKills;
sithMulti_ProcessScore();
return;
}
v3 = _frand() * 4.0;
if ( v3 < 1.0 )
{
v9 = pPlayerInfo;
v4 = sithStrTable_GetUniStringWithFallback("%s_COMMITTED_SUICIDE0");
LABEL_11:
jk_snwprintf(a1a, 0x80u, v4, v9);
goto LABEL_12;
}
if ( v3 >= 2.0 )
{
v9 = pPlayerInfo;
if ( v3 >= 3.0 )
{
v4 = sithStrTable_GetUniStringWithFallback("%s_COMMITTED_SUICIDE3");
goto LABEL_11;
}
v8 = sithStrTable_GetUniStringWithFallback("%s_COMMITTED_SUICIDE2");
jk_snwprintf(a1a, 0x80u, v8, pPlayerInfo);
}
else
{
v7 = sithStrTable_GetUniStringWithFallback("%s_COMMITTED_SUICIDE1");
jk_snwprintf(a1a, 0x80u, v7, pPlayerInfo);
}
LABEL_12:
sithConsole_PrintUniStr(a1a);
LABEL_15:
++pPlayerInfo->numSuicides;
sithMulti_ProcessScore();
}
// MOTS altered?
void sithMulti_ProcessScore()
{
int score_limit_met;
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_4) == 0 )
{
sithNet_teamScore[0] = 0;
sithNet_teamScore[1] = 0;
sithNet_teamScore[2] = 0;
sithNet_teamScore[3] = 0;
sithNet_teamScore[4] = 0;
for (int i = 0; i < jkPlayer_maxPlayers; i++)
{
int v4 = jkPlayer_playerInfos[i].numKills - jkPlayer_playerInfos[i].numSuicides;
jkPlayer_playerInfos[i].score = v4;
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_TEAMS) != 0 )
sithNet_teamScore[jkPlayer_playerInfos[i].teamNum] += v4;
}
}
sithNet_bSyncScores = 1;
if ( sithNet_isServer && (sithNet_MultiModeFlags & MULTIMODEFLAG_SCORELIMIT) != 0 )
{
score_limit_met = 0;
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_TEAMS) != 0 )
{
for (int i = 0; i < 5; i++)
{
if ( sithNet_teamScore[i] >= sithNet_scorelimit ) {
score_limit_met = 1;
sithMulti_infoPrintf("Team score limit met by team %d, %u pts of %u\n", i, sithNet_teamScore[i], sithNet_scorelimit);
}
}
}
else
{
for (int i = 0; i < jkPlayer_maxPlayers; i++)
{
if ( jkPlayer_playerInfos[i].score >= sithNet_scorelimit ) {
score_limit_met = 1;
sithMulti_infoPrintf("Player score limit met by player %d (netid %u), %u pts of %u\n", i, jkPlayer_playerInfos[i].net_id, jkPlayer_playerInfos[i].score, sithNet_scorelimit);
}
}
}
if ( score_limit_met )
{
wchar_t* v9 = sithStrTable_GetUniStringWithFallback("MULTI_SCORELIMIT");
stdString_WcharToChar(std_genBuffer, v9, 127);
std_genBuffer[127] = 0;
sithConsole_Print(std_genBuffer);
sithConsole_AlertSound();
uint32_t v10 = strlen(std_genBuffer) + 1;
if ( v10 >= 0x80 )
v10 = 128;
NETMSG_START;
//NETMSG_PUSHS16(1);// MOTS added
NETMSG_PUSHS32(-1);
NETMSG_PUSHS32(-1);
NETMSG_PUSHS32(v10);
NETMSG_PUSHSTR(std_genBuffer, v10);
NETMSG_END(DSS_CHAT);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, -1, 1, 1);
sithMulti_bTimelimitMet = 1;
sithNet_MultiModeFlags &= ~MULTIMODEFLAG_TIMELIMIT;
}
}
}
void sithMulti_EndLevel(unsigned int waitMs, int type)
{
if ( sithMulti_leaveJoinType != type || waitMs < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinType = type;
sithMulti_leaveJoinWaitMs = waitMs;
}
}
void sithMulti_SendWelcome(int a1, int playerIdx, int sendtoId)
{
NETMSG_START;
NETMSG_PUSHS32(playerIdx);
NETMSG_PUSHS32(a1);
NETMSG_PUSHWSTR(jkPlayer_playerInfos[playerIdx].player_name, 0x10);
NETMSG_END(DSS_WELCOME);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sendtoId, 1, 1);
}
void sithMulti_SendQuit(int idx)
{
if (!sithNet_isServer) return;
NETMSG_START;
NETMSG_PUSHS32(idx);
NETMSG_END(DSS_QUIT);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, idx, 1, 1);
}
int sithMulti_LobbyMessage()
{
int16_t v0; // bp
if ( sithNet_isServer )
{
if ( sithNet_bNeedsFullThingSyncForLeaveJoin )
{
if ( sithMulti_sendto_id )
{
NETMSG_START;
NETMSG_PUSHS32(3);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sithMulti_sendto_id, 1, 0);
}
sithNet_bNeedsFullThingSyncForLeaveJoin = 0;
sithMulti_sendto_id = 0;
stdComm_currentBigSyncStage = 2;
stdComm_dword_832208 = 0;
}
if ( stdComm_dword_8321F8 )
{
NETMSG_START;
NETMSG_PUSHS32(sithNet_MultiModeFlags);
for (int i = 0; i < 5; i++)
{
NETMSG_PUSHS32(sithNet_teamScore[i]);
}
v0 = 0;
for (int i = 0; i < jkPlayer_maxPlayers; i++ )
{
if ( (jkPlayer_playerInfos[i].flags & 1) != 0 )
++v0;
}
NETMSG_PUSHS16(v0);
for (int i = 0; i < jkPlayer_maxPlayers; i++)
{
sithPlayerInfo* v6 = &jkPlayer_playerInfos[i];
if ( (v6->flags & 1) != 0 )
{
NETMSG_PUSHWSTR(v6->multi_name, 0x20);
NETMSG_PUSHS16(v6->numKills);
NETMSG_PUSHS16(v6->numKilled);
NETMSG_PUSHS16(v6->numSuicides);
NETMSG_PUSHS16(v6->teamNum);
NETMSG_PUSHS32(v6->score);
}
}
DirectPlay_SendLobbyMessage(sithComm_netMsgTmp.pktData, NETMSG_LEN());
}
}
return stdComm_DoReceive();
}
int sithMulti_ProcessJoinLeave(sithCogMsg *msg)
{
int v1; // edi
int v2; // ebx
int v4; // ecx
int v5; // edx
sithPlayerInfo* v6; // eax
wchar_t *v8; // eax
wchar_t a1a[128]; // [esp+10h] [ebp-100h] BYREF
NETMSG_IN_START(msg);
v1 = NETMSG_POPS32();
v2 = NETMSG_POPS32();
NETMSG_POPWSTR(jkPlayer_playerInfos[v1].player_name, 0x10);
sithMulti_verbosePrintf("sithMulti_ProcessJoinLeave %x %x %x\n", v1, v2, stdComm_dplayIdSelf);
if ( v2 != stdComm_dplayIdSelf )
{
if ( (jkPlayer_playerInfos[v1].flags & 1) == 0 )
{
sithPlayer_sub_4C87C0(v1, v2);
v8 = sithStrTable_GetUniStringWithFallback("%s_HAS_JOINED_THE_GAME");
jk_snwprintf(a1a, 0x80u, v8, jkPlayer_playerInfos[v1].player_name);
sithConsole_PrintUniStr(a1a);
jkPlayer_playerInfos[v1].lastUpdateMs = sithTime_curMs;
if ( sithNet_isServer )
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_JOIN, 3, jkPlayer_playerInfos[v1].playerThing->thingIdx, 0, v1);
if ( sithMulti_handlerIdk )
sithMulti_handlerIdk();
sithDSSThing_SendSyncThing(sithPlayer_pLocalPlayerThing, -1, 255);
if ( sithNet_isServer )
sithNet_bSyncScores = 1;
}
return 1;
}
if ( (g_submodeFlags & 8) == 0 )
return 1;
v4 = jkPlayer_maxPlayers;
if ( jkPlayer_maxPlayers )
{
v5 = sithTime_curMs;
v6 = &jkPlayer_playerInfos[0];
do
{
v6->lastUpdateMs = v5;
v6++;
--v4;
}
while ( v4 );
}
g_submodeFlags &= ~8u;
sithThing_sub_4CCE60();
sithPlayer_sub_4C87C0(v1, v2);
sithPlayer_idk(v1);
sithPlayer_ResetPalEffects();
sithEvent_RegisterFunc(2, sithMulti_ServerLeft, sithNet_tickrate, 1);
sithComm_SetNeedsSync();
return 1;
}
int sithMulti_ProcessPing(sithCogMsg *msg)
{
msg->netMsg.cogMsgId = DSS_PINGREPLY;
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, msg->netMsg.thingIdx, 1, 0);
return 1;
}
int sithMulti_ProcessPingResponse(sithCogMsg *msg)
{
int v1; // eax
sithPlayerInfo* i; // ecx
if ( msg->pktData[0] == sithMulti_dword_832654 )
{
v1 = 0;
if ( jkPlayer_maxPlayers )
{
for ( i = &jkPlayer_playerInfos[0]; i->net_id != msg->netMsg.thingIdx; ++i )
{
if ( ++v1 >= jkPlayer_maxPlayers )
return 1;
}
_sprintf(std_genBuffer, "Ping time to %S is %d msec", jkPlayer_playerInfos[v1].player_name, sithTime_curMs - sithMulti_dword_832654);
sithConsole_Print(std_genBuffer);
}
}
return 1;
}
int sithMulti_ProcessQuit(sithCogMsg *msg)
{
wchar_t *v2; // eax
int v3; // eax
int v4; // edi
int v5; // esi
wchar_t *v6; // eax
wchar_t *v7; // eax
wchar_t a1a[128]; // [esp+Ch] [ebp-100h] BYREF
if ( msg->netMsg.thingIdx != sithNet_serverNetId )
return 0;
if ( msg->pktData[0] == stdComm_dplayIdSelf )
{
if ( sithMulti_leaveJoinType != 2 )
{
v2 = sithStrTable_GetUniStringWithFallback("MULTI_EJECTED");
sithConsole_PrintUniStr(v2);
sithConsole_AlertSound();
if ( sithMulti_leaveJoinType != 2 || sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinWaitMs = sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS;
sithMulti_leaveJoinType = 2;
return 1;
}
}
}
else
{
v3 = sithPlayer_ThingIdxToPlayerIdx(msg->pktData[0]);
v4 = v3;
if ( v3 >= 0 )
{
v5 = v3;
v6 = sithStrTable_GetUniStringWithFallback("%s_HAS_LEFT_THE_GAME");
jk_snwprintf(a1a, 0x80u, v6, &jkPlayer_playerInfos[v5]);
sithConsole_PrintUniStr(a1a);
sithConsole_AlertSound();
if ( jkPlayer_playerInfos[v5].net_id == sithNet_serverNetId )
{
v7 = sithStrTable_GetUniStringWithFallback("SERVER_LEFT_GAME");
sithConsole_PrintUniStr(v7);
sithConsole_AlertSound();
if ( sithMulti_leaveJoinType != 2 || sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinType = 2;
sithMulti_leaveJoinWaitMs = sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS;
}
}
sithSoundClass_StopSound(jkPlayer_playerInfos[v5].playerThing, 0);
sithPlayer_Startup(v4);
if ( sithNet_isServer )
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_LEAVE, 3, jkPlayer_playerInfos[v5].playerThing->thingIdx, 0, v4);
}
}
return 1;
}
int sithMulti_ServerLeft(int a, sithEventInfo* b)
{
unsigned int v0; // edi
sithPlayerInfo* v1; // esi
int v2; // eax
wchar_t *v3; // eax
wchar_t *v4; // eax
wchar_t *v6; // eax
wchar_t *v7; // eax
wchar_t a1[128]; // [esp+10h] [ebp-100h] BYREF
if ( sithWorld_pCurrentWorld && sithPlayer_pLocalPlayerThing && (g_submodeFlags & 8) == 0 )
sithDSSThing_SendPos(sithPlayer_pLocalPlayerThing, -1, 0);
if ( sithNet_isServer )
{
v0 = 1;
if ( jkPlayer_maxPlayers > 1 )
{
v1 = &jkPlayer_playerInfos[1];
do
{
if ( (v1->flags & 1) != 0 && sithTime_curMs > v1->lastUpdateMs + MULTI_TIMEOUT_MS )
{
v2 = v1->net_id;
if ( sithNet_isServer )
{
sithComm_netMsgTmp.pktData[0] = v1->net_id;
sithComm_netMsgTmp.netMsg.msg_size = 4;
sithComm_netMsgTmp.netMsg.flag_maybe = 0;
sithComm_netMsgTmp.netMsg.cogMsgId = DSS_QUIT;
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v2, 1, 1);
}
v3 = sithStrTable_GetUniStringWithFallback("%s_HAS_LEFT_THE_GAME");
jk_snwprintf(a1, 0x80u, v3, v1);
sithConsole_PrintUniStr(a1);
sithConsole_AlertSound();
if ( v1->net_id == sithNet_serverNetId )
{
v4 = sithStrTable_GetUniStringWithFallback("SERVER_LEFT_GAME");
sithConsole_PrintUniStr(v4);
sithConsole_AlertSound();
if ( sithMulti_leaveJoinType != 2 || sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinType = 2;
sithMulti_leaveJoinWaitMs = sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS;
}
}
sithSoundClass_StopSound(v1->playerThing, 0);
sithPlayer_Startup(v0);
if ( sithNet_isServer )
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_LEAVE, 3, v1->playerThing->thingIdx, 0, v0);
}
++v0;
++v1;
}
while ( v0 < jkPlayer_maxPlayers );
}
if ( sithMulti_lastScoreUpdateMs + MULTI_SCORE_UPDATE_INTERVAL_MS < sithTime_curMsAbsolute )
{
sithMulti_lastScoreUpdateMs = sithTime_curMsAbsolute;
sithNet_bSyncScores = 1;
return 1;
}
}
else if ( sithTime_curMs > jkPlayer_playerInfos[0].lastUpdateMs + MULTI_TIMEOUT_MS )
{
jkPlayer_playerInfos[0].lastUpdateMs = sithTime_curMs;
v6 = sithStrTable_GetUniStringWithFallback("%s_HAS_LEFT_THE_GAME");
jk_snwprintf(a1, 0x80u, v6, jkPlayer_playerInfos);
sithConsole_PrintUniStr(a1);
sithConsole_AlertSound();
if ( jkPlayer_playerInfos[0].net_id == sithNet_serverNetId )
{
v7 = sithStrTable_GetUniStringWithFallback("SERVER_LEFT_GAME");
sithConsole_PrintUniStr(v7);
sithConsole_AlertSound();
if ( sithMulti_leaveJoinType != 2 || sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinType = 2;
sithMulti_leaveJoinWaitMs = sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS;
}
}
sithSoundClass_StopSound(jkPlayer_playerInfos[0].playerThing, 0);
sithPlayer_Startup(0);
if ( sithNet_isServer )
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_LEAVE, 3, jkPlayer_playerInfos[0].playerThing->thingIdx, 0, 0);
}
return 1;
}
void sithMulti_SendLeaveJoin(int sendtoId, int bSync)
{
char v15[32]; // [esp+10h] [ebp-20h] BYREF
NETMSG_START;
NETMSG_PUSHS32(sithNet_MultiModeFlags);
NETMSG_PUSHS32(sithNet_serverNetId);
NETMSG_PUSHS16(jkPlayer_maxPlayers)
for (int i = 0; i < jkPlayer_maxPlayers; i++)
{
sithPlayerInfo* v6 = &jkPlayer_playerInfos[i];
NETMSG_PUSHS32((sithNet_isServer && jkGuiNetHost_bIsDedicated && !i) ? v6->flags & ~2 : v6->flags);
if ( (v6->flags & 4) != 0 )
{
NETMSG_PUSHS32(v6->net_id);
stdString_WcharToChar(v15, v6->player_name, 15);
v15[15] = 0;
NETMSG_PUSHSTR(v15, 0x10);
NETMSG_PUSHS16(v6->numKills);
NETMSG_PUSHS16(v6->numKilled);
NETMSG_PUSHS16(v6->numSuicides);
NETMSG_PUSHS16(v6->teamNum);
NETMSG_PUSHS16(v6->score); // why is this s16 here but s32 in LobbyMessage?
}
}
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_TEAMS) != 0 )
{
for (int i = 0; i < 5; i++)
{
NETMSG_PUSHS16(sithNet_teamScore[i]);
}
}
NETMSG_END(DSS_LEAVEJOIN);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sendtoId, 1, bSync);
}
int sithMulti_ProcessLeaveJoin(sithCogMsg *msg)
{
uint32_t v1; // eax
int v2; // edx
unsigned int v3; // ebp
uint32_t v4; // eax
sithPlayerInfo* v6; // edi
int v7; // ecx
int v8; // eax
wchar_t *v10; // eax
wchar_t *v12; // eax
wchar_t *v13; // eax
char a2[32]; // [esp+10h] [ebp-220h] BYREF
wchar_t a1a[128]; // [esp+30h] [ebp-200h] BYREF
wchar_t v22[128]; // [esp+130h] [ebp-100h] BYREF
NETMSG_IN_START(msg);
sithNet_MultiModeFlags = 0;
sithNet_serverNetId = 0;
sithNet_dword_8C4BA8 = 0;
v1 = stdPlatform_GetTimeMsec();
v2 = NETMSG_POPS32();
sithNet_dword_8C4BA8 = v1;
sithNet_serverNetId = NETMSG_POPS32();
v3 = 0;
v4 = NETMSG_POPS16();
sithNet_MultiModeFlags = v2;
jkPlayer_maxPlayers = v4;
for (v3 = 0; v3 < jkPlayer_maxPlayers; v3++)
{
v6 = &jkPlayer_playerInfos[v3];
v7 = v6->flags;
v6->flags = NETMSG_POPS32();
if ( (v6->flags & 4) != 0 )
{
v8 = NETMSG_POPS32();
v6->net_id = v8;
if ( (v6->flags & 1) == 0 || (v7 & 1) != 0 || (g_submodeFlags & 8) != 0 )
{
if ( !v6->net_id && (v7 & 1) != 0 && (g_submodeFlags & 8) == 0 )
{
v12 = sithStrTable_GetUniStringWithFallback("%s_HAS_LEFT_THE_GAME");
jk_snwprintf(v22, 0x80u, v12, v6);
sithConsole_PrintUniStr(v22);
sithConsole_AlertSound();
if ( v6->net_id == sithNet_serverNetId )
{
v13 = sithStrTable_GetUniStringWithFallback("SERVER_LEFT_GAME");
sithConsole_PrintUniStr(v13);
sithConsole_AlertSound();
if ( sithMulti_leaveJoinType != 2 || sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinType = 2;
sithMulti_leaveJoinWaitMs = sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS;
}
}
sithSoundClass_StopSound(v6->playerThing, 0);
sithPlayer_Startup(v3);
if ( sithNet_isServer )
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_LEAVE, 3, v6->playerThing->thingIdx, 0, v3);
}
}
else
{
v10 = sithStrTable_GetUniStringWithFallback("%s_HAS_JOINED_THE_GAME");
jk_snwprintf(a1a, 0x80u, v10, v6);
sithConsole_PrintUniStr(a1a);
v6->lastUpdateMs = sithTime_curMs;
if (sithNet_isServer)
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_JOIN, 3, v6->playerThing->thingIdx, 0, v3);
if ( sithMulti_handlerIdk )
sithMulti_handlerIdk();
sithDSSThing_SendSyncThing(sithPlayer_pLocalPlayerThing, -1, 255);
}
NETMSG_POPSTR(a2, 0x10);
stdString_CharToWchar(v6->player_name, a2, 15);
v6->numKills = NETMSG_POPS16();
v6->numKilled = NETMSG_POPS16();
v6->numSuicides = NETMSG_POPS16();
v6->teamNum = NETMSG_POPS16();
v6->score = NETMSG_POPS16();
}
}
if (sithNet_MultiModeFlags & MULTIMODEFLAG_TEAMS)
{
for (int i = 0; i < 5; i++)
{
sithNet_teamScore[i] = NETMSG_POPS16();
}
}
return 1;
}
void sithMulti_sub_4CA470(int a1)
{
uint32_t v1; // eax
sithPlayerInfo* v2; // ecx
int v3; // edi
wchar_t *v4; // eax
wchar_t *v5; // eax
wchar_t a1a[128]; // [esp+Ch] [ebp-100h] BYREF
if ( sithNet_bNeedsFullThingSyncForLeaveJoin && a1 == sithMulti_sendto_id )
{
if ( sithMulti_sendto_id )
{
sithComm_netMsgTmp.pktData[0] = 3;
sithComm_netMsgTmp.pktData[1] = 0;
sithComm_netMsgTmp.netMsg.msg_size = 8;
sithComm_netMsgTmp.netMsg.flag_maybe = 0;
sithComm_netMsgTmp.netMsg.cogMsgId = DSS_JOINING;
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sithMulti_sendto_id, 1, 0);
}
sithNet_bNeedsFullThingSyncForLeaveJoin = 0;
sithMulti_sendto_id = 0;
stdComm_currentBigSyncStage = 2;
stdComm_dword_832208 = 0;
}
v1 = 0;
if ( jkPlayer_maxPlayers )
{
v2 = &jkPlayer_playerInfos[0];
while ( a1 != v2->net_id )
{
++v1;
++v2;
if ( v1 >= jkPlayer_maxPlayers )
goto LABEL_10;
}
v3 = v1;
}
else
{
LABEL_10:
v3 = -1;
}
if ( v3 >= 0 )
{
v4 = sithStrTable_GetUniStringWithFallback("%s_HAS_LEFT_THE_GAME");
jk_snwprintf(a1a, 0x80u, v4, &jkPlayer_playerInfos[v3]);
sithConsole_PrintUniStr(a1a);
sithConsole_AlertSound();
if ( jkPlayer_playerInfos[v3].net_id == sithNet_serverNetId )
{
v5 = sithStrTable_GetUniStringWithFallback("SERVER_LEFT_GAME");
sithConsole_PrintUniStr(v5);
sithConsole_AlertSound();
if ( sithMulti_leaveJoinType != 2 || sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS < sithMulti_leaveJoinWaitMs )
{
sithMulti_leaveJoinType = 2;
sithMulti_leaveJoinWaitMs = sithTime_curMs + MULTI_LEAVEJOIN_DELAY_MS;
}
}
sithSoundClass_StopSound(jkPlayer_playerInfos[v3].playerThing, 0);
sithPlayer_Startup(v3);
if ( sithNet_isServer )
sithCog_SendSimpleMessageToAll(SITH_MESSAGE_LEAVE, 3, jkPlayer_playerInfos[v3].playerThing->thingIdx, 0, v3);
}
}
void sithMulti_InitTick(unsigned int tickrate)
{
sithNet_isMulti = 1;
sithNet_dword_83262C = stdComm_dplayIdSelf;
sithNet_serverNetId = 0;
sithNet_isServer = 0;
if ( tickrate < TICKRATE_MIN )
{
sithNet_tickrate = TICKRATE_MIN;
}
else if ( tickrate > TICKRATE_MAX )
{
sithNet_tickrate = TICKRATE_MAX;
}
else
{
sithNet_tickrate = tickrate;
}
sithNet_MultiModeFlags = 0;
sithNet_serverNetId = 0;
sithNet_dword_8C4BA8 = 0;
}
int sithMulti_ProcessJoinRequest(sithCogMsg *msg)
{
int v1; // esi
uint32_t v3; // eax
sithPlayerInfo* v4; // ecx
uint32_t v5; // ecx
sithPlayerInfo* v6; // eax
uint32_t v7; // eax
int *v8; // ecx
unsigned int v9; // eax
int v10; // ecx
char v11[32]; // [esp+Ch] [ebp-20h] BYREF
NETMSG_IN_START(msg);
v1 = msg->netMsg.thingIdx;
if ( stdComm_bIsServer && v1 )
{
NETMSG_POPSTR(v11, 32);
sithMulti_verbosePrintf("sithMulti_ProcessJoinRequest, id %x map %s\n", v1, v11);
if ( __strcmpi(v11, sithWorld_pCurrentWorld->map_jkl_fname) )
{
sithMulti_verbosePrintf("Bad map name %s\n", v11);
NETMSG_START;
NETMSG_PUSHS32(6);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
return 1;
}
for (v3 = 0; v3 < jkPlayer_maxPlayers; v3++)
{
v4 = &jkPlayer_playerInfos[v3];
if ( v4->net_id == v1 )
break;
}
if ( v3 < jkPlayer_maxPlayers )
{
sithMulti_verbosePrintf("Idk 2, %x %x\n", v3, jkPlayer_maxPlayers);
sithMulti_SendWelcome(v1, v3, v1);
return 1;
}
stdComm_cogMsg_SendEnumPlayers(v1);
if ( sithMulti_leaveJoinType )
{
sithMulti_verbosePrintf("Idk 1\n");
NETMSG_START;
NETMSG_PUSHS32(3);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
return 1;
}
if ( sithNet_bNeedsFullThingSyncForLeaveJoin )
{
if ( sithMulti_sendto_id == v1 )
{
sithMulti_verbosePrintf("idk 2\n");
NETMSG_START;
NETMSG_PUSHS32(0);
NETMSG_PUSHF32(0.5);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
return 1;
}
else
{
sithMulti_verbosePrintf("idk 3\n");
NETMSG_START;
NETMSG_PUSHS32(1);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
return 1;
}
}
for (v5 = 0; v5 < jkPlayer_maxPlayers; v5++)
{
v6 = &jkPlayer_playerInfos[v5];
if ( (v6->flags & 2) != 0 && !v6->net_id )
break;
}
if ( v5 == jkPlayer_maxPlayers )
{
sithMulti_verbosePrintf("Too many players\n");
NETMSG_START;
NETMSG_PUSHS32(5);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
return 1;
}
sithMulti_requestConnectIdx = v5;
DirectPlay_EnumPlayers(0);
v7 = 0;
for (v7 = 0; v7 < DirectPlay_numPlayers; v7++)
{
if (DirectPlay_aPlayers[v7].dpId == v1) break;
}
if ( v7 != DirectPlay_numPlayers )
{
sithMulti_verbosePrintf("aaaaaa %x\n", sithMulti_requestConnectIdx);
sithPlayer_sub_4C8910(sithMulti_requestConnectIdx);
NETMSG_POPWSTR(jkPlayer_playerInfos[sithMulti_requestConnectIdx].player_name, 0x10);
NETMSG_POPWSTR(jkPlayer_playerInfos[sithMulti_requestConnectIdx].multi_name, 0x20);
//jkPlayer_playerInfos[sithMulti_requestConnectIdx].net_id = v1; // Added?
//jkPlayer_playerInfos[sithMulti_requestConnectIdx].flags = 5;
uint32_t popped_check = NETMSG_POPS32();
v10 = sithNet_checksum;
if ( v10 != popped_check )
{
sithMulti_verbosePrintf("Bad checksum %x vs %x\n", v10, popped_check);
#if 0
NETMSG_START;
NETMSG_PUSHS32(4);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
return 1;
#endif
}
sithMulti_verbosePrintf("Sending the final\n");
NETMSG_START;
NETMSG_PUSHS32(0);
NETMSG_PUSHF32(0.25);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, v1, 1, 0);
sithMulti_SendLeaveJoin(v1, 0);
sithNet_bNeedsFullThingSyncForLeaveJoin = 1;
sithMulti_sendto_id = v1;
stdComm_currentBigSyncStage = 2;
stdComm_dword_832208 = 0;
stdComm_dword_832200 = 0;
stdComm_dword_832210 = 0;
sithNet_dword_832620 = 0;
}
}
return 1;
}
void stdComm_cogMsg_SendEnumPlayers(int sendtoId)
{
NETMSG_START_2;
DirectPlay_EnumPlayers(0);
NETMSG_PUSHU8(DirectPlay_numPlayers);
for (int i = 0; i < DirectPlay_numPlayers; i++)
{
NETMSG_PUSHS32(DirectPlay_aPlayers[i].dpId)
}
NETMSG_END_2(DSS_ENUMPLAYERS);
sithComm_SendMsgToPlayer(&stdComm_cogMsgTmp, sendtoId, 1, 1);
}
int stdComm_cogMsg_HandleEnumPlayers(sithCogMsg *msg)
{
int v2; // ebx
int v3; // edi
uint32_t v4; // eax
sithDplayPlayer* v5; // ecx
signed int result; // eax
NETMSG_IN_START(msg);
uint8_t arg0 = NETMSG_POPU8();
if ( !sithNet_isServer && !stdComm_dword_8321E8 && (g_submodeFlags & 8) != 0 )
{
DirectPlay_EnumPlayers(0);
v2 = 0;
if ( !arg0 )
{
LABEL_11:
result = 1;
stdComm_dword_8321E8 = 1;
return result;
}
while ( 1 )
{
v3 = NETMSG_POPS32();
for (v4 = 0; v4 < DirectPlay_numPlayers; v4++)
{
v5 = &DirectPlay_aPlayers[v4];
if ( v3 == v5->dpId )
break;
}
if ( v4 == DirectPlay_numPlayers )
break;
if ( ++v2 >= arg0 )
goto LABEL_11;
}
DirectPlay_StartSession(&stdComm_dplayIdSelf, jkPlayer_playerShortName);
}
return 1;
}
// MOTS altered
void sithMulti_HandleTimeLimit(int deltaMs)
{
unsigned int v2; // esi
sithSurface *v8; // edx
sithSurface *v9; // ecx
sithSector *v11; // esi
sithThing *v14; // esi
unsigned int deltaMsa; // [esp+18h] [ebp+4h]
if (!sithNet_isMulti)
return;
sithThing_Sync();
sithSurface_Sync();
sithSector_Sync();
if ( sithMulti_leaveJoinType && sithTime_curMs > sithMulti_leaveJoinWaitMs )
{
if ( sithMulti_leaveJoinType == 1 )
{
sithMulti_leaveJoinType = 0;
sithMain_SetEndLevel();
}
else if ( sithMulti_leaveJoinType == 2 )
{
sithMulti_leaveJoinType = 0;
sithMain_set_sithmode_5();
}
}
else if ( sithNet_isServer )
{
if ( sithNet_bSyncScores )
{
sithNet_bSyncScores = 0;
sithMulti_SendLeaveJoin(-1, 0);
}
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_TIMELIMIT) != 0 && sithTime_curMs > sithNet_multiplayer_timelimit )
{
stdString_WcharToChar(std_genBuffer, sithStrTable_GetUniStringWithFallback("MULTI_TIMELIMIT"), 127);
std_genBuffer[127] = 0;
sithConsole_Print(std_genBuffer);
sithConsole_AlertSound();
v2 = strlen(std_genBuffer) + 1;
if ( v2 >= 0x80 )
v2 = 128;
NETMSG_START;
NETMSG_PUSHS32(-1);
NETMSG_PUSHS32(-1);
NETMSG_PUSHS32(v2);
NETMSG_PUSHSTR(std_genBuffer, v2);
NETMSG_END(DSS_CHAT);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, -1, 1, 1);
sithMulti_bTimelimitMet = 1;
sithNet_MultiModeFlags &= ~MULTIMODEFLAG_TIMELIMIT;
}
if ( sithNet_bNeedsFullThingSyncForLeaveJoin )
{
if ( sithMulti_leaveJoinType )
{
if ( sithMulti_sendto_id )
{
NETMSG_START;
NETMSG_PUSHS32(3);
NETMSG_PUSHS32(0);
NETMSG_END(DSS_JOINING);
sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sithMulti_sendto_id, 1, 0);
}
sithNet_bNeedsFullThingSyncForLeaveJoin = 0;
sithMulti_sendto_id = 0;
stdComm_currentBigSyncStage = 2;
stdComm_dword_832208 = 0;
}
else
{
uint32_t update_steps = (sithMulti_dword_832664 + deltaMs) / MULTI_BIG_UPDATE_INTERVAL_MS;
sithMulti_dword_832664 = (sithMulti_dword_832664 + deltaMs) - MULTI_BIG_UPDATE_INTERVAL_MS * update_steps;
//printf("steps %x %x %x\n", update_steps, stdComm_currentBigSyncStage, stdComm_dword_832208);
for (int i = 0; i < update_steps; i++)
{
switch ( stdComm_currentBigSyncStage )
{
case 1:
while (stdComm_dword_832208 < sithWorld_pCurrentWorld->numSectors)
{
v11 = &sithWorld_pCurrentWorld->sectors[stdComm_dword_832208++];
if (v11->flags & SITH_SECTOR_SYNC )
{
sithDSS_SendSectorStatus(v11, sithMulti_sendto_id, 1);
break;
}
else if (v11->flags & SITH_SECTOR_ADJOINS_SET)
{
sithDSS_SendSectorFlags(v11, sithMulti_sendto_id, 1);
break;
}
}
if ( stdComm_dword_832208 >= sithWorld_pCurrentWorld->numSectors )
{
stdComm_dword_832208 = 0;
stdComm_currentBigSyncStage = 3;
stdComm_dword_832208 = 0;
}
++stdComm_dword_832210;
continue;
case 2:
while (stdComm_dword_832208 < sithWorld_pCurrentWorld->numSurfaces)
{
v8 = &sithWorld_pCurrentWorld->surfaces[stdComm_dword_832208++];
if (v8->surfaceFlags & SITH_SURFACE_CHANGED)
{
sithDSS_SendSurfaceStatus(v8, sithMulti_sendto_id, 1);
break;
}
}
if ( stdComm_dword_832208 >= sithWorld_pCurrentWorld->numSurfaces )
{
stdComm_dword_832208 = 0;
stdComm_currentBigSyncStage = 1;
stdComm_dword_832208 = 0;
}
++stdComm_dword_832200;
continue;
case 3:
// Sync stage 3 (TODO: is there an off-by-one here...? not touching it for now.)
while (stdComm_dword_832208 <= sithWorld_pCurrentWorld->numThings)
{
v14 = &sithWorld_pCurrentWorld->things[stdComm_dword_832208++];
if ( sithThing_ShouldSync(v14) )
{
if ( v14->type != SITH_THING_WEAPON && v14->type != SITH_THING_EXPLOSION )
{
if ( (v14->thing_id & 0xFFFF0000) != 0 )
sithDSSThing_SendFullDesc(v14, sithMulti_sendto_id, 1);
else
sithDSSThing_SendSyncThing(v14, sithMulti_sendto_id, 1);
sithDSSThing_SendPos(v14, sithMulti_sendto_id, 0);
// Added: co-op
if (v14->type == SITH_THING_CORPSE || ((v14->type == SITH_THING_ACTOR || v14->type == SITH_THING_PLAYER) && v14->thingflags & SITH_TF_DEAD)) {
//sithDSSThing_SendSyncThing(v14, sithMulti_sendto_id, 1);
//sithDSS_SendSyncAI(v14->actor, sithMulti_sendto_id, 1);
if (v14->rdthing.puppet)
sithDSS_SendSyncPuppet(v14, sithMulti_sendto_id, 255);
}
}
}
}
if (stdComm_dword_832208 > sithWorld_pCurrentWorld->numThings)
{
stdComm_dword_832208 = 0;
stdComm_currentBigSyncStage = 4;
stdComm_dword_832208 = 0;
}
++sithNet_dword_832620;
continue;
case 4:
if ( stdComm_dword_832208 >= sithMulti_dword_83265C
|| (sithDSSThing_SendDestroyThing(sithMulti_arr_832218[stdComm_dword_832208], sithMulti_sendto_id),
++stdComm_dword_832208,
stdComm_dword_832208 >= sithMulti_dword_83265C) )
{
if ( (sithNet_MultiModeFlags & MULTIMODEFLAG_TEAMS) != 0 && (sithNet_MultiModeFlags & MULTIMODEFLAG_100) != 0 )
jkPlayer_playerInfos[sithMulti_requestConnectIdx].teamNum = (sithMulti_requestConnectIdx & 1) + 1;
sithMulti_verbosePrintf("Last sync %x %x\n", sithMulti_sendto_id, sithMulti_requestConnectIdx);
jkPlayer_playerInfos[sithMulti_requestConnectIdx].net_id = sithMulti_sendto_id;
sithMulti_SendLeaveJoin(sithMulti_sendto_id, 1);
sithMulti_SendWelcome(sithMulti_sendto_id, sithMulti_requestConnectIdx, sithMulti_sendto_id);
sithNet_bNeedsFullThingSyncForLeaveJoin = 0;
sithMulti_sendto_id = 0;
stdComm_currentBigSyncStage = 2;
stdComm_dword_832208 = 0;
sithNet_bSyncScores = 1;
}
continue;
default:
return;
}
}
}
}
}
}
uint32_t sithMulti_IterPlayersnothingidk(int net_id)
{
uint32_t result; // eax
sithPlayerInfo* i; // ecx
result = 0;
if ( !jkPlayer_maxPlayers )
return -1;
for ( i = &jkPlayer_playerInfos[0]; net_id != i->net_id; ++i )
{
if ( ++result >= jkPlayer_maxPlayers )
return -1;
}
return result;
}
int sithMulti_SendPing(int sendtoId)
{
sithMulti_dword_832654 = sithTime_curMs;
sithComm_netMsgTmp.pktData[0] = sithTime_curMs;
sithComm_netMsgTmp.netMsg.msg_size = 4;
sithComm_netMsgTmp.netMsg.flag_maybe = 0;
sithComm_netMsgTmp.netMsg.cogMsgId = DSS_PING;
return sithComm_SendMsgToPlayer(&sithComm_netMsgTmp, sendtoId, 1, 0);
}
|
894497bdacd8012d4a907d2eb5dca2e979939b0c
|
28d0f8c01599f8f6c711bdde0b59f9c2cd221203
|
/sys/dev/ofw/ofw_subr.c
|
e0532a5ad8d8ebeba611b0412e6b9fb00473d0f8
|
[] |
no_license
|
NetBSD/src
|
1a9cbc22ed778be638b37869ed4fb5c8dd616166
|
23ee83f7c0aea0777bd89d8ebd7f0cde9880d13c
|
refs/heads/trunk
| 2023-08-31T13:24:58.105962
| 2023-08-27T15:50:47
| 2023-08-27T15:50:47
| 88,439,547
| 656
| 348
| null | 2023-07-20T20:07:24
| 2017-04-16T20:03:43
| null |
UTF-8
|
C
| false
| false
| 16,219
|
c
|
ofw_subr.c
|
/* $NetBSD: ofw_subr.c,v 1.60 2022/01/22 11:49:18 thorpej Exp $ */
/*
* Copyright (c) 2021 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Copyright 1998
* Digital Equipment Corporation. All rights reserved.
*
* This software is furnished under license and may be used and
* copied only in accordance with the following terms and conditions.
* Subject to these conditions, you may download, copy, install,
* use, modify and distribute this software in source and/or binary
* form. No title or ownership is transferred hereby.
*
* 1) Any source code used, modified or distributed must reproduce
* and retain this copyright notice and list of conditions as
* they appear in the source file.
*
* 2) No right is granted to use any trade name, trademark, or logo of
* Digital Equipment Corporation. Neither the "Digital Equipment
* Corporation" name nor any trademark or logo of Digital Equipment
* Corporation may be used to endorse or promote products derived
* from this software without the prior written permission of
* Digital Equipment Corporation.
*
* 3) This software is provided "AS-IS" and any express or implied
* warranties, including but not limited to, any implied warranties
* of merchantability, fitness for a particular purpose, or
* non-infringement are disclaimed. In no event shall DIGITAL be
* liable for any damages whatsoever, and in particular, DIGITAL
* shall not be liable for special, indirect, consequential, or
* incidental damages or damages for lost profits, loss of
* revenue or loss of use, whether such damages arise in contract,
* negligence, tort, under statute, in equity, at law or otherwise,
* even if advised of the possibility of such damage.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.60 2022/01/22 11:49:18 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
#include <sys/kmem.h>
#include <sys/systm.h>
#include <sys/device_calls.h>
#include <dev/ofw/openfirm.h>
#define OFW_MAX_STACK_BUF_SIZE 256
#define OFW_PATH_BUF_SIZE 512
/*
* OpenFirmware device handle support.
*/
static device_call_t
of_devhandle_lookup_device_call(devhandle_t handle, const char *name,
devhandle_t *call_handlep)
{
__link_set_decl(of_device_calls, struct device_call_descriptor);
struct device_call_descriptor * const *desc;
__link_set_foreach(desc, of_device_calls) {
if (strcmp((*desc)->name, name) == 0) {
return (*desc)->call;
}
}
return NULL;
}
static const struct devhandle_impl of_devhandle_impl = {
.type = DEVHANDLE_TYPE_OF,
.lookup_device_call = of_devhandle_lookup_device_call,
};
devhandle_t
devhandle_from_of(devhandle_t super_handle, int phandle)
{
devhandle_type_t super_type = devhandle_type(super_handle);
devhandle_t handle = { 0 };
if (super_type == DEVHANDLE_TYPE_OF) {
handle.impl = super_handle.impl;
} else {
KASSERT(super_type == DEVHANDLE_TYPE_INVALID);
handle.impl = &of_devhandle_impl;
}
handle.integer = phandle;
return handle;
}
int
devhandle_to_of(devhandle_t const handle)
{
KASSERT(devhandle_type(handle) == DEVHANDLE_TYPE_OF);
return handle.integer;
}
static int
of_device_enumerate_children(device_t dev, devhandle_t call_handle, void *v)
{
struct device_enumerate_children_args *args = v;
int phandle = devhandle_to_of(call_handle);
int child;
for (child = OF_child(phandle); child != 0; child = OF_peer(child)) {
if (!args->callback(dev, devhandle_from_of(call_handle, child),
args->callback_arg)) {
break;
}
}
return 0;
}
OF_DEVICE_CALL_REGISTER(DEVICE_ENUMERATE_CHILDREN_STR,
of_device_enumerate_children)
/*
* int of_decode_int(p)
*
* This routine converts OFW encoded-int datums
* into the integer format of the host machine.
*
* It is primarily used to convert integer properties
* returned by the OF_getprop routine.
*
* Arguments:
* p pointer to unsigned char array which is an
* OFW-encoded integer.
*
* Return Value:
* Decoded integer value of argument p.
*
* Side Effects:
* None.
*/
int
of_decode_int(const unsigned char *p)
{
unsigned int i = *p++ << 8;
i = (i + *p++) << 8;
i = (i + *p++) << 8;
return (i + *p);
}
/*
* int of_compatible(phandle, strings)
*
* This routine checks an OFW node's "compatible" entry to see if
* it matches any of the provided strings.
*
* of_compatible_match() is the preferred way to perform driver
* compatibility match. However, this routine that deals with
* only strings is useful in some situations and is provided for
* convenience.
*
* Arguments:
* phandle OFW phandle of device to be checked for
* compatibility.
* strings Array of containing expected "compatibility"
* property values, presence of any of which
* indicates compatibility.
*
* Return Value:
* 0 if none of the strings are found in phandle's "compatibility"
* property, or the reverse index of the matching string in the
* phandle's "compatibility" property plus 1.
*
* Side Effects:
* None.
*/
int
of_compatible(int phandle, const char * const *strings)
{
char *prop, propbuf[OFW_MAX_STACK_BUF_SIZE];
const char *cp;
int proplen, match = 0;
proplen = OF_getproplen(phandle, "compatible");
if (proplen <= 0) {
return 0;
}
prop = kmem_tmpbuf_alloc(proplen, propbuf, sizeof(propbuf), KM_SLEEP);
if (OF_getprop(phandle, "compatible", prop, proplen) != proplen) {
goto out;
}
for (; (cp = *strings) != NULL; strings++) {
if ((match = strlist_match(prop, proplen, cp)) != 0) {
break;
}
}
out:
kmem_tmpbuf_free(prop, proplen, propbuf);
return match;
}
/*
* int of_compatible_match(phandle, compat_data)
*
* This routine searches an array of device_compatible_entry structures
* for a matching "compatible" entry matching the supplied OFW node,
* and returns a weighted match value corresponding to which string
* from the "compatible" property was matched, which more weight given
* to the first string than the last.
*
* It should be used when determining whether a driver can drive
* a particular device.
*
* Arguments:
* phandle OFW phandle of device to be checked for
* compatibility.
* compat_data Array of possible compat entry strings and
* associated metadata. The last entry in the
* list should have a "compat" of NULL to terminate
* the list.
*
* Return Value:
* 0 if none of the strings are found in phandle's "compatibility"
* property, or a positive number based on the reverse index of the
* matching string in the phandle's "compatibility" property, plus 1.
*
* Side Effects:
* None.
*/
int
of_compatible_match(int phandle,
const struct device_compatible_entry *compat_data)
{
char *prop, propbuf[OFW_MAX_STACK_BUF_SIZE];
int proplen, match = 0;
proplen = OF_getproplen(phandle, "compatible");
if (proplen <= 0) {
return 0;
}
prop = kmem_tmpbuf_alloc(proplen, propbuf, sizeof(propbuf), KM_SLEEP);
if (OF_getprop(phandle, "compatible", prop, proplen) != proplen) {
goto out;
}
match = device_compatible_match_strlist(prop, proplen, compat_data);
out:
kmem_tmpbuf_free(prop, proplen, propbuf);
return match;
}
/*
* const struct device_compatible_entry *of_compatible_lookup(phandle,
* compat_data)
*
* This routine searches an array of device_compatible_entry structures
* for a "compatible" entry matching the supplied OFW node.
*
* Arguments:
* phandle OFW phandle of device to be checked for
* compatibility.
* compat_data Array of possible compat entry strings and
* associated metadata. The last entry in the
* list should have a "compat" of NULL to terminate
* the list.
*
* Return Value:
* The first matching compat_data entry in the array. If no matches
* are found, NULL is returned.
*
* Side Effects:
* None.
*/
const struct device_compatible_entry *
of_compatible_lookup(int phandle,
const struct device_compatible_entry *compat_data)
{
char *prop, propbuf[OFW_MAX_STACK_BUF_SIZE];
const struct device_compatible_entry *match = NULL;
int proplen;
proplen = OF_getproplen(phandle, "compatible");
if (proplen <= 0) {
return 0;
}
prop = kmem_tmpbuf_alloc(proplen, propbuf, sizeof(propbuf), KM_SLEEP);
if (OF_getprop(phandle, "compatible", prop, proplen) != proplen) {
goto out;
}
match = device_compatible_lookup_strlist(prop, proplen, compat_data);
out:
kmem_tmpbuf_free(prop, proplen, propbuf);
return match;
}
/*
* int of_packagename(phandle, buf, bufsize)
*
* This routine places the last component of an OFW node's name
* into a user-provided buffer.
*
* It can be used during autoconfiguration to make printing of
* device names more informative.
*
* Arguments:
* phandle OFW phandle of device whose name name is
* desired.
* buf Buffer to contain device name, provided by
* caller. (For now, must be at least 4
* bytes long.)
* bufsize Length of buffer referenced by 'buf', in
* bytes.
*
* Return Value:
* -1 if the device path name could not be obtained or would
* not fit in the allocated temporary buffer, or zero otherwise
* (meaning that the leaf node name was successfully extracted).
*
* Side Effects:
* If the leaf node name was successfully extracted, 'buf' is
* filled in with at most 'bufsize' bytes of the leaf node
* name. If the leaf node was not successfully extracted, a
* somewhat meaningful string is placed in the buffer. In
* either case, the contents of 'buf' will be NUL-terminated.
*/
int
of_packagename(int phandle, char *buf, int bufsize)
{
char *pbuf;
const char *lastslash;
int l, rv;
pbuf = kmem_alloc(OFW_PATH_BUF_SIZE, KM_SLEEP);
l = OF_package_to_path(phandle, pbuf, OFW_PATH_BUF_SIZE);
/* check that we could get the name, and that it's not too long. */
if (l < 0 ||
(l == OFW_PATH_BUF_SIZE && pbuf[OFW_PATH_BUF_SIZE - 1] != '\0')) {
if (bufsize >= 25)
snprintf(buf, bufsize, "??? (phandle 0x%x)", phandle);
else if (bufsize >= 4)
strlcpy(buf, "???", bufsize);
else
panic("of_packagename: bufsize = %d is silly",
bufsize);
rv = -1;
} else {
pbuf[l] = '\0';
lastslash = strrchr(pbuf, '/');
strlcpy(buf, (lastslash == NULL) ? pbuf : (lastslash + 1),
bufsize);
rv = 0;
}
kmem_free(pbuf, OFW_PATH_BUF_SIZE);
return (rv);
}
/*
* Find the first child of a given node that matches name. Does not recurse.
*/
int
of_find_firstchild_byname(int node, const char *name)
{
char namex[32];
int nn;
for (nn = OF_child(node); nn; nn = OF_peer(nn)) {
memset(namex, 0, sizeof(namex));
if (OF_getprop(nn, "name", namex, sizeof(namex)) == -1)
continue;
if (strcmp(name, namex) == 0)
return nn;
}
return -1;
}
/*
* Find a child node that is compatible with str. Recurses, starting at node.
*/
int
of_find_bycompat(int node, const char *str)
{
const char * compatible[] = { str, NULL };
int child, ret;
for (child = OF_child(node); child; child = OF_peer(child)) {
if (of_compatible(child, compatible))
return child;
ret = of_find_bycompat(child, str);
if (ret != -1)
return ret;
}
return -1;
}
/*
* Find a give node by name. Recurses, and seems to walk upwards too.
*/
int
of_getnode_byname(int start, const char *target)
{
int node, next;
char name[64];
if (start == 0)
start = OF_peer(0);
for (node = start; node; node = next) {
memset(name, 0, sizeof name);
OF_getprop(node, "name", name, sizeof name - 1);
if (strcmp(name, target) == 0)
break;
if ((next = OF_child(node)) != 0)
continue;
while (node) {
if ((next = OF_peer(node)) != 0)
break;
node = OF_parent(node);
}
}
/* XXX is this correct? */
return node;
}
/*
* Create a uint32_t integer property from an OFW node property.
*/
bool
of_to_uint32_prop(prop_dictionary_t dict, int node, const char *ofname,
const char *propname)
{
uint32_t prop;
if (OF_getprop(node, ofname, &prop, sizeof(prop)) != sizeof(prop))
return FALSE;
return(prop_dictionary_set_uint32(dict, propname, prop));
}
/*
* Create a data property from an OFW node property. Max size of 256bytes.
*/
bool
of_to_dataprop(prop_dictionary_t dict, int node, const char *ofname,
const char *propname)
{
int len;
uint8_t prop[256];
len = OF_getprop(node, ofname, prop, 256);
if (len < 1)
return FALSE;
return prop_dictionary_set_data(dict, propname, prop, len);
}
/*
* look at output-device, see if there's a Sun-typical video mode specifier as
* in screen:r1024x768x60 attached. If found copy it into *buffer, otherwise
* return NULL
*/
char *
of_get_mode_string(char *buffer, int len)
{
int options;
char *pos, output_device[256];
/*
* finally, let's see if there's a video mode specified in
* output-device and pass it on so there's at least some way
* to program video modes
*/
options = OF_finddevice("/options");
if ((options == 0) || (options == -1))
return NULL;
if (OF_getprop(options, "output-device", output_device, 256) == 0)
return NULL;
/* find the mode string if there is one */
pos = strstr(output_device, ":r");
if (pos == NULL)
return NULL;
strncpy(buffer, pos + 2, len);
return buffer;
}
/*
* of_device_from_phandle --
*
* Return a device_t associated with the specified phandle.
*
* This is expected to be used rarely, so we don't care if
* it's fast. Also, it can only find devices that have
* gone through of_device_register() (obviously).
*/
device_t
of_device_from_phandle(int phandle)
{
devhandle_t devhandle;
deviter_t di;
device_t dev;
for (dev = deviter_first(&di, DEVITER_F_ROOT_FIRST);
dev != NULL;
dev = deviter_next(&di)) {
devhandle = device_handle(dev);
if (devhandle_type(devhandle) == DEVHANDLE_TYPE_OF) {
if (devhandle_to_of(devhandle) == phandle) {
/* Found it! */
break;
}
}
}
deviter_release(&di);
return dev;
}
/*
* Returns true if the specified property is present.
*/
bool
of_hasprop(int node, const char *prop)
{
return OF_getproplen(node, prop) >= 0;
}
/*
* Get the value of a uint32 property, compensating for host byte order.
* Returns 0 on success, non-zero on failure.
*/
int
of_getprop_uint32(int node, const char *prop, uint32_t *val)
{
uint32_t v;
int len;
len = OF_getprop(node, prop, &v, sizeof(v));
if (len != sizeof(v))
return -1;
*val = be32toh(v);
return 0;
}
int
of_getprop_uint32_array(int node, const char *prop, uint32_t *array, int n)
{
uint32_t *v = array;
int len;
len = OF_getprop(node, prop, array, n * sizeof(*v));
if (len < (int)(n * sizeof(*v)))
return -1;
for (; n > 0; n--) {
BE32TOH(*v);
v++;
}
return 0;
}
/*
* Get the value of a uint64 property, compensating for host byte order.
* Returns 0 on success, non-zero on failure.
*/
int
of_getprop_uint64(int node, const char *prop, uint64_t *val)
{
uint64_t v;
int len;
len = OF_getprop(node, prop, &v, sizeof(v));
if (len != sizeof(v))
return -1;
*val = be64toh(v);
return 0;
}
|
e79197df20080f4ffa485ca69e970f1c857fd03c
|
99bdb3251fecee538e0630f15f6574054dfc1468
|
/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/GD32F4xx_usb_library/device/class/dfu/Source/dfu_mem.c
|
b5c1a040cec0ec854a04977487c88e3839fb9e23
|
[
"Zlib",
"LicenseRef-scancode-proprietary-license",
"MIT",
"BSD-3-Clause",
"X11",
"BSD-4-Clause-UC",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
RT-Thread/rt-thread
|
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
|
3602f891211904a27dcbd51e5ba72fefce7326b2
|
refs/heads/master
| 2023-09-01T04:10:20.295801
| 2023-08-31T16:20:55
| 2023-08-31T16:20:55
| 7,408,108
| 9,599
| 5,805
|
Apache-2.0
| 2023-09-14T13:37:26
| 2013-01-02T14:49:21
|
C
|
UTF-8
|
C
| false
| false
| 7,306
|
c
|
dfu_mem.c
|
/*!
\file dfu_mem.c
\brief USB DFU device media access layer functions
\version 2020-08-01, V3.0.0, firmware for GD32F4xx
\version 2022-03-09, V3.1.0, firmware for GD32F4xx
\version 2022-06-30, V3.2.0, firmware for GD32F4xx
*/
/*
Copyright (c) 2022, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
#include "dfu_mem.h"
#include "drv_usb_hw.h"
#include "usbd_transc.h"
extern usb_core_driver usb_dfu_dev;
extern struct {
uint8_t buf[TRANSFER_SIZE];
uint16_t data_len;
uint16_t block_num;
uint32_t base_addr;
} prog;
dfu_mem_prop* mem_tab[MAX_USED_MEMORY_MEDIA] = {
&dfu_inter_flash_cb,
&dfu_nor_flash_cb,
&dfu_nand_flash_cb,
};
/* The list of memory interface string descriptor pointers. This list
can be updated whenever a memory has to be added or removed */
const uint8_t* USBD_DFU_StringDesc[MAX_USED_MEMORY_MEDIA] =
{
(const uint8_t *)INTER_FLASH_IF_STR,
(const uint8_t *)NOR_FLASH_IF_STR,
(const uint8_t *)NAND_FLASH_IF_STR
};
static uint8_t dfu_mem_checkaddr (uint32_t addr);
/*!
\brief initialize the memory media on the GD32
\param[in] none
\param[out] none
\retval MEM_OK
*/
uint8_t dfu_mem_init (void)
{
uint32_t mem_index = 0U;
/* initialize all supported memory medias */
for (mem_index = 0U; mem_index < MAX_USED_MEMORY_MEDIA; mem_index++) {
/* check if the memory media exists */
if (NULL != mem_tab[mem_index]->mem_init) {
mem_tab[mem_index]->mem_init();
}
}
return MEM_OK;
}
/*!
\brief deinitialize the memory media on the GD32
\param[in] none
\param[out] none
\retval MEM_OK
*/
uint8_t dfu_mem_deinit (void)
{
uint32_t mem_index = 0U;
/* deinitialize all supported memory medias */
for (mem_index = 0U; mem_index < MAX_USED_MEMORY_MEDIA; mem_index++) {
/* check if the memory media exists */
if (NULL != mem_tab[mem_index]->mem_deinit) {
mem_tab[mem_index]->mem_deinit();
}
}
return MEM_OK;
}
/*!
\brief erase a memory sector
\param[in] addr: memory sector address/code
\param[out] none
\retval MEM_OK
*/
uint8_t dfu_mem_erase (uint32_t addr)
{
uint32_t mem_index = dfu_mem_checkaddr(addr);
/* check if the address is in protected area */
if (IS_PROTECTED_AREA(addr)) {
return MEM_FAIL;
}
if (mem_index < MAX_USED_MEMORY_MEDIA) {
/* check if the operation is supported */
if (NULL != mem_tab[mem_index]->mem_erase) {
return mem_tab[mem_index]->mem_erase(addr);
} else {
return MEM_FAIL;
}
} else {
return MEM_FAIL;
}
}
/*!
\brief write data to sectors of memory
\param[in] buf: the data buffer to be write
\param[in] addr: memory sector address/code
\param[in] len: data length
\param[out] none
\retval MEM_OK
*/
uint8_t dfu_mem_write (uint8_t *buf, uint32_t addr, uint32_t len)
{
uint32_t mem_index = dfu_mem_checkaddr(addr);
/* check if the address is in protected area */
if (IS_PROTECTED_AREA(addr)) {
return MEM_FAIL;
}
if ((addr & MAL_MASK_OB) == OB_RDPT0) {
option_byte_write(addr, buf);
NVIC_SystemReset();
return MEM_OK;
}
if (mem_index < MAX_USED_MEMORY_MEDIA) {
/* check if the operation is supported */
if (NULL != mem_tab[mem_index]->mem_write) {
return mem_tab[mem_index]->mem_write(buf, addr, len);
} else {
return MEM_FAIL;
}
} else {
return MEM_FAIL;
}
}
/*!
\brief read data from sectors of memory
\param[in] buf: the data buffer to be write
\param[in] addr: memory sector address/code
\param[in] len: data length
\param[out] none
\retval pointer to buffer
*/
uint8_t* dfu_mem_read (uint8_t *buf, uint32_t addr, uint32_t len)
{
uint32_t mem_index = 0U;
if ((OB_RDPT0 != addr) && (OB_RDPT1 != addr)) {
mem_index = dfu_mem_checkaddr(addr);
}
if (mem_index < MAX_USED_MEMORY_MEDIA) {
/* check if the operation is supported */
if (NULL != mem_tab[mem_index]->mem_read) {
return mem_tab[mem_index]->mem_read(buf, addr, len);
} else {
return buf;
}
} else {
return buf;
}
}
/*!
\brief get the status of a given memory and store in buffer
\param[in] addr: memory sector address/code
\param[in] cmd: 0 for erase and 1 for write
\param[in] buffer: pointer to the buffer where the status data will be stored
\param[out] none
\retval MEM_OK if all operations are OK, MEM_FAIL else
*/
uint8_t dfu_mem_getstatus (uint32_t addr, uint8_t cmd, uint8_t *buffer)
{
uint32_t mem_index = dfu_mem_checkaddr(addr);
if (mem_index < MAX_USED_MEMORY_MEDIA) {
if (cmd & 0x01U) {
POLLING_TIMEOUT_SET(mem_tab[mem_index]->write_timeout);
} else {
POLLING_TIMEOUT_SET(mem_tab[mem_index]->erase_timeout);
}
return MEM_OK;
} else {
return MEM_FAIL;
}
}
/*!
\brief check the address is supported
\param[in] addr: memory sector address/code
\param[out] none
\retval index of the addressed memory
*/
static uint8_t dfu_mem_checkaddr (uint32_t addr)
{
uint8_t mem_index = 0U;
/* check with all supported memories */
for (mem_index = 0U; mem_index < MAX_USED_MEMORY_MEDIA; mem_index++) {
/* if the check address is supported, return the memory index */
if (MEM_OK == mem_tab[mem_index]->mem_checkaddr(addr)) {
return mem_index;
}
}
/* if there is no memory found, return MAX_USED_MEMORY_MEDIA */
return (MAX_USED_MEMORY_MEDIA);
}
|
737db432ea5af322e6a6e29259be53976af7294d
|
79d343002bb63a44f8ab0dbac0c9f4ec54078c3a
|
/lib/libc/glibc/include/errno.h
|
c361a785c24b928fd3f6b58ef11090b0efb9390b
|
[
"MIT",
"LicenseRef-scancode-inner-net-2.0",
"LGPL-2.1-or-later",
"BSD-3-Clause",
"HPND",
"LicenseRef-scancode-pcre",
"LicenseRef-scancode-other-copyleft",
"ISC",
"LicenseRef-scancode-other-permissive",
"Spencer-94",
"SunPro",
"CMU-Mach"
] |
permissive
|
ziglang/zig
|
4aa75d8d3bcc9e39bf61d265fd84b7f005623fc5
|
f4c9e19bc3213c2bc7e03d7b06d7129882f39f6c
|
refs/heads/master
| 2023-08-31T13:16:45.980913
| 2023-08-31T05:50:29
| 2023-08-31T05:50:29
| 40,276,274
| 25,560
| 2,399
|
MIT
| 2023-09-14T21:09:50
| 2015-08-06T00:51:28
|
Zig
|
UTF-8
|
C
| false
| false
| 1,083
|
h
|
errno.h
|
#ifndef _ERRNO_H
#include <stdlib/errno.h>
#if !defined _ISOMAC && !defined __ASSEMBLER__
# if IS_IN (rtld)
# include <dl-sysdep.h>
# ifndef RTLD_PRIVATE_ERRNO
# error "dl-sysdep.h must define RTLD_PRIVATE_ERRNO!"
# endif
# else
# define RTLD_PRIVATE_ERRNO 0
# endif
# if RTLD_PRIVATE_ERRNO
/* The dynamic linker uses its own private errno variable.
All access to errno inside the dynamic linker is serialized,
so a single (hidden) global variable is all it needs. */
# undef errno
# define errno rtld_errno
extern int rtld_errno attribute_hidden;
# elif IS_IN_LIB && !IS_IN (rtld)
# undef errno
# if IS_IN (libc)
# define errno __libc_errno
# else
# define errno errno /* For #ifndef errno tests. */
# endif
extern __thread int errno attribute_tls_model_ie;
# endif /* IS_IN_LIB */
# define __set_errno(val) (errno = (val))
extern int *__errno_location (void) __THROW __attribute_const__
# if RTLD_PRIVATE_ERRNO
attribute_hidden
# endif
;
libc_hidden_proto (__errno_location)
#endif /* !_ISOMAC && !__ASSEMBLER__ */
#endif /* !_ERRNO_H */
|
32545acaf3ea0e200bcf9ba331e39a48f1f41ee4
|
591045a1915d1f2c0f13174fb1dfee9043e50d17
|
/src/filesystem.c
|
8a916b9a63b8e1b5f4aea1295f07b502cae35587
|
[
"ISC"
] |
permissive
|
Tangent128/luasdl2
|
d599e8c04ce7f14833e2ce13217973913a2bddc2
|
5dbcdc70869e50b4e53bdc894f587eacd34a9010
|
refs/heads/master
| 2023-08-18T16:07:22.799736
| 2022-06-08T15:53:27
| 2022-06-08T15:53:27
| 27,103,407
| 404
| 103
|
ISC
| 2022-11-08T05:06:58
| 2014-11-25T01:26:14
|
C
|
UTF-8
|
C
| false
| false
| 1,849
|
c
|
filesystem.c
|
/*
* filesystem.c -- filesystem functions
*
* Copyright (c) 2013, 2014 David Demelier <markand@malikania.fr>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "filesystem.h"
/*
* SDL.getBasePath()
*
* Returns:
* The base directory where the application runs or nil on failure
* The error message
*/
static int
l_getBasePath(lua_State *L)
{
char *str = SDL_GetBasePath();
if (str == NULL)
return commonPushSDLError(L, 1);
lua_pushstring(L, str);
SDL_free(str);
return 1;
}
/*
* SDL.getPrefPath(organization, application)
*
* Arguments:
* organization the organization name
* application the application name
*
* Returns:
* The directory or nil on failure
* The error message
*/
static int
l_getPrefPath(lua_State *L)
{
const char *organization = luaL_checkstring(L, 1);
const char *application = luaL_checkstring(L, 2);
char *str = SDL_GetPrefPath(organization, application);
if (str == NULL)
return commonPushSDLError(L, 1);
lua_pushstring(L, str);
SDL_free(str);
return 1;
}
const luaL_Reg FilesystemFunctions[] = {
{ "getBasePath", l_getBasePath },
{ "getPrefPath", l_getPrefPath },
{ NULL, NULL }
};
|
b184ab79a9a91a23120458081d866e2602a7be23
|
ab2d9dd46478aaeddd9dba4b3c6453c832c86f2d
|
/src/blogc-git-receiver/pre-receive.h
|
ab19c472b71a1437b4bd2a5b3c6390a2f4495da7
|
[
"BSD-3-Clause"
] |
permissive
|
blogc/blogc
|
e30ba50bbb8ee311405e69fa77091c2e0859fac8
|
f35e7ab6965d4da9779e948de71d23892954c1c7
|
refs/heads/master
| 2023-03-15T23:25:59.113703
| 2023-03-05T23:31:09
| 2023-03-05T23:31:09
| 33,968,989
| 223
| 25
|
BSD-3-Clause
| 2018-01-18T13:56:46
| 2015-04-15T02:36:12
|
C
|
UTF-8
|
C
| false
| false
| 335
|
h
|
pre-receive.h
|
/*
* blogc: A blog compiler.
* Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br>
*
* This program can be distributed under the terms of the BSD License.
* See the file LICENSE.
*/
#ifndef _PRE_RECEIVE_H
#define _PRE_RECEIVE_H
int bgr_pre_receive_hook(int argc, char *argv[]);
#endif /* _PRE_RECEIVE_H */
|
24b667cfeab5ed1244b177c868b28c6af4906f86
|
94096248c1de2dcf46e69ca913cedfa290e44224
|
/tests/api/test-dev-cmodule-guide.c
|
446f4265a55082115964518870f894f3c347e301
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
svaarala/duktape
|
612110d1a6db46226c171cfd222974b1b3651ad5
|
5e169deafbbd12823665f5d30fb4c4c04e3dfa26
|
refs/heads/master
| 2023-08-06T16:43:33.014729
| 2022-11-17T21:02:08
| 2022-11-17T21:02:08
| 15,852,088
| 4,796
| 610
|
MIT
| 2023-09-11T17:13:01
| 2014-01-12T22:16:14
|
JavaScript
|
UTF-8
|
C
| false
| false
| 3,531
|
c
|
test-dev-cmodule-guide.c
|
/*
* Module example from guide, as a more concrete test case.
*/
/* Include duktape.h and whatever platform headers are needed. */
#include "duktape.h"
/* No longer applicable because module framework is no longer built in. */
/*---
skip: true
---*/
static duk_ret_t my_print(duk_context *ctx) {
duk_push_string(ctx, " ");
duk_insert(ctx, 0);
duk_join(ctx, duk_get_top(ctx) - 1);
printf("%s\n", duk_safe_to_string(ctx, -1));
return 0;
}
/*
* Duktape/C functions providing module functionality.
*/
static duk_ret_t my_func_1(duk_context *ctx) {
printf("my_func_1() called\n");
return 0;
}
static duk_ret_t my_func_2(duk_context *ctx) {
printf("my_func_2() called\n");
return 0;
}
/*
* Module initialization
*/
static const duk_function_list_entry my_module_funcs[] = {
{ "func1", my_func_1, 3 /*nargs*/ },
{ "func2", my_func_2, DUK_VARARGS /*nargs*/ },
{ NULL, NULL, 0 }
};
static const duk_number_list_entry my_module_consts[] = {
{ "FLAG_FOO", (double) (1 << 0) },
{ NULL, 0.0 }
};
static duk_ret_t dukopen_my_module(duk_context *ctx) {
duk_push_object(ctx);
duk_put_function_list(ctx, -1, my_module_funcs);
duk_put_number_list(ctx, -1, my_module_consts);
return 1;
}
/*
* Calling code
*/
/*===
*** test_use_module (duk_safe_call)
my_func_2() called
final top: 0
==> rc=0, result='undefined'
===*/
static duk_ret_t test_use_module(duk_context *ignored_ctx, void *udata) {
duk_context *ctx;
(void) udata;
ctx = duk_create_heap_default();
if (!ctx) {
printf("Failed to create heap\n");
return 0;
}
duk_push_c_function(ctx, dukopen_my_module, 0);
duk_call(ctx, 0);
duk_put_global_string(ctx, "my_module");
duk_eval_string_noresult(ctx, "my_module.func2()");
printf("final top: %ld\n", (long) duk_get_top(ctx));
duk_destroy_heap(ctx);
return 0;
}
/*
* Example of how a modSearch() function can use module.exports to return
* the C module initialization value.
*/
/*===
*** test_modsearch_module (duk_safe_call)
1
my_func_1() called
final top: 0
==> rc=0, result='undefined'
===*/
static duk_ret_t my_modsearch(duk_context *ctx) {
/* Arguments: id, require, exports, module.
*
* The 'id' is ignored in this example, normally you'd use 'id' to
* select which module to initialize.
*/
/* Initialize the C module. */
duk_push_c_function(ctx, dukopen_my_module, 0);
duk_call(ctx, 0);
/* Result is now on stack top. Overwrite module.exports to make
* that value come out from require().
*/
/* [ id require exports module c_module ] */
duk_put_prop_string(ctx, 3 /*module*/, "exports"); /* module.exports = c_module; */
return 0; /* return undefined, no ECMAScript source code */
}
static duk_ret_t test_modsearch_module(duk_context *ignored_ctx, void *udata) {
duk_context *ctx;
(void) udata;
ctx = duk_create_heap_default();
if (!ctx) {
printf("Failed to create heap\n");
return 0;
}
/* Dummy print() binding. */
duk_push_c_function(ctx, my_print, 1);
duk_put_global_string(ctx, "print");
/* Register Duktape.modSearch. */
duk_eval_string(ctx, "(function (fun) { Duktape.modSearch = fun; })");
duk_push_c_function(ctx, my_modsearch, 4 /*nargs*/);
duk_call(ctx, 1);
duk_pop(ctx);
/* Require test. */
duk_eval_string_noresult(ctx, "var mod = require('my_module'); print(mod.FLAG_FOO); mod.func1();");
printf("final top: %ld\n", (long) duk_get_top(ctx));
duk_destroy_heap(ctx);
return 0;
}
/*
* Main
*/
void test(duk_context *ctx) {
TEST_SAFE_CALL(test_use_module);
TEST_SAFE_CALL(test_modsearch_module);
}
|
f23332653e165c6084c40e20d510ed3b9306bc5a
|
e1cddfd754d952134e72dfd03522c5ea4fb6008e
|
/src/vlib/buffer.h
|
b548adf4be8c5a17fd11c943486ebc8c9b7f6c5b
|
[
"Apache-2.0"
] |
permissive
|
FDio/vpp
|
0ad30fa1bec2975ffa6b66b45c9f4f32163123b6
|
f234b0d4626d7e686422cc9dfd25958584f4931e
|
refs/heads/master
| 2023-08-31T16:09:04.068646
| 2022-03-14T09:49:15
| 2023-08-31T09:50:00
| 96,556,718
| 1,048
| 630
|
Apache-2.0
| 2023-06-21T05:39:17
| 2017-07-07T16:29:40
|
C
|
UTF-8
|
C
| false
| false
| 15,696
|
h
|
buffer.h
|
/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* buffer.h: VLIB buffers
*
* Copyright (c) 2008 Eliot Dresselhaus
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef included_vlib_buffer_h
#define included_vlib_buffer_h
#include <vppinfra/types.h>
#include <vppinfra/cache.h>
#include <vppinfra/serialize.h>
#include <vppinfra/vector.h>
#include <vppinfra/lock.h>
#include <vlib/error.h> /* for vlib_error_t */
#include <vlib/config.h> /* for __PRE_DATA_SIZE */
#define VLIB_BUFFER_PRE_DATA_SIZE __PRE_DATA_SIZE
#define VLIB_BUFFER_DEFAULT_DATA_SIZE (2048)
/* Minimum buffer chain segment size. Does not apply to last buffer in chain.
Dataplane code can safely asume that specified amount of data is not split
into 2 chained buffers */
#define VLIB_BUFFER_MIN_CHAIN_SEG_SIZE (128)
/* Amount of head buffer data copied to each replica head buffer */
#define VLIB_BUFFER_CLONE_HEAD_SIZE (256)
/** \file
vlib buffer structure definition and a few select
access methods. This structure and the buffer allocation
mechanism should perhaps live in vnet, but it would take a lot
of typing to make it so.
*/
/**
* Buffer Flags
*/
#define foreach_vlib_buffer_flag \
_( 0, IS_TRACED, 0) \
_( 1, NEXT_PRESENT, "next-present") \
_( 2, TOTAL_LENGTH_VALID, 0) \
_( 3, EXT_HDR_VALID, "ext-hdr-valid")
/* NOTE: only buffer generic flags should be defined here, please consider
using user flags. i.e. src/vnet/buffer.h */
enum
{
#define _(bit, name, v) VLIB_BUFFER_##name = (1 << (bit)),
foreach_vlib_buffer_flag
#undef _
};
enum
{
#define _(bit, name, v) VLIB_BUFFER_LOG2_##name = (bit),
foreach_vlib_buffer_flag
#undef _
};
/* User defined buffer flags. */
#define LOG2_VLIB_BUFFER_FLAG_USER(n) (32 - (n))
#define VLIB_BUFFER_FLAG_USER(n) (1 << LOG2_VLIB_BUFFER_FLAG_USER(n))
#define VLIB_BUFFER_FLAGS_ALL (0x0f)
/** \brief Compile time buffer trajectory tracing option
Turn this on if you run into "bad monkey" contexts,
and you want to know exactly which nodes they've visited...
See vlib/main.c...
*/
#ifndef VLIB_BUFFER_TRACE_TRAJECTORY
#define VLIB_BUFFER_TRACE_TRAJECTORY 0
#endif /* VLIB_BUFFER_TRACE_TRAJECTORY */
/** VLIB buffer representation. */
typedef union
{
struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
/** signed offset in data[], pre_data[] that we are currently
* processing. If negative current header points into predata area. */
i16 current_data;
/** Nbytes between current data and the end of this buffer. */
u16 current_length;
/** buffer flags:
<br> VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,
<br> VLIB_BUFFER_IS_TRACED: trace this buffer.
<br> VLIB_BUFFER_NEXT_PRESENT: this is a multi-chunk buffer.
<br> VLIB_BUFFER_TOTAL_LENGTH_VALID: as it says
<br> VLIB_BUFFER_EXT_HDR_VALID: buffer contains valid external buffer manager header,
set to avoid adding it to a flow report
<br> VLIB_BUFFER_FLAG_USER(n): user-defined bit N
*/
u32 flags;
/** Generic flow identifier */
u32 flow_id;
/** Reference count for this buffer. */
volatile u8 ref_count;
/** index of buffer pool this buffer belongs. */
u8 buffer_pool_index;
/** Error code for buffers to be enqueued to error handler. */
vlib_error_t error;
/** Next buffer for this linked-list of buffers. Only valid if
* VLIB_BUFFER_NEXT_PRESENT flag is set. */
u32 next_buffer;
/** The following fields can be in a union because once a packet enters
* the punt path, it is no longer on a feature arc */
union
{
/** Used by feature subgraph arcs to visit enabled feature nodes */
u32 current_config_index;
/* the reason the packet once punted */
u32 punt_reason;
};
/** Opaque data used by sub-graphs for their own purposes. */
u32 opaque[10];
/** part of buffer metadata which is initialized on alloc ends here. */
STRUCT_MARK (template_end);
/** start of 2nd half (2nd cacheline on systems where cacheline size is 64) */
CLIB_ALIGN_MARK (second_half, 64);
/** Specifies trace buffer handle if VLIB_PACKET_IS_TRACED flag is
* set. */
u32 trace_handle;
/** Only valid for first buffer in chain. Current length plus total length
* given here give total number of bytes in buffer chain. */
u32 total_length_not_including_first_buffer;
/**< More opaque data, see ../vnet/vnet/buffer.h */
u32 opaque2[14];
#if VLIB_BUFFER_TRACE_TRAJECTORY > 0
/** trace trajectory data - we use a specific cacheline for that in the
* buffer when it is compiled-in */
#define VLIB_BUFFER_TRACE_TRAJECTORY_MAX 31
#define VLIB_BUFFER_TRACE_TRAJECTORY_SZ 64
#define VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b) (b)->trajectory_nb = 0
CLIB_ALIGN_MARK (trajectory, 64);
u16 trajectory_nb;
u16 trajectory_trace[VLIB_BUFFER_TRACE_TRAJECTORY_MAX];
#else /* VLIB_BUFFER_TRACE_TRAJECTORY */
#define VLIB_BUFFER_TRACE_TRAJECTORY_SZ 0
#define VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b)
#endif /* VLIB_BUFFER_TRACE_TRAJECTORY */
/** start of buffer headroom */
CLIB_ALIGN_MARK (headroom, 64);
/** Space for inserting data before buffer start. Packet rewrite string
* will be rewritten backwards and may extend back before
* buffer->data[0]. Must come directly before packet data. */
u8 pre_data[VLIB_BUFFER_PRE_DATA_SIZE];
/** Packet data */
u8 data[];
};
#ifdef CLIB_HAVE_VEC128
u8x16 as_u8x16[4];
#endif
#ifdef CLIB_HAVE_VEC256
u8x32 as_u8x32[2];
#endif
#ifdef CLIB_HAVE_VEC512
u8x64 as_u8x64[1];
#endif
} vlib_buffer_t;
STATIC_ASSERT_SIZEOF (vlib_buffer_t, 128 + VLIB_BUFFER_TRACE_TRAJECTORY_SZ +
VLIB_BUFFER_PRE_DATA_SIZE);
STATIC_ASSERT (VLIB_BUFFER_PRE_DATA_SIZE % CLIB_CACHE_LINE_BYTES == 0,
"VLIB_BUFFER_PRE_DATA_SIZE must be divisible by cache line size");
#define VLIB_BUFFER_HDR_SIZE (sizeof(vlib_buffer_t) - VLIB_BUFFER_PRE_DATA_SIZE)
/** \brief Prefetch buffer metadata.
The first 64 bytes of buffer contains most header information
@param b - (vlib_buffer_t *) pointer to the buffer
@param type - LOAD, STORE. In most cases, STORE is the right answer
*/
#define vlib_prefetch_buffer_header(b,type) CLIB_PREFETCH (b, 64, type)
#define vlib_prefetch_buffer_data(b,type) \
CLIB_PREFETCH (vlib_buffer_get_current(b), CLIB_CACHE_LINE_BYTES, type)
always_inline void
vlib_buffer_struct_is_sane (vlib_buffer_t * b)
{
ASSERT (sizeof (b[0]) % 64 == 0);
/* Rewrite data must be before and contiguous with packet data. */
ASSERT (b->pre_data + VLIB_BUFFER_PRE_DATA_SIZE == b->data);
}
always_inline uword
vlib_buffer_get_va (vlib_buffer_t * b)
{
return pointer_to_uword (b->data);
}
/** \brief Get pointer to current data to process
@param b - (vlib_buffer_t *) pointer to the buffer
@return - (void *) (b->data + b->current_data)
*/
always_inline void *
vlib_buffer_get_current (vlib_buffer_t * b)
{
/* Check bounds. */
ASSERT ((signed) b->current_data >= (signed) -VLIB_BUFFER_PRE_DATA_SIZE);
return b->data + b->current_data;
}
always_inline uword
vlib_buffer_get_current_va (vlib_buffer_t * b)
{
return vlib_buffer_get_va (b) + b->current_data;
}
/** \brief Advance current data pointer by the supplied (signed!) amount
@param b - (vlib_buffer_t *) pointer to the buffer
@param l - (word) signed increment
*/
always_inline void
vlib_buffer_advance (vlib_buffer_t * b, word l)
{
ASSERT (b->current_length >= l);
b->current_data += l;
b->current_length -= l;
ASSERT ((b->flags & VLIB_BUFFER_NEXT_PRESENT) == 0 ||
b->current_length >= VLIB_BUFFER_MIN_CHAIN_SEG_SIZE);
}
/** \brief Check if there is enough space in buffer to advance
@param b - (vlib_buffer_t *) pointer to the buffer
@param l - (word) size to check
@return - 0 if there is less space than 'l' in buffer
*/
always_inline u8
vlib_buffer_has_space (vlib_buffer_t * b, word l)
{
return b->current_length >= l;
}
/** \brief Reset current header & length to state they were in when
packet was received.
@param b - (vlib_buffer_t *) pointer to the buffer
*/
always_inline void
vlib_buffer_reset (vlib_buffer_t * b)
{
b->current_length += clib_max (b->current_data, 0);
b->current_data = 0;
}
/** \brief Get pointer to buffer's opaque data array
@param b - (vlib_buffer_t *) pointer to the buffer
@return - (void *) b->opaque
*/
always_inline void *
vlib_get_buffer_opaque (vlib_buffer_t * b)
{
return (void *) b->opaque;
}
/** \brief Get pointer to buffer's opaque2 data array
@param b - (vlib_buffer_t *) pointer to the buffer
@return - (void *) b->opaque2
*/
always_inline void *
vlib_get_buffer_opaque2 (vlib_buffer_t * b)
{
return (void *) b->opaque2;
}
/** \brief Get pointer to the end of buffer's data
* @param b pointer to the buffer
* @return pointer to tail of packet's data
*/
always_inline u8 *
vlib_buffer_get_tail (vlib_buffer_t * b)
{
return b->data + b->current_data + b->current_length;
}
/** \brief Append uninitialized data to buffer
* @param b pointer to the buffer
* @param size number of uninitialized bytes
* @return pointer to beginning of uninitialized data
*/
always_inline void *
vlib_buffer_put_uninit (vlib_buffer_t * b, u16 size)
{
void *p = vlib_buffer_get_tail (b);
/* XXX make sure there's enough space */
b->current_length += size;
return p;
}
/** \brief Prepend uninitialized data to buffer
* @param b pointer to the buffer
* @param size number of uninitialized bytes
* @return pointer to beginning of uninitialized data
*/
always_inline void *
vlib_buffer_push_uninit (vlib_buffer_t * b, u8 size)
{
ASSERT (b->current_data + VLIB_BUFFER_PRE_DATA_SIZE >= size);
b->current_data -= size;
b->current_length += size;
return vlib_buffer_get_current (b);
}
/** \brief Make head room, typically for packet headers
* @param b pointer to the buffer
* @param size number of head room bytes
* @return pointer to start of buffer (current data)
*/
always_inline void *
vlib_buffer_make_headroom (vlib_buffer_t * b, u8 size)
{
b->current_data += size;
return vlib_buffer_get_current (b);
}
/** \brief Construct a trace handle from thread and pool index
* @param thread Thread id
* @param pool_index Pool index
* @return trace handle
*/
always_inline u32
vlib_buffer_make_trace_handle (u32 thread, u32 pool_index)
{
u32 rv;
ASSERT (thread < 0xff);
ASSERT (pool_index < 0x00FFFFFF);
rv = (thread << 24) | (pool_index & 0x00FFFFFF);
return rv;
}
/** \brief Extract the thread id from a trace handle
* @param trace_handle the trace handle
* @return the thread id
*/
always_inline u32
vlib_buffer_get_trace_thread (vlib_buffer_t * b)
{
u32 trace_handle = b->trace_handle;
return trace_handle >> 24;
}
/** \brief Extract the trace (pool) index from a trace handle
* @param trace_handle the trace handle
* @return the trace index
*/
always_inline u32
vlib_buffer_get_trace_index (vlib_buffer_t * b)
{
u32 trace_handle = b->trace_handle;
return trace_handle & 0x00FFFFFF;
}
/** \brief Retrieve bytes from buffer head
* @param b pointer to the buffer
* @param size number of bytes to pull
* @return pointer to start of buffer (current data)
*/
always_inline void *
vlib_buffer_pull (vlib_buffer_t * b, u8 size)
{
if (b->current_length + VLIB_BUFFER_PRE_DATA_SIZE < size)
return 0;
void *data = vlib_buffer_get_current (b);
vlib_buffer_advance (b, size);
return data;
}
/* Forward declaration. */
struct vlib_main_t;
#define VLIB_BUFFER_POOL_PER_THREAD_CACHE_SZ 512
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
u32 cached_buffers[VLIB_BUFFER_POOL_PER_THREAD_CACHE_SZ];
u32 n_cached;
} vlib_buffer_pool_thread_t;
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
uword start;
uword size;
uword log2_page_size;
u8 index;
u32 numa_node;
u32 physmem_map_index;
u32 data_size;
u32 n_buffers;
u32 n_avail;
u32 *buffers;
u8 *name;
clib_spinlock_t lock;
/* per-thread data */
vlib_buffer_pool_thread_t *threads;
/* buffer metadata template */
vlib_buffer_t buffer_template;
} vlib_buffer_pool_t;
#define VLIB_BUFFER_MAX_NUMA_NODES 32
typedef u32 (vlib_buffer_alloc_free_callback_t) (struct vlib_main_t *vm,
u8 buffer_pool_index,
u32 *buffers, u32 n_buffers);
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
/* Virtual memory address and size of buffer memory, used for calculating
buffer index */
uword buffer_mem_start;
uword buffer_mem_size;
vlib_buffer_pool_t *buffer_pools;
vlib_buffer_alloc_free_callback_t *alloc_callback_fn;
vlib_buffer_alloc_free_callback_t *free_callback_fn;
u8 default_buffer_pool_index_for_numa[VLIB_BUFFER_MAX_NUMA_NODES];
/* config */
u32 buffers_per_numa;
u16 ext_hdr_size;
u32 default_data_size;
clib_mem_page_sz_t log2_page_size;
/* Hash table mapping buffer index into number
0 => allocated but free, 1 => allocated and not-free.
If buffer index is not in hash table then this buffer
has never been allocated. */
uword *buffer_known_hash;
clib_spinlock_t buffer_known_hash_lockp;
/* logging */
vlib_log_class_t log_default;
} vlib_buffer_main_t;
clib_error_t *vlib_buffer_main_init (struct vlib_main_t *vm);
format_function_t format_vlib_buffer_pool_all;
int vlib_buffer_set_alloc_free_callback (
struct vlib_main_t *vm, vlib_buffer_alloc_free_callback_t *alloc_callback_fn,
vlib_buffer_alloc_free_callback_t *free_callback_fn);
extern u16 __vlib_buffer_external_hdr_size;
#define VLIB_BUFFER_SET_EXT_HDR_SIZE(x) \
static void __clib_constructor \
vnet_buffer_set_ext_hdr_size() \
{ \
if (__vlib_buffer_external_hdr_size) \
clib_error ("buffer external header space already set"); \
__vlib_buffer_external_hdr_size = CLIB_CACHE_LINE_ROUND (x); \
}
#endif /* included_vlib_buffer_h */
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/
|
2fbb616fa232b91ab4c59389a0af02ea60d3374b
|
0fa1152e1e434ce9fe9e2db95f43f25675bf7d27
|
/src/modules/navigator/precland_params.c
|
9c2e63ac32585ff30f97ec457d70a022b0156796
|
[
"BSD-3-Clause"
] |
permissive
|
PX4/PX4-Autopilot
|
4cc90dccc9285ca4db7f595ac5a7547df02ca92e
|
3d61ab84c42ff8623bd48ff0ba74f9cf26bb402b
|
refs/heads/main
| 2023-08-30T23:58:35.398450
| 2022-03-26T01:29:03
| 2023-08-30T15:40:01
| 5,298,790
| 3,146
| 3,798
|
BSD-3-Clause
| 2023-09-14T17:22:04
| 2012-08-04T21:19:36
|
C++
|
UTF-8
|
C
| false
| false
| 3,406
|
c
|
precland_params.c
|
/****************************************************************************
*
* Copyright (c) 2017 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file precland_params.c
*
* Parameters for precision landing.
*
* @author Nicolas de Palezieux (Sunflower Labs) <ndepal@gmail.com>
*/
/**
* Landing Target Timeout
*
* Time after which the landing target is considered lost without any new measurements.
*
* @unit s
* @min 0.0
* @max 50
* @decimal 1
* @increment 0.5
* @group Precision Land
*/
PARAM_DEFINE_FLOAT(PLD_BTOUT, 5.0f);
/**
* Horizontal acceptance radius
*
* Start descending if closer above landing target than this.
*
* @unit m
* @min 0.0
* @max 10
* @decimal 2
* @increment 0.1
* @group Precision Land
*/
PARAM_DEFINE_FLOAT(PLD_HACC_RAD, 0.2f);
/**
* Final approach altitude
*
* Allow final approach (without horizontal positioning) if losing landing target closer than this to the ground.
*
* @unit m
* @min 0.0
* @max 10
* @decimal 2
* @increment 0.1
* @group Precision Land
*/
PARAM_DEFINE_FLOAT(PLD_FAPPR_ALT, 0.1f);
/**
* Search altitude
*
* Altitude above home to which to climb when searching for the landing target.
*
* @unit m
* @min 0.0
* @max 100
* @decimal 1
* @increment 0.1
* @group Precision Land
*/
PARAM_DEFINE_FLOAT(PLD_SRCH_ALT, 10.0f);
/**
* Search timeout
*
* Time allowed to search for the landing target before falling back to normal landing.
*
* @unit s
* @min 0.0
* @max 100
* @decimal 1
* @increment 0.1
* @group Precision Land
*/
PARAM_DEFINE_FLOAT(PLD_SRCH_TOUT, 10.0f);
/**
* Maximum number of search attempts
*
* Maximum number of times to search for the landing target if it is lost during the precision landing.
*
* @min 0
* @max 100
* @group Precision Land
*/
PARAM_DEFINE_INT32(PLD_MAX_SRCH, 3);
|
07ba16ab754ec6b59b567d1857cc69bd71ba7627
|
42ab733e143d02091d13424fb4df16379d5bba0d
|
/third_party/libsdl2/include/SDL_rect.h
|
543bb618694ea9d4b5383e71a7c35b666b9e754c
|
[
"Zlib",
"Apache-2.0",
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
google/filament
|
11cd37ac68790fcf8b33416b7d8d8870e48181f0
|
0aa0efe1599798d887fa6e33c412c09e81bea1bf
|
refs/heads/main
| 2023-08-29T17:58:22.496956
| 2023-08-28T17:27:38
| 2023-08-28T17:27:38
| 143,455,116
| 16,631
| 1,961
|
Apache-2.0
| 2023-09-14T16:23:39
| 2018-08-03T17:26:00
|
C++
|
UTF-8
|
C
| false
| false
| 4,445
|
h
|
SDL_rect.h
|
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* \file SDL_rect.h
*
* Header file for SDL_rect definition and management functions.
*/
#ifndef SDL_rect_h_
#define SDL_rect_h_
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_pixels.h"
#include "SDL_rwops.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* \brief The structure that defines a point
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
*/
typedef struct SDL_Point
{
int x;
int y;
} SDL_Point;
/**
* \brief A rectangle, with the origin at the upper left.
*
* \sa SDL_RectEmpty
* \sa SDL_RectEquals
* \sa SDL_HasIntersection
* \sa SDL_IntersectRect
* \sa SDL_UnionRect
* \sa SDL_EnclosePoints
*/
typedef struct SDL_Rect
{
int x, y;
int w, h;
} SDL_Rect;
/**
* \brief Returns true if point resides inside a rectangle.
*/
SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
{
return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
(p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
}
/**
* \brief Returns true if the rectangle has no area.
*/
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
{
return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
}
/**
* \brief Returns true if the two rectangles are equal.
*/
SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
{
return (a && b && (a->x == b->x) && (a->y == b->y) &&
(a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
}
/**
* \brief Determine whether two rectangles intersect.
*
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
const SDL_Rect * B);
/**
* \brief Calculate the intersection of two rectangles.
*
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
const SDL_Rect * B,
SDL_Rect * result);
/**
* \brief Calculate the union of two rectangles.
*/
extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
const SDL_Rect * B,
SDL_Rect * result);
/**
* \brief Calculate a minimal rectangle enclosing a set of points
*
* \return SDL_TRUE if any points were within the clipping rect
*/
extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
int count,
const SDL_Rect * clip,
SDL_Rect * result);
/**
* \brief Calculate the intersection of a rectangle and line segment.
*
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
rect, int *X1,
int *Y1, int *X2,
int *Y2);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include "close_code.h"
#endif /* SDL_rect_h_ */
/* vi: set ts=4 sw=4 expandtab: */
|
85a3b6a3f6da9a4e213ff98043fce713461d9568
|
e72db16e9747386afd01edd1dd36d9589a3f71ef
|
/src/test/pmreorder_simple/pmreorder_simple.c
|
a7e5497e8f5e1fe75c550688325c0a2c1f5e6ac4
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
pmem/pmdk
|
5e49feee8017574340db2a0f9b4e2eab99f8581c
|
ccadb16227bddea1bdcc518bd8f298d551b2baad
|
refs/heads/master
| 2023-08-31T02:28:06.884934
| 2023-08-30T14:52:25
| 2023-08-30T14:52:25
| 23,637,153
| 1,017
| 402
|
NOASSERTION
| 2023-09-07T11:52:42
| 2014-09-03T20:55:23
|
C
|
UTF-8
|
C
| false
| false
| 3,335
|
c
|
pmreorder_simple.c
|
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
/*
* pmreorder_simple.c -- a simple unit test for store reordering
*
* usage: pmreorder_simple g|b|c|m file
* g - write data in a consistent manner
* b - write data in a possibly inconsistent manner
* c - check data consistency
* m - write data to the pool in a consistent way,
* but at the beginning logs some inconsistent values
*
* See README file for more details.
*/
#include "unittest.h"
#include "util.h"
#include "valgrind_internal.h"
/*
* The struct three_field is inconsistent if flag is set and the fields have
* different values.
*/
struct three_field {
int first_field;
int second_field;
int third_field;
int flag;
};
/*
* write_consistent -- (internal) write data in a consistent manner
*/
static void
write_consistent(struct three_field *structp)
{
structp->first_field = 1;
structp->second_field = 1;
structp->third_field = 1;
pmem_persist(&structp->first_field, sizeof(int) * 3);
structp->flag = 1;
pmem_persist(&structp->flag, sizeof(structp->flag));
}
/*
* write_inconsistent -- (internal) write data in an inconsistent manner.
*/
static void
write_inconsistent(struct three_field *structp)
{
structp->flag = 1;
structp->first_field = 1;
structp->second_field = 1;
structp->third_field = 1;
pmem_persist(structp, sizeof(*structp));
}
/*
* check_consistency -- (internal) check struct three_field consistency
*/
static int
check_consistency(struct three_field *structp)
{
int consistent = 0;
if (structp->flag)
consistent = (structp->first_field != structp->second_field) ||
(structp->first_field != structp->third_field);
return consistent;
}
int
main(int argc, char *argv[])
{
START(argc, argv, "pmreorder_simple");
util_init();
if ((argc != 3) || (strchr("gbcm", argv[1][0]) == NULL) ||
argv[1][1] != '\0')
UT_FATAL("usage: %s g|b|c|m file", argv[0]);
int fd = OPEN(argv[2], O_RDWR);
size_t size;
/* mmap and register in valgrind pmemcheck */
void *map = pmem_map_file(argv[2], 0, 0, 0, &size, NULL);
UT_ASSERTne(map, NULL);
struct three_field *structp = map;
char opt = argv[1][0];
/* clear the struct to get a consistent start state for writing */
if (strchr("gb", opt))
pmem_memset_persist(structp, 0, sizeof(*structp));
else if (strchr("m", opt)) {
/* set test values to log an inconsistent start state */
pmem_memset_persist(&structp->flag, 1, sizeof(int));
pmem_memset_persist(&structp->first_field, 0, sizeof(int) * 2);
pmem_memset_persist(&structp->third_field, 1, sizeof(int));
/* clear the struct to get back a consistent start state */
pmem_memset_persist(structp, 0, sizeof(*structp));
}
/* verify that DEFAULT_REORDER restores default engine */
VALGRIND_EMIT_LOG("PMREORDER_MARKER_CHANGE.BEGIN");
switch (opt) {
case 'g':
write_consistent(structp);
break;
case 'b':
write_inconsistent(structp);
break;
case 'm':
write_consistent(structp);
break;
case 'c':
return check_consistency(structp);
default:
UT_FATAL("Unrecognized option %c", opt);
}
VALGRIND_EMIT_LOG("PMREORDER_MARKER_CHANGE.END");
/* check if undefined marker will not cause an issue */
VALGRIND_EMIT_LOG("PMREORDER_MARKER_UNDEFINED.BEGIN");
VALGRIND_EMIT_LOG("PMREORDER_MARKER_UNDEFINED.END");
CLOSE(fd);
DONE(NULL);
}
|
7efb0d30a7b6aa0ca6a71d248f842a860e289dfe
|
de21f9075f55640514c29ef0f1fe3f0690845764
|
/regression/cbmc/Quantifiers-invalid-var-range/main.c
|
b2850470d37938b31f09d22a964142ce5856b054
|
[
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-4-Clause"
] |
permissive
|
diffblue/cbmc
|
975a074ac445febb3b5715f8792beb545522dc18
|
decd2839c2f51a54b2ad0f3e89fdc1b4bf78cd16
|
refs/heads/develop
| 2023-08-31T05:52:05.342195
| 2023-08-30T13:31:51
| 2023-08-30T13:31:51
| 51,877,056
| 589
| 309
|
NOASSERTION
| 2023-09-14T18:49:17
| 2016-02-16T23:03:52
|
C++
|
UTF-8
|
C
| false
| false
| 355
|
c
|
main.c
|
int main()
{
int a[3][3];
// clang-format off
// clang-format would rewrite the "==>" as "== >"
// NOLINTNEXTLINE(whitespace/line_length)
__CPROVER_assume(__CPROVER_forall { int i; (i>=0 && i<5) ==> __CPROVER_exists{int j; (j>=i && j<3) && a[i][j]==10} });
// clang-format on
assert(a[0][0]==10||a[0][1]==10||a[0][2]==10);
return 0;
}
|
40b74a2a66a807b08acd423e5a63ed13fe3db80b
|
50dd46b8ece33f3cdd174284b15d1d51f89669d4
|
/third_party/edk2/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
|
45285510a5006f51082a78bee55933a2aeecb5ed
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause",
"OpenSSL"
] |
permissive
|
google/google-ctf
|
f99da1ee07729bbccb869fff1cbaed6a80e43bcc
|
df02323eaf945d15e124801c74abaadca2749dc7
|
refs/heads/master
| 2023-08-31T14:30:27.548081
| 2023-08-29T13:04:20
| 2023-08-29T13:04:20
| 131,317,137
| 4,136
| 607
|
Apache-2.0
| 2023-08-30T22:17:02
| 2018-04-27T15:56:03
|
Go
|
UTF-8
|
C
| false
| false
| 19,882
|
c
|
VtdReg.c
|
/** @file
Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "DmaProtection.h"
UINTN mVtdUnitNumber;
VTD_UNIT_INFORMATION *mVtdUnitInformation;
BOOLEAN mVtdEnabled;
/**
Flush VTD page table and context table memory.
This action is to make sure the IOMMU engine can get final data in memory.
@param[in] VtdIndex The index used to identify a VTd engine.
@param[in] Base The base address of memory to be flushed.
@param[in] Size The size of memory in bytes to be flushed.
**/
VOID
FlushPageTableMemory (
IN UINTN VtdIndex,
IN UINTN Base,
IN UINTN Size
)
{
if (mVtdUnitInformation[VtdIndex].ECapReg.Bits.C == 0) {
WriteBackDataCacheRange ((VOID *)Base, Size);
}
}
/**
Flush VTd engine write buffer.
@param[in] VtdIndex The index used to identify a VTd engine.
**/
VOID
FlushWriteBuffer (
IN UINTN VtdIndex
)
{
UINT32 Reg32;
if (mVtdUnitInformation[VtdIndex].CapReg.Bits.RWBF != 0) {
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_GSTS_REG);
MmioWrite32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_GCMD_REG, Reg32 | B_GMCD_REG_WBF);
do {
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_GSTS_REG);
} while ((Reg32 & B_GSTS_REG_WBF) != 0);
}
}
/**
Invalidate VTd context cache.
@param[in] VtdIndex The index used to identify a VTd engine.
**/
EFI_STATUS
InvalidateContextCache (
IN UINTN VtdIndex
)
{
UINT64 Reg64;
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_CCMD_REG);
if ((Reg64 & B_CCMD_REG_ICC) != 0) {
DEBUG ((DEBUG_ERROR,"ERROR: InvalidateContextCache: B_CCMD_REG_ICC is set for VTD(%d)\n",VtdIndex));
return EFI_DEVICE_ERROR;
}
Reg64 &= ((~B_CCMD_REG_ICC) & (~B_CCMD_REG_CIRG_MASK));
Reg64 |= (B_CCMD_REG_ICC | V_CCMD_REG_CIRG_GLOBAL);
MmioWrite64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_CCMD_REG, Reg64);
do {
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_CCMD_REG);
} while ((Reg64 & B_CCMD_REG_ICC) != 0);
return EFI_SUCCESS;
}
/**
Invalidate VTd IOTLB.
@param[in] VtdIndex The index used to identify a VTd engine.
**/
EFI_STATUS
InvalidateIOTLB (
IN UINTN VtdIndex
)
{
UINT64 Reg64;
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + (mVtdUnitInformation[VtdIndex].ECapReg.Bits.IRO * 16) + R_IOTLB_REG);
if ((Reg64 & B_IOTLB_REG_IVT) != 0) {
DEBUG ((DEBUG_ERROR,"ERROR: InvalidateIOTLB: B_IOTLB_REG_IVT is set for VTD(%d)\n", VtdIndex));
return EFI_DEVICE_ERROR;
}
Reg64 &= ((~B_IOTLB_REG_IVT) & (~B_IOTLB_REG_IIRG_MASK));
Reg64 |= (B_IOTLB_REG_IVT | V_IOTLB_REG_IIRG_GLOBAL);
MmioWrite64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + (mVtdUnitInformation[VtdIndex].ECapReg.Bits.IRO * 16) + R_IOTLB_REG, Reg64);
do {
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + (mVtdUnitInformation[VtdIndex].ECapReg.Bits.IRO * 16) + R_IOTLB_REG);
} while ((Reg64 & B_IOTLB_REG_IVT) != 0);
return EFI_SUCCESS;
}
/**
Invalid VTd global IOTLB.
@param[in] VtdIndex The index of VTd engine.
@retval EFI_SUCCESS VTd global IOTLB is invalidated.
@retval EFI_DEVICE_ERROR VTd global IOTLB is not invalidated.
**/
EFI_STATUS
InvalidateVtdIOTLBGlobal (
IN UINTN VtdIndex
)
{
if (!mVtdEnabled) {
return EFI_SUCCESS;
}
DEBUG((DEBUG_VERBOSE, "InvalidateVtdIOTLBGlobal(%d)\n", VtdIndex));
//
// Write Buffer Flush before invalidation
//
FlushWriteBuffer (VtdIndex);
//
// Invalidate the context cache
//
if (mVtdUnitInformation[VtdIndex].HasDirtyContext) {
InvalidateContextCache (VtdIndex);
}
//
// Invalidate the IOTLB cache
//
if (mVtdUnitInformation[VtdIndex].HasDirtyContext || mVtdUnitInformation[VtdIndex].HasDirtyPages) {
InvalidateIOTLB (VtdIndex);
}
return EFI_SUCCESS;
}
/**
Prepare VTD configuration.
**/
VOID
PrepareVtdConfig (
VOID
)
{
UINTN Index;
UINTN DomainNumber;
for (Index = 0; Index < mVtdUnitNumber; Index++) {
DEBUG ((DEBUG_INFO, "Dump VTd Capability (%d)\n", Index));
mVtdUnitInformation[Index].CapReg.Uint64 = MmioRead64 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_CAP_REG);
DumpVtdCapRegs (&mVtdUnitInformation[Index].CapReg);
mVtdUnitInformation[Index].ECapReg.Uint64 = MmioRead64 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_ECAP_REG);
DumpVtdECapRegs (&mVtdUnitInformation[Index].ECapReg);
if ((mVtdUnitInformation[Index].CapReg.Bits.SLLPS & BIT0) == 0) {
DEBUG((DEBUG_WARN, "!!!! 2MB super page is not supported on VTD %d !!!!\n", Index));
}
if ((mVtdUnitInformation[Index].CapReg.Bits.SAGAW & BIT2) == 0) {
DEBUG((DEBUG_ERROR, "!!!! 4-level page-table is not supported on VTD %d !!!!\n", Index));
return ;
}
DomainNumber = (UINTN)1 << (UINT8)((UINTN)mVtdUnitInformation[Index].CapReg.Bits.ND * 2 + 4);
if (mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceDataNumber >= DomainNumber) {
DEBUG((DEBUG_ERROR, "!!!! Pci device Number(0x%x) >= DomainNumber(0x%x) !!!!\n", mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceDataNumber, DomainNumber));
return ;
}
}
return ;
}
/**
Disable PMR in all VTd engine.
**/
VOID
DisablePmr (
VOID
)
{
UINT32 Reg32;
VTD_CAP_REG CapReg;
UINTN Index;
DEBUG ((DEBUG_INFO,"DisablePmr\n"));
for (Index = 0; Index < mVtdUnitNumber; Index++) {
CapReg.Uint64 = MmioRead64 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_CAP_REG);
if (CapReg.Bits.PLMR == 0 || CapReg.Bits.PHMR == 0) {
continue ;
}
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_PMEN_ENABLE_REG);
if ((Reg32 & BIT0) != 0) {
MmioWrite32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_PMEN_ENABLE_REG, 0x0);
do {
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_PMEN_ENABLE_REG);
} while((Reg32 & BIT0) != 0);
DEBUG ((DEBUG_INFO,"Pmr(%d) disabled\n", Index));
} else {
DEBUG ((DEBUG_INFO,"Pmr(%d) not enabled\n", Index));
}
}
return ;
}
/**
Enable DMAR translation.
@retval EFI_SUCCESS DMAR translation is enabled.
@retval EFI_DEVICE_ERROR DMAR translation is not enabled.
**/
EFI_STATUS
EnableDmar (
VOID
)
{
UINTN Index;
UINT32 Reg32;
for (Index = 0; Index < mVtdUnitNumber; Index++) {
DEBUG((DEBUG_INFO, ">>>>>>EnableDmar() for engine [%d] \n", Index));
if (mVtdUnitInformation[Index].ExtRootEntryTable != NULL) {
DEBUG((DEBUG_INFO, "ExtRootEntryTable 0x%x \n", mVtdUnitInformation[Index].ExtRootEntryTable));
MmioWrite64 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_RTADDR_REG, (UINT64)(UINTN)mVtdUnitInformation[Index].ExtRootEntryTable | BIT11);
} else {
DEBUG((DEBUG_INFO, "RootEntryTable 0x%x \n", mVtdUnitInformation[Index].RootEntryTable));
MmioWrite64 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_RTADDR_REG, (UINT64)(UINTN)mVtdUnitInformation[Index].RootEntryTable);
}
MmioWrite32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GCMD_REG, B_GMCD_REG_SRTP);
DEBUG((DEBUG_INFO, "EnableDmar: waiting for RTPS bit to be set... \n"));
do {
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GSTS_REG);
} while((Reg32 & B_GSTS_REG_RTPS) == 0);
//
// Init DMAr Fault Event and Data registers
//
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_FEDATA_REG);
//
// Write Buffer Flush before invalidation
//
FlushWriteBuffer (Index);
//
// Invalidate the context cache
//
InvalidateContextCache (Index);
//
// Invalidate the IOTLB cache
//
InvalidateIOTLB (Index);
//
// Enable VTd
//
MmioWrite32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GCMD_REG, B_GMCD_REG_TE);
DEBUG((DEBUG_INFO, "EnableDmar: Waiting B_GSTS_REG_TE ...\n"));
do {
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GSTS_REG);
} while ((Reg32 & B_GSTS_REG_TE) == 0);
DEBUG ((DEBUG_INFO,"VTD (%d) enabled!<<<<<<\n",Index));
}
//
// Need disable PMR, since we already setup translation table.
//
DisablePmr ();
mVtdEnabled = TRUE;
return EFI_SUCCESS;
}
/**
Disable DMAR translation.
@retval EFI_SUCCESS DMAR translation is disabled.
@retval EFI_DEVICE_ERROR DMAR translation is not disabled.
**/
EFI_STATUS
DisableDmar (
VOID
)
{
UINTN Index;
UINTN SubIndex;
UINT32 Reg32;
for (Index = 0; Index < mVtdUnitNumber; Index++) {
DEBUG((DEBUG_INFO, ">>>>>>DisableDmar() for engine [%d] \n", Index));
//
// Write Buffer Flush before invalidation
//
FlushWriteBuffer (Index);
//
// Disable VTd
//
MmioWrite32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GCMD_REG, B_GMCD_REG_SRTP);
do {
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GSTS_REG);
} while((Reg32 & B_GSTS_REG_RTPS) == 0);
Reg32 = MmioRead32 (mVtdUnitInformation[Index].VtdUnitBaseAddress + R_GSTS_REG);
DEBUG((DEBUG_INFO, "DisableDmar: GSTS_REG - 0x%08x\n", Reg32));
DEBUG ((DEBUG_INFO,"VTD (%d) Disabled!<<<<<<\n",Index));
}
mVtdEnabled = FALSE;
for (Index = 0; Index < mVtdUnitNumber; Index++) {
DEBUG((DEBUG_INFO, "engine [%d] access\n", Index));
for (SubIndex = 0; SubIndex < mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceDataNumber; SubIndex++) {
DEBUG ((DEBUG_INFO, " PCI S%04X B%02x D%02x F%02x - %d\n",
mVtdUnitInformation[Index].Segment,
mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceData[Index].PciSourceId.Bits.Bus,
mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceData[Index].PciSourceId.Bits.Device,
mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceData[Index].PciSourceId.Bits.Function,
mVtdUnitInformation[Index].PciDeviceInfo.PciDeviceData[Index].AccessCount
));
}
}
return EFI_SUCCESS;
}
/**
Dump VTd capability registers.
@param[in] CapReg The capability register.
**/
VOID
DumpVtdCapRegs (
IN VTD_CAP_REG *CapReg
)
{
DEBUG((DEBUG_INFO, " CapReg:\n", CapReg->Uint64));
DEBUG((DEBUG_INFO, " ND - 0x%x\n", CapReg->Bits.ND));
DEBUG((DEBUG_INFO, " AFL - 0x%x\n", CapReg->Bits.AFL));
DEBUG((DEBUG_INFO, " RWBF - 0x%x\n", CapReg->Bits.RWBF));
DEBUG((DEBUG_INFO, " PLMR - 0x%x\n", CapReg->Bits.PLMR));
DEBUG((DEBUG_INFO, " PHMR - 0x%x\n", CapReg->Bits.PHMR));
DEBUG((DEBUG_INFO, " CM - 0x%x\n", CapReg->Bits.CM));
DEBUG((DEBUG_INFO, " SAGAW - 0x%x\n", CapReg->Bits.SAGAW));
DEBUG((DEBUG_INFO, " MGAW - 0x%x\n", CapReg->Bits.MGAW));
DEBUG((DEBUG_INFO, " ZLR - 0x%x\n", CapReg->Bits.ZLR));
DEBUG((DEBUG_INFO, " FRO - 0x%x\n", CapReg->Bits.FRO));
DEBUG((DEBUG_INFO, " SLLPS - 0x%x\n", CapReg->Bits.SLLPS));
DEBUG((DEBUG_INFO, " PSI - 0x%x\n", CapReg->Bits.PSI));
DEBUG((DEBUG_INFO, " NFR - 0x%x\n", CapReg->Bits.NFR));
DEBUG((DEBUG_INFO, " MAMV - 0x%x\n", CapReg->Bits.MAMV));
DEBUG((DEBUG_INFO, " DWD - 0x%x\n", CapReg->Bits.DWD));
DEBUG((DEBUG_INFO, " DRD - 0x%x\n", CapReg->Bits.DRD));
DEBUG((DEBUG_INFO, " FL1GP - 0x%x\n", CapReg->Bits.FL1GP));
DEBUG((DEBUG_INFO, " PI - 0x%x\n", CapReg->Bits.PI));
}
/**
Dump VTd extended capability registers.
@param[in] ECapReg The extended capability register.
**/
VOID
DumpVtdECapRegs (
IN VTD_ECAP_REG *ECapReg
)
{
DEBUG((DEBUG_INFO, " ECapReg:\n", ECapReg->Uint64));
DEBUG((DEBUG_INFO, " C - 0x%x\n", ECapReg->Bits.C));
DEBUG((DEBUG_INFO, " QI - 0x%x\n", ECapReg->Bits.QI));
DEBUG((DEBUG_INFO, " DT - 0x%x\n", ECapReg->Bits.DT));
DEBUG((DEBUG_INFO, " IR - 0x%x\n", ECapReg->Bits.IR));
DEBUG((DEBUG_INFO, " EIM - 0x%x\n", ECapReg->Bits.EIM));
DEBUG((DEBUG_INFO, " PT - 0x%x\n", ECapReg->Bits.PT));
DEBUG((DEBUG_INFO, " SC - 0x%x\n", ECapReg->Bits.SC));
DEBUG((DEBUG_INFO, " IRO - 0x%x\n", ECapReg->Bits.IRO));
DEBUG((DEBUG_INFO, " MHMV - 0x%x\n", ECapReg->Bits.MHMV));
DEBUG((DEBUG_INFO, " ECS - 0x%x\n", ECapReg->Bits.ECS));
DEBUG((DEBUG_INFO, " MTS - 0x%x\n", ECapReg->Bits.MTS));
DEBUG((DEBUG_INFO, " NEST - 0x%x\n", ECapReg->Bits.NEST));
DEBUG((DEBUG_INFO, " DIS - 0x%x\n", ECapReg->Bits.DIS));
DEBUG((DEBUG_INFO, " PASID - 0x%x\n", ECapReg->Bits.PASID));
DEBUG((DEBUG_INFO, " PRS - 0x%x\n", ECapReg->Bits.PRS));
DEBUG((DEBUG_INFO, " ERS - 0x%x\n", ECapReg->Bits.ERS));
DEBUG((DEBUG_INFO, " SRS - 0x%x\n", ECapReg->Bits.SRS));
DEBUG((DEBUG_INFO, " NWFS - 0x%x\n", ECapReg->Bits.NWFS));
DEBUG((DEBUG_INFO, " EAFS - 0x%x\n", ECapReg->Bits.EAFS));
DEBUG((DEBUG_INFO, " PSS - 0x%x\n", ECapReg->Bits.PSS));
}
/**
Dump VTd registers.
@param[in] VtdIndex The index of VTd engine.
**/
VOID
DumpVtdRegs (
IN UINTN VtdIndex
)
{
UINTN Index;
UINT64 Reg64;
VTD_FRCD_REG FrcdReg;
VTD_CAP_REG CapReg;
UINT32 Reg32;
VTD_SOURCE_ID SourceId;
DEBUG((DEBUG_INFO, "#### DumpVtdRegs(%d) Begin ####\n", VtdIndex));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_VER_REG);
DEBUG((DEBUG_INFO, " VER_REG - 0x%08x\n", Reg32));
CapReg.Uint64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_CAP_REG);
DEBUG((DEBUG_INFO, " CAP_REG - 0x%016lx\n", CapReg.Uint64));
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_ECAP_REG);
DEBUG((DEBUG_INFO, " ECAP_REG - 0x%016lx\n", Reg64));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_GSTS_REG);
DEBUG((DEBUG_INFO, " GSTS_REG - 0x%08x \n", Reg32));
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_RTADDR_REG);
DEBUG((DEBUG_INFO, " RTADDR_REG - 0x%016lx\n", Reg64));
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_CCMD_REG);
DEBUG((DEBUG_INFO, " CCMD_REG - 0x%016lx\n", Reg64));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_FSTS_REG);
DEBUG((DEBUG_INFO, " FSTS_REG - 0x%08x\n", Reg32));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_FECTL_REG);
DEBUG((DEBUG_INFO, " FECTL_REG - 0x%08x\n", Reg32));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_FEDATA_REG);
DEBUG((DEBUG_INFO, " FEDATA_REG - 0x%08x\n", Reg32));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_FEADDR_REG);
DEBUG((DEBUG_INFO, " FEADDR_REG - 0x%08x\n",Reg32));
Reg32 = MmioRead32 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + R_FEUADDR_REG);
DEBUG((DEBUG_INFO, " FEUADDR_REG - 0x%08x\n",Reg32));
for (Index = 0; Index < (UINTN)CapReg.Bits.NFR + 1; Index++) {
FrcdReg.Uint64[0] = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + ((CapReg.Bits.FRO * 16) + (Index * 16) + R_FRCD_REG));
FrcdReg.Uint64[1] = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + ((CapReg.Bits.FRO * 16) + (Index * 16) + R_FRCD_REG + sizeof(UINT64)));
DEBUG((DEBUG_INFO, " FRCD_REG[%d] - 0x%016lx %016lx\n", Index, FrcdReg.Uint64[1], FrcdReg.Uint64[0]));
if (FrcdReg.Uint64[1] != 0 || FrcdReg.Uint64[0] != 0) {
DEBUG((DEBUG_INFO, " Fault Info - 0x%016lx\n", VTD_64BITS_ADDRESS(FrcdReg.Bits.FILo, FrcdReg.Bits.FIHi)));
SourceId.Uint16 = (UINT16)FrcdReg.Bits.SID;
DEBUG((DEBUG_INFO, " Source - B%02x D%02x F%02x\n", SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function));
DEBUG((DEBUG_INFO, " Type - %x (%a)\n", FrcdReg.Bits.T, FrcdReg.Bits.T ? "read" : "write"));
DEBUG((DEBUG_INFO, " Reason - %x (Refer to VTd Spec, Appendix A)\n", FrcdReg.Bits.FR));
}
}
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + (mVtdUnitInformation[VtdIndex].ECapReg.Bits.IRO * 16) + R_IVA_REG);
DEBUG((DEBUG_INFO, " IVA_REG - 0x%016lx\n",Reg64));
Reg64 = MmioRead64 (mVtdUnitInformation[VtdIndex].VtdUnitBaseAddress + (mVtdUnitInformation[VtdIndex].ECapReg.Bits.IRO * 16) + R_IOTLB_REG);
DEBUG((DEBUG_INFO, " IOTLB_REG - 0x%016lx\n",Reg64));
DEBUG((DEBUG_INFO, "#### DumpVtdRegs(%d) End ####\n", VtdIndex));
}
/**
Dump VTd registers for all VTd engine.
**/
VOID
DumpVtdRegsAll (
VOID
)
{
UINTN Num;
for (Num = 0; Num < mVtdUnitNumber; Num++) {
DumpVtdRegs (Num);
}
}
/**
Dump VTd registers if there is error.
**/
VOID
DumpVtdIfError (
VOID
)
{
UINTN Num;
UINTN Index;
VTD_FRCD_REG FrcdReg;
VTD_CAP_REG CapReg;
UINT32 Reg32;
BOOLEAN HasError;
for (Num = 0; Num < mVtdUnitNumber; Num++) {
HasError = FALSE;
Reg32 = MmioRead32 (mVtdUnitInformation[Num].VtdUnitBaseAddress + R_FSTS_REG);
if (Reg32 != 0) {
HasError = TRUE;
}
Reg32 = MmioRead32 (mVtdUnitInformation[Num].VtdUnitBaseAddress + R_FECTL_REG);
if ((Reg32 & BIT30) != 0) {
HasError = TRUE;
}
CapReg.Uint64 = MmioRead64 (mVtdUnitInformation[Num].VtdUnitBaseAddress + R_CAP_REG);
for (Index = 0; Index < (UINTN)CapReg.Bits.NFR + 1; Index++) {
FrcdReg.Uint64[0] = MmioRead64 (mVtdUnitInformation[Num].VtdUnitBaseAddress + ((CapReg.Bits.FRO * 16) + (Index * 16) + R_FRCD_REG));
FrcdReg.Uint64[1] = MmioRead64 (mVtdUnitInformation[Num].VtdUnitBaseAddress + ((CapReg.Bits.FRO * 16) + (Index * 16) + R_FRCD_REG + sizeof(UINT64)));
if (FrcdReg.Bits.F != 0) {
HasError = TRUE;
}
}
if (HasError) {
REPORT_STATUS_CODE (EFI_ERROR_CODE, PcdGet32 (PcdErrorCodeVTdError));
DEBUG((DEBUG_INFO, "\n#### ERROR ####\n"));
DumpVtdRegs (Num);
DEBUG((DEBUG_INFO, "#### ERROR ####\n\n"));
//
// Clear
//
for (Index = 0; Index < (UINTN)CapReg.Bits.NFR + 1; Index++) {
FrcdReg.Uint64[1] = MmioRead64 (mVtdUnitInformation[Num].VtdUnitBaseAddress + ((CapReg.Bits.FRO * 16) + (Index * 16) + R_FRCD_REG + sizeof(UINT64)));
if (FrcdReg.Bits.F != 0) {
//
// Software writes the value read from this field (F) to Clear it.
//
MmioWrite64 (mVtdUnitInformation[Num].VtdUnitBaseAddress + ((CapReg.Bits.FRO * 16) + (Index * 16) + R_FRCD_REG + sizeof(UINT64)), FrcdReg.Uint64[1]);
}
}
MmioWrite32 (mVtdUnitInformation[Num].VtdUnitBaseAddress + R_FSTS_REG, MmioRead32 (mVtdUnitInformation[Num].VtdUnitBaseAddress + R_FSTS_REG));
}
}
}
|
13e3b8a2723371fe17888245c6812fbe6f8afabb
|
d38ab28cf6ee680b5a82f37e7841d31617750da4
|
/Code/Explicit/include/sitkExplicitITKLabelMap.h
|
736f31177057b7eb3f63e9ff409a29a2409bf938
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
SimpleITK/SimpleITK
|
cdd9f417acc7f7fe20b006a75dc483d6bb6d9b20
|
cfb40ba1149ba9f186793ccdd206f7179c8ba7a3
|
refs/heads/master
| 2023-09-01T15:01:04.024343
| 2023-08-31T19:09:36
| 2023-08-31T19:09:36
| 1,069,177
| 764
| 216
|
Apache-2.0
| 2023-09-13T17:48:23
| 2010-11-10T18:56:04
|
SWIG
|
UTF-8
|
C
| false
| false
| 2,973
|
h
|
sitkExplicitITKLabelMap.h
|
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef sitkExplicitITKLabelMap_h__
#define sitkExplicitITKLabelMap_h__
#include "sitkExplicit.h"
#include "itkLabelMap.h"
#ifndef SITK_TEMPLATE_EXPLICIT_EXPLICITITK
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::AttributeLabelObject<unsigned long, 2u, bool> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::AttributeLabelObject<unsigned long, 3u, bool> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::AttributeLabelObject<unsigned long long, 2u, bool> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::AttributeLabelObject<unsigned long long, 3u, bool> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned char, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned char, 3u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned int, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned int, 3u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned long, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned long, 3u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned long long, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned long long, 3u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned short, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::LabelObject<unsigned short, 3u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::ShapeLabelObject<unsigned long, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::ShapeLabelObject<unsigned long, 3u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::ShapeLabelObject<unsigned long long, 2u> >;
extern template class SITKExplicit_EXPORT_EXPLICIT itk::LabelMap<itk::ShapeLabelObject<unsigned long long, 3u> >;
#endif // SITK_TEMPLATE_EXPLICIT_EXPLICITITK
#endif // sitkExplicitITKLabelMap_h__
|
5397543fd3b266d61ada2df09baaa59823a0273a
|
aa793c2b787ff591f69147e2cc5e23d6c7b4d77e
|
/src/minilzlib/dictbuf.c
|
02875dca0834e2dd941fde22914735d1754d97e8
|
[
"MIT",
"BSD-3-Clause",
"OFL-1.1",
"GPL-2.0-only",
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] |
permissive
|
AsahiLinux/m1n1
|
8280a8342c407936beabda0f08a700759a636b05
|
6d0979e71e83f47c5da5fdb8c5e21eb1268d54e8
|
refs/heads/main
| 2023-08-22T20:52:30.090704
| 2023-08-21T14:16:08
| 2023-08-21T14:16:08
| 329,707,886
| 2,966
| 200
|
MIT
| 2023-09-07T10:19:39
| 2021-01-14T18:59:03
|
Python
|
UTF-8
|
C
| false
| false
| 3,470
|
c
|
dictbuf.c
|
/*++
Copyright (c) Alex Ionescu. All rights reserved.
Module Name:
dictbuf.c
Abstract:
This module implements the management of the LZMA "history buffer" which is
often called the "dictionary". Routines for writing into the history buffer
as well as for reading back from it are implemented, as well as mechanisms
for repeating previous symbols forward into the dictionary. This forms the
basis for LZMA match distance-length pairs that are found and decompressed.
Note that for simplicity's sake, the dictionary is stored directly in the
output buffer, such that no "flushing" or copying is needed back and forth.
Author:
Alex Ionescu (@aionescu) 15-Apr-2020 - Initial version
Environment:
Windows & Linux, user mode and kernel mode.
--*/
#include "minlzlib.h"
//
// State used for the history buffer (dictionary)
//
typedef struct _DICTIONARY_STATE
{
//
// Buffer, start position, current position, and offset limit in the buffer
//
uint8_t* Buffer;
uint32_t BufferSize;
uint32_t Start;
uint32_t Offset;
uint32_t Limit;
} DICTIONARY_STATE, *PDICTIONARY_STATE;
DICTIONARY_STATE Dictionary;
void
DtInitialize (
uint8_t* HistoryBuffer,
uint32_t Size
)
{
//
// Initialize the buffer and reset the position
//
Dictionary.Buffer = HistoryBuffer;
Dictionary.Offset = 0;
Dictionary.BufferSize = Size;
}
bool
DtSetLimit (
uint32_t Limit
)
{
//
// Make sure that the passed in dictionary limit fits within the size, and
// then set this as the new limit. Save the starting point (current offset)
//
if ((Dictionary.Offset + Limit) > Dictionary.BufferSize)
{
return false;
}
Dictionary.Limit = Dictionary.Offset + Limit;
Dictionary.Start = Dictionary.Offset;
return true;
}
bool
DtIsComplete (
uint32_t* BytesProcessed
)
{
//
// Return bytes processed and if the dictionary has been fully written to
//
*BytesProcessed = Dictionary.Offset - Dictionary.Start;
return (Dictionary.Offset == Dictionary.Limit);
}
bool
DtCanWrite (
uint32_t* Position
)
{
//
// Return our position and make sure it's not beyond the uncompressed size
//
*Position = Dictionary.Offset;
return (Dictionary.Offset < Dictionary.Limit);
}
uint8_t
DtGetSymbol (
uint32_t Distance
)
{
//
// If the dictionary is still empty, just return 0, otherwise, return the
// symbol that is Distance bytes backward.
//
if (Distance > Dictionary.Offset)
{
return 0;
}
return Dictionary.Buffer[Dictionary.Offset - Distance];
}
void
DtPutSymbol (
uint8_t Symbol
)
{
//
// Write the symbol and advance our position
//
Dictionary.Buffer[Dictionary.Offset++] = Symbol;
}
bool
DtRepeatSymbol (
uint32_t Length,
uint32_t Distance
)
{
//
// Make sure we never get asked to write past the end of the dictionary. We
// should also not allow the distance to go beyond the current offset since
// DtGetSymbol will return 0 thinking the dictionary is empty.
//
if (((Length + Dictionary.Offset) > Dictionary.Limit) ||
(Distance > Dictionary.Offset))
{
return false;
}
//
// Now rewrite the stream of past symbols forward into the dictionary.
//
do
{
DtPutSymbol(DtGetSymbol(Distance));
} while (--Length > 0);
return true;
}
|
9ab76edfb7c79679d81273425b365ba57fb8f15f
|
05819963250c2ae0ba59ffef48d7c99a5b6b7cfd
|
/drivers/video/image_sensor_inf.h
|
18baa498bae81ae820527c7deb66af52fc6daffe
|
[
"LicenseRef-scancode-bsd-atmel"
] |
permissive
|
atmelcorp/atmel-software-package
|
cefa3213069995d453d3b47b8b3aa7a7aca683ac
|
e0428c7c8175a42a2460cff27bb0501db0bbe160
|
refs/heads/master
| 2023-04-13T16:34:56.181081
| 2023-04-06T17:30:10
| 2023-04-11T06:05:12
| 47,840,424
| 117
| 94
|
NOASSERTION
| 2022-10-20T03:07:15
| 2015-12-11T17:18:56
|
C
|
UTF-8
|
C
| false
| false
| 7,085
|
h
|
image_sensor_inf.h
|
/* ----------------------------------------------------------------------------
* SAM Software Package License
* ----------------------------------------------------------------------------
* Copyright (c) 2013, Atmel Corporation
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
*
* Atmel's name may not be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ----------------------------------------------------------------------------
*/
#ifndef IMAGE_SENSOR_INF_H
#define IMAGE_SENSOR_INF_H
#ifdef CONFIG_HAVE_IMAGE_SENSOR
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include <stdint.h>
#include "board.h"
/*---------------------------------------------------------------------------
* Definitions
*---------------------------------------------------------------------------*/
#define SENSOR_OMNIVISION_2640 0
#define SENSOR_OMNIVISION_2643 1
#define SENSOR_OMNIVISION_5640 2
#define SENSOR_OMNIVISION_7670 3
#define SENSOR_OMNIVISION_7740 4
#define SENSOR_OMNIVISION_9740 5
#define SENSOR_SUPPORTED_NUMBER 6
#define SENSOR_SUPPORTED_OUTPUTS 7
/** terminating list entry for register in configuration file */
#define SENSOR_REG_TERM 0xFF
/** terminating list entry for value in configuration file */
#define SENSOR_VAL_TERM 0xFF
/*----------------------------------------------------------------------------
* Types
*----------------------------------------------------------------------------*/
/** Sensor status or return code */
enum {
SENSOR_OK = 0, /**< Operation is successful */
SENSOR_TWI_ERROR,
SENSOR_ID_ERROR,
SENSOR_RESOLUTION_NOT_SUPPORTED
};
/** Sensor type */
enum {
SENSOR_COMS = 0,
SENSOR_CCD
};
/** Sensor TWI mode */
enum {
SENSOR_TWI_REG_BYTE_DATA_BYTE = 0,
SENSOR_TWI_REG_2BYTE_DATA_BYTE,
SENSOR_TWI_REG_BYTE_DATA_2BYTE
};
/** Sensor resolution */
enum {
QVGA = 0,
VGA,
SVGA,
XGA,
WXGA,
UVGA
};
/** Sensor output format */
enum {
RAW_BAYER = 0,
YUV_422,
RGB,
CCIR656,
MONO
};
/** Sensor output bit width */
enum {
BIT_8 = 0,
BIT_9,
BIT_10,
BIT_11,
BIT_12
};
/** define a structure for sensor register initialization values */
struct sensor_reg {
uint16_t reg; /* Register to be written */
uint16_t val; /* value to be written */
};
struct sensor_output {
uint8_t type; /** Index 0: normal, 1: AF setting*/
uint8_t output_resolution; /** sensor output resolution */
uint8_t output_format; /** sensor output format */
uint8_t output_bit; /** sensor output bit width */
uint8_t supported; /** supported for current output_resolution*/
uint32_t output_width; /** output width */
uint32_t output_height; /** output height */
const struct sensor_reg* output_setting; /** sensor registers setting */
};
/** define a structure for sensor profile */
struct sensor_profile {
const char* name; /** Sensor name */
uint8_t cmos_ccd; /** Sensor type for CMOS sensor or CCD */
uint8_t twi_inf_mode; /** TWI interface mode */
uint8_t addr; /** TWI slave address */
uint16_t pid_high_reg; /** Register address for product ID high byte */
uint16_t pid_low_reg; /** Register address for product ID low byte*/
uint16_t pid_high; /** product ID high byte */
uint16_t pid_low; /** product ID low byte */
uint16_t version_mask; /** version mask */
const struct sensor_output* output_conf[SENSOR_SUPPORTED_OUTPUTS]; /** sensor settings */
};
/*----------------------------------------------------------------------------
* Exported sensor profiles
*----------------------------------------------------------------------------*/
extern const struct sensor_profile mt9v022_profile;
extern const struct sensor_profile ov2640_profile;
extern const struct sensor_profile ov2643_profile;
extern const struct sensor_profile ov5640_profile;
extern const struct sensor_profile ov7670_profile;
extern const struct sensor_profile ov7740_profile;
extern const struct sensor_profile ov9740_profile;
/*----------------------------------------------------------------------------
* Exported functions
*----------------------------------------------------------------------------*/
/**
* \brief Detect with given supported sensor index,
* or automatically detect the connected sensor.
* \param twi_bus TWI bus
* \param detect_auto true for auto detect.
* \param id Supported sensor index
* \return pointer to a profile if no error; otherwise return NULL.
*/
extern struct sensor_profile* sensor_detect(uint8_t twi_bus, bool detect_auto, uint8_t id);
/**
* \brief Load and configure sensor setting with giving profile.
* \param twi_bus TWI bus
* \param sensor pointer to a sensor profile instance.
* \param resolution resolution request
* \return SENSOR_OK if no error; otherwise return SENSOR_XXX_ERROR
*/
extern uint32_t sensor_setup(uint8_t twi_bus,
struct sensor_profile* sensor,
uint8_t resolution,
uint8_t format);
/**
* \brief Retrieves sensor output bit width and size for giving resolution and format.
* \param sensor pointer to a sensor profile instance.
* \param resolution Output resolution request.
* \param format Output Format request.
* \param bits Output Format request.
* \param width pointer to image width to be read.
* \param height pointer to image height to be read.
* \return SENSOR_OK if no error; otherwise return SENSOR_XXX_ERROR
*/
extern uint32_t sensor_get_output(struct sensor_profile* sensor,
uint8_t resolution,
uint8_t format,
uint8_t *bits,
uint32_t *width,
uint32_t *height);
#endif /* CONFIG_HAVE_IMAGE_SENSOR */
#endif /* ! IMAGE_SENSOR_INF_H */
|
26e1a929261e198ac8de120e2b7c0da5204c6fd1
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/third_party/xnnpack/src/src/u8-maxpool/u8-maxpool-9p8x-minmax-wasmsimd-c16.c
|
c584eeacbd35842ed72da572b5f85c91d48166dc
|
[
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
C
| false
| false
| 9,033
|
c
|
u8-maxpool-9p8x-minmax-wasmsimd-c16.c
|
// Copyright 2021 Google LLC
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#include <assert.h>
#include <wasm_simd128.h>
#include <xnnpack/maxpool.h>
void xnn_u8_maxpool_minmax_ukernel_9p8x__wasmsimd_c16(
size_t output_pixels,
size_t kernel_elements,
size_t channels,
const uint8_t** input,
size_t input_offset,
uint8_t* output,
size_t input_increment,
size_t output_increment,
const union xnn_u8_minmax_params params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
{
assert(output_pixels != 0);
assert(kernel_elements != 0);
assert(channels != 0);
const v128_t voutput_max = wasm_v128_load64_splat(params->wasmsimd.max);
const v128_t voutput_min = wasm_v128_load64_splat(params->wasmsimd.min);
do {
uint8_t* o = output;
{
const uint8_t* i0 = *input++;
const uint8_t* i1 = *input++;
const uint8_t* i2 = *input++;
const uint8_t* i3 = *input++;
const uint8_t* i4 = *input++;
const uint8_t* i5 = *input++;
const uint8_t* i6 = *input++;
const uint8_t* i7 = *input++;
const uint8_t* i8 = *input++;
i0 = (const uint8_t*) ((uintptr_t) i0 + input_offset);
i1 = (const uint8_t*) ((uintptr_t) i1 + input_offset);
i2 = (const uint8_t*) ((uintptr_t) i2 + input_offset);
i3 = (const uint8_t*) ((uintptr_t) i3 + input_offset);
i4 = (const uint8_t*) ((uintptr_t) i4 + input_offset);
i5 = (const uint8_t*) ((uintptr_t) i5 + input_offset);
i6 = (const uint8_t*) ((uintptr_t) i6 + input_offset);
i7 = (const uint8_t*) ((uintptr_t) i7 + input_offset);
i8 = (const uint8_t*) ((uintptr_t) i8 + input_offset);
if (kernel_elements < 2) {
i1 = i0;
}
if (kernel_elements <= 2) {
i2 = i0;
}
if (kernel_elements < 4) {
i3 = i0;
}
if (kernel_elements <= 4) {
i4 = i0;
}
if (kernel_elements < 6) {
i5 = i0;
}
if (kernel_elements <= 6) {
i6 = i0;
}
if (kernel_elements < 8) {
i7 = i0;
}
if (kernel_elements <= 8) {
i8 = i0;
}
size_t c = channels;
for (; c >= 16; c -= 16) {
const v128_t vi0 = wasm_v128_load(i0);
i0 += 16;
const v128_t vi1 = wasm_v128_load(i1);
i1 += 16;
const v128_t vi2 = wasm_v128_load(i2);
i2 += 16;
const v128_t vi3 = wasm_v128_load(i3);
i3 += 16;
const v128_t vi4 = wasm_v128_load(i4);
i4 += 16;
const v128_t vi5 = wasm_v128_load(i5);
i5 += 16;
const v128_t vi6 = wasm_v128_load(i6);
i6 += 16;
const v128_t vi7 = wasm_v128_load(i7);
i7 += 16;
const v128_t vi8 = wasm_v128_load(i8);
i8 += 16;
const v128_t vmax018 = wasm_u8x16_max(wasm_u8x16_max(vi0, vi1), vi8);
const v128_t vmax23 = wasm_u8x16_max(vi2, vi3);
const v128_t vmax45 = wasm_u8x16_max(vi4, vi5);
const v128_t vmax67 = wasm_u8x16_max(vi6, vi7);
const v128_t vmax2345 = wasm_u8x16_max(vmax23, vmax45);
const v128_t vmax01678 = wasm_u8x16_max(vmax018, vmax67);
v128_t vout = wasm_u8x16_max(vmax2345, vmax01678);
vout = wasm_u8x16_min(vout, voutput_max);
vout = wasm_u8x16_max(vout, voutput_min);
wasm_v128_store(o, vout); o += 16;
}
if (c != 0) {
const v128_t vi0 = wasm_v128_load(i0);
const v128_t vi1 = wasm_v128_load(i1);
const v128_t vi2 = wasm_v128_load(i2);
const v128_t vi3 = wasm_v128_load(i3);
const v128_t vi4 = wasm_v128_load(i4);
const v128_t vi5 = wasm_v128_load(i5);
const v128_t vi6 = wasm_v128_load(i6);
const v128_t vi7 = wasm_v128_load(i7);
const v128_t vi8 = wasm_v128_load(i8);
const v128_t vmax018 = wasm_u8x16_max(wasm_u8x16_max(vi0, vi1), vi8);
const v128_t vmax23 = wasm_u8x16_max(vi2, vi3);
const v128_t vmax45 = wasm_u8x16_max(vi4, vi5);
const v128_t vmax67 = wasm_u8x16_max(vi6, vi7);
const v128_t vmax2345 = wasm_u8x16_max(vmax23, vmax45);
const v128_t vmax01678 = wasm_u8x16_max(vmax018, vmax67);
v128_t vout = wasm_u8x16_max(vmax2345, vmax01678);
vout = wasm_u8x16_min(vout, voutput_max);
vout = wasm_u8x16_max(vout, voutput_min);
if (c & 8) {
wasm_v128_store64_lane(o, vout, 0);
vout = wasm_v64x2_shuffle(vout, vout, 1, 1);
o += 8;
}
if (c & 4) {
wasm_v128_store32_lane(o, vout, 0);
vout = wasm_u64x2_shr(vout, 32);
o += 4;
}
if (c & 2) {
wasm_v128_store16_lane(o, vout, 0);
vout = wasm_u32x4_shr(vout, 16);
o += 2;
}
if (c & 1) {
wasm_v128_store8_lane(o, vout, 0);
o += 1;
}
}
}
for (ptrdiff_t k = (ptrdiff_t) kernel_elements - 9; k > 0; k -= 8) {
const uint8_t* i0 = *input++;
const uint8_t* i1 = *input++;
const uint8_t* i2 = *input++;
const uint8_t* i3 = *input++;
const uint8_t* i4 = *input++;
const uint8_t* i5 = *input++;
const uint8_t* i6 = *input++;
const uint8_t* i7 = *input++;
i0 = (const uint8_t*) ((uintptr_t) i0 + input_offset);
i1 = (const uint8_t*) ((uintptr_t) i1 + input_offset);
i2 = (const uint8_t*) ((uintptr_t) i2 + input_offset);
i3 = (const uint8_t*) ((uintptr_t) i3 + input_offset);
i4 = (const uint8_t*) ((uintptr_t) i4 + input_offset);
i5 = (const uint8_t*) ((uintptr_t) i5 + input_offset);
i6 = (const uint8_t*) ((uintptr_t) i6 + input_offset);
i7 = (const uint8_t*) ((uintptr_t) i7 + input_offset);
if (k < 2) {
i1 = i0;
}
if (k <= 2) {
i2 = i0;
}
if (k < 4) {
i3 = i0;
}
if (k <= 4) {
i4 = i0;
}
if (k < 6) {
i5 = i0;
}
if (k <= 6) {
i6 = i0;
}
if (k < 8) {
i7 = i0;
}
o = output;
size_t c = channels;
for (; c >= 16; c -= 16) {
const v128_t vi0 = wasm_v128_load(i0);
i0 += 16;
const v128_t vi1 = wasm_v128_load(i1);
i1 += 16;
const v128_t vi2 = wasm_v128_load(i2);
i2 += 16;
const v128_t vi3 = wasm_v128_load(i3);
i3 += 16;
const v128_t vi4 = wasm_v128_load(i4);
i4 += 16;
const v128_t vi5 = wasm_v128_load(i5);
i5 += 16;
const v128_t vi6 = wasm_v128_load(i6);
i6 += 16;
const v128_t vi7 = wasm_v128_load(i7);
i7 += 16;
const v128_t vo = wasm_v128_load(o);
const v128_t vmax01 = wasm_u8x16_max(wasm_u8x16_max(vi0, vi1), vo);
const v128_t vmax23 = wasm_u8x16_max(vi2, vi3);
const v128_t vmax45 = wasm_u8x16_max(vi4, vi5);
const v128_t vmax67 = wasm_u8x16_max(vi6, vi7);
const v128_t vmax2345 = wasm_u8x16_max(vmax23, vmax45);
const v128_t vmax0167 = wasm_u8x16_max(vmax01, vmax67);
v128_t vout = wasm_u8x16_max(vmax2345, vmax0167);
vout = wasm_u8x16_min(vout, voutput_max);
vout = wasm_u8x16_max(vout, voutput_min);
wasm_v128_store(o, vout);
o += 16;
}
if (c != 0) {
const v128_t vi0 = wasm_v128_load(i0);
const v128_t vi1 = wasm_v128_load(i1);
const v128_t vi2 = wasm_v128_load(i2);
const v128_t vi3 = wasm_v128_load(i3);
const v128_t vi4 = wasm_v128_load(i4);
const v128_t vi5 = wasm_v128_load(i5);
const v128_t vi6 = wasm_v128_load(i6);
const v128_t vi7 = wasm_v128_load(i7);
const v128_t vo = wasm_v128_load(o);
const v128_t vmax01 = wasm_u8x16_max(wasm_u8x16_max(vi0, vi1), vo);
const v128_t vmax23 = wasm_u8x16_max(vi2, vi3);
const v128_t vmax45 = wasm_u8x16_max(vi4, vi5);
const v128_t vmax67 = wasm_u8x16_max(vi6, vi7);
const v128_t vmax2345 = wasm_u8x16_max(vmax23, vmax45);
const v128_t vmax0167 = wasm_u8x16_max(vmax01, vmax67);
v128_t vout = wasm_u8x16_max(vmax2345, vmax0167);
vout = wasm_u8x16_min(vout, voutput_max);
vout = wasm_u8x16_max(vout, voutput_min);
if (c & 8) {
wasm_v128_store64_lane(o, vout, 0);
vout = wasm_v64x2_shuffle(vout, vout, 1, 1);
o += 8;
}
if (c & 4) {
wasm_v128_store32_lane(o, vout, 0);
vout = wasm_u64x2_shr(vout, 32);
o += 4;
}
if (c & 2) {
wasm_v128_store16_lane(o, vout, 0);
vout = wasm_u32x4_shr(vout, 16);
o += 2;
}
if (c & 1) {
wasm_v128_store8_lane(o, vout, 0);
o += 1;
}
}
}
input = (const uint8_t**) ((uintptr_t) input + input_increment);
output = (uint8_t*) ((uintptr_t) o + output_increment);
} while (--output_pixels != 0);
}
|
f5f981c48884c4095e45b29d98d620708c763ca3
|
c6759b857e55991fea3ef0b465dbcee53fa38714
|
/rtos/freeRTOS/vendors/gwt/vega/pmsis/include/pmsis/implem/hal/cluster/cluster_ctrl_unit.h
|
545f8fc1c9495d1475f007dd18375f02da50958b
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
GreenWaves-Technologies/gap_sdk
|
1b343bba97b7a5ce62a24162bd72eef5cc67e269
|
3fea306d52ee33f923f2423c5a75d9eb1c07e904
|
refs/heads/master
| 2023-09-01T14:38:34.270427
| 2023-08-10T09:04:44
| 2023-08-10T09:04:44
| 133,324,605
| 145
| 96
|
Apache-2.0
| 2023-08-27T19:03:52
| 2018-05-14T07:50:29
|
C
|
UTF-8
|
C
| false
| false
| 2,975
|
h
|
cluster_ctrl_unit.h
|
/*
* Copyright (c) 2021, GreenWaves Technologies, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of GreenWaves Technologies, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <stdint.h>
#include "pmsis/targets/target.h"
/*! Fetch enable. */
static inline void hal_cl_ctrl_fetch_enable(uint32_t device_id, uint32_t nb_core)
{
uint32_t base = (uint32_t) cl_glob_ctrl(device_id);
uint32_t fetch = (((1 << nb_core) - 1));
cluster_ctrl_unit_fetch_en_set(base, fetch);
}
static inline void hal_cl_ctrl_fetch_mask_enable(uint32_t device_id, uint32_t core_mask)
{
uint32_t base = (uint32_t) cl_glob_ctrl(device_id);
cluster_ctrl_unit_fetch_en_set(base, core_mask);
}
/*! ClockGate cluster. */
static inline void hal_cl_ctrl_clock_gate_enable(uint32_t device_id)
{
uint32_t base = (uint32_t) cl_glob_ctrl(device_id);
uint32_t cg = (CLUSTER_CTRL_UNIT_CLOCK_GATE_EN(1));
cluster_ctrl_unit_clock_gate_set(base, cg);
}
static inline void hal_cl_ctrl_clock_gate_disable(uint32_t device_id)
{
uint32_t base = (uint32_t) cl_glob_ctrl(device_id);
uint32_t cg = (CLUSTER_CTRL_UNIT_CLOCK_GATE_EN(0));
cluster_ctrl_unit_clock_gate_set(base, cg);
}
/*! Boot address. */
static inline void hal_cl_ctrl_boot_addr_set(uint32_t device_id, uint8_t core_id,
uint32_t boot_addr)
{
uint32_t base = (uint32_t) cl_glob_ctrl(device_id);
uint32_t offset = (CLUSTER_CTRL_UNIT_BOOT_ADDR0_OFFSET + (core_id << 2));
GAP_WRITE(base, offset, boot_addr);
}
|
5a4c07e59bcec3808c8b71a3acb07e5201e47ca0
|
ed3b24ae57df21a5b089148235dd1b6d728e56f3
|
/ld/unit-tests/test-cases/no-dynamic-common/a.c
|
8f92c9da2cd7f3c949c5c3d234d56e53414bde29
|
[
"MIT",
"APSL-2.0"
] |
permissive
|
michaeleisel/zld
|
36ce14511ca9e0a971a0ed614bbee5dac9bb6fa1
|
519197a3bf4dbe47ea5a3bbce609df166f6f976d
|
refs/heads/master
| 2023-08-23T13:46:50.509156
| 2023-02-15T06:02:03
| 2023-02-15T06:02:03
| 237,002,244
| 1,217
| 55
|
MIT
| 2023-02-15T06:00:43
| 2020-01-29T14:32:45
|
C++
|
UTF-8
|
C
| false
| false
| 90
|
c
|
a.c
|
extern int common_variable;
int
main(int argc, char **argv)
{
return common_variable;
}
|
4d3ef68d9cbc2d0175d617e198f56c96a017d7c3
|
0744dcc5394cebf57ebcba343747af6871b67017
|
/os/include/tinyara/usb/usb.h
|
fee57dbc46430976676a9eca118ecddc8f1cfd0b
|
[
"GPL-1.0-or-later",
"BSD-3-Clause",
"ISC",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive",
"Apache-2.0"
] |
permissive
|
Samsung/TizenRT
|
96abf62f1853f61fcf91ff14671a5e0c6ca48fdb
|
1a5c2e00a4b1bbf4c505bbf5cc6a8259e926f686
|
refs/heads/master
| 2023-08-31T08:59:33.327998
| 2023-08-08T06:09:20
| 2023-08-31T04:38:20
| 82,517,252
| 590
| 719
|
Apache-2.0
| 2023-09-14T06:54:49
| 2017-02-20T04:38:30
|
C
|
UTF-8
|
C
| false
| false
| 20,927
|
h
|
usb.h
|
/****************************************************************************
*
* Copyright 2016 Samsung Electronics All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*
****************************************************************************/
/************************************************************************************
* include/tinyara/usb/usb.h
*
* Copyright (C) 2008, 2009-2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
#ifndef __INCLUDE_TINYARA_USB_USB_H
#define __INCLUDE_TINYARA_USB_USB_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <tinyara/config.h>
#include <stdint.h>
/************************************************************************************
* Preprocessor Definitions
************************************************************************************/
/* A packet identifier (PID) immediately follows the SYNC field of every USB packet.
* A PID consists of a four-bit packet type field followed by a four-bit check field
* USB Tokens (See Table 8-1 in the USB specification)
*/
#define USB_PID_OUT_TOKEN (0x01) /* Tokens */
#define USB_PID_IN_TOKEN (0x09)
#define USB_PID_SOF_TOKEN (0x05)
#define USB_PID_SETUP_TOKEN (0x0d)
#define USB_PID_DATA0 (0x03) /* Data */
#define USB_PID_DATA1 (0x0b)
#define USB_PID_DATA2 (0x07)
#define USB_PID_MDATA (0x0f)
#define USB_PID_ACK (0x02) /* Handshake */
#define USB_PID_NAK (0x0a)
#define USB_PID_STALL (0x0e)
#define USB_PID_NYET (0x06)
#define USB_PID_PRE_TOKEN (0x0c) /* Special */
#define USB_PID_ERR (0x0c)
#define USB_PID_SPLIT_TOKEN (0x08)
#define USB_PID_PING_TOKEN (0x04)
#define USB_PID_RESERVED (0x00)
/* All 16-bit values must be little-endian */
#define MSBYTE(u16) ((u16) >> 8) /* Get MS byte from uint16_t */
#define LSBYTE(u16) ((u16) & 0xff) /* Get LS byte from uint16_t */
#define GETUINT16(p) (((uint16_t)p[1] << 8) | (uint16_t)p[0])
#define GETUINT32(p) (((uint32_t)p[3] << 24) | ((uint32_t)p[2] << 16) | \
((uint32_t)p[1] << 8) | (uint32_t)p[0])
/* USB directions (in endpoint addresses) */
#define USB_DIR_MASK (0x80)
#define USB_EPNO_MASK (0x7f)
#define USB_DIR_OUT (0x00) /* host-to-device */
#define USB_DIR_IN (0x80) /* device-to-host */
#define USB_EPNO(addr) ((addr) & USB_EPNO_MASK)
#define USB_EPOUT(addr) ((addr) | USB_DIR_OUT)
#define USB_EPIN(addr) ((addr) | USB_DIR_IN)
#define USB_ISEPIN(addr) (((addr) & USB_DIR_MASK) == USB_DIR_IN)
#define USB_ISEPOUT(addr) (((addr) & USB_DIR_MASK) == USB_DIR_OUT)
/* Control Setup Packet. Byte 0 = Request type */
#define USB_REQ_DIR_MASK (1 << 7) /* Bit 7=1: Direction bit */
#define USB_REQ_DIR_IN (1 << 7) /* Bit 7=1: Device-to-host */
#define USB_REQ_DIR_OUT (0 << 7) /* Bit 7=0: Host-to-device */
#define USB_REQ_ISIN(type) (((type) & USB_REQ_DIR_MASK) != 0)
#define USB_REQ_ISOUT(type) (((type) & USB_REQ_DIR_MASK) == 0)
#define USB_REQ_TYPE_SHIFT (5) /* Bits 5:6: Request type */
#define USB_REQ_TYPE_MASK (3 << USB_REQ_TYPE_SHIFT)
#define USB_REQ_TYPE_STANDARD (0 << USB_REQ_TYPE_SHIFT)
#define USB_REQ_TYPE_CLASS (1 << USB_REQ_TYPE_SHIFT)
#define USB_REQ_TYPE_VENDOR (2 << USB_REQ_TYPE_SHIFT)
#define USB_REQ_RECIPIENT_SHIFT (0) /* Bits 0:4: Recipient */
#define USB_REQ_RECIPIENT_MASK (0x1f << USB_REQ_RECIPIENT_SHIFT)
#define USB_REQ_RECIPIENT_DEVICE (0 << USB_REQ_RECIPIENT_SHIFT)
#define USB_REQ_RECIPIENT_INTERFACE (1 << USB_REQ_RECIPIENT_SHIFT)
#define USB_REQ_RECIPIENT_ENDPOINT (2 << USB_REQ_RECIPIENT_SHIFT)
#define USB_REQ_RECIPIENT_OTHER (3 << USB_REQ_RECIPIENT_SHIFT)
/* Control Setup Packet. Byte 1 = Standard Request Codes */
#define USB_REQ_GETSTATUS (0x00)
#define USB_REQ_CLEARFEATURE (0x01)
#define USB_REQ_SETFEATURE (0x03)
#define USB_REQ_SETADDRESS (0x05)
#define USB_REQ_GETDESCRIPTOR (0x06)
#define USB_REQ_SETDESCRIPTOR (0x07)
#define USB_REQ_GETCONFIGURATION (0x08)
#define USB_REQ_SETCONFIGURATION (0x09)
#define USB_REQ_GETINTERFACE (0x0a)
#define USB_REQ_SETINTERFACE (0x0b)
#define USB_REQ_SYNCHFRAME (0x0c)
#define USB_REQ_SETENCRYPTION (0x0d) /* Wireless USB */
#define USB_REQ_GETENCRYPTION (0x0e)
#define USB_REQ_SETHANDSHAKE (0x0f)
#define USB_REQ_GETHANDSHAKE (0x10)
#define USB_REQ_SETCONNECTION (0x11)
#define USB_REQ_SETSECURITYDATA (0x12)
#define USB_REQ_GETSECURITYDATA (0x13)
#define USB_REQ_SETWUSBDATA (0x14)
#define USB_REQ_LOOPBACKDATAWRITE (0x15)
#define USB_REQ_LOOPBACKDATAREAD (0x16)
#define USB_REQ_SETINTERFACEDS (0x17)
/* USB feature values */
#define USB_FEATURE_ENDPOINTHALT 0
#define USB_FEATURE_SELFPOWERED 0
#define USB_FEATURE_REMOTEWAKEUP 1
#define USB_FEATURE_TESTMODE 2
#define USB_FEATURE_BATTERY 2
#define USB_FEATURE_BHNPENABLE 3
#define USB_FEATURE_WUSBDEVICE 3
#define USB_FEATURE_AHNPSUPPORT 4
#define USB_FEATURE_AALTHNPSUPPORT 5
#define USB_FEATURE_DEBUGMODE 6
/* Generic descriptor header offsets */
#define USB_DESC_DESCLENOFFSET 0
#define USB_DESC_DESCTYPEOFFSET 1
/* Descriptor types */
#define USB_DESC_TYPE_DEVICE (0x01)
#define USB_DESC_TYPE_CONFIG (0x02)
#define USB_DESC_TYPE_STRING (0x03)
#define USB_DESC_TYPE_INTERFACE (0x04)
#define USB_DESC_TYPE_ENDPOINT (0x05)
#define USB_DESC_TYPE_DEVICEQUALIFIER (0x06)
#define USB_DESC_TYPE_OTHERSPEEDCONFIG (0x07)
#define USB_DESC_TYPE_INTERFACEPOWER (0x08)
#define USB_DESC_TYPE_OTG (0x09)
#define USB_DESC_TYPE_DEBUG (0x0a)
#define USB_DESC_TYPE_INTERFACEASSOCIATION (0x0b)
#define USB_DESC_TYPE_SECURITY (0x0c)
#define USB_DESC_TYPE_KEY (0x0d)
#define USB_DESC_TYPE_ENCRYPTION_TYPE (0x0e)
#define USB_DESC_TYPE_BOS (0x0f)
#define USB_DESC_TYPE_DEVICECAPABILITY (0x10)
#define USB_DESC_TYPE_WIRELESS_ENDPOINTCOMP (0x11)
#define USB_DESC_TYPE_CSDEVICE (0x21)
#define USB_DESC_TYPE_CSCONFIG (0x22)
#define USB_DESC_TYPE_CSSTRING (0x23)
#define USB_DESC_TYPE_CSINTERFACE (0x24)
#define USB_DESC_TYPE_CSENDPOINT (0x25)
/* Device and interface descriptor class codes */
#define USB_CLASS_PER_INTERFACE (0x00)
#define USB_CLASS_AUDIO (0x01)
#define USB_CLASS_CDC (0x02)
#define USB_CLASS_HID (0x03)
#define USB_CLASS_PHYSICAL (0x05)
#define USB_CLASS_STILL_IMAGE (0x06)
#define USB_CLASS_PRINTER (0x07)
#define USB_CLASS_MASS_STORAGE (0x08)
#define USB_CLASS_HUB (0x09)
#define USB_CLASS_CDC_DATA (0x0a)
#define USB_CLASS_CSCID (0x0b)
#define USB_CLASS_CONTENT_SEC (0x0d)
#define USB_CLASS_VIDEO (0x0e)
#define USB_CLASS_WIRELESS_CONTROLLER (0xe0)
#define USB_CLASS_MISC (0xef)
#define USB_CLASS_APP_SPEC (0xfe)
#define USB_CLASS_VENDOR_SPEC (0xff)
/* Values for configuration descriptor attributes */
#define USB_CONFIG_ATTR_BATTERY (0x10) /* Battery powered */
#define USB_CONFIG_ATTR_WAKEUP (0x20) /* Remote wakeup */
#define USB_CONFIG_ATTR_SELFPOWER (0x40) /* Self-powered */
#define USB_CONFIG_ATTR_ONE (0x80) /* Must be one */
/* Endpoint descriptor address */
#define USB_EP_ADDR_NUMBER_MASK (0x0f)
#define USB_EP_ADDR_DIR_MASK (0x80)
/* Endpoint descriptor attributes */
#define USB_EP_ATTR_XFERTYPE_SHIFT (0)
#define USB_EP_ATTR_XFERTYPE_MASK (3 << USB_EP_ATTR_XFERTYPE_SHIFT)
#define USB_EP_ATTR_XFER_CONTROL (0 << USB_EP_ATTR_XFERTYPE_SHIFT)
#define USB_EP_ATTR_XFER_ISOC (1 << USB_EP_ATTR_XFERTYPE_SHIFT)
#define USB_EP_ATTR_XFER_BULK (2 << USB_EP_ATTR_XFERTYPE_SHIFT)
#define USB_EP_ATTR_XFER_INT (3 << USB_EP_ATTR_XFERTYPE_SHIFT)
#define USB_EP_ATTR_SYNC_SHIFT (2)
#define USB_EP_ATTR_SYNC_MASK (3 << USB_EP_ATTR_SYNC_SHIFT)
#define USB_EP_ATTR_NO_SYNC (0 << USB_EP_ATTR_SYNC_SHIFT)
#define USB_EP_ATTR_ASYNC (1 << USB_EP_ATTR_SYNC_SHIFT)
#define USB_EP_ATTR_ADAPTIVE (2 << USB_EP_ATTR_SYNC_SHIFT)
#define USB_EP_ATTR_SYNC (3 << USB_EP_ATTR_SYNC_SHIFT)
#define USB_EP_ATTR_USAGE_SHIFT (4)
#define USB_EP_ATTR_USAGE_MASK (3 << USB_EP_ATTR_USAGE_SHIFT)
#define USB_EP_ATTR_USAGE_DATA (0 << USB_EP_ATTR_USAGE_SHIFT)
#define USB_EP_ATTR_USAGE_FEEDBACK (1 << USB_EP_ATTR_USAGE_SHIFT)
#define USB_EP_ATTR_USAGE_IMPLICIT (2 << USB_EP_ATTR_USAGE_SHIFT)
#define USB_EP_ATTR_MAX_ADJUSTABLE (1 << 7)
/* OTG Definitions */
/* OTG SET FEATURE Constants */
#define USBOTG_FEATURE_B_HNP_ENABLE 3 /* Enable B device to perform HNP */
#define USBOTG_FEATURE_A_HNP_SUPPORT 4 /* A device supports HNP */
#define USBOTG_FEATURE_A_ALT_HNP_SUPPORT 5 /* Another port on the A device supports HNP */
#define USB_SPEED_UNKNOWN 0 /* Transfer rate not yet set */
#define USB_SPEED_LOW 1 /* USB 1.0 */
#define USB_SPEED_FULL 2 /* USB 1.1 */
#define USB_SPEED_HIGH 3 /* USB 2.0 */
#define USB_SPEED_VARIABLE 4 /* Wireless USB 2.5 */
/* Maximum number of devices per controller */
#define USB_MAX_DEVICES (127)
/* Microsoft OS Descriptor specific values */
#define USB_REQ_GETMSFTOSDESCRIPTOR (0xEE)
#define MSFTOSDESC_INDEX_FUNCTION 4
#define MSFTOSDESC_INDEX_EXTPROP 5
/************************************************************************************
* Public Types
************************************************************************************/
/* This structure is used to send control requests to a USB device. */
struct usb_ctrlreq_s {
uint8_t type; /* Matches request type */
uint8_t req; /* Matches request field */
uint8_t value[2];
uint8_t index[2];
uint8_t len[2];
};
#define USB_SIZEOF_CTRLREQ 8
/* Generic descriptor */
struct usb_desc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
};
/* Device descriptor */
struct usb_devdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t usb[2]; /* USB version */
uint8_t classid; /* Device class */
uint8_t subclass; /* Device sub-class */
uint8_t protocol; /* Device protocol */
uint8_t mxpacketsize; /* Max packet size (ep0) */
uint8_t vendor[2]; /* Vendor ID */
uint8_t product[2]; /* Product ID */
uint8_t device[2]; /* Device ID */
uint8_t imfgr; /* Manufacturer */
uint8_t iproduct; /* Product */
uint8_t serno; /* Serial number */
uint8_t nconfigs; /* Number of configurations */
};
#define USB_SIZEOF_DEVDESC 18
/* Configuration descriptor */
struct usb_cfgdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t totallen[2]; /* Total length */
uint8_t ninterfaces; /* Number of interfaces */
uint8_t cfgvalue; /* Configuration value */
uint8_t icfg; /* Configuration */
uint8_t attr; /* Attributes */
uint8_t mxpower; /* Max power (mA/2) */
};
#define USB_SIZEOF_CFGDESC 9
struct usb_otherspeedconfigdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t totallen[2]; /* Total length */
uint8_t ninterfaces; /* Number of interfaces */
uint8_t cfgvalue; /* Configuration value */
uint8_t icfg; /* Configuration */
uint8_t attr; /* Attributes */
uint8_t mxpower; /* Max power (mA/2) */
};
#define USB_SIZEOF_OTHERSPEEDCONFIGDESC 9
/* String descriptor */
struct usb_strdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t data[2];
};
/* Interface descriptor */
struct usb_ifdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t ifno; /* Interface number */
uint8_t alt; /* Alternate setting */
uint8_t neps; /* Number of endpoints */
uint8_t classid; /* Interface class */
uint8_t subclass; /* Interface sub-class */
uint8_t protocol; /* Interface protocol */
uint8_t iif; /* iInterface */
};
#define USB_SIZEOF_IFDESC 9
/* Endpoint descriptor */
struct usb_epdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t addr; /* Endpoint address */
uint8_t attr; /* Endpoint attributes */
uint8_t mxpacketsize[2]; /* Maximum packet size */
uint8_t interval; /* Interval */
};
#define USB_SIZEOF_EPDESC 7
struct usb_audioepdesc_s {
struct usb_epdesc_s ep;
uint8_t refresh;
uint8_t synchaddr;
};
#define USB_SIZEOF_AUDIOEPDESC 9
/* Device qualifier descriptor */
struct usb_qualdesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t usb[2]; /* USB version */
uint8_t classid; /* Qualifier class */
uint8_t subclass; /* Qualifier sub-class */
uint8_t protocol; /* Qualifier protocol */
uint8_t mxpacketsize; /* Max packet size (ep0) */
uint8_t nconfigs; /* Number of configurations */
uint8_t reserved;
};
#define USB_SIZEOF_QUALDESC 10
/* Interface association descriptor
*
* The Universal Serial Bus Specification, revision 2.0, does not support grouping
* more than one interface of a composite device within a single function. However,
* the USB Device Working Group (DWG) created USB device classes that allow for
* functions with multiple interfaces, and the USB Implementor's Forum issued an
* Engineering Change Notification (ECN) that defines a mechanism for grouping
* interfaces.
*/
struct usb_iaddesc_s {
uint8_t len; /* Descriptor length */
uint8_t type; /* Descriptor type */
uint8_t firstif; /* Number of first interface of the function */
uint8_t nifs; /* Number of interfaces associated with the function */
uint8_t classid; /* Class code */
uint8_t subclass; /* Sub-class code */
uint8_t protocol; /* Protocol code */
uint8_t ifunction; /* Index to string identifying the function */
};
#define USB_SIZEOF_IADDESC 8
/* Microsoft OS function descriptor.
* This can be used to request a specific driver (such as WINUSB) to be loaded
* on Windows. Unlike other descriptors, it is requested by a special request
* USB_REQ_GETMSFTOSDESCRIPTOR.
* More details: https://msdn.microsoft.com/en-us/windows/hardware/gg463179
* And excellent explanation: https://github.com/pbatard/libwdi/wiki/WCID-Devices
*
* The device will have exactly one "Extended Compat ID Feature Descriptor",
* which may contain multiple "Function Descriptors" associated with different
* interfaces.
*/
struct usb_msft_os_function_desc_s {
uint8_t firstif; /* Index of first associated interface */
uint8_t nifs; /* Number of associated interfaces */
uint8_t compatible_id[8]; /* COMPATIBLE_ID of the driver to load */
uint8_t sub_id[8]; /* SUB_COMPATIBLE_ID of the driver */
uint8_t reserved[6];
};
struct usb_msft_os_feature_desc_s {
uint8_t len[4]; /* Descriptor length */
uint8_t version[2]; /* Descriptor syntax version, 0x0100 */
uint8_t index[2]; /* Set to 4 for "extended compat ID descriptors" */
uint8_t count; /* Number of function sections */
uint8_t reserved[7];
struct usb_msft_os_function_desc_s function[1];
};
/* Microsoft OS extended property descriptor.
* This can be used to set specific registry values, such as interface GUID for
* a device. It is requested per-interface by special request USB_REQ_GETMSFTOSDESCRIPTOR.
*
* The interface will have one extended properties descriptor, which may contain
* multiple properties inside it.
*/
struct usb_msft_os_extprop_hdr_s {
uint8_t len[4]; /* Descriptor length */
uint8_t version[2]; /* Descriptor syntax version, 0x0100 */
uint8_t index[2]; /* Set to 5 for "extended property descriptors" */
uint8_t count[2]; /* Number of property sections */
/* The properties are appended after the header and follow this format:
* uint8_t prop_len[4];
* uint8_t data_type[4];
* uint8_t name_len[2];
* uint8_t name[name_len];
* uint8_t data_len[4];
* uint8_t data[data_len];
*/
};
/************************************************************************************
* Public Data
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
#endif // __INCLUDE_TINYARA_USB_USB_H
|
34e8bb3adb6da678950f22815e948a1f3ec11f5b
|
9de0cec678bc4a3bec2b4adabef9f39ff5b4afac
|
/PWGJE/EMCALJetTasks/macros/AddTaskFullpAJets.C
|
07525c913eccae511e90f07c359d5050e268f0b6
|
[] |
permissive
|
alisw/AliPhysics
|
91bf1bd01ab2af656a25ff10b25e618a63667d3e
|
5df28b2b415e78e81273b0d9bf5c1b99feda3348
|
refs/heads/master
| 2023-08-31T20:41:44.927176
| 2023-08-31T14:51:12
| 2023-08-31T14:51:12
| 61,661,378
| 129
| 1,150
|
BSD-3-Clause
| 2023-09-14T18:48:45
| 2016-06-21T19:31:29
|
C++
|
UTF-8
|
C
| false
| false
| 6,134
|
c
|
AddTaskFullpAJets.C
|
AliAnalysisTaskFullpAJets *AddTaskFullpAJets(const char* proj_name, const Double_t jetRadius = 0.4, Bool_t IsMC = kFALSE, const char* track_name = "PicoTracks", const char* clus_name = "caloClusters", const char* corrclus_name = "caloClustersCorr", const char* mcpart_name = "MCParticles", TString Centrality_name = "V0A", Double_t scaleFactor = 1.28, Double_t nefJetCut = 1.0, Bool_t doNEF = kFALSE, Bool_t signalTrackBias = kFALSE, Bool_t doTrackQA = kFALSE, Bool_t doClusterQA = kFALSE, Int_t calcRhoJet = 0, Bool_t doNEFSignalOnly = kTRUE, Bool_t doVertexRCut = kTRUE, Bool_t isMCParticleLevel = kFALSE, Double_t jetRAccept = 0.4, Bool_t doTHnSparse = kFALSE, Bool_t doJetRhoDensity = kFALSE, Int_t setTriggerClass = 0, Bool_t do3DHistos = kFALSE)
{
char *usedTracks = track_name;
char *usedClusters = clus_name;
char *outClusName = corrclus_name;
char *usedMCParticles = mcpart_name;
char *projName = proj_name;
const Double_t minTrackPt=0.15;
const Double_t minClusterPt=0.30;
const Double_t minMCPartPt=0.00;
TString centEst = Centrality_name;
Double_t scaleFac = scaleFactor; // Obtained from previous runs...
Double_t NEFSignalJetCut = nefJetCut; // Require signal jet to not exceed a Neutral Energy Fraction of this setting...
// Some constants for the jet finders
const Int_t cKT=0;
const Int_t cANTIKT=1;
const Int_t cFULLJETS=0;
const Int_t cCHARGEDJETS=1;
const Int_t cNEUTRALJETS=2;
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr)
{
Error("AddTaskJetCommon","No analysis manager found.");
return 0;
}
// Determine the int of the jet radius for naming purposes
Int_t drjet=Int_t(100*jetRadius);
if (drjet%10 == 0)
{
drjet/=10;
}
TString taskName = Form("AnalysisFullpAJetsR%d",drjet);
TString listName = Form("List%sR%d",projName,drjet);
TString fileName = Form("%s:FullpAJets", AliAnalysisManager::GetCommonFileName());
// Jet finders (RECONSTRUCTED DATA)
TString tmpTaskName("");
AliEmcalJetTask* jetFinderTask = NULL;
gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJet.C");
// Add User Task
AliAnalysisTaskFullpAJets *task = new AliAnalysisTaskFullpAJets(taskName);
// Used for physics selection
task->SetUseAliAnaUtils(kTRUE);
task->DoVertexRCut(doVertexRCut);
if (IsMC == kTRUE)
{
task->SetTrackName(usedMCParticles);
task->SetClusterName("");
task->SetTrackPtCut(minMCPartPt);
task->SetClusterPtCut(minMCPartPt);
task->SetMCParticleLevel(isMCParticleLevel);
// ########## CHARGED JETS ##########
jetFinderTask = AddTaskEmcalJet(usedMCParticles,"",cKT,jetRadius,cCHARGEDJETS,minMCPartPt,minMCPartPt,0.005,1,"Jet");
task->SetkTChargedJetName(jetFinderTask->GetName());
jetFinderTask = AddTaskEmcalJet(usedMCParticles,"",cANTIKT,jetRadius,cCHARGEDJETS,minMCPartPt,minMCPartPt,0.005,1,"Jet");
task->SetAkTChargedJetName(jetFinderTask->GetName());
// ########## FULL JETS ##########
// No Full jets or clusters are used if run over MCParticles!
task->SetkTFullJetName("");
task->SetAkTFullJetName("");
}
else
{
task->SetTrackName(usedTracks);
task->SetClusterName(outClusName);
task->SetTrackPtCut(minTrackPt);
task->SetClusterPtCut(minClusterPt);
// ########## CHARGED JETS ##########
jetFinderTask = AddTaskEmcalJet(usedTracks,"",cKT,jetRadius,cCHARGEDJETS,minTrackPt,minClusterPt,0.005,1,"Jet");
task->SetkTChargedJetName(jetFinderTask->GetName());
jetFinderTask = AddTaskEmcalJet(usedTracks,"",cANTIKT,jetRadius,cCHARGEDJETS,minTrackPt,minClusterPt,0.005,1,"Jet");
task->SetAkTChargedJetName(jetFinderTask->GetName());
// ########## FULL JETS ##########
jetFinderTask = AddTaskEmcalJet(usedTracks,outClusName,cKT,jetRadius,cFULLJETS,minTrackPt,minClusterPt,0.005,1,"Jet");
task->SetkTFullJetName(jetFinderTask->GetName());
jetFinderTask = AddTaskEmcalJet(usedTracks,outClusName,cANTIKT,jetRadius,cFULLJETS,minTrackPt,minClusterPt,0.005,1,"Jet");
task->SetAkTFullJetName(jetFinderTask->GetName());
}
// Set Trigger
// setTriggerClass == 0 -> MB or kINT7 trigger doesn't need to be set
if (setTriggerClass == 1) // i.e. EMCal Jet Trigger kJ1, pT,jet > 20 GeV
{
task->SetTrigClass("J1");
}
else if (setTriggerClass == 2) // i.e. EMCal Jet Trigger kJ2, pT,jet > 10 GeV
{
task->SetTrigClass("J2");
}
else if (setTriggerClass == 3) // i.e. EMCal Gamma Trigger kG1
{
task->SetTrigClass("G1");
}
else if (setTriggerClass == 4) // i.e. EMCal Gamma Trigger kG2
{
task->SetTrigClass("G2");
}
else if (setTriggerClass == 5) // i.e. EMCal Trigger kL0
{
task->SetTrigClass("L0");
}
else if (setTriggerClass == -1) // i.e. EMCal Jet Trigger not defined
{
task->SetTrigClass("ND");
}
task->SetRjet(drjet);
task->SetJetRAcceptance(jetRAccept);
task->SetCentralityTag(centEst.Data());
task->SetScaleFactor(scaleFac);
task->SelectCollisionCandidates(AliVEvent::kINT7);
task->SetNColl(7);
task->SetNEFSignalJetCut(NEFSignalJetCut);
task->DoNEFCalibration(doNEF);
task->DoNEFSignalOnly(doNEFSignalOnly);
task->SetJetChargeBias(signalTrackBias);
task->DoTrackQA(doTrackQA);
task->DoClusterQA(doClusterQA);
task->CalculateRhoJet(calcRhoJet);
task->DoTHnSparse(doTHnSparse);
task->DoJetRhoDensity(doJetRhoDensity);
task->Do3DPlotting(do3DHistos);
mgr->AddTask(task);
AliAnalysisDataContainer *coutput = mgr->CreateContainer(listName,TList::Class(),AliAnalysisManager::kOutputContainer,fileName);
mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
mgr->ConnectOutput(task,1,coutput);
return task;
}
|
db895dbb49f7ab9df170e645da6cd059b7eb61fc
|
e683a0b8dbb87c7ceb99e0d06896174a559d2c67
|
/Tools/swat/rpc.h
|
3794f5ecea8254393b4638d3a3a6f1c23d06dfd1
|
[
"Apache-2.0"
] |
permissive
|
bluewaysw/pcgeos
|
f093d79567d977d992f47065056d14d5a04b9f14
|
c6ae4c8e77b54b9ff654c3916f2191f8b1a1b65d
|
refs/heads/master
| 2023-08-31T00:17:54.481175
| 2023-08-29T19:00:49
| 2023-08-29T19:00:49
| 157,968,410
| 603
| 88
|
Apache-2.0
| 2023-09-13T07:44:06
| 2018-11-17T09:09:55
|
Assembly
|
UTF-8
|
C
| false
| false
| 43,361
|
h
|
rpc.h
|
/***********************************************************************
*
* Copyright (c) Berkeley Softworks 1989 -- All Rights Reserved
*
* PROJECT: PCGEOS
* MODULE: Swat -- Communications protocol definitions
* FILE: rpc.h
*
* AUTHOR: Adam de Boor: Aug 9, 1988
*
* REVISION HISTORY:
* Date Name Description
* ---- ---- -----------
* 8/ 9/88 ardeb Initial version
*
* DESCRIPTION:
* Protocol structure definitions to be included by both the stub
* and Swat.
*
* NOTE: If the structures change, the Type descriptions in the
* various modules (ibm.c, atron.c, handle.c) must also be updated.
*
* NOTE: Any use of LONGs in the protocol *must* be aligned on a
* longword boundary w/in the structure or the stub and Swat will
* be using different structures when Swat is run on a Sparc,
* which will pad the structure to align the LONG field.
*
* $Id: rpc.h,v 4.30 97/05/23 08:26:13 weber Exp $
*
***********************************************************************/
#ifndef _RPC_H_
#define _RPC_H_ 1
/* START C DEFINITIONS */
/*
* Any C preprocessor defines or C type definitions that should not also
* be in rpc.def must be placed between comment lines containing
* "START C DEFINITIONS" and "END C DFEINITIONS".
*/
#if defined(_MSC_VER)
/* We must have our structures be exact and not aligned to 8 bytes */
#pragma pack(push, 2)
#endif
#if defined(__WATCOMC__)
#pragma pack(push, 2)
#endif
/*
* Macros for defining the structures
*/
#define STRUCT(name) typedef struct name {
#define BYTE(field) unsigned char field;
#define WORD(field) unsigned short field;
#define LONG(field) unsigned long field;
#define BYTEA(field,sz) unsigned char field[sz];
#define WORDA(field,sz) unsigned short field[sz];
#define LONGA(field,sz) unsigned long field[sz];
#define FSTRUC(field,type) type field;
#define ENDST(name) } name;
#if defined(_WIN32)
# include <time.h>
#else
# include <sys/time.h>
#endif
#include <objfmt.h>
#if defined(_MSDOS) || defined(_WIN32)
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
/*
* Operations on timevals.
*
* NB: timercmp does not work for >= or <=.
*/
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec cmp (uvp)->tv_sec) || \
(((tvp)->tv_sec == (uvp)->tv_sec) && \
((tvp)->tv_usec cmp (uvp)->tv_usec)))
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif
/*
* Boolean arguments
*/
#ifndef Boolean
#define Boolean int
#endif Boolean
/*
* Flags for Rpc_Watch
*/
#define RPC_READABLE 1
#define RPC_WRITABLE 2
#define RPC_EXCEPTABLE 4
/*
* Rpc_Debug flags
*/
#define RD_STREAM 0x0001 /* Tell about stream readiness */
#define RD_EVENT_QUEUE 0x0002 /* Tell about queueing and deleting events*/
#define RD_EVENT_TAKEN 0x0004 /* Tell about events being taken */
#define RD_CALL 0x0008 /* Tell about our calling */
#define RD_SERVE 0x0010 /* Tell about our servers */
#define RD_PACKET 0x0020 /* Tell about packet stuff */
#define RD_NO_TIMEOUT 0x0040 /* Resend calls forever */
#define RD_CACHE 0x0080 /* Tell about server cache */
#define RETRY_SEC 1
#define RETRY_USEC 0
#define NUM_RETRIES 2
typedef unsigned short Rpc_Proc;
typedef void *Rpc_Opaque;
typedef Rpc_Opaque Rpc_Event; /* Type returned by Rpc_EventCreate */
typedef Rpc_Opaque Rpc_Message; /* Handle for replying to a call */
typedef byte Rpc_Stat; /* Call status */
/*
* communications modes
*/
#define CM_NONE 0
#define CM_SERIAL 1
#define CM_NETWARE 2
#define CM_NPIPE 3
#define CM_SERIAL_TCP 4
/*
* Function definitions for Swat
*/
extern Rpc_Stat Rpc_Call (Rpc_Proc rpcNum,
int inLength, Type inType, Opaque inData,
int outLength, Type outType, Opaque outData);
extern void Rpc_Init (int *argcPtr, char **argv);
extern void Rpc_Exit (Rpc_Proc exitRpcNum);
extern Boolean Rpc_Connect (void);
extern Boolean Rpc_Disconnect (int wakeup);
extern void Rpc_ServerCreate (Rpc_Proc num,
void (*serverProc) (Rpc_Message msg,
int dataLen,
Rpc_Opaque data,
Rpc_Opaque clientData),
Type argType,
Type replyType,
Rpc_Opaque clientData);
extern void Rpc_ServerDelete (Rpc_Proc num);
extern Rpc_Event Rpc_EventCreate (struct timeval *interval,
Boolean (*eventProc) (Rpc_Opaque clientData,
Rpc_Event event),
Rpc_Opaque clientData);
extern void Rpc_EventDelete (Rpc_Event event);
extern void Rpc_EventReset (Rpc_Event event, struct timeval *interval);
extern void Rpc_Watch (int stream, int state,
void (*streamProc) (int stream,
Rpc_Opaque clientData,
int state),
Rpc_Opaque clientData);
extern void Rpc_Ignore (int stream);
extern void Rpc_Error (Rpc_Message msg, Rpc_Stat error);
extern void Rpc_Return (Rpc_Message msg, int replyLen, Rpc_Opaque reply);
extern void Rpc_Abort (void);
extern Address Rpc_IndexToOffset(Patient patient, word index, ObjSym *s);
extern void Rpc_Wait (void);
extern void Rpc_Poll (void);
extern void Rpc_Run (void);
extern void Rpc_Debug (int debug);
extern char *Rpc_ErrorMessage (Rpc_Stat status);
extern char *Rpc_LastError (void);
extern void Rpc_Rs(void);
extern void Rpc_Rss(void);
extern void Rpc_Rssn(void);
extern void Rpc_Rsn(void);
extern int Rpc_ReadFromGeode(Patient patient, dword offset, word size,
word dataType, char *buf,
word dataValue1, word dataValue2);
extern void Rpc_Push(int stream);
extern Boolean Rpc_Pop(int stream);
#if defined(_WIN32)
extern Boolean Rpc_NtserialInit(const char *tty);
#endif
/*
* C defines REGS_32, while assembly defines _Regs_32. We define and use the
* assembly version here so we don't have to pull any (other) ugly tricks in
* the rpc.sed script. So, make sure you use the assembly define from hereon.
*/
#if REGS_32
#define _Regs_32 1
#else
#define _Regs_32 0
#endif
#if _Regs_32
int RegisterMapping(int regIndex) ; /* Convert REG_AX types to reg_ax types */
#else
#define RegisterMapping(regIndex) (regIndex)
#endif
#define Reg32(regarray, index) *((dword *)&((regarray).reg_regs[index]))
/* END C DEFINITIONS */
#define True 1
#define False 0
/*
* Special handle ID's. Used mostly by Swat itself, not the stub.
*/
#define HID_KTHREAD 0
#define HID_KCODE 1
#define HID_KINIT 2
#define HID_KDATA 16
#define HID_DOS 4
#define HID_SWAT 5
#define HID_BIOS 6
#define HID_PSP 7
#define HID_KROUT 8
#define RPC_SUCCESS 0 /* Call succeeded, here's reply data */
#define RPC_CANTSEND 1 /* Couldn't send message, for some
* reason */
#define RPC_TIMEDOUT 2 /* Message timed out */
#define RPC_TOOBIG 3 /* Results (or message) too big */
#define RPC_NOPROC 4 /* No such procedure on remote
* machine */
#define RPC_ACCESS 5 /* Permission denied */
#define RPC_BADARGS 6 /* Arguments were improper */
#define RPC_SYSTEMERR 7 /* Undefined system error */
#define RPC_SWAPPED 8 /* Data are swapped and can't be
* brought in */
#define RPC_NOHANDLE 9 /* No such handle */
#define RPC_NOTATTACHED 10 /* Not attached to PC */
#define RPC_INCOMPAT 11 /* Target PC is incompatible, somehow */
/*
* Protocol revision number. Swat will refuse to connect to a stub of a
* lower revision number than this.
*/
#define RPC_REVISION1 16 /* Revision for Release 1 */
#define RPC_REVISION 24
/*
* Each RPC call and reply consists of a header and data.
*
* The header contains bookkeeping info along with the number of bytes of data
* that follow. The data are padded to a word boundary to make access of
* parameters as efficient as possible.
*
* All data are sent in the PC's byte-order (little endian)
*/
#define RPC_CALL 1 /* Message is a call */
#define RPC_REPLY 2 /* Message is a reply */
#define RPC_ERROR 4 /* Message is an error reply. reply data is
* status code */
#define RPC_ACK 8 /* Message is an explicit acknowledge */
STRUCT(RpcHeader)
BYTE(rh_flags) /* Flags for the message */
BYTE(rh_procNum) /* Procedure called */
BYTE(rh_length) /* Number of bytes of parameters */
BYTE(rh_id) /* Sequence number */
ENDST(RpcHeader)
#define RPC_MAX_DATA 255
/*
* Link-level framing constants. Each message begins with RPC_MSG_START
* and ends with RPC_MSG_END. Any occurrence of these characters within
* the message itself is quoted with RPC_MSG_QUOTE, followed by either
* RPC_MSG_QUOTE_START or RPC_MSG_QUOTE_END. RPC_MSG_QUOTE itself is quoted
* by the two-byte sequence RPC_MSG_QUOTE RPC_MSG_QUOTE_QUOTE.
*/
#define RPC_MSG_START 0x10 /* Start-of-message byte */
#define RPC_MSG_END 0x11 /* End-of-message byte */
#define RPC_MSG_QUOTE 0x12 /* Lead byte for 2-byte quote sequence */
#define RPC_MSG_QUOTE_START 'S'
#define RPC_MSG_QUOTE_END 'E'
#define RPC_MSG_QUOTE_QUOTE 'Q'
/*
* Register structure transmitted by the PC
*/
#if _Regs_32
#define REG_NUM_REGS 22 /* Number of "general" registers */
#define reg_ax 0
#define reg_eax 0
#define reg_cx 4
#define reg_ecx 4
#define reg_dx 8
#define reg_edx 8
#define reg_bx 12
#define reg_ebx 12
#define reg_sp 16
#define reg_esp 16
#define reg_bp 20
#define reg_ebp 20
#define reg_si 24
#define reg_esi 24
#define reg_di 28
#define reg_edi 28
#define reg_es 32
#define reg_cs 34
#define reg_ss 36
#define reg_ds 38
#define reg_fs 40
#define reg_gs 42
STRUCT(IbmRegs)
WORDA(reg_regs, REG_NUM_REGS)/* General registers */
WORD(reg_ip) /* IP */
LONG(reg_eflags) /* Flags register */
WORD(reg_xipPage) /* current xip page for thread */
ENDST(IbmRegs)
#else
#define REG_NUM_REGS 12 /* Number of "general" registers */
#define reg_ax 0
#define reg_cx 2
#define reg_dx 4
#define reg_bx 6
#define reg_sp 8
#define reg_bp 10
#define reg_si 12
#define reg_di 14
#define reg_es 16
#define reg_cs 18
#define reg_ss 20
#define reg_ds 22
STRUCT(IbmRegs)
WORDA(reg_regs, REG_NUM_REGS)/* General registers */
WORD(reg_ip) /* IP */
WORD(reg_flags) /* Flags register */
WORD(reg_xipPage) /* current xip page for thread */
ENDST(IbmRegs)
#endif /* _Regs_32 */
/*
* Initialization
*/
#define RPC_INIT_BASE 0
#define RPC_BEEP (RPC_INIT_BASE) /* Call sent to see if stub is
* awake. If so, returns the
* checksum for the loaded kernel
* as well as the revision for
* the stub (see RPC_REVISION) */
STRUCT(BeepReply1) /* Reply to Release1XX RPC_BEEP */
WORD(br1_csum) /* Kernel checksum */
WORD(br1_rev) /* Stub revision */
ENDST(BeepReply1)
STRUCT(BeepReply)
WORD(br_csum) /* Loader's checksum */
WORD(br_rev) /* Stub revision */
WORD(br_baseSeg) /* Loader's base segment */
WORD(br_stubSeg) /* Physical base segment of stub code */
WORD(br_stubSize) /* Total size of stub code and stack */
BYTE(br_stubType) /* Type of stub (see STUB_ constants) */
#define STUB_EMS 0 /* Stub is in EMS board */
#define STUB_ATRON 1 /* Stub is in ATRON board */
#define STUB_LOW 2 /* Stub is in low memory */
#define STUB_BSW 3 /* Stub is in special BSW debug board */
#define STUB_ZOOMER 4 /* Stub is for the Zoomer */
#define STUB_32BIT_REGS 0x80 /* Stub uses 32 bit registers */
#define STUB_GEOS32 0x40
#define STUB_TYPE_MASK 0x3F
BYTE(br_kernelLoaded) /* Non-zero if kernel has been loaded */
WORD(br_sysTablesOff) /* Offset of DOS system table addresses */
WORD(br_sysTablesSeg) /* Segment of same. These are words to avoid
* padding by gcc */
WORD(br_psp) /* Segment of PSP for kernel/stub */
BYTE(br_mask1) /* Mask we're using for controller 1 */
BYTE(br_mask2) /* Mask we're using for controller 2 */
WORD(br_irqHandlers) /* Base of InterruptHandlers table */
#if GEOS32
WORD(br_kstack) /* Stack used by kernal loader */
WORD(br_kstacksize) /* size of Stack used by kernal loader */
WORD(br_biosseg) /* Selector to BIOS read only code memory */
#endif
ENDST(BeepReply)
#define RPC_HELLO (RPC_INIT_BASE+1) /* Startup call sent after
* KERNEL_LOAD received */
#define RPC_KERNEL_LOAD (RPC_INIT_BASE+2) /* Call from stub to say kernel
* is now resident. Passes
* SpawnArgs */
STRUCT(HelloArgs1)
WORD(ha1_kdata) /* Offset to variable segment */
WORD(ha1_bootstrap) /* Bootstrapping, so no need to find
* threads and geodes */
WORD(ha1_HandleTable) /* Offset to HandleTable w/in kdata */
WORD(ha1_currentThread) /* Offset to currentThread variable */
WORD(ha1_geodeListPtr) /* Offset to geodeListPtr */
WORD(ha1_threadListPtr) /* Offset to threadListPtr */
WORD(ha1_dosLock) /* Offset to DOS lock */
WORD(ha1_heapSem) /* Offset to Heap lock */
WORD(ha1_lastHandle) /* Offset to lastHandle */
WORD(ha1_initSeg) /* Offset to BG_initSegment */
WORD(ha1_sysECLevel) /* offset to sysECLevel */
WORD(ha1_DebugLoadResource) /* Offset of resource load vector */
WORD(ha1_DebugMemory) /* Offset of memory state change vector */
WORD(ha1_DebugProcess) /* Offset of process state change vector */
WORD(ha1_MemLock) /* Offset to MemLock routine */
WORD(ha1_EndGeos) /* Offset to EndGeos routine */
WORD(ha1_BlockOnLongQueue) /* Offset to BlockOnLongQueue routine */
WORD(ha1_FileRead) /* Offset to FileRead routine */
WORD(ha1_FilePos) /* Offset to FilePos routine */
ENDST(HelloArgs1)
STRUCT(HelloArgs)
WORD(ha_bootstrap) /* Bootstrapping, so no need to find
* threads and geodes */
WORD(ha_currentThread) /* Offset to currentThread variable */
ENDST(HelloArgs)
/*
* Hello reply structures. Return buffer looks like this (Release1XX):
* HelloReply1
* Geode handle #1
* .
* .
* .
* Geode handle #HelloReply1.hr1_numGeodes
* Thread handle #1
* .
* .
* .
* Thread handle#HelloReply1.hr1_numThreads
*
* The RPC Module will swap the HelloReply1, but the caller will have to
* swap the handle id's by hand, once the number is known.
*
* For Release2, the return buffer is simply a HelloReply structure.
*/
STRUCT(HelloReply1)
WORD(hr1_baseSeg) /* Physical base segment of kernel */
WORD(hr1_initSeg) /* Current physical base of initialization
* code seg (0 if initialization complete) */
WORD(hr1_stubSeg) /* Physical base segment of stub code */
BYTE(hr1_stubType) /* Type of stub (see STUB_ constants) */
BYTE(hr1_pad) /* Padding (word-alignment) */
WORD(hr1_numGeodes) /* Number of geodes loaded */
WORD(hr1_numThreads) /* Number of threads active */
WORD(hr1_curThread) /* Current thread ID */
WORD(hr1_lastHandle) /* The offset of the last handle */
WORD(hr1_sysTablesOff) /* Offset of DOS system table addresses */
WORD(hr1_sysTablesSeg) /* Segment of same. These are words to avoid
* padding by gcc */
WORD(hr1_psp) /* Segment of PSP for kernel/stub */
BYTE(hr1_mask1) /* Mask we're using for controller 1 */
BYTE(hr1_mask2) /* Mask we're using for controller 2 */
WORD(hr1_irqHandlers) /* Base of InterruptHandlers table */
ENDST(HelloReply1)
STRUCT(HelloReply)
WORD(hr_numGeodes) /* Number of geodes loaded */
WORD(hr_numThreads) /* Number of threads active */
WORD(hr_curThread) /* Current thread ID */
WORD(hr_kernelVersion) /* version of kernel */
WORD(hr_curXIPPage) /* get current xip page on startup */
ENDST(HelloReply)
#define STUB_EMS 0 /* Stub is in EMS board */
#define STUB_ATRON 1 /* Stub is in ATRON board */
#define STUB_LOW 2 /* Stub is in low memory */
#define STUB_BSW 3 /* Stub is in special BSW debug board */
#define RPC_MAX_HELLO RPC_MAX_DATA /* Largest reply for RPC_HELLO*/
#define RPC_GOODBYE1 (RPC_INIT_BASE+2) /* Detach from the PC. Replaces
* vectors, etc. */
#define RPC_GOODBYE (RPC_INIT_BASE+3) /* Detach from the PC. Replaces
* vectors, etc. */
#define RPC_EXIT1 (RPC_INIT_BASE+3) /* Detach from the PC and go
* back to MS-DOS. Also sent
* by Stub if kernel exits. */
#define RPC_EXIT (RPC_INIT_BASE+4) /* Detach from the PC and go
* back to MS-DOS. Also sent
* by Stub if kernel exits. */
#define RPC_RELOAD_SYS1 (RPC_INIT_BASE+4) /* Kernel being reloaded after
* running a DOS app */
#define RPC_RELOAD_SYS (RPC_INIT_BASE+5) /* Kernel being reloaded after
* running a DOS app */
#define RPC_DOS_RUN1 (RPC_INIT_BASE+5) /* Exiting to DOS for a bit */
#define RPC_DOS_RUN (RPC_INIT_BASE+6) /* Exiting to DOS for a bit */
#define RPC_SETUP (RPC_INIT_BASE+7) /* set up table of offsets */
STRUCT(SetupReplyArgs)
WORD(sa_kernelHasTable) /* this tells us if its an old kernel */
WORD(sa_tableSize) /* size of the table */
WORD(sa_currentThread)
WORD(sa_geodeListPtr)
WORD(sa_threadListPtr)
WORD(sa_biosLock)
WORD(sa_heapSem)
WORD(sa_DebugLoadResource)
WORD(sa_DebugMemory)
WORD(sa_DebugProces)
WORD(sa_MemLock)
WORD(sa_EndGeos)
WORD(sa_BlockOnLongQueue)
WORD(sa_FileReadFar)
WORD(sa_FilePosFar)
WORD(sa_sysECBlock)
WORD(sa_sysECChecksum)
WORD(sa_sysECLevel)
WORD(sa_systemCounter) /* Offset to systemCounter */
WORD(sa_errorFlag)
WORD(sa_ResourceCallInt) /* Offset to ResourceCallInt */
WORD(sa_ResourceCallInt_end) /* Offset to ResourceCallInt */
WORD(sa_FatalError) /* Offset to FatalError */
WORD(sa_FatalError_end)
WORD(sa_SendMessage) /* Offset to SendMessage */
WORD(sa_SendMessage_end) /* etc etc etc etc etc */
WORD(sa_CallFixed)
WORD(sa_CallFixed_end)
WORD(sa_ObjCallMethodTable)
WORD(sa_ObjCallMethodTable_end)
WORD(sa_CallMethodCommonLoadESDI)
WORD(sa_CallMethodCommonLoadESDI_end)
WORD(sa_ObjCallMethodTableSaveBXSI)
WORD(sa_ObjCallMethodTableSaveBXSI_end)
WORD(sa_CallMethodCommon)
WORD(sa_CallMethodCommon_end)
WORD(sa_MessageDispatchDefaultCallBack)
WORD(sa_MessageDispatchDefaultCallBack_end)
WORD(sa_MessageProcess)
WORD(sa_MessageProcess_end)
WORD(sa_OCCC_callInstanceCommon)
WORD(sa_OCCC_callInstanceCommon_end)
WORD(sa_OCCC_no_save_no_test)
WORD(sa_OCCC_no_save_no_test_end)
WORD(sa_OCCC_save_no_test)
WORD(sa_OCCC_save_no_test_end)
WORD(sa_Idle)
WORD(sa_Idle_end)
WORD(sa_curXIPPage)
WORD(sa_MapXIPPageFar)
WORD(sa_MAPPING_PAGE_SIZE)
WORD(sa_MAPPING_PAGE_ADDRESS)
ENDST(SetupReplyArgs)
/*
* Continuation calls
*/
#define RPC_CNT_BASE 16
#define RPC_CONTINUE (RPC_CNT_BASE+1) /* Continue machine
* unconditionally. Takes a word
* argument giving the state of
* the timer interrupt mask bit.
*/
#define RPC_STEP (RPC_CNT_BASE+3) /* Execute a single instruction in
* the current thread. */
STRUCT(StepReply)
FSTRUC(sr_regs,IbmRegs) /* Current registers */
WORD(sr_thread) /* Current thread (just to make sure) */
WORD(sr_curXIPPage)
ENDST(StepReply)
#define RPC_SKIPBPT (RPC_CNT_BASE+4) /* Execute a single instruction
* in the current thread, storing
* an INT 3 at its start when
* the instruction has executed.
* Continue the machine afterward.
* Word argument is breakpoint
* number to skip.
*/
/*
* Register access
*/
#define RPC_REG_BASE 32
#define RPC_READ_REGS (RPC_REG_BASE) /* Read all registers for the
* given thread (handle is arg,
* IbmRegs is result) */
#define RPC_WRITE_REGS (RPC_REG_BASE+1) /* Write all registers for
* thread (handle and IbmRegs
* are args) */
STRUCT(WriteRegsArgs)
WORD(wra_thread) /* Thread whose registers are to be written */
FSTRUC(wra_regs,IbmRegs) /* Registers to write */
ENDST(WriteRegsArgs)
#define RPC_READ_FPU (RPC_REG_BASE+2) /* Read all the FPU registers */
STRUCT(CoprocRegs)
WORD(cr_control)
WORD(cr_status)
WORD(cr_tag)
WORD(cr_ip)
WORD(cr_opAndHighIP)
WORD(cr_dp)
WORD(cr_highDP)
WORDA(cr_stack,40) /* The stack, from ST(0) to ST(7) */
ENDST(CoprocRegs)
#define RPC_WRITE_FPU (RPC_REG_BASE+3)/* Write all the FPU registers */
/*
* Memory access
*/
#define RPC_MEM_BASE 48
#define RPC_READ_MEM (RPC_MEM_BASE) /* Read memory. Handle, offset and
* 16-bit length are args. No more
* than 512 bytes of data may be
* read at a time. */
STRUCT(ReadArgs) /* Args for reading handle memory */
WORD(ra_offset) /* Offset in block to access */
WORD(ra_handle) /* Handle of data. Should be swapped in
* if necessary and possible. If block has been
* discarded or can't be swapped in, return
* error. */
WORD(ra_numBytes) /* Number of bytes to read */
ENDST(ReadArgs)
#define RPC_WRITE_MEM (RPC_MEM_BASE+1) /* Write memory. Handle, offset
* and 16-bit length are args.
* No more than 512 bytes of
* data may be written at once */
STRUCT(WriteArgs) /* Args for writing to handle memory. Number
* of bytes indicated by length of RPC */
WORD(wa_offset) /* Offset in block to access */
WORD(wa_handle) /* Handle for data */
ENDST(WriteArgs)
#define RPC_FILL_MEM8 (RPC_MEM_BASE+2) /* Fill memory. handle/offset,
* 16-bit length and fill byte are
* args. */
#define RPC_FILL_MEM16 (RPC_MEM_BASE+3) /* Fill memory. handle/offset,
* 16-bit length and fill word are
* args */
STRUCT(FillArgs)
WORD(fa_offset) /* Offset in block */
WORD(fa_handle) /* Handle of data */
WORD(fa_length) /* Number of bytes/words to fill */
WORD(fa_value) /* Value for filling (in low byte if byte
* fill) */
ENDST(FillArgs)
#define RPC_READ_IO8 (RPC_MEM_BASE+4) /* Read from 8-bit I/O port. Arg
* is port number. Reply is
* zero-extended value */
#define RPC_READ_IO16 (RPC_MEM_BASE+5) /* Read from a 16-bit I/O port.
* Arg is port number. Reply is
* 16-bit value */
#define RPC_WRITE_IO8 (RPC_MEM_BASE+6) /* Write to an 8-bit I/O port.
* Args are port number and value*/
#define RPC_WRITE_IO16 (RPC_MEM_BASE+7) /* Write to a 16-bit I/O port. */
STRUCT(IoWriteArgs)
WORD(iow_port) /* Port to write */
WORD(iow_value) /* Use low 8-bits for 8-bit write */
ENDST(IoWriteArgs)
#define RPC_READ_ABS (RPC_MEM_BASE+8) /* Read from absolute memory
* location. Data returned as
* for RPC_READ_MEM */
STRUCT(AbsReadArgs)
WORD(ara_offset) /* Offset into segment */
WORD(ara_segment) /* Segment from which to read */
WORD(ara_numBytes) /* Number of bytes to read */
ENDST(AbsReadArgs)
#define RPC_WRITE_ABS (RPC_MEM_BASE+9) /* Write to absolute memory
* location. Args are segment/offset
* followed by bytes to
* write. Number of bytes implied
* by RPC length */
STRUCT(AbsWriteArgs)
WORD(awa_offset) /* Offset into segment */
WORD(awa_segment) /* Segment to which to write */
ENDST(AbsWriteArgs)
#define RPC_FILL_ABS8 (RPC_MEM_BASE+10) /* Fill memory. Segment/offset,
* 16-bit length and fill byte are
* args. */
#define RPC_FILL_ABS16 (RPC_MEM_BASE+11) /* Fill memory. Segment/offset,
* 16-bit length and fill word are
* args */
STRUCT(AbsFillArgs)
WORD(afa_offset) /* Offset to which to write */
WORD(afa_segment) /* Segment to which to write */
WORD(afa_length) /* Number of bytes/words to fill */
WORD(afa_value) /* Value with which to fill (in low byte
* if byte fill) */
ENDST(AbsFillArgs)
/*
* Block Info
*
* For BLOCK_LOAD, BLOCK_OUT, BLOCK_MOVE, and BLOCK_CHANGE, the machine
* may continue once the RPC has returned.
*/
#define RPC_BLK_BASE 64
#define RPC_BLOCK_LOAD (RPC_BLK_BASE) /* A flagged block has been
* (re)loaded. Passes handle and
* segment address for block.
* Issued in response to a
* DEBUG_SWAPIN call to
* DebugMemory */
STRUCT(LoadArgs)
WORD(la_handle) /* Handle swapped in */
WORD(la_dataAddress) /* New address */
ENDST(LoadArgs)
#define RPC_RES_LOAD (RPC_BLK_BASE+1) /* A module has been loaded. Args
* are as for BLOCK_LOAD.
* Issued in response to a
* DebugLoadResource call */
#define RPC_BLOCK_MOVE (RPC_BLK_BASE+2) /* A block has moved on the heap.
* Passes handle and new segment
* address. Issued in response to
* a DEBUG_MOVE call to
* DebugMemory. */
STRUCT(MoveArgs)
WORD(ma_handle) /* Handle moved */
WORD(ma_dataAddress) /* New address */
ENDST(MoveArgs)
#define RPC_BLOCK_OUT (RPC_BLK_BASE+3) /* A block has been thrown out.
* Passes handle and a byte that
* is non-zero if the block was
* discarded. Issued in response to
* either a DEBUG_DISCARD or a
* DEBUG_SWAPOUT call to
* DebugMemory. */
STRUCT(OutArgs)
WORD(oa_handle) /* Handle swapped out */
WORD(oa_discarded) /* Non-zero if discarded */
ENDST(OutArgs)
#define RPC_BLOCK_REALLOC (RPC_BLK_BASE+4) /* A block has been reallocated.
* Passes handle, seg addr and new
* paragraph size. Issued in
* response to a DEBUG_REALLOC
* call to DebugMemory */
STRUCT(ReallocArgs)
WORD(rea_handle)
WORD(rea_dataAddress)
WORD(rea_paraSize)
ENDST(ReallocArgs)
#define RPC_BLOCK_FREE (RPC_BLK_BASE+5) /* Handle has been freed. Arg is
* handle ID. Issued in response to
* a DEBUG_FREE call to
* DebugMemory. */
#define RPC_BLOCK_FIND (RPC_BLK_BASE+6) /* Find the handle that
* encompasses the given segment.
* Arg is 16-bit segment. Reply is
* handle id and structure. Sought
* handles are marked as debugged.
*/
STRUCT(FindArgs)
WORD(fa_address) /* segment address to find */
WORD(fa_xipPage) /* xip page to consider mapped in */
ENDST(FindArgs)
STRUCT(FindReply)
WORD(fr_id) /* Handle ID */
/*
* Actual handle structure
*/
WORD(fr_dataAddress) /* Data address */
WORD(fr_paraSize) /* Size of data block (paragraphs) */
WORD(fr_owner) /* Handle of owning process */
WORD(fr_otherInfo) /* otherInfo field */
BYTE(fr_flags) /* Handle flags */
BYTE(fr_pad) /* Padding for word alignment */
WORD(fr_xipPage) /* page number if an xip handle, else -1 */
ENDST(FindReply)
#define RPC_BLOCK_INFO (RPC_BLK_BASE+7) /* Read a handle's state. Arg is
* handle ID. Return is InfoReply.
*/
/*
* If requested handle is a thread handle, ir_paraSize contains the max
* SP for the thread, with ir_otherInfo being the SS for the thread; ir_flags
* is undefined.
*/
STRUCT(InfoReply)
WORD(ir_dataAddress) /* Data address */
WORD(ir_paraSize) /* Size of data block (paragraphs) */
WORD(ir_owner) /* Handle of owning process */
WORD(ir_otherInfo) /* otherInfo field */
BYTE(ir_flags) /* Handle flags */
BYTE(ir_pad) /* Padding for word alignment */
WORD(ir_xipPage) /* page number if an xip handle, else -1 */
ENDST(InfoReply)
#define RPC_BLOCK_ATTACH (RPC_BLK_BASE+8) /* Attach to a handle, causing
* the new state of the handle to
* be transmitted when it changes.
* Arg is handle id. */
#define RPC_BLOCK_DETACH (RPC_BLK_BASE+9) /* Opposite of ATTACH */
/*
* Thread manipulation.
*/
#define RPC_THD_BASE 80
#define RPC_SPAWN (RPC_THD_BASE) /* A thread has spawned a new
* thread, or a driver/library
* has been loaded. Passes new
* thread handle (0 for d/l) and
* its owner */
STRUCT(SpawnArgs)
WORD(sa_thread) /* New thread/current thread for d/l */
WORD(sa_owner) /* Owner of new thread */
WORD(sa_ss) /* Initial SS for new thread (0 for appl thread
* and for d/l load) */
WORD(sa_sp) /* Initial SP for new thread (junk for appl thread,
* 0 for d/l load) */
WORD(sa_xipPage) /* current xip page at time of spawn */
ENDST(SpawnArgs)
#define RPC_THREAD_EXIT (RPC_THD_BASE+1) /* A thread has exited. Passes
* the thread handle and exit
* status */
STRUCT(ThreadExitArgs)
WORD(tea_handle) /* Thread handle. */
WORD(tea_status) /* Exit status/current thread (for d/l) */
ENDST(ThreadExitArgs)
#define RPC_GEODE_EXIT (RPC_THD_BASE+2) /* A geode has exited. Passes
* handle of exiting geode and
* handle of current thread.
* NOTE: For a process, this will
* come before the THREAD_EXIT for
* the last thread. */
STRUCT(GeodeExitArgs)
WORD(gea_handle) /* Geode handle */
WORD(gea_curThread) /* Current thread */
ENDST(GeodeExitArgs)
/*
* HALT definitions
*/
#define RPC_HLT_BASE 96
#define RPC_HALT (RPC_HLT_BASE) /* Machine stopped for some reason.
* Args are an IbmRegs structure
* with the registers at the time
* of the halt, a word indicating
* the reason for the stop, and a
* word giving the thread that was
* active. These codes
* correspond to the actual
* interrupt generated by the
* exception condition. In the case
* of other intercepted interrupts,
* the interrupt number will be
* passed. */
STRUCT(HaltArgs)
WORD(ha_thread) /* Thread in which it stopped */
FSTRUC(ha_regs,IbmRegs) /* Active registers */
WORD(ha_reason) /* Why machine halted: */
WORD(ha_curXIPPage) /* current XIP page, -1 if not applicable */
ENDST(HaltArgs)
#define RPC_HALT_DIV0 0 /* Divide-by-zero */
#define RPC_HALT_STEP 1 /* Single-step complete. */
#define RPC_HALT_NMI 2 /* NMI recognized */
#define RPC_HALT_BPT 3 /* Processor hit a breakpoint. */
#define RPC_HALT_INTO 4 /* Overflow interrupt */
#define RPC_HALT_BOUND 5 /* Bound error */
#define RPC_HALT_ILLINST 6 /* Illegal instruction */
#define RPC_HALT_PEXT 7 /* Processor extension not present */
#define RPC_HALT_DCHECK 8 /* Double-check fault */
#define RPC_HALT_PEXTERR 9 /* Processor extension overrun */
#define RPC_HALT_INVTSS 10 /* Invalid task-state-segment */
#define RPC_HALT_NOSEG 11 /* Segment not present */
#define RPC_HALT_SSOVER 12 /* Stack segment overrun or absent */
#define RPC_HALT_GP 13 /* General protection fault */
#define RPC_MASK (RPC_HLT_BASE+1) /* Gives two bytes of mask for
* the interrupt controllers while
* the system is halted. I.e.
* enables interrupts to occur
* while the stub is awaiting
* a command */
STRUCT(MaskArgs)
BYTE(ma_PIC1) /* Mask for controller 1 */
BYTE(ma_PIC2) /* Mask for controller 2 */
ENDST(MaskArgs)
#define RPC_INTERRUPT (RPC_HLT_BASE+2) /* Stop the machine! */
#define RPC_CBREAK (RPC_HLT_BASE+3) /* Set a conditional breakpoint.
* UNIX side is responsible for
* changing the instruction...
* Returns the breakpoint #
* (always non-zero) */
/*
* cb_thread must come before cb_regs b/c the IbmRegs structure in HaltArgs
* has reg_ip and reg_flags following the 12 general registers. Putting
* cb_thread first makes for grossness up on unix and cleanliness down on
* the pc...
*/
STRUCT(CBreakArgs)
WORD(cb_ip) /* IP for breakpoint */
WORD(cb_cs) /* CS for breakpoint */
#if _Regs_32
BYTEA(cb_comps,12)
#else
BYTEA(cb_comps,7) /* Comparisons. These are four bits for each
* field being compared. The four bits encode
* the type of comparison to be performed and come
* from the low four bits of the Jcond instruction.
* The bits actually encode the inverse of the
* comparison... 0 implies the value is
* uninteresting. */
BYTE(cb_pad) /* Padding for Sparc... */
#endif
WORD(cb_thread) /* Thread handle active */
WORDA(cb_regs,REG_NUM_REGS) /* Registers for comparison */
/* Stuff for memory word comparison */
WORD(cb_value) /* Value against which word is to be compared.
* Placed before seg:off to allow reference
* via cb_regs... */
WORD(cb_off) /* Offset of word for comparison */
WORD(cb_seg) /* Segment of word for comparison */
WORD(cb_xipPage) /* xip page of handle */
ENDST(CBreakArgs)
#define RPC_NOCBREAK (RPC_HLT_BASE+4) /* Clear conditional breakpoint.
* Pass breakpoint # returned by
* CBREAK */
#define RPC_CHGCBREAK (RPC_HLT_BASE+5) /* Change the criteria of a
* conditional breakpoint */
STRUCT(ChangeCBreakArgs)
WORD(ccba_num) /* Breakpoint number */
FSTRUC(ccba_crit,CBreakArgs) /* New criteria */
ENDST(ChangeCBreakArgs)
#define RPC_SETTBREAK (RPC_HLT_BASE+6) /* Set a tally breakpoint */
STRUCT(SetTBreakArgs)
WORD(stba_ip) /* IP for breakpoint */
WORD(stba_cs) /* CS for breakpoint */
WORD(stba_xipPage) /* xip page */
ENDST(SetTBreakArgs)
STRUCT(SetTBreakReply)
WORD(stbr_num) /* Breakpoint number */
ENDST(SetTBreakReply)
#define RPC_GETTBREAK (RPC_HLT_BASE+7) /* Fetch count for a tbrk.
* Arg is number returned by
* RPC_SETTBREAK, result is
* dword count */
#define RPC_ZEROTBREAK (RPC_HLT_BASE+8) /* Reset the counter for a
* tally breakpoint. Arg is
* number returned by
* RPC_SETTBREAK */
#define RPC_CLEARTBREAK (RPC_HLT_BASE+9) /* Clear a tally breakpoint.
* Arg is number returned by
* RPC_SETTBREAK */
#define RPC_SETTIMEBRK (RPC_HLT_BASE+10) /* Set timing breakpoint.
* Return value is bp number */
STRUCT(SetTimeBrkArgs)
WORD(stiba_ip) /* IP for breakpoint */
WORD(stiba_cs) /* CS for breakpoint */
WORD(stiba_xipPage) /* xip page */
WORD(stiba_endIP) /* IP for ending breakpoint. If stiba_endHandle
* is 0, this is 0 if the routine is near, and
* non-zero if the routine is far. */
WORD(stiba_endHandle) /* Handle of block containing same. 0 if should
* run to completion of the routine */
ENDST(SetTimeBrkArgs)
#define RPC_CLEARTIMEBRK (RPC_HLT_BASE+11) /* Clear a timing breakpoint.
* Arg is the breakpoint
* number */
#define RPC_GETTIMEBRK (RPC_HLT_BASE+12) /* Fetch the time accumulated
* for a timing breakpoint.
* Arg is the breakpoint number.
*/
STRUCT(GetTimeBrkReply)
WORD(gtbr_ticksLow) /* Ticks */
WORD(gtbr_ticksHigh)/* Ticks (cont) */
WORD(gtbr_cus) /* Clock units (19886 per tick) */
WORD(gtbr_countLow) /* Times hit */
WORD(gtbr_countHigh)/* Times hit (cont) */
ENDST(GetTimeBrkReply)
#define RPC_ZEROTIMEBRK (RPC_HLT_BASE+13) /* Reset the accumulated time
* for the given timing break-
* point. Arg is the bp number*/
#define RPC_SETBREAK (RPC_HLT_BASE+14) /* Set unconditional
* breakpoint. Returns bp
* number. */
STRUCT(SetBreakArgs)
WORD(sba_ip)
WORD(sba_cs) /* handle if sba_xip != -1 */
WORD(sba_xip) /* -1 if not xip, xip page if in xip */
ENDST(SetBreakArgs)
#define RPC_CLEARBREAK (RPC_HLT_BASE+15) /* Clear unconditional bp */
/*
* Atron board definitions
*/
#define RPC_ATR_BASE 112
#define RPC_TRACE_FETCH (RPC_ATR_BASE) /* Begin fetching trace records.
* The stub will send them up in
* 30-record chunks, calling
* RPC_TRACE_NEXT in Swat. */
#define RPC_TRACE_NEXT (RPC_ATR_BASE+1)/* Procedure called by the stub to
* transfer trace records up to Swat
* Server should return a single
* byte return value: 1 if more
* records are wanted, 0 if not. */
STRUCT(AtronTraceRecord)
WORD(atr_addrLow) /* Low 16 bits of address */
WORD(atr_data) /* 16 bits of data */
BYTE(atr_bus) /* Bus-control signals */
#define ATRB_DMA 0x01 /* -DMA (DMA cycle) */
#define ATRB_MASTER 0x02 /* -MASTER (Other bus master) */
#define ATRB_IOR 0x04 /* -IOR (I/O read) */
#define ATRB_MRD 0x08 /* -MRD (memory read) */
#define ATRB_MWT 0x10 /* -MWT (memory write) */
#define ATRB_IOW 0x20 /* -IOW (I/O write) */
#define ATRB_REFRESH 0x40 /* REFRESH (memory-refresh cycle) */
#define ATRB_BHE 0x80 /* High byte of data bus valid */
BYTE(atr_misc) /* Miscellaneous signals from coprocessor
* and board */
#define ATRM_S0 0x01 /* S0 (queue status 0 -- not valid on
* all machines) */
#define ATRM_COD 0x02 /* COD/-INTA line from processor */
#define ATRM_S1 0x04 /* S1 (queue status 1 -- not valid on all
* machines) */
#define ATRM_PEACK 0x08 /* Cycle on behalf of processor extension */
#define ATRM_RUN 0x10 /* Board in free-running mode */
#define ATRM_HWBP 0x20 /* Hardware breakpoint detected
* (unreliable) */
#define ATRM_MISCBP 0x40 /* Other breakpoint (stop button -- also
* unreliable) */
#define ATRM_IOCHK 0x80 /* -IOCHCHK (I/O channel check) */
BYTE(atr_addrHigh) /* High 8 bits of address */
BYTE(atr_pad) /* Pad to word-boundary */
ENDST(AtronTraceRecord)
#define RPC_BRK_FILL (RPC_ATR_BASE+2)/* Fill a region of breakpoint
* RAM */
STRUCT(BrkFillArgs)
LONG(bfa_addr) /* Address to fill */
WORD(bfa_length) /* Number of bytes to fill */
BYTE(bfa_value) /* Byte to store */
BYTE(bfa_pad) /* Padding for word alignment */
ENDST(BrkFillArgs)
#define RPC_BRK_WRITE (RPC_ATR_BASE+3)/* Write data to breakpoint RAM.
* Args are same as for writing
* regular RAM */
#define RPC_FILE_XFER 128 /* file transfer routines */
#define FILE_XFER_BLOCK_SIZE 230
#define RPC_SEND_FILE RPC_FILE_XFER
#define FILE_XFER_SYNC 127
#define FILE_XFER_ERROR 001
#define FILE_XFER_RETRY 002
#define FILE_XFER_ERROR_DOS_SEM_TAKEN 003
#define FILE_XFER_ERROR_FILE_CREATE_FAILED 004
#define FILE_XFER_QUIT 120
#define RPC_SEND_FILE_NEXT_BLOCK RPC_FILE_XFER+1
/* since we sometimes try to get at data from geodes that are in the geo
* file but not in the geodes resources (ie. file header and resource tables)
* for XIPed geodes, this data must be gereated some other way, for the
* resource tables we can just build out the table by going through the
* handle table in the core block
*/
/* udata can only be gotton from a geo file, the load has no
* geo file, and normal data for XIP geodes is always in memory
* so no need to */
#define GEODE_DATA_UDATA_SIZE 0 /* geode header stuff */
#define GEODE_DATA_LOADER 1 /* a special case for the loader */
#define GEODE_DATA_OFFSETS 2 /* get the resource offsets */
/* leave a gap here in case we need to add any other non-geode cases */
#define GEODE_DATA_GEODE 10 /* defines first real geode data value */
#define GEODE_DATA_FLAGS 10 /* get the resource allocation flags */
#define GEODE_DATA_HEADER 11 /* geode header stuff */
#define GEODE_DATA_NORMAL 12 /* get data from a geodes resource */
#define RPC_READ_GEODE RPC_SEND_FILE_NEXT_BLOCK+1
STRUCT(ReadGeodeArgs)
WORD(RGA_size) /* number of bytes to read */
WORD(RGA_geodeHandle) /* handle of geode used to get at */
LONG(RGA_offset) /* file position to read from */
WORD(RGA_dataType) /* type of data */
WORD(RGA_dataValue1) /* value depends on data type */
WORD(RGA_dataValue2) /* value depends on data type */
ENDST(ReadGeodeArgs) /* the GEOS file handle (GH_geoHandle) */
STRUCT(ReadGeodeReply)
WORD(RGR_size) /* size */
BYTE(RGR_ok) /* is everything ok */
BYTE(RGR_pad) /* a byte of padding so C and ASM agree*/
ENDST(ReadGeodeReply) /* on the size of this thing */
#define RPC_INDEX_TO_OFFSET RPC_READ_GEODE+1
STRUCT(IndexToOffsetArgs)
WORD(ITOA_geodeHandle) /* handle of geode used to get at */
WORD(ITOA_index) /* index into export table to convert */
ENDST(IndexToOffsetArgs)
STRUCT(IndexToOffsetReply)
WORD(ITOR_offset) /* converted offset */
ENDST(IndexToOffsetReply)
#define RPC_FIND_GEODE RPC_INDEX_TO_OFFSET+1 /* geode file search routine */
#define RPC_FIND_GEODE_XFER_SIZE 128 /* data transfer size */
#define RPC_GET_NEXT_DATA_BLOCK RPC_FIND_GEODE+1 /* get a generic chunk of data */
STRUCT(GetNextDataBlock)
WORD(GNDB_size)
ENDST(GetNextDataBlock)
#define RPC_READ_XMS_MEM RPC_GET_NEXT_DATA_BLOCK+1 /* get a chunk of data from xms */
STRUCT(ReadXmsMemArgs)
LONG(RXMA_size) /* size of block to get */
LONG(RXMA_sourceOffset) /* offset into xms block to read from */
WORD(RXMA_sourceHandle) /* handle of xms block to read from */
WORD(RXMA_procSegment) /* segment of xmsAddr */
WORD(RXMA_procOffset) /* offset of xmsAddr */
ENDST(ReadXmsMemArgs)
#define RPC_READ_DEBUG_REGS 135
#define RPC_WRITE_DEBUG_REGS RPC_READ_DEBUG_REGS+1
/* The Intel debugging registers. DR4 and DR5 are unused. */
STRUCT(DebugRegsArgs)
LONG(DRA_dr7) /* control register */
LONG(DRA_dr6) /* status register */
LONG(DRA_dr3) /* linear address 3 */
LONG(DRA_dr2) /* linear address 2 */
LONG(DRA_dr1) /* linear address 1 */
LONG(DRA_dr0) /* linear address 0 */
ENDST(DebugRegsArgs)
/* START C DEFINITIONS */
#if defined(_MSC_VER)
/* Go back to what we had for structure padding/packing */
#pragma pack(pop)
#endif
#if defined(__WATCOMC__)
#pragma pack(pop)
#endif
/* END C DEFINITIONS */
/*
* The last defined RPC
*/
#define RPC_LAST RPC_WRITE_DEBUG_REGS
#endif /* _RPC_H_ */
|
7777def7c6f7b854ea1af6dd1c13705b26a4629f
|
ac927e79d8c3fb7e1be6d4eb316ddea5920b1a60
|
/src/base/abc/abcAig.c
|
ff6022b8ec43b842f14ca9a294d33eb8a3edea0c
|
[
"MIT-Modern-Variant"
] |
permissive
|
berkeley-abc/abc
|
f4cb3886bd4c34448b1b5c154fbed96f6095e6e1
|
756e21a81de1fe799df8189f77c4ea34399d2c8e
|
refs/heads/master
| 2023-08-22T17:11:30.017600
| 2023-08-20T08:50:59
| 2023-08-20T08:50:59
| 124,750,053
| 727
| 336
|
NOASSERTION
| 2023-09-13T18:24:40
| 2018-03-11T11:33:37
|
C
|
UTF-8
|
C
| false
| false
| 50,288
|
c
|
abcAig.c
|
/**CFile****************************************************************
FileName [abcAig.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Network and node package.]
Synopsis [Simple structural hashing package.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: abcAig.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#include "abc.h"
ABC_NAMESPACE_IMPL_START
/*
AIG is an And-Inv Graph with structural hashing.
It is always structurally hashed. It means that at any time:
- for each AND gate, there are no other AND gates with the same children
- the constants are propagated
- there is no single-input nodes (inverters/buffers)
Additionally the following invariants are satisfied:
- there are no dangling nodes (the nodes without fanout)
- the level of each AND gate reflects the levels of this fanins
- the EXOR-status of each node is up-to-date
- the AND nodes are in the topological order
- the constant 1 node has always number 0 in the object list
The operations that are performed on AIGs:
- building new nodes (Abc_AigAnd)
- performing elementary Boolean operations (Abc_AigOr, Abc_AigXor, etc)
- replacing one node by another (Abc_AigReplace)
- propagating constants (Abc_AigReplace)
When AIG is duplicated, the new graph is structurally hashed too.
If this repeated hashing leads to fewer nodes, it means the original
AIG was not strictly hashed (one of the conditions above is violated).
*/
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
// the simple AIG manager
struct Abc_Aig_t_
{
Abc_Ntk_t * pNtkAig; // the AIG network
Abc_Obj_t * pConst1; // the constant 1 object (not a node!)
Abc_Obj_t ** pBins; // the table bins
int nBins; // the size of the table
int nEntries; // the total number of entries in the table
Vec_Ptr_t * vNodes; // the temporary array of nodes
Vec_Ptr_t * vStackReplaceOld; // the nodes to be replaced
Vec_Ptr_t * vStackReplaceNew; // the nodes to be used for replacement
Vec_Vec_t * vLevels; // the nodes to be updated
Vec_Vec_t * vLevelsR; // the nodes to be updated
Vec_Ptr_t * vAddedCells; // the added nodes
Vec_Ptr_t * vUpdatedNets; // the nodes whose fanouts have changed
int nStrash0;
int nStrash1;
int nStrash5;
int nStrash2;
};
// iterators through the entries in the linked lists of nodes
#define Abc_AigBinForEachEntry( pBin, pEnt ) \
for ( pEnt = pBin; \
pEnt; \
pEnt = pEnt->pNext )
#define Abc_AigBinForEachEntrySafe( pBin, pEnt, pEnt2 ) \
for ( pEnt = pBin, \
pEnt2 = pEnt? pEnt->pNext: NULL; \
pEnt; \
pEnt = pEnt2, \
pEnt2 = pEnt? pEnt->pNext: NULL )
// hash key for the structural hash table
//static inline unsigned Abc_HashKey2( Abc_Obj_t * p0, Abc_Obj_t * p1, int TableSize ) { return ((unsigned)(p0) + (unsigned)(p1) * 12582917) % TableSize; }
//static inline unsigned Abc_HashKey2( Abc_Obj_t * p0, Abc_Obj_t * p1, int TableSize ) { return ((unsigned)((a)->Id + (b)->Id) * ((a)->Id + (b)->Id + 1) / 2) % TableSize; }
// hashing the node
static unsigned Abc_HashKey2( Abc_Obj_t * p0, Abc_Obj_t * p1, int TableSize )
{
unsigned Key = 0;
Key ^= Abc_ObjRegular(p0)->Id * 7937;
Key ^= Abc_ObjRegular(p1)->Id * 2971;
Key ^= Abc_ObjIsComplement(p0) * 911;
Key ^= Abc_ObjIsComplement(p1) * 353;
return Key % TableSize;
}
// structural hash table procedures
static Abc_Obj_t * Abc_AigAndCreate( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 );
static Abc_Obj_t * Abc_AigAndCreateFrom( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1, Abc_Obj_t * pAnd );
static void Abc_AigAndDelete( Abc_Aig_t * pMan, Abc_Obj_t * pThis );
static void Abc_AigResize( Abc_Aig_t * pMan );
// incremental AIG procedures
static void Abc_AigReplace_int( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew, int fUpdateLevel );
static void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan );
static void Abc_AigUpdateLevelR_int( Abc_Aig_t * pMan );
static void Abc_AigRemoveFromLevelStructure( Vec_Vec_t * vStruct, Abc_Obj_t * pNode );
static void Abc_AigRemoveFromLevelStructureR( Vec_Vec_t * vStruct, Abc_Obj_t * pNode );
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Allocates the local AIG manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Aig_t * Abc_AigAlloc( Abc_Ntk_t * pNtkAig )
{
Abc_Aig_t * pMan;
// start the manager
pMan = ABC_ALLOC( Abc_Aig_t, 1 );
memset( pMan, 0, sizeof(Abc_Aig_t) );
// allocate the table
pMan->nBins = Abc_PrimeCudd( 10000 );
pMan->pBins = ABC_ALLOC( Abc_Obj_t *, pMan->nBins );
memset( pMan->pBins, 0, sizeof(Abc_Obj_t *) * pMan->nBins );
pMan->vNodes = Vec_PtrAlloc( 100 );
pMan->vLevels = Vec_VecAlloc( 100 );
pMan->vLevelsR = Vec_VecAlloc( 100 );
pMan->vStackReplaceOld = Vec_PtrAlloc( 100 );
pMan->vStackReplaceNew = Vec_PtrAlloc( 100 );
// create the constant node
assert( pNtkAig->vObjs->nSize == 0 );
pMan->pConst1 = Abc_NtkCreateObj( pNtkAig, ABC_OBJ_NODE );
pMan->pConst1->Type = ABC_OBJ_CONST1;
pMan->pConst1->fPhase = 1;
pNtkAig->nObjCounts[ABC_OBJ_NODE]--;
// save the current network
pMan->pNtkAig = pNtkAig;
return pMan;
}
/**Function*************************************************************
Synopsis [Deallocates the local AIG manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigFree( Abc_Aig_t * pMan )
{
assert( Vec_PtrSize( pMan->vStackReplaceOld ) == 0 );
assert( Vec_PtrSize( pMan->vStackReplaceNew ) == 0 );
// free the table
if ( pMan->vAddedCells )
Vec_PtrFree( pMan->vAddedCells );
if ( pMan->vUpdatedNets )
Vec_PtrFree( pMan->vUpdatedNets );
Vec_VecFree( pMan->vLevels );
Vec_VecFree( pMan->vLevelsR );
Vec_PtrFree( pMan->vStackReplaceOld );
Vec_PtrFree( pMan->vStackReplaceNew );
Vec_PtrFree( pMan->vNodes );
ABC_FREE( pMan->pBins );
ABC_FREE( pMan );
}
/**Function*************************************************************
Synopsis [Returns the number of dangling nodes removed.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigCleanup( Abc_Aig_t * pMan )
{
Vec_Ptr_t * vDangles;
Abc_Obj_t * pAnd;
int i, nNodesOld;
// printf( "Strash0 = %d. Strash1 = %d. Strash100 = %d. StrashM = %d.\n",
// pMan->nStrash0, pMan->nStrash1, pMan->nStrash5, pMan->nStrash2 );
nNodesOld = pMan->nEntries;
// collect the AND nodes that do not fanout
vDangles = Vec_PtrAlloc( 100 );
for ( i = 0; i < pMan->nBins; i++ )
Abc_AigBinForEachEntry( pMan->pBins[i], pAnd )
if ( Abc_ObjFanoutNum(pAnd) == 0 )
Vec_PtrPush( vDangles, pAnd );
// process the dangling nodes and their MFFCs
Vec_PtrForEachEntry( Abc_Obj_t *, vDangles, pAnd, i )
Abc_AigDeleteNode( pMan, pAnd );
Vec_PtrFree( vDangles );
return nNodesOld - pMan->nEntries;
}
/**Function*************************************************************
Synopsis [Makes sure that every node in the table is in the network and vice versa.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigCheck( Abc_Aig_t * pMan )
{
Abc_Obj_t * pObj, * pAnd;
int i, nFanins, Counter;
Abc_NtkForEachNode( pMan->pNtkAig, pObj, i )
{
nFanins = Abc_ObjFaninNum(pObj);
if ( nFanins == 0 )
{
if ( !Abc_AigNodeIsConst(pObj) )
{
printf( "Abc_AigCheck: The AIG has non-standard constant nodes.\n" );
return 0;
}
continue;
}
if ( nFanins == 1 )
{
printf( "Abc_AigCheck: The AIG has single input nodes.\n" );
return 0;
}
if ( nFanins > 2 )
{
printf( "Abc_AigCheck: The AIG has non-standard nodes.\n" );
return 0;
}
if ( pObj->Level != 1 + (unsigned)Abc_MaxInt( Abc_ObjFanin0(pObj)->Level, Abc_ObjFanin1(pObj)->Level ) )
printf( "Abc_AigCheck: Node \"%s\" has level that does not agree with the fanin levels.\n", Abc_ObjName(pObj) );
pAnd = Abc_AigAndLookup( pMan, Abc_ObjChild0(pObj), Abc_ObjChild1(pObj) );
if ( pAnd != pObj )
printf( "Abc_AigCheck: Node \"%s\" is not in the structural hashing table.\n", Abc_ObjName(pObj) );
}
// count the number of nodes in the table
Counter = 0;
for ( i = 0; i < pMan->nBins; i++ )
Abc_AigBinForEachEntry( pMan->pBins[i], pAnd )
Counter++;
if ( Counter != Abc_NtkNodeNum(pMan->pNtkAig) )
{
printf( "Abc_AigCheck: The number of nodes in the structural hashing table is wrong.\n" );
return 0;
}
// if the node is a choice node, nodes in its class should not have fanouts
Abc_NtkForEachNode( pMan->pNtkAig, pObj, i )
if ( Abc_AigNodeIsChoice(pObj) )
for ( pAnd = (Abc_Obj_t *)pObj->pData; pAnd; pAnd = (Abc_Obj_t *)pAnd->pData )
if ( Abc_ObjFanoutNum(pAnd) > 0 )
{
printf( "Abc_AigCheck: Representative %s", Abc_ObjName(pAnd) );
printf( " of choice node %s has %d fanouts.\n", Abc_ObjName(pObj), Abc_ObjFanoutNum(pAnd) );
return 0;
}
return 1;
}
/**Function*************************************************************
Synopsis [Computes the number of logic levels not counting PIs/POs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigLevel( Abc_Ntk_t * pNtk )
{
Abc_Obj_t * pNode;
int i, LevelsMax;
assert( Abc_NtkIsStrash(pNtk) );
if ( pNtk->nBarBufs )
return Abc_NtkLevel( pNtk );
// perform the traversal
LevelsMax = 0;
Abc_NtkForEachCo( pNtk, pNode, i )
if ( LevelsMax < (int)Abc_ObjFanin0(pNode)->Level )
LevelsMax = (int)Abc_ObjFanin0(pNode)->Level;
return LevelsMax;
}
/**Function*************************************************************
Synopsis [Performs canonicization step.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigAndCreate( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 )
{
Abc_Obj_t * pAnd;
unsigned Key;
// check if it is a good time for table resizing
if ( pMan->nEntries > 2 * pMan->nBins )
Abc_AigResize( pMan );
// order the arguments
if ( Abc_ObjRegular(p0)->Id > Abc_ObjRegular(p1)->Id )
pAnd = p0, p0 = p1, p1 = pAnd;
// create the new node
pAnd = Abc_NtkCreateNode( pMan->pNtkAig );
Abc_ObjAddFanin( pAnd, p0 );
Abc_ObjAddFanin( pAnd, p1 );
// set the level of the new node
pAnd->Level = 1 + Abc_MaxInt( Abc_ObjRegular(p0)->Level, Abc_ObjRegular(p1)->Level );
pAnd->fExor = Abc_NodeIsExorType(pAnd);
pAnd->fPhase = (Abc_ObjIsComplement(p0) ^ Abc_ObjRegular(p0)->fPhase) & (Abc_ObjIsComplement(p1) ^ Abc_ObjRegular(p1)->fPhase);
// add the node to the corresponding linked list in the table
Key = Abc_HashKey2( p0, p1, pMan->nBins );
pAnd->pNext = pMan->pBins[Key];
pMan->pBins[Key] = pAnd;
pMan->nEntries++;
// create the cuts if defined
// if ( pAnd->pNtk->pManCut )
// Abc_NodeGetCuts( pAnd->pNtk->pManCut, pAnd );
pAnd->pCopy = NULL;
// add the node to the list of updated nodes
if ( pMan->vAddedCells )
Vec_PtrPush( pMan->vAddedCells, pAnd );
return pAnd;
}
/**Function*************************************************************
Synopsis [Performs canonicization step.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigAndCreateFrom( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1, Abc_Obj_t * pAnd )
{
Abc_Obj_t * pTemp;
unsigned Key;
assert( !Abc_ObjIsComplement(pAnd) );
// order the arguments
if ( Abc_ObjRegular(p0)->Id > Abc_ObjRegular(p1)->Id )
pTemp = p0, p0 = p1, p1 = pTemp;
// create the new node
Abc_ObjAddFanin( pAnd, p0 );
Abc_ObjAddFanin( pAnd, p1 );
// set the level of the new node
pAnd->Level = 1 + Abc_MaxInt( Abc_ObjRegular(p0)->Level, Abc_ObjRegular(p1)->Level );
pAnd->fExor = Abc_NodeIsExorType(pAnd);
// add the node to the corresponding linked list in the table
Key = Abc_HashKey2( p0, p1, pMan->nBins );
pAnd->pNext = pMan->pBins[Key];
pMan->pBins[Key] = pAnd;
pMan->nEntries++;
// create the cuts if defined
// if ( pAnd->pNtk->pManCut )
// Abc_NodeGetCuts( pAnd->pNtk->pManCut, pAnd );
pAnd->pCopy = NULL;
// add the node to the list of updated nodes
// if ( pMan->vAddedCells )
// Vec_PtrPush( pMan->vAddedCells, pAnd );
return pAnd;
}
/**Function*************************************************************
Synopsis [Performs canonicization step.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigAndLookup( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 )
{
Abc_Obj_t * pAnd, * pConst1;
unsigned Key;
assert( Abc_ObjRegular(p0)->pNtk->pManFunc == pMan );
assert( Abc_ObjRegular(p1)->pNtk->pManFunc == pMan );
// check for trivial cases
pConst1 = Abc_AigConst1(pMan->pNtkAig);
if ( p0 == p1 )
return p0;
if ( p0 == Abc_ObjNot(p1) )
return Abc_ObjNot(pConst1);
if ( Abc_ObjRegular(p0) == pConst1 )
{
if ( p0 == pConst1 )
return p1;
return Abc_ObjNot(pConst1);
}
if ( Abc_ObjRegular(p1) == pConst1 )
{
if ( p1 == pConst1 )
return p0;
return Abc_ObjNot(pConst1);
}
/*
{
int nFans0 = Abc_ObjFanoutNum( Abc_ObjRegular(p0) );
int nFans1 = Abc_ObjFanoutNum( Abc_ObjRegular(p1) );
if ( nFans0 == 0 || nFans1 == 0 )
pMan->nStrash0++;
else if ( nFans0 == 1 || nFans1 == 1 )
pMan->nStrash1++;
else if ( nFans0 <= 100 && nFans1 <= 100 )
pMan->nStrash5++;
else
pMan->nStrash2++;
}
*/
{
int nFans0 = Abc_ObjFanoutNum( Abc_ObjRegular(p0) );
int nFans1 = Abc_ObjFanoutNum( Abc_ObjRegular(p1) );
if ( nFans0 == 0 || nFans1 == 0 )
return NULL;
}
// order the arguments
if ( Abc_ObjRegular(p0)->Id > Abc_ObjRegular(p1)->Id )
pAnd = p0, p0 = p1, p1 = pAnd;
// get the hash key for these two nodes
Key = Abc_HashKey2( p0, p1, pMan->nBins );
// find the matching node in the table
Abc_AigBinForEachEntry( pMan->pBins[Key], pAnd )
if ( p0 == Abc_ObjChild0(pAnd) && p1 == Abc_ObjChild1(pAnd) )
{
// assert( Abc_ObjFanoutNum(Abc_ObjRegular(p0)) && Abc_ObjFanoutNum(p1) );
return pAnd;
}
return NULL;
}
/**Function*************************************************************
Synopsis [Returns the gate implementing EXOR of the two arguments if it exists.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigXorLookup( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1, int * pType )
{
Abc_Obj_t * pNode1, * pNode2, * pNode;
// set the flag to zero
if ( pType ) *pType = 0;
// check the case of XOR(a,b) = OR(ab, a'b')'
if ( (pNode1 = Abc_AigAndLookup(pMan, Abc_ObjNot(p0), Abc_ObjNot(p1))) &&
(pNode2 = Abc_AigAndLookup(pMan, p0, p1)) )
{
pNode = Abc_AigAndLookup( pMan, Abc_ObjNot(pNode1), Abc_ObjNot(pNode2) );
if ( pNode && pType ) *pType = 1;
return pNode;
}
// check the case of XOR(a,b) = OR(a'b, ab')
if ( (pNode1 = Abc_AigAndLookup(pMan, p0, Abc_ObjNot(p1))) &&
(pNode2 = Abc_AigAndLookup(pMan, Abc_ObjNot(p0), p1)) )
{
pNode = Abc_AigAndLookup( pMan, Abc_ObjNot(pNode1), Abc_ObjNot(pNode2) );
return pNode? Abc_ObjNot(pNode) : NULL;
}
return NULL;
}
/**Function*************************************************************
Synopsis [Returns the gate implementing EXOR of the two arguments if it exists.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigMuxLookup( Abc_Aig_t * pMan, Abc_Obj_t * pC, Abc_Obj_t * pT, Abc_Obj_t * pE, int * pType )
{
Abc_Obj_t * pNode1, * pNode2, * pNode;
// set the flag to zero
if ( pType ) *pType = 0;
// check the case of MUX(c,t,e) = OR(ct', c'e')'
if ( (pNode1 = Abc_AigAndLookup(pMan, pC, Abc_ObjNot(pT))) &&
(pNode2 = Abc_AigAndLookup(pMan, Abc_ObjNot(pC), Abc_ObjNot(pE))) )
{
pNode = Abc_AigAndLookup( pMan, Abc_ObjNot(pNode1), Abc_ObjNot(pNode2) );
if ( pNode && pType ) *pType = 1;
return pNode;
}
// check the case of MUX(c,t,e) = OR(ct, c'e)
if ( (pNode1 = Abc_AigAndLookup(pMan, pC, pT)) &&
(pNode2 = Abc_AigAndLookup(pMan, Abc_ObjNot(pC), pE)) )
{
pNode = Abc_AigAndLookup( pMan, Abc_ObjNot(pNode1), Abc_ObjNot(pNode2) );
return pNode? Abc_ObjNot(pNode) : NULL;
}
return NULL;
}
/**Function*************************************************************
Synopsis [Deletes an AIG node from the hash table.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigAndDelete( Abc_Aig_t * pMan, Abc_Obj_t * pThis )
{
Abc_Obj_t * pAnd, * pAnd0, * pAnd1, ** ppPlace;
unsigned Key;
assert( !Abc_ObjIsComplement(pThis) );
assert( Abc_ObjIsNode(pThis) );
assert( Abc_ObjFaninNum(pThis) == 2 );
assert( pMan->pNtkAig == pThis->pNtk );
// get the hash key for these two nodes
pAnd0 = Abc_ObjRegular( Abc_ObjChild0(pThis) );
pAnd1 = Abc_ObjRegular( Abc_ObjChild1(pThis) );
Key = Abc_HashKey2( Abc_ObjChild0(pThis), Abc_ObjChild1(pThis), pMan->nBins );
// find the matching node in the table
ppPlace = pMan->pBins + Key;
Abc_AigBinForEachEntry( pMan->pBins[Key], pAnd )
{
if ( pAnd != pThis )
{
ppPlace = &pAnd->pNext;
continue;
}
*ppPlace = pAnd->pNext;
break;
}
assert( pAnd == pThis );
pMan->nEntries--;
// delete the cuts if defined
if ( pThis->pNtk->pManCut )
Abc_NodeFreeCuts( pThis->pNtk->pManCut, pThis );
}
/**Function*************************************************************
Synopsis [Resizes the hash table of AIG nodes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigResize( Abc_Aig_t * pMan )
{
Abc_Obj_t ** pBinsNew;
Abc_Obj_t * pEnt, * pEnt2;
int nBinsNew, Counter, i;
abctime clk;
unsigned Key;
clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd( 3 * pMan->nBins );
// allocate a new array
pBinsNew = ABC_ALLOC( Abc_Obj_t *, nBinsNew );
memset( pBinsNew, 0, sizeof(Abc_Obj_t *) * nBinsNew );
// rehash the entries from the old table
Counter = 0;
for ( i = 0; i < pMan->nBins; i++ )
Abc_AigBinForEachEntrySafe( pMan->pBins[i], pEnt, pEnt2 )
{
Key = Abc_HashKey2( Abc_ObjChild0(pEnt), Abc_ObjChild1(pEnt), nBinsNew );
pEnt->pNext = pBinsNew[Key];
pBinsNew[Key] = pEnt;
Counter++;
}
assert( Counter == pMan->nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", pMan->nBins, nBinsNew );
// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( pMan->pBins );
pMan->pBins = pBinsNew;
pMan->nBins = nBinsNew;
}
/**Function*************************************************************
Synopsis [Resizes the hash table of AIG nodes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigRehash( Abc_Aig_t * pMan )
{
Abc_Obj_t ** pBinsNew;
Abc_Obj_t * pEnt, * pEnt2;
int * pArray;
unsigned Key;
int Counter, Temp, i;
// allocate a new array
pBinsNew = ABC_ALLOC( Abc_Obj_t *, pMan->nBins );
memset( pBinsNew, 0, sizeof(Abc_Obj_t *) * pMan->nBins );
// rehash the entries from the old table
Counter = 0;
for ( i = 0; i < pMan->nBins; i++ )
Abc_AigBinForEachEntrySafe( pMan->pBins[i], pEnt, pEnt2 )
{
// swap the fanins if needed
pArray = pEnt->vFanins.pArray;
if ( pArray[0] > pArray[1] )
{
Temp = pArray[0];
pArray[0] = pArray[1];
pArray[1] = Temp;
Temp = pEnt->fCompl0;
pEnt->fCompl0 = pEnt->fCompl1;
pEnt->fCompl1 = Temp;
}
// rehash the node
Key = Abc_HashKey2( Abc_ObjChild0(pEnt), Abc_ObjChild1(pEnt), pMan->nBins );
pEnt->pNext = pBinsNew[Key];
pBinsNew[Key] = pEnt;
Counter++;
}
assert( Counter == pMan->nEntries );
// replace the table and the parameters
ABC_FREE( pMan->pBins );
pMan->pBins = pBinsNew;
}
/**Function*************************************************************
Synopsis [Performs canonicization step.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigConst1( Abc_Ntk_t * pNtk )
{
assert( Abc_NtkIsStrash(pNtk) );
return ((Abc_Aig_t *)pNtk->pManFunc)->pConst1;
}
/**Function*************************************************************
Synopsis [Performs canonicization step.]
Description [The argument nodes can be complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigAnd( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 )
{
Abc_Obj_t * pAnd;
if ( (pAnd = Abc_AigAndLookup( pMan, p0, p1 )) )
return pAnd;
return Abc_AigAndCreate( pMan, p0, p1 );
}
/**Function*************************************************************
Synopsis [Implements Boolean OR.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigOr( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 )
{
return Abc_ObjNot( Abc_AigAnd( pMan, Abc_ObjNot(p0), Abc_ObjNot(p1) ) );
}
/**Function*************************************************************
Synopsis [Implements Boolean XOR.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigXor( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 )
{
return Abc_AigOr( pMan, Abc_AigAnd(pMan, p0, Abc_ObjNot(p1)),
Abc_AigAnd(pMan, p1, Abc_ObjNot(p0)) );
}
/**Function*************************************************************
Synopsis [Implements Boolean XOR.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigMux( Abc_Aig_t * pMan, Abc_Obj_t * pC, Abc_Obj_t * p1, Abc_Obj_t * p0 )
{
return Abc_AigOr( pMan, Abc_AigAnd(pMan, pC, p1), Abc_AigAnd(pMan, Abc_ObjNot(pC), p0) );
}
/**Function*************************************************************
Synopsis [Implements the miter.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigMiter_rec( Abc_Aig_t * pMan, Abc_Obj_t ** ppObjs, int nObjs )
{
Abc_Obj_t * pObj1, * pObj2;
if ( nObjs == 1 )
return ppObjs[0];
pObj1 = Abc_AigMiter_rec( pMan, ppObjs, nObjs/2 );
pObj2 = Abc_AigMiter_rec( pMan, ppObjs + nObjs/2, nObjs - nObjs/2 );
return Abc_AigOr( pMan, pObj1, pObj2 );
}
/**Function*************************************************************
Synopsis [Implements the miter.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigMiter( Abc_Aig_t * pMan, Vec_Ptr_t * vPairs, int fImplic )
{
int i;
if ( vPairs->nSize == 0 )
return Abc_ObjNot( Abc_AigConst1(pMan->pNtkAig) );
assert( vPairs->nSize % 2 == 0 );
// go through the cubes of the node's SOP
if ( fImplic )
{
for ( i = 0; i < vPairs->nSize; i += 2 )
vPairs->pArray[i/2] = Abc_AigAnd( pMan, (Abc_Obj_t *)vPairs->pArray[i], Abc_ObjNot((Abc_Obj_t *)vPairs->pArray[i+1]) );
}
else
{
for ( i = 0; i < vPairs->nSize; i += 2 )
vPairs->pArray[i/2] = Abc_AigXor( pMan, (Abc_Obj_t *)vPairs->pArray[i], (Abc_Obj_t *)vPairs->pArray[i+1] );
}
vPairs->nSize = vPairs->nSize/2;
return Abc_AigMiter_rec( pMan, (Abc_Obj_t **)vPairs->pArray, vPairs->nSize );
}
/**Function*************************************************************
Synopsis [Implements the miter.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Abc_Obj_t * Abc_AigMiter2( Abc_Aig_t * pMan, Vec_Ptr_t * vPairs )
{
Abc_Obj_t * pMiter, * pXor;
int i;
assert( vPairs->nSize % 2 == 0 );
// go through the cubes of the node's SOP
pMiter = Abc_ObjNot( Abc_AigConst1(pMan->pNtkAig) );
for ( i = 0; i < vPairs->nSize; i += 2 )
{
pXor = Abc_AigXor( pMan, (Abc_Obj_t *)vPairs->pArray[i], (Abc_Obj_t *)vPairs->pArray[i+1] );
pMiter = Abc_AigOr( pMan, pMiter, pXor );
}
return pMiter;
}
/**Function*************************************************************
Synopsis [Replaces one AIG node by the other.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigReplace( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew, int fUpdateLevel )
{
assert( Vec_PtrSize(pMan->vStackReplaceOld) == 0 );
assert( Vec_PtrSize(pMan->vStackReplaceNew) == 0 );
Vec_PtrPush( pMan->vStackReplaceOld, pOld );
Vec_PtrPush( pMan->vStackReplaceNew, pNew );
assert( !Abc_ObjIsComplement(pOld) );
// process the replacements
while ( Vec_PtrSize(pMan->vStackReplaceOld) )
{
pOld = (Abc_Obj_t *)Vec_PtrPop( pMan->vStackReplaceOld );
pNew = (Abc_Obj_t *)Vec_PtrPop( pMan->vStackReplaceNew );
if ( Abc_ObjFanoutNum(pOld) == 0 )
return 0;
Abc_AigReplace_int( pMan, pOld, pNew, fUpdateLevel );
}
if ( fUpdateLevel )
{
Abc_AigUpdateLevel_int( pMan );
if ( pMan->pNtkAig->vLevelsR )
Abc_AigUpdateLevelR_int( pMan );
}
return 1;
}
/**Function*************************************************************
Synopsis [Performs internal replacement step.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigReplace_int( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew, int fUpdateLevel )
{
Abc_Obj_t * pFanin1, * pFanin2, * pFanout, * pFanoutNew, * pFanoutFanout;
int k, v, iFanin;
// make sure the old node is regular and has fanouts
// (the new node can be complemented and can have fanouts)
assert( !Abc_ObjIsComplement(pOld) );
assert( Abc_ObjFanoutNum(pOld) > 0 );
// look at the fanouts of old node
Abc_NodeCollectFanouts( pOld, pMan->vNodes );
Vec_PtrForEachEntry( Abc_Obj_t *, pMan->vNodes, pFanout, k )
{
if ( Abc_ObjIsCo(pFanout) )
{
pFanin1 = Abc_ObjRegular( pNew );
if ( pFanin1->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pFanin1 );
if ( fUpdateLevel && pMan->pNtkAig->vLevelsR )
{
Abc_ObjSetReverseLevel( pFanin1, Abc_ObjReverseLevel(pOld) );
assert( pFanin1->fMarkB == 0 );
if ( !Abc_ObjIsCi(pFanin1) )
{
pFanin1->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_ObjReverseLevel(pFanin1), pFanin1 );
}
}
Abc_ObjPatchFanin( pFanout, pOld, pNew );
continue;
}
// find the old node as a fanin of this fanout
iFanin = Vec_IntFind( &pFanout->vFanins, pOld->Id );
assert( iFanin == 0 || iFanin == 1 );
// get the new fanin
pFanin1 = Abc_ObjNotCond( pNew, Abc_ObjFaninC(pFanout, iFanin) );
assert( Abc_ObjRegular(pFanin1) != pFanout );
// get another fanin
pFanin2 = Abc_ObjChild( pFanout, iFanin ^ 1 );
assert( Abc_ObjRegular(pFanin2) != pFanout );
// check if the node with these fanins exists
if ( (pFanoutNew = Abc_AigAndLookup( pMan, pFanin1, pFanin2 )) )
{ // such node exists (it may be a constant)
// schedule replacement of the old fanout by the new fanout
Vec_PtrPush( pMan->vStackReplaceOld, pFanout );
Vec_PtrPush( pMan->vStackReplaceNew, pFanoutNew );
continue;
}
// such node does not exist - modify the old fanout node
// (this way the change will not propagate all the way to the COs)
assert( Abc_ObjRegular(pFanin1) != Abc_ObjRegular(pFanin2) );
// if the node is in the level structure, remove it
if ( pFanout->fMarkA )
Abc_AigRemoveFromLevelStructure( pMan->vLevels, pFanout );
// if the node is in the level structure, remove it
if ( pFanout->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pFanout );
// remove the old fanout node from the structural hashing table
Abc_AigAndDelete( pMan, pFanout );
// remove the fanins of the old fanout
Abc_ObjRemoveFanins( pFanout );
// recreate the old fanout with new fanins and add it to the table
Abc_AigAndCreateFrom( pMan, pFanin1, pFanin2, pFanout );
assert( Abc_AigNodeIsAcyclic(pFanout, pFanout) );
if ( fUpdateLevel )
{
// schedule the updated fanout for updating direct level
assert( pFanout->fMarkA == 0 );
pFanout->fMarkA = 1;
Vec_VecPush( pMan->vLevels, pFanout->Level, pFanout );
// schedule the updated fanout for updating reverse level
if ( pMan->pNtkAig->vLevelsR )
{
assert( pFanout->fMarkB == 0 );
pFanout->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_ObjReverseLevel(pFanout), pFanout );
}
}
// the fanout has changed, update EXOR status of its fanouts
Abc_ObjForEachFanout( pFanout, pFanoutFanout, v )
if ( Abc_AigNodeIsAnd(pFanoutFanout) )
pFanoutFanout->fExor = Abc_NodeIsExorType(pFanoutFanout);
}
// if the node has no fanouts left, remove its MFFC
if ( Abc_ObjFanoutNum(pOld) == 0 )
Abc_AigDeleteNode( pMan, pOld );
}
/**Function*************************************************************
Synopsis [Performs internal deletion step.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigDeleteNode( Abc_Aig_t * pMan, Abc_Obj_t * pNode )
{
Abc_Obj_t * pNode0, * pNode1, * pTemp;
int i, k;
// make sure the node is regular and dangling
assert( !Abc_ObjIsComplement(pNode) );
assert( Abc_ObjIsNode(pNode) );
assert( Abc_ObjFaninNum(pNode) == 2 );
assert( Abc_ObjFanoutNum(pNode) == 0 );
// when deleting an old node that is scheduled for replacement, remove it from the replacement queue
Vec_PtrForEachEntry( Abc_Obj_t *, pMan->vStackReplaceOld, pTemp, i )
if ( pNode == pTemp )
{
// remove the entry from the replacement array
for ( k = i; k < pMan->vStackReplaceOld->nSize - 1; k++ )
{
pMan->vStackReplaceOld->pArray[k] = pMan->vStackReplaceOld->pArray[k+1];
pMan->vStackReplaceNew->pArray[k] = pMan->vStackReplaceNew->pArray[k+1];
}
pMan->vStackReplaceOld->nSize--;
pMan->vStackReplaceNew->nSize--;
}
// when deleting a new node that should replace another node, do not delete
Vec_PtrForEachEntry( Abc_Obj_t *, pMan->vStackReplaceNew, pTemp, i )
if ( pNode == Abc_ObjRegular(pTemp) )
return;
// remember the node's fanins
pNode0 = Abc_ObjFanin0( pNode );
pNode1 = Abc_ObjFanin1( pNode );
// add the node to the list of updated nodes
if ( pMan->vUpdatedNets )
{
Vec_PtrPushUnique( pMan->vUpdatedNets, pNode0 );
Vec_PtrPushUnique( pMan->vUpdatedNets, pNode1 );
}
// remove the node from the table
Abc_AigAndDelete( pMan, pNode );
// if the node is in the level structure, remove it
if ( pNode->fMarkA )
Abc_AigRemoveFromLevelStructure( pMan->vLevels, pNode );
if ( pNode->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pNode );
// remove the node from the network
Abc_NtkDeleteObj( pNode );
// call recursively for the fanins
if ( Abc_ObjIsNode(pNode0) && pNode0->vFanouts.nSize == 0 )
Abc_AigDeleteNode( pMan, pNode0 );
if ( Abc_ObjIsNode(pNode1) && pNode1->vFanouts.nSize == 0 )
Abc_AigDeleteNode( pMan, pNode1 );
}
/**Function*************************************************************
Synopsis [Updates the level of the node after it has changed.]
Description [This procedure is based on the observation that
after the node's level has changed, the fanouts levels can change too,
but the new fanout levels are always larger than the node's level.
As a result, we can accumulate the nodes to be updated in the queue
and process them in the increasing order of levels.]
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan )
{
Abc_Obj_t * pNode, * pFanout;
Vec_Ptr_t * vVec;
int LevelNew, i, k, v;
// go through the nodes and update the level of their fanouts
Vec_VecForEachLevel( pMan->vLevels, vVec, i )
{
if ( Vec_PtrSize(vVec) == 0 )
continue;
Vec_PtrForEachEntry( Abc_Obj_t *, vVec, pNode, k )
{
if ( pNode == NULL )
continue;
assert( Abc_ObjIsNode(pNode) );
assert( (int)pNode->Level == i );
// clean the mark
assert( pNode->fMarkA == 1 );
pNode->fMarkA = 0;
// iterate through the fanouts
Abc_ObjForEachFanout( pNode, pFanout, v )
{
if ( Abc_ObjIsCo(pFanout) )
continue;
// get the new level of this fanout
LevelNew = 1 + Abc_MaxInt( Abc_ObjFanin0(pFanout)->Level, Abc_ObjFanin1(pFanout)->Level );
assert( LevelNew > i );
if ( (int)pFanout->Level == LevelNew ) // no change
continue;
// if the fanout is present in the data structure, pull it out
if ( pFanout->fMarkA )
Abc_AigRemoveFromLevelStructure( pMan->vLevels, pFanout );
// update the fanout level
pFanout->Level = LevelNew;
// add the fanout to the data structure to update its fanouts
assert( pFanout->fMarkA == 0 );
pFanout->fMarkA = 1;
Vec_VecPush( pMan->vLevels, pFanout->Level, pFanout );
}
}
Vec_PtrClear( vVec );
}
}
/**Function*************************************************************
Synopsis [Updates the level of the node after it has changed.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigUpdateLevelR_int( Abc_Aig_t * pMan )
{
Abc_Obj_t * pNode, * pFanin, * pFanout;
Vec_Ptr_t * vVec;
int LevelNew, i, k, v, j;
// go through the nodes and update the level of their fanouts
Vec_VecForEachLevel( pMan->vLevelsR, vVec, i )
{
if ( Vec_PtrSize(vVec) == 0 )
continue;
Vec_PtrForEachEntry( Abc_Obj_t *, vVec, pNode, k )
{
if ( pNode == NULL )
continue;
assert( Abc_ObjIsNode(pNode) );
assert( Abc_ObjReverseLevel(pNode) == i );
// clean the mark
assert( pNode->fMarkB == 1 );
pNode->fMarkB = 0;
// iterate through the fanins
Abc_ObjForEachFanin( pNode, pFanin, v )
{
if ( Abc_ObjIsCi(pFanin) )
continue;
// get the new reverse level of this fanin
LevelNew = 0;
Abc_ObjForEachFanout( pFanin, pFanout, j )
if ( LevelNew < Abc_ObjReverseLevel(pFanout) )
LevelNew = Abc_ObjReverseLevel(pFanout);
LevelNew += 1;
assert( LevelNew > i );
if ( Abc_ObjReverseLevel(pFanin) == LevelNew ) // no change
continue;
// if the fanin is present in the data structure, pull it out
if ( pFanin->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pFanin );
// update the reverse level
Abc_ObjSetReverseLevel( pFanin, LevelNew );
// add the fanin to the data structure to update its fanins
assert( pFanin->fMarkB == 0 );
pFanin->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, LevelNew, pFanin );
}
}
Vec_PtrClear( vVec );
}
}
/**Function*************************************************************
Synopsis [Removes the node from the level structure.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigRemoveFromLevelStructure( Vec_Vec_t * vStruct, Abc_Obj_t * pNode )
{
Vec_Ptr_t * vVecTemp;
Abc_Obj_t * pTemp;
int m;
assert( pNode->fMarkA );
vVecTemp = Vec_VecEntry( vStruct, pNode->Level );
Vec_PtrForEachEntry( Abc_Obj_t *, vVecTemp, pTemp, m )
{
if ( pTemp != pNode )
continue;
Vec_PtrWriteEntry( vVecTemp, m, NULL );
break;
}
assert( m < Vec_PtrSize(vVecTemp) ); // found
pNode->fMarkA = 0;
}
/**Function*************************************************************
Synopsis [Removes the node from the level structure.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigRemoveFromLevelStructureR( Vec_Vec_t * vStruct, Abc_Obj_t * pNode )
{
Vec_Ptr_t * vVecTemp;
Abc_Obj_t * pTemp;
int m;
assert( pNode->fMarkB );
vVecTemp = Vec_VecEntry( vStruct, Abc_ObjReverseLevel(pNode) );
Vec_PtrForEachEntry( Abc_Obj_t *, vVecTemp, pTemp, m )
{
if ( pTemp != pNode )
continue;
Vec_PtrWriteEntry( vVecTemp, m, NULL );
break;
}
assert( m < Vec_PtrSize(vVecTemp) ); // found
pNode->fMarkB = 0;
}
/**Function*************************************************************
Synopsis [Returns 1 if the node has at least one complemented fanout.]
Description [A fanout is complemented if the fanout's fanin edge pointing
to the given node is complemented.]
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigNodeHasComplFanoutEdge( Abc_Obj_t * pNode )
{
Abc_Obj_t * pFanout;
int i, iFanin;
Abc_ObjForEachFanout( pNode, pFanout, i )
{
iFanin = Vec_IntFind( &pFanout->vFanins, pNode->Id );
assert( iFanin >= 0 );
if ( Abc_ObjFaninC( pFanout, iFanin ) )
return 1;
}
return 0;
}
/**Function*************************************************************
Synopsis [Returns 1 if the node has at least one complemented fanout.]
Description [A fanout is complemented if the fanout's fanin edge pointing
to the given node is complemented. Only the fanouts with current TravId
are counted.]
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigNodeHasComplFanoutEdgeTrav( Abc_Obj_t * pNode )
{
Abc_Obj_t * pFanout;
int i, iFanin;
Abc_ObjForEachFanout( pNode, pFanout, i )
{
if ( !Abc_NodeIsTravIdCurrent(pFanout) )
continue;
iFanin = Vec_IntFind( &pFanout->vFanins, pNode->Id );
assert( iFanin >= 0 );
if ( Abc_ObjFaninC( pFanout, iFanin ) )
return 1;
}
return 0;
}
/**Function*************************************************************
Synopsis [Prints the AIG node for debugging purposes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigPrintNode( Abc_Obj_t * pNode )
{
Abc_Obj_t * pNodeR = Abc_ObjRegular(pNode);
if ( Abc_ObjIsCi(pNodeR) )
{
printf( "CI %4s%s.\n", Abc_ObjName(pNodeR), Abc_ObjIsComplement(pNode)? "\'" : "" );
return;
}
if ( Abc_AigNodeIsConst(pNodeR) )
{
printf( "Constant 1 %s.\n", Abc_ObjIsComplement(pNode)? "(complemented)" : "" );
return;
}
// print the node's function
printf( "%7s%s", Abc_ObjName(pNodeR), Abc_ObjIsComplement(pNode)? "\'" : "" );
printf( " = " );
printf( "%7s%s", Abc_ObjName(Abc_ObjFanin0(pNodeR)), Abc_ObjFaninC0(pNodeR)? "\'" : "" );
printf( " * " );
printf( "%7s%s", Abc_ObjName(Abc_ObjFanin1(pNodeR)), Abc_ObjFaninC1(pNodeR)? "\'" : "" );
printf( "\n" );
}
/**Function*************************************************************
Synopsis [Check if the node has a combination loop of depth 1 or 2.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigNodeIsAcyclic( Abc_Obj_t * pNode, Abc_Obj_t * pRoot )
{
Abc_Obj_t * pFanin0, * pFanin1;
Abc_Obj_t * pChild00, * pChild01;
Abc_Obj_t * pChild10, * pChild11;
if ( !Abc_AigNodeIsAnd(pNode) )
return 1;
pFanin0 = Abc_ObjFanin0(pNode);
pFanin1 = Abc_ObjFanin1(pNode);
if ( pRoot == pFanin0 || pRoot == pFanin1 )
return 0;
if ( Abc_ObjIsCi(pFanin0) )
{
pChild00 = NULL;
pChild01 = NULL;
}
else
{
pChild00 = Abc_ObjFanin0(pFanin0);
pChild01 = Abc_ObjFanin1(pFanin0);
if ( pRoot == pChild00 || pRoot == pChild01 )
return 0;
}
if ( Abc_ObjIsCi(pFanin1) )
{
pChild10 = NULL;
pChild11 = NULL;
}
else
{
pChild10 = Abc_ObjFanin0(pFanin1);
pChild11 = Abc_ObjFanin1(pFanin1);
if ( pRoot == pChild10 || pRoot == pChild11 )
return 0;
}
return 1;
}
/**Function*************************************************************
Synopsis [Resizes the hash table of AIG nodes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigCheckFaninOrder( Abc_Aig_t * pMan )
{
Abc_Obj_t * pEnt;
int i;
for ( i = 0; i < pMan->nBins; i++ )
Abc_AigBinForEachEntry( pMan->pBins[i], pEnt )
{
if ( Abc_ObjRegular(Abc_ObjChild0(pEnt))->Id > Abc_ObjRegular(Abc_ObjChild1(pEnt))->Id )
{
// int i0 = Abc_ObjRegular(Abc_ObjChild0(pEnt))->Id;
// int i1 = Abc_ObjRegular(Abc_ObjChild1(pEnt))->Id;
printf( "Node %d has incorrect ordering of fanins.\n", pEnt->Id );
}
}
}
/**Function*************************************************************
Synopsis [Sets the correct phase of the nodes.]
Description [The AIG nodes should be in the DFS order.]
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigSetNodePhases( Abc_Ntk_t * pNtk )
{
Abc_Obj_t * pObj;
int i;
assert( Abc_NtkIsDfsOrdered(pNtk) );
Abc_AigConst1(pNtk)->fPhase = 1;
Abc_NtkForEachPi( pNtk, pObj, i )
pObj->fPhase = 0;
Abc_NtkForEachLatchOutput( pNtk, pObj, i )
pObj->fPhase = Abc_LatchIsInit1(pObj);
Abc_AigForEachAnd( pNtk, pObj, i )
pObj->fPhase = (Abc_ObjFanin0(pObj)->fPhase ^ Abc_ObjFaninC0(pObj)) & (Abc_ObjFanin1(pObj)->fPhase ^ Abc_ObjFaninC1(pObj));
Abc_NtkForEachPo( pNtk, pObj, i )
pObj->fPhase = (Abc_ObjFanin0(pObj)->fPhase ^ Abc_ObjFaninC0(pObj));
Abc_NtkForEachLatchInput( pNtk, pObj, i )
pObj->fPhase = (Abc_ObjFanin0(pObj)->fPhase ^ Abc_ObjFaninC0(pObj));
}
/**Function*************************************************************
Synopsis [Start the update list.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Ptr_t * Abc_AigUpdateStart( Abc_Aig_t * pMan, Vec_Ptr_t ** pvUpdatedNets )
{
assert( pMan->vAddedCells == NULL );
pMan->vAddedCells = Vec_PtrAlloc( 1000 );
pMan->vUpdatedNets = Vec_PtrAlloc( 1000 );
*pvUpdatedNets = pMan->vUpdatedNets;
return pMan->vAddedCells;
}
/**Function*************************************************************
Synopsis [Start the update list.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigUpdateStop( Abc_Aig_t * pMan )
{
assert( pMan->vAddedCells != NULL );
Vec_PtrFree( pMan->vAddedCells );
Vec_PtrFree( pMan->vUpdatedNets );
pMan->vAddedCells = NULL;
pMan->vUpdatedNets = NULL;
}
/**Function*************************************************************
Synopsis [Start the update list.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigUpdateReset( Abc_Aig_t * pMan )
{
assert( pMan->vAddedCells != NULL );
Vec_PtrClear( pMan->vAddedCells );
Vec_PtrClear( pMan->vUpdatedNets );
}
/**Function*************************************************************
Synopsis [Start the update list.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_AigCountNext( Abc_Aig_t * pMan )
{
Abc_Obj_t * pAnd;
int i, Counter = 0, CounterTotal = 0;
// count how many nodes have pNext set
for ( i = 0; i < pMan->nBins; i++ )
Abc_AigBinForEachEntry( pMan->pBins[i], pAnd )
{
Counter += (pAnd->pNext != NULL);
CounterTotal++;
}
printf( "Counter = %d. Nodes = %d. Ave = %6.2f\n", Counter, CounterTotal, 1.0 * CounterTotal/pMan->nBins );
return Counter;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
void Abc_NtkHelloWorld( Abc_Ntk_t * pNtk )
{
printf( "Hello, World!\n" );
}
ABC_NAMESPACE_IMPL_END
|
66301c4e97f4849adb6a5b9a1dfad9703d63aecd
|
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
|
/SOFTWARE/A64-TERES/linux-a64/arch/unicore32/include/asm/dma-mapping.h
|
366460a817965d2ed7d1d4dceb987784067e87e6
|
[
"Linux-syscall-note",
"GPL-2.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] |
permissive
|
OLIMEX/DIY-LAPTOP
|
ae82f4ee79c641d9aee444db9a75f3f6709afa92
|
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
|
refs/heads/rel3
| 2023-08-04T01:54:19.483792
| 2023-04-03T07:18:12
| 2023-04-03T07:18:12
| 80,094,055
| 507
| 92
|
Apache-2.0
| 2023-04-03T07:05:59
| 2017-01-26T07:25:50
|
C
|
UTF-8
|
C
| false
| false
| 3,126
|
h
|
dma-mapping.h
|
/*
* linux/arch/unicore32/include/asm/dma-mapping.h
*
* Code specific to PKUnity SoC and UniCore ISA
*
* Copyright (C) 2001-2010 GUAN Xue-tao
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __UNICORE_DMA_MAPPING_H__
#define __UNICORE_DMA_MAPPING_H__
#ifdef __KERNEL__
#include <linux/mm_types.h>
#include <linux/scatterlist.h>
#include <linux/swiotlb.h>
#include <asm-generic/dma-coherent.h>
#include <asm/memory.h>
#include <asm/cacheflush.h>
extern struct dma_map_ops swiotlb_dma_map_ops;
static inline struct dma_map_ops *get_dma_ops(struct device *dev)
{
return &swiotlb_dma_map_ops;
}
static inline int dma_supported(struct device *dev, u64 mask)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
if (unlikely(dma_ops == NULL))
return 0;
return dma_ops->dma_supported(dev, mask);
}
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
if (dma_ops->mapping_error)
return dma_ops->mapping_error(dev, dma_addr);
return 0;
}
#include <asm-generic/dma-mapping-common.h>
static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
{
if (dev && dev->dma_mask)
return addr + size - 1 <= *dev->dma_mask;
return 1;
}
static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
{
return paddr;
}
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
{
return daddr;
}
static inline void dma_mark_clean(void *addr, size_t size) {}
static inline int dma_set_mask(struct device *dev, u64 dma_mask)
{
if (!dev->dma_mask || !dma_supported(dev, dma_mask))
return -EIO;
*dev->dma_mask = dma_mask;
return 0;
}
#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
static inline void *dma_alloc_attrs(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag,
struct dma_attrs *attrs)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
return dma_ops->alloc(dev, size, dma_handle, flag, attrs);
}
#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
static inline void dma_free_attrs(struct device *dev, size_t size,
void *cpu_addr, dma_addr_t dma_handle,
struct dma_attrs *attrs)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
dma_ops->free(dev, size, cpu_addr, dma_handle, attrs);
}
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
static inline void dma_cache_sync(struct device *dev, void *vaddr,
size_t size, enum dma_data_direction direction)
{
unsigned long start = (unsigned long)vaddr;
unsigned long end = start + size;
switch (direction) {
case DMA_NONE:
BUG();
case DMA_FROM_DEVICE:
case DMA_BIDIRECTIONAL: /* writeback and invalidate */
__cpuc_dma_flush_range(start, end);
break;
case DMA_TO_DEVICE: /* writeback only */
__cpuc_dma_clean_range(start, end);
break;
}
}
#endif /* __KERNEL__ */
#endif
|
fc5d907c1ac7a4beaceceb44304187b7239e3c4f
|
0cc343d927d5db6693006018986715c43acab961
|
/examples/io/turing_complete/turing_complete.c
|
dc8c08fdab2740302d0e34154603c77fe99dad40
|
[
"MIT"
] |
permissive
|
verifast/verifast
|
ec0101fc4a69bd33c5f66be4444169c4e060ead8
|
d152da790c7ebf72ce616533a6c83082629adbdb
|
refs/heads/master
| 2023-08-25T00:13:51.464802
| 2023-08-13T10:00:00
| 2023-08-13T10:00:00
| 14,519,163
| 325
| 64
|
NOASSERTION
| 2023-08-10T21:16:08
| 2013-11-19T08:57:02
|
OCaml
|
UTF-8
|
C
| false
| false
| 8,573
|
c
|
turing_complete.c
|
/**
* This example illustrates that the I/O verification approach is turing
* complete, i.e. any input/output behavior of a turing machine can be
* expressed in a contract.
*
* We do not suggest to write contracts like this. This example is just
* to illustrate that the approach is more powerful than one might expect.
*
* In this file, we first model the concept of a turing machine. Next,
* we define a predicate "tm_io" that, given a turing machine as an
* argument, expresses the permission to do the input/output the turing
* machine does. This way, we can for any turing machine specify that a
* C program is only allowed to perform the I/O the turing machine does.
*
* To make things more interesting, we make the turing machine more
* interactive. Typically, the input of the turing machine is the input
* on the tape, and the output of the turing machine is the output on
* the tape and/or the final state.
* We could restart the turing machine to make it more interactive, but
* we choose to extend the turing machine to have an operation "write
* to world" and "read from world", which writes the current symbol on
* the tape to the world, and writes a symbol received from the world on
* the tape, respectively.
*
* For better understanding, we give a trivial example: we verify that a
* simple C program that just writes what it reads, only performs the
* I/O allowed by a turing machine that only writes (to the world) what
* it reads (from the world).
*
* For a version that uses less annotation features,
* see turing_complete_lowtech.c.
*
*/
//@#include <io.gh>
//@#include <assoclist.gh>
#include <stdio_simple.h>
/*@
inductive tm_state = tm_state(int id);
inductive tm_config = tm_config(
tm_state state,
list<pair<int, int> > tape,
int tape_head_pos
);
fixpoint tm_state tm_config_get_state(tm_config config){switch(config){case tm_config(state, tape, tape_head_pos): return state;}}
fixpoint list<pair<int, int> > tm_config_get_tape(tm_config config){switch(config){case tm_config(state, tape, tape_head_pos): return tape;}}
fixpoint int tm_config_get_tape_head_pos(tm_config config){switch(config){case tm_config(state, tape, tape_head_pos): return tape_head_pos;}}
fixpoint tm_config tm_config_update(tm_config config, int read_value){
return tm_config(
tm_config_get_state(config),
cons(
pair(tm_config_get_tape_head_pos(config), read_value),
tm_config_get_tape(config)
),
tm_config_get_tape_head_pos(config)
);
}
inductive tm_io =
tm_io_read
| tm_io_write
| tm_io_skip
;
inductive tm_action = tm_action(
int write_on_tape,
int tape_move, // -1, 0, 1
tm_io io,
tm_state state
);
fixpoint int tm_action_get_write_on_tape(tm_action tm_action){switch(tm_action){ case tm_action(write_on_tape, tape_move, io, state): return write_on_tape;}}
fixpoint int tm_action_get_tape_move(tm_action tm_action){switch(tm_action){ case tm_action(write_on_tape, tape_move, io, state): return tape_move;}}
fixpoint tm_io tm_action_get_io(tm_action tm_action){switch(tm_action){ case tm_action(write_on_tape, tape_move, io, state): return io;}}
fixpoint tm_state tm_action_get_state(tm_action tm_action){switch(tm_action){ case tm_action(write_on_tape, tape_move, io, state): return state;}}
inductive tm = tm(
fixpoint(tm_state, int, option<tm_action>) table,
tm_state initial_state
);
fixpoint fixpoint(tm_state, int, option<tm_action>) tm_get_table(tm tm){switch (tm){case tm(table, initial_state): return table;}}
fixpoint tm_state tm_get_initial_state(tm tm){switch (tm){case tm(table, initial_state): return initial_state;}}
fixpoint tm_config tm_get_initial_config(tm tm){
return tm_config(
tm_get_initial_state(tm),
nil, // empty tape
0 // tape_head_pos
);
}
inductive tm_step_info = tm_step_info(
tm_io io,
int io_value,
tm_config config
);
fixpoint tm_io tm_step_info_get_io(tm_step_info info){switch(info){case tm_step_info(io, io_value, config): return io;}}
fixpoint int tm_step_info_get_io_value(tm_step_info info){switch(info){case tm_step_info(io, io_value, config): return io_value;}}
fixpoint tm_config tm_step_info_get_config(tm_step_info info){switch(info){case tm_step_info(io, io_value, config): return config;}}
fixpoint option<tm_action> get_action(tm tm, tm_config config){
return
(tm_get_table(tm))(
tm_config_get_state(config),
assoc( // look up current value in tape
tm_config_get_tape_head_pos(config),
tm_config_get_tape(config)
)
)
;
}
fixpoint tm_step_info tm_step_(tm tm, tm_config config) {
return switch(get_action(tm, config)){
case some(x): return default_value<tm_step_info>;
case none: return default_value<tm_step_info>;
};
}
fixpoint option<tm_step_info> tm_step(tm tm, tm_config config) {
return switch(get_action(tm, config)){
case none: return none;
case some(the_action):
return some(tm_step_info(
// io:
tm_action_get_io( the_action ),
// io_value (only relevant for write):
assoc( // look up current value in tape
tm_config_get_tape_head_pos(config),
tm_config_get_tape(config)
),
// config:
tm_config(
// state:
tm_action_get_state( the_action ),
// tape:
cons(
pair(tm_config_get_tape_head_pos(config), tm_action_get_write_on_tape( the_action )), // new value
tm_config_get_tape(config) // old tape
),
// tape_head_pos:
tm_config_get_tape_head_pos(config) + tm_action_get_tape_move( the_action )
)
));
};
}
fixpoint t option_unpack<t>(option<t> option){
switch(option){
case none: return default_value<t>;
case some(value): return value;
}
}
/**
* Permission to perform the IO actions as defined by the given turing machine tm
* starting from configuration config.
* For the initial config, use "tm_get_initial_config(tm)".
*/
copredicate tm_io(place t1, tm tm, tm_config config, place t2) =
tm_step(tm, config) == none ?
no_op(t1, t2)
:
[_]exists(?t_before)
&*& [_]exists(?new_config)
&*& (tm_step_info_get_io(option_unpack(tm_step(tm, config))) == tm_io_write ?
write_char_io(t1, stdout, tm_step_info_get_io_value( option_unpack(tm_step(tm,config)) ), ?success, t_before)
&*& new_config == tm_step_info_get_config( option_unpack(tm_step(tm,config)) )
: tm_step_info_get_io(option_unpack(tm_step(tm, config))) == tm_io_read ?
read_char_io(t1, stdin, ?read_value, ?success, t_before)
&*& new_config == tm_config_update( tm_step_info_get_config( option_unpack(tm_step(tm,config)) ), read_value)
:
t_before == t1
)
&*& tm_io(t_before, tm, new_config, t2);
@*/
// -------------------------------------------------------------- \\
// Example: a (trivial) turing machine: "cat" \\
// -------------------------------------------------------------- \\
/*@
/**
* Transition table of the "cat" turing machine.
* We could also encode it as a real table, i.e. we do
* not exploit that fixpoints are already turing-complete,
* but writing it as a fixpoint is more compact.
*/
fixpoint option<tm_action> cat_table(tm_state state, int on_tape) {
// state 0 = read
// state 1 = write
return
state == tm_state(0) ?
some(tm_action(
0, // write_on_tape, ignored
0, // tape_move
tm_io_read,
tm_state(1)
))
: state == tm_state(1) ?
some(tm_action(
0, // write_on_tape, ignored
0, // tape_move
tm_io_write,
tm_state(0)
))
:
none // never happens if starting from initial state
;
}
// The "cat" turing machine.
fixpoint tm cat_tm(){
return tm(
cat_table,
tm_state(0) // initial state
);
}
@*/
/**
* C program that writes what it reads.
* We verify whether this C implementation only does the
* I/O that is allowed by the turing machine "cat_tm".
* Note that progress is not verified, i.e. if
* the implementation does not do any I/O and does not terminate,
* verification will pass.
*/
void cat()
//@ requires token(?t1) &*& tm_io(t1, cat_tm(), tm_get_initial_config(cat_tm()), ?t2);
//@ ensures token(t2);
{
while(true)
//@ invariant token(?t1_loop) &*& tm_io(t1_loop, cat_tm(), ?config, t2) &*& tm_config_get_state(config) == tm_state(0);
{
//@ open tm_io(_, _, _, _);
int c = getchar();
//@ open tm_io(_, _, _, _);
putchar(c);
}
}
|
8bcd3be9a9be00f458d88afc7819d0fd69a0d185
|
7df190df28da7e4ff166e55dc8ce780f11236a9f
|
/src/router/services/tools/ra_ioctl.h
|
081598f2b7295dfeb849f9fc77a40574703f978c
|
[] |
no_license
|
mirror/dd-wrt
|
25416946e6132aa54b35809de61834a1825a9a36
|
8f2934a5a2adfbb59b471375aa3a38de5d036531
|
refs/heads/master
| 2023-08-31T14:54:47.496685
| 2023-08-30T17:40:54
| 2023-08-30T17:40:54
| 7,470,282
| 520
| 281
| null | 2023-05-29T20:56:24
| 2013-01-06T17:21:29
| null |
UTF-8
|
C
| false
| false
| 2,219
|
h
|
ra_ioctl.h
|
#ifndef _RAETH_IOCTL_H
#define _RAETH_IOCTL_H
/* ioctl commands */
#define RAETH_ESW_REG_READ 0x89F1
#define RAETH_ESW_REG_WRITE 0x89F2
#define RAETH_MII_READ 0x89F3
#define RAETH_MII_WRITE 0x89F4
#define RAETH_ESW_INGRESS_RATE 0x89F5
#define RAETH_ESW_EGRESS_RATE 0x89F6
#define RAETH_ESW_PHY_DUMP 0x89F7
#if defined (CONFIG_RALINK_RT6855) || defined(CONFIG_RALINK_RT6855A) || \
defined (CONFIG_RALINK_MT7620)
#define REG_ESW_WT_MAC_MFC 0x10
#define REG_ESW_WT_MAC_ATA1 0x74
#define REG_ESW_WT_MAC_ATA2 0x78
#define REG_ESW_WT_MAC_ATWD 0x7C
#define REG_ESW_WT_MAC_ATC 0x80
#define REG_ESW_TABLE_TSRA1 0x84
#define REG_ESW_TABLE_TSRA2 0x88
#define REG_ESW_TABLE_ATRD 0x8C
#define REG_ESW_VLAN_VTCR 0x90
#define REG_ESW_VLAN_VAWD1 0x94
#define REG_ESW_VLAN_VAWD2 0x98
#define REG_ESW_VLAN_ID_BASE 0x100
//#define REG_ESW_VLAN_ID_BASE 0x50
#define REG_ESW_VLAN_MEMB_BASE 0x70
#define REG_ESW_TABLE_SEARCH 0x24
#define REG_ESW_TABLE_STATUS0 0x28
#define REG_ESW_TABLE_STATUS1 0x2C
#define REG_ESW_TABLE_STATUS2 0x30
#define REG_ESW_WT_MAC_AD0 0x34
#define REG_ESW_WT_MAC_AD1 0x38
#define REG_ESW_WT_MAC_AD2 0x3C
#else
/* rt3052 embedded ethernet switch registers */
#define REG_ESW_VLAN_ID_BASE 0x50
#define REG_ESW_VLAN_MEMB_BASE 0x70
#define REG_ESW_TABLE_SEARCH 0x24
#define REG_ESW_TABLE_STATUS0 0x28
#define REG_ESW_TABLE_STATUS1 0x2C
#define REG_ESW_TABLE_STATUS2 0x30
#define REG_ESW_WT_MAC_AD0 0x34
#define REG_ESW_WT_MAC_AD1 0x38
#define REG_ESW_WT_MAC_AD2 0x3C
#endif
#if defined(CONFIG_RALINK_RT3352) || defined (CONFIG_RALINK_RT5350)
#define REG_ESW_MAX 0x16C
#elif defined (CONFIG_RALINK_RT6855) || defined(CONFIG_RALINK_RT6855A) || \
defined (CONFIG_RALINK_MT7620)
#define REG_ESW_MAX 0x7FFFF
#else //RT305x, RT3350
#define REG_ESW_MAX 0xFC
#endif
typedef struct rt3052_esw_reg {
unsigned int off;
unsigned int val;
} esw_reg;
typedef struct ralink_mii_ioctl_data {
__u32 phy_id;
__u32 reg_num;
__u32 val_in;
__u32 val_out;
} ra_mii_ioctl_data;
typedef struct rt335x_esw_reg {
unsigned int on_off;
unsigned int port;
unsigned int bw; /*Mbps */
} esw_rate;
#endif
|
7625636c7e5bc7ccf953d166c19577eb04ebfa2f
|
ac927e79d8c3fb7e1be6d4eb316ddea5920b1a60
|
/src/base/wlc/wlcNtk.c
|
5d10972021a4c0e3dbd615cd9f14940f3f538d71
|
[
"MIT-Modern-Variant"
] |
permissive
|
berkeley-abc/abc
|
f4cb3886bd4c34448b1b5c154fbed96f6095e6e1
|
756e21a81de1fe799df8189f77c4ea34399d2c8e
|
refs/heads/master
| 2023-08-22T17:11:30.017600
| 2023-08-20T08:50:59
| 2023-08-20T08:50:59
| 124,750,053
| 727
| 336
|
NOASSERTION
| 2023-09-13T18:24:40
| 2018-03-11T11:33:37
|
C
|
UTF-8
|
C
| false
| false
| 54,383
|
c
|
wlcNtk.c
|
/**CFile****************************************************************
FileName [wlcNtk.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Verilog parser.]
Synopsis [Network data-structure.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - August 22, 2014.]
Revision [$Id: wlcNtk.c,v 1.00 2014/09/12 00:00:00 alanmi Exp $]
***********************************************************************/
#include <math.h>
#include "wlc.h"
#include "misc/vec/vecWec.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
// object types
static char * Wlc_Names[WLC_OBJ_NUMBER+1] = {
NULL, // 00: unknown
"pi", // 01: primary input
"po", // 02: primary output (unused)
"ff", // 03: flop output
"bi", // 04: flop input (unused)
"ff", // 05: flop (unused)
"const", // 06: constant
"buf", // 07: buffer
"mux", // 08: multiplexer
">>", // 09: shift right
">>>", // 10: shift right (arithmetic)
"<<", // 11: shift left
"<<<", // 12: shift left (arithmetic)
"rotR", // 13: rotate right
"rotL", // 14: rotate left
"~", // 15: bitwise NOT
"&", // 16: bitwise AND
"|", // 17: bitwise OR
"^", // 18: bitwise XOR
"~&", // 19: bitwise NAND
"~|", // 20: bitwise NOR
"~^", // 21: bitwise NXOR
"[:]", // 22: bit selection
"{,}", // 23: bit concatenation
"zPad", // 24: zero padding
"sExt", // 25: sign extension
"!", // 26: logic NOT
"=>", // 27: logic implication
"&&", // 28: logic AND
"||", // 29: logic OR
"^^", // 30: logic XOR
"==", // 31: compare equal
"!=", // 32: compare not equal
"<", // 33: compare less
">", // 34: compare more
"<=", // 35: compare less or equal
">=", // 36: compare more or equal
"&", // 37: reduction AND
"|", // 38: reduction OR
"^", // 39: reduction XOR
"~&", // 40: reduction NAND
"~|", // 41: reduction NOR
"~^", // 42: reduction NXOR
"+", // 43: arithmetic addition
"-", // 44: arithmetic subtraction
"*", // 45: arithmetic multiplier
"/", // 46: arithmetic division
"%", // 47: arithmetic reminder
"mod", // 48: arithmetic modulus
"**", // 49: arithmetic power
"-", // 50: arithmetic minus
"sqrt", // 51: integer square root
"squar", // 52: integer square
"table", // 53: bit table
"READ", // 54: mem read port
"WRITE", // 55: mem write port
"addsub", // 56: adder/subtractor
"sel", // 57: selector
"dec", // 58: decoder
"LUT", // 59: lookup table
NULL // 58: unused
};
char * Wlc_ObjTypeName( Wlc_Obj_t * p ) { return p ? (p->Type < WLC_OBJ_NUMBER ? Wlc_Names[p->Type] : (char *)"out_of_bound") : (char *)"no_obj"; }
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars )
{
memset( pPars, 0, sizeof(Wlc_Par_t) );
pPars->nBitsAdd = ABC_INFINITY; // adder bit-width
pPars->nBitsMul = ABC_INFINITY; // multiplier bit-widht
pPars->nBitsMux = ABC_INFINITY; // MUX bit-width
pPars->nBitsFlop = ABC_INFINITY; // flop bit-width
pPars->nIterMax = 1000; // the max number of iterations
pPars->nLimit = ABC_INFINITY; // the max number of signals
pPars->fXorOutput = 1; // XOR outputs of word-level miter
pPars->fCheckClauses = 1; // Check clauses in the reloaded trace
pPars->fPushClauses = 0; // Push clauses in the reloaded trace
pPars->fMFFC = 1; // Refine the entire MFFC of a PPI
pPars->fPdra = 0; // Use pdr -nct
pPars->fLoadTrace = 1; // Load previous PDR traces
pPars->fProofRefine = 0; // Use proof-based refinement
pPars->fHybrid = 1; // Use a hybrid of CBR and PBR
pPars->fCheckCombUnsat = 0; // Check if ABS becomes comb. unsat
pPars->fAbs2 = 0; // Use UFAR style createAbs
pPars->fProofUsePPI = 0; // Use PPI values in PBR
pPars->fUseBmc3 = 0; // Run BMC3 in parallel
pPars->fShrinkAbs = 0; // Shrink Abs with BMC
pPars->fShrinkScratch= 0; // Restart pdr from scratch after shrinking
pPars->fVerbose = 0; // verbose output`
pPars->fPdrVerbose = 0; // show verbose PDR output
}
/**Function*************************************************************
Synopsis [Working with models.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Wlc_Ntk_t * Wlc_NtkAlloc( char * pName, int nObjsAlloc )
{
Wlc_Ntk_t * p;
p = ABC_CALLOC( Wlc_Ntk_t, 1 );
p->pName = pName ? Extra_FileNameGeneric( pName ) : NULL;
Vec_IntGrow( &p->vPis, 111 );
Vec_IntGrow( &p->vPos, 111 );
Vec_IntGrow( &p->vCis, 111 );
Vec_IntGrow( &p->vCos, 111 );
Vec_IntGrow( &p->vFfs, 111 );
p->pMemFanin = Mem_FlexStart();
p->nObjsAlloc = nObjsAlloc;
p->pObjs = ABC_CALLOC( Wlc_Obj_t, p->nObjsAlloc );
p->iObj = 1;
return p;
}
void Wlc_ObjSetCi( Wlc_Ntk_t * p, Wlc_Obj_t * pObj )
{
assert( Wlc_ObjIsCi(pObj) );
assert( Wlc_ObjFaninNum(pObj) == 0 );
if ( Wlc_NtkPiNum(p) == Wlc_NtkCiNum(p) || pObj->Type != WLC_OBJ_PI )
{
pObj->Fanins[1] = Vec_IntSize(&p->vCis);
Vec_IntPush( &p->vCis, Wlc_ObjId(p, pObj) );
}
else // insert in the array of CI at the end of PIs
{
Wlc_Obj_t * pTemp; int i;
Vec_IntInsert( &p->vCis, Wlc_NtkPiNum(p), Wlc_ObjId(p, pObj) );
// other CI IDs are invalidated... naive fix!
Wlc_NtkForEachCi( p, pTemp, i )
pTemp->Fanins[1] = i;
}
if ( pObj->Type == WLC_OBJ_PI )
Vec_IntPush( &p->vPis, Wlc_ObjId(p, pObj) );
}
void Wlc_ObjSetCo( Wlc_Ntk_t * p, Wlc_Obj_t * pObj, int fFlopInput )
{
// pObj->Fanins[1] = Vec_IntSize(&p->vCos);
Vec_IntPush( &p->vCos, Wlc_ObjId(p, pObj) );
if ( !fFlopInput )
Vec_IntPush( &p->vPos, Wlc_ObjId(p, pObj) );
if ( fFlopInput )
pObj->fIsFi = 1;
else
pObj->fIsPo = 1;
}
int Wlc_ObjAlloc( Wlc_Ntk_t * p, int Type, int Signed, int End, int Beg )
{
Wlc_Obj_t * pObj;
assert( Type != WLC_OBJ_PO && Type != WLC_OBJ_FI );
if ( p->iObj == p->nObjsAlloc )
{
p->pObjs = ABC_REALLOC( Wlc_Obj_t, p->pObjs, 2 * p->nObjsAlloc );
memset( p->pObjs + p->nObjsAlloc, 0, sizeof(Wlc_Obj_t) * p->nObjsAlloc );
p->nObjsAlloc *= 2;
}
pObj = Wlc_NtkObj( p, p->iObj );
pObj->Type = Type;
pObj->Signed = Signed;
pObj->End = End;
pObj->Beg = Beg;
if ( Wlc_ObjIsCi(pObj) )
Wlc_ObjSetCi( p, pObj );
p->nObjs[Type]++;
return p->iObj++;
}
int Wlc_ObjCreate( Wlc_Ntk_t * p, int Type, int Signed, int End, int Beg, Vec_Int_t * vFanins )
{
int iFaninNew = Wlc_ObjAlloc( p, Type, Signed, End, Beg );
Wlc_ObjAddFanins( p, Wlc_NtkObj(p, iFaninNew), vFanins );
return iFaninNew;
}
char * Wlc_ObjName( Wlc_Ntk_t * p, int iObj )
{
static char Buffer[100];
if ( Wlc_NtkHasNameId(p) && Wlc_ObjNameId(p, iObj) )
return Abc_NamStr( p->pManName, Wlc_ObjNameId(p, iObj) );
sprintf( Buffer, "n%d", iObj );
return Buffer;
}
void Wlc_ObjUpdateType( Wlc_Ntk_t * p, Wlc_Obj_t * pObj, int Type )
{
assert( pObj->Type == WLC_OBJ_NONE );
p->nObjs[pObj->Type]--;
pObj->Type = Type;
p->nObjs[pObj->Type]++;
}
void Wlc_ObjAddFanins( Wlc_Ntk_t * p, Wlc_Obj_t * pObj, Vec_Int_t * vFanins )
{
assert( pObj->nFanins == 0 );
pObj->nFanins = Vec_IntSize(vFanins);
// special treatment of CONST, SELECT and TABLE
if ( pObj->Type == WLC_OBJ_CONST )
pObj->nFanins = 0;
else if ( pObj->Type == WLC_OBJ_BIT_SELECT || pObj->Type == WLC_OBJ_TABLE )
pObj->nFanins = 1;
if ( Wlc_ObjHasArray(pObj) )
pObj->pFanins[0] = (int *)Mem_FlexEntryFetch( p->pMemFanin, Vec_IntSize(vFanins) * sizeof(int) );
memcpy( Wlc_ObjFanins(pObj), Vec_IntArray(vFanins), sizeof(int) * Vec_IntSize(vFanins) );
}
void Wlc_NtkFree( Wlc_Ntk_t * p )
{
if ( p->pManName )
Abc_NamStop( p->pManName );
if ( p->pMemFanin )
Mem_FlexStop( p->pMemFanin, 0 );
if ( p->pMemTable )
Mem_FlexStop( p->pMemTable, 0 );
ABC_FREE( p->vPoPairs.pArray );
Vec_PtrFreeP( &p->vTables );
Vec_WrdFreeP( &p->vLutTruths );
ABC_FREE( p->vPis.pArray );
ABC_FREE( p->vPos.pArray );
ABC_FREE( p->vCis.pArray );
ABC_FREE( p->vCos.pArray );
ABC_FREE( p->vFfs.pArray );
ABC_FREE( p->vFfs2.pArray );
Vec_IntFreeP( &p->vInits );
Vec_IntFreeP( &p->vArsts );
ABC_FREE( p->vTravIds.pArray );
ABC_FREE( p->vNameIds.pArray );
ABC_FREE( p->vValues.pArray );
ABC_FREE( p->vCopies.pArray );
ABC_FREE( p->vBits.pArray );
ABC_FREE( p->vLevels.pArray );
ABC_FREE( p->vRefs.pArray );
ABC_FREE( p->pInits );
ABC_FREE( p->pObjs );
ABC_FREE( p->pName );
ABC_FREE( p->pSpec );
ABC_FREE( p );
}
int Wlc_NtkMemUsage( Wlc_Ntk_t * p )
{
int Mem = sizeof(Wlc_Ntk_t);
Mem += 4 * p->vPis.nCap;
Mem += 4 * p->vPos.nCap;
Mem += 4 * p->vCis.nCap;
Mem += 4 * p->vCos.nCap;
Mem += 4 * p->vFfs.nCap;
Mem += 4 * p->vFfs2.nCap;
Mem += sizeof(Wlc_Obj_t) * p->nObjsAlloc;
Mem += Abc_NamMemUsed(p->pManName);
Mem += Mem_FlexReadMemUsage(p->pMemFanin);
return Mem;
}
/**Function*************************************************************
Synopsis [Assigns object levels.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Wlc_NtkCreateLevels_( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
int i, k, iFanin, Level, LevelMax = 0;
Vec_IntFill( &p->vLevels, Wlc_NtkObjNumMax(p), 0 );
Wlc_NtkForEachObj( p, pObj, i )
{
Level = 0;
Wlc_ObjForEachFanin( pObj, iFanin, k )
Level = Abc_MaxInt( Level, Wlc_ObjLevelId(p, iFanin) + 1 );
Vec_IntWriteEntry( &p->vLevels, i, Level );
LevelMax = Abc_MaxInt( LevelMax, Level );
}
return LevelMax;
}
int Wlc_NtkCreateLevelsRev( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
int i, k, iFanin, Level, LevelMax = 0;
Vec_IntFill( &p->vLevels, Wlc_NtkObjNumMax(p), 0 );
Wlc_NtkForEachObjReverse( p, pObj, i )
{
if ( Wlc_ObjIsCi(pObj) )
continue;
Level = Wlc_ObjLevel(p, pObj) + 1;
Wlc_ObjForEachFanin( pObj, iFanin, k )
Vec_IntUpdateEntry( &p->vLevels, iFanin, Level );
LevelMax = Abc_MaxInt( LevelMax, Level );
}
// reverse the values
Wlc_NtkForEachObj( p, pObj, i )
Vec_IntWriteEntry( &p->vLevels, i, LevelMax - Wlc_ObjLevelId(p, i) );
Wlc_NtkForEachCi( p, pObj, i )
Vec_IntWriteEntry( &p->vLevels, Wlc_ObjId(p, pObj), 0 );
//Wlc_NtkForEachObj( p, pObj, i )
// printf( "%d -> %d\n", i, Wlc_ObjLevelId(p, i) );
return LevelMax;
}
/**Function*************************************************************
Synopsis [Assigns object levels.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_NtkCreateLevels_rec( Wlc_Ntk_t * p, Wlc_Obj_t * pObj )
{
int k, iFanin, Level = 0, iObj = Wlc_ObjId(p, pObj);
if ( Wlc_ObjIsCi(pObj) || Wlc_ObjIsFf(p, iObj) || Wlc_ObjFaninNum(pObj) == 0 || Wlc_ObjLevel(p, pObj) > 0 )
return;
Wlc_ObjForEachFanin( pObj, iFanin, k ) if ( iFanin )
Wlc_NtkCreateLevels_rec( p, Wlc_NtkObj(p, iFanin) );
Wlc_ObjForEachFanin( pObj, iFanin, k ) if ( iFanin )
Level = Abc_MaxInt( Level, Wlc_ObjLevelId(p, iFanin) );
Vec_IntWriteEntry( &p->vLevels, Wlc_ObjId(p, pObj), Level + 1 );
}
int Wlc_NtkCreateLevels( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj; int i, LeveMax = 0;
Vec_IntFill( &p->vLevels, Wlc_NtkObjNumMax(p), 0 );
Wlc_NtkForEachObj( p, pObj, i )
Wlc_NtkCreateLevels_rec( p, pObj );
Wlc_NtkForEachObj( p, pObj, i )
if ( !Wlc_ObjIsCi(pObj) && Wlc_ObjFaninNum(pObj) )
Vec_IntAddToEntry( &p->vLevels, i, 1 );
LeveMax = Vec_IntFindMax( &p->vLevels );
Wlc_NtkForEachFf2( p, pObj, i )
Vec_IntWriteEntry( &p->vLevels, Wlc_ObjId(p, pObj), LeveMax+1 );
//Wlc_NtkPrintObjects( p );
return LeveMax+1;
}
int Wlc_NtkRemapLevels( Wlc_Ntk_t * p, Vec_Int_t * vObjs, int nLevels )
{
int i, k, iFanin, iObj, Entry, Level = 0, Res = nLevels;
Vec_Int_t * vMap = Vec_IntStart( nLevels+1 );
Vec_Int_t * vUsed = Vec_IntStart( nLevels+1 );
// mark used levels
Vec_IntWriteEntry( vUsed, nLevels, 1 );
Vec_IntForEachEntry( vObjs, iObj, i )
{
Vec_IntWriteEntry( vUsed, Wlc_ObjLevelId(p, iObj), 1 );
Wlc_ObjForEachFanin( Wlc_NtkObj(p, iObj), iFanin, k ) if ( iFanin )
Vec_IntWriteEntry( vUsed, Wlc_ObjLevelId(p, iFanin), 1 );
}
// create level map
Vec_IntForEachEntry( vUsed, Entry, i )
if ( Entry )
Vec_IntWriteEntry( vMap, i, Level++ );
//printf( "Total used levels %d -> %d\n", nLevels, Level );
// remap levels
Vec_IntForEachEntry( &p->vLevels, Level, i )
{
if ( Vec_IntEntry(vUsed, Level) )
Vec_IntWriteEntry( &p->vLevels, i, Vec_IntEntry(vMap, Level) );
else
Vec_IntWriteEntry( &p->vLevels, i, -1 );
}
Res = Vec_IntEntry( vMap, nLevels );
Vec_IntFree( vUsed );
Vec_IntFree( vMap );
return Res;
}
/**Function*************************************************************
Synopsis [Collects statistics for each side of the miter.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_NtkCollectStats( Wlc_Ntk_t * p, int nObjs[2][WLC_OBJ_NUMBER] )
{
Wlc_Obj_t * pObj;
int n, i;
if ( Wlc_NtkPoNum(p) != 2 )
return;
for ( n = 0; n < 2; n++ )
{
Wlc_NtkMarkCone( p, n, 1, 1, 0 );
Wlc_NtkForEachObj( p, pObj, i )
if ( pObj->Mark )
nObjs[n][pObj->Type]++;
}
Wlc_NtkCleanMarks( p );
}
int Wlc_NtkCountRealPis( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
int i, Count = 0;
Wlc_NtkMarkCone( p, -1, -1, 1, 0 );
Wlc_NtkForEachPi( p, pObj, i )
Count += pObj->Mark;
Wlc_NtkCleanMarks( p );
return Count;
}
/**Function*************************************************************
Synopsis [Prints distribution of operator types.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_WrdSelectSortCost2( word * pArray, int nSize, word * pCosts )
{
int i, j, best_i;
for ( i = 0; i < nSize-1; i++ )
{
best_i = i;
for ( j = i+1; j < nSize; j++ )
if ( pCosts[j] < pCosts[best_i] )
best_i = j;
ABC_SWAP( word, pArray[i], pArray[best_i] );
ABC_SWAP( word, pCosts[i], pCosts[best_i] );
}
}
static inline word Wlc_NtkPrintDistribMakeSign( int s, int s0, int s1 )
{
return ((word)s1 << 42) | ((word)s0 << 21) | (word)s;
}
static inline void Wlc_NtkPrintDistribFromSign( word sss, int * s, int * s0, int * s1 )
{
*s1 = (int)(sss >> 42); *s0 = (int)(sss >> 21) & 0x1FFFFF; *s = (int)sss & 0x1FFFFF;
}
static inline void Wlc_NtkPrintDistribAddOne( Vec_Ptr_t * vTypes, Vec_Ptr_t * vOccurs, int Type, word Sign )
{
Vec_Wrd_t * vType = (Vec_Wrd_t *)Vec_PtrEntry( vTypes, Type );
Vec_Wrd_t * vOccur = (Vec_Wrd_t *)Vec_PtrEntry( vOccurs, Type );
word Entry; int i;
Vec_WrdForEachEntry( vType, Entry, i )
if ( Entry == Sign )
{
Vec_WrdAddToEntry( vOccur, i, 1 );
return;
}
Vec_WrdPush( vType, Sign );
Vec_WrdPush( vOccur, 1 );
}
void Wlc_NtkPrintDistribSortOne( Vec_Ptr_t * vTypes, Vec_Ptr_t * vOccurs, int Type )
{
Vec_Wrd_t * vType = (Vec_Wrd_t *)Vec_PtrEntry( vTypes, Type );
Vec_Wrd_t * vOccur = (Vec_Wrd_t *)Vec_PtrEntry( vOccurs, Type );
Vec_WrdSelectSortCost2( Vec_WrdArray(vType), Vec_WrdSize(vType), Vec_WrdArray(vOccur) );
Vec_WrdReverseOrder( vType );
Vec_WrdReverseOrder( vOccur );
}
void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fTwoSides, int fVerbose )
{
int nObjs[2][WLC_OBJ_NUMBER] = {{0}}; // counter of objects of each type
Wlc_Obj_t * pObj, * pObjRange = NULL; int nCountRange = 0;
Vec_Ptr_t * vTypes, * vOccurs;
Vec_Int_t * vAnds = Vec_IntStart( WLC_OBJ_NUMBER );
word Sign = 0;
int i, k, s, s0, s1;
if ( Wlc_NtkPoNum(p) != 2 )
fTwoSides = 0;
if ( fTwoSides )
Wlc_NtkCollectStats( p, nObjs );
// allocate statistics arrays
vTypes = Vec_PtrStart( WLC_OBJ_NUMBER );
vOccurs = Vec_PtrStart( WLC_OBJ_NUMBER );
for ( i = 0; i < WLC_OBJ_NUMBER; i++ )
Vec_PtrWriteEntry( vTypes, i, Vec_WrdAlloc(16) );
for ( i = 0; i < WLC_OBJ_NUMBER; i++ )
Vec_PtrWriteEntry( vOccurs, i, Vec_WrdAlloc(16) );
// add nodes
Wlc_NtkForEachObj( p, pObj, i )
{
// char * pName = Wlc_ObjName(p, i);
if ( Wlc_ObjSign(pObj) > 0x1FFFFF )
printf( "Object %6d has range %d, which is reduced to %d in the statistics.\n",
i, Wlc_ObjRange(pObj), Wlc_ObjRange(pObj) & 0xFFFFF );
if ( pObj->Beg )
{
if ( pObjRange == NULL )
pObjRange = pObj;
nCountRange++;
}
// 0-input types
if ( Wlc_ObjIsCi(pObj) || pObj->Type == WLC_OBJ_CONST || pObj->Type == WLC_OBJ_BIT_CONCAT )
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), 0, 0 );
// 1-input types
else if ( pObj->Type == WLC_OBJ_BUF || pObj->Type == WLC_OBJ_BIT_SELECT || pObj->Type == WLC_OBJ_TABLE ||
pObj->Type == WLC_OBJ_BIT_ZEROPAD || pObj->Type == WLC_OBJ_BIT_SIGNEXT ||
pObj->Type == WLC_OBJ_BIT_NOT || pObj->Type == WLC_OBJ_LOGIC_NOT || pObj->Type == WLC_OBJ_ARI_MINUS )
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), Wlc_ObjSign(Wlc_ObjFanin0(p, pObj)), 0 );
// 2-input types (including MUX)
else if ( Wlc_ObjFaninNum(pObj) == 0 )
printf( "Object %d with name \"%s\" has type 0. Looks like it was declared by not defined...\n", i, Wlc_ObjName(p, i) );
else if ( Wlc_ObjFaninNum(pObj) == 1 )
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), Wlc_ObjSign(Wlc_ObjFanin0(p, pObj)), 0 );
else
{
assert( Wlc_ObjFaninNum(pObj) >= 2 );
Sign = Wlc_NtkPrintDistribMakeSign( Wlc_ObjSign(pObj), Wlc_ObjFaninId(pObj, 0) ? Wlc_ObjSign(Wlc_ObjFanin0(p, pObj)) : 0, Wlc_ObjFaninId(pObj, 1) ? Wlc_ObjSign(Wlc_ObjFanin1(p, pObj)) : 0 );
}
// add to storage
Wlc_NtkPrintDistribAddOne( vTypes, vOccurs, pObj->Type, Sign );
// count the number of AIG nodes
if ( pObj->Type == WLC_OBJ_MUX )
Vec_IntAddToEntry( vAnds, WLC_OBJ_MUX, 3 * Wlc_ObjRange(pObj) * (Wlc_ObjFaninNum(pObj) - 2) );
else if ( pObj->Type == WLC_OBJ_SHIFT_R )
Vec_IntAddToEntry( vAnds, WLC_OBJ_SHIFT_R, Abc_MinInt(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Abc_Base2Log(Wlc_ObjRange(pObj))) * 3 );
else if ( pObj->Type == WLC_OBJ_SHIFT_RA )
Vec_IntAddToEntry( vAnds, WLC_OBJ_SHIFT_RA, Wlc_ObjRange(pObj) * Abc_MinInt(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Abc_Base2Log(Wlc_ObjRange(pObj))) * 3 );
else if ( pObj->Type == WLC_OBJ_SHIFT_L )
Vec_IntAddToEntry( vAnds, WLC_OBJ_SHIFT_L, Wlc_ObjRange(pObj) * Abc_MinInt(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Abc_Base2Log(Wlc_ObjRange(pObj))) * 3 );
else if ( pObj->Type == WLC_OBJ_SHIFT_LA )
Vec_IntAddToEntry( vAnds, WLC_OBJ_SHIFT_LA, Wlc_ObjRange(pObj) * Abc_MinInt(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Abc_Base2Log(Wlc_ObjRange(pObj))) * 3 );
else if ( pObj->Type == WLC_OBJ_ROTATE_R )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ROTATE_R, Wlc_ObjRange(pObj) * Abc_MinInt(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Abc_Base2Log(Wlc_ObjRange(pObj))) * 3 );
else if ( pObj->Type == WLC_OBJ_ROTATE_L )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ROTATE_L, Wlc_ObjRange(pObj) * Abc_MinInt(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Abc_Base2Log(Wlc_ObjRange(pObj))) * 3 );
else if ( pObj->Type == WLC_OBJ_BIT_NOT )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_NOT, 0 );
else if ( pObj->Type == WLC_OBJ_BIT_AND )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_AND, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_BIT_OR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_OR, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_BIT_XOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_XOR, 3 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_BIT_NAND )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_NAND, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_BIT_NOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_NOR, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_BIT_NXOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_NXOR, 3 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_BIT_SELECT )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_SELECT, 0 );
else if ( pObj->Type == WLC_OBJ_BIT_CONCAT )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_CONCAT, 0 );
else if ( pObj->Type == WLC_OBJ_BIT_ZEROPAD )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_ZEROPAD, 0 );
else if ( pObj->Type == WLC_OBJ_BIT_SIGNEXT )
Vec_IntAddToEntry( vAnds, WLC_OBJ_BIT_SIGNEXT, 0 );
else if ( pObj->Type == WLC_OBJ_LOGIC_NOT )
Vec_IntAddToEntry( vAnds, WLC_OBJ_LOGIC_NOT, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_LOGIC_IMPL )
Vec_IntAddToEntry( vAnds, WLC_OBJ_LOGIC_IMPL, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) + Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_LOGIC_AND )
Vec_IntAddToEntry( vAnds, WLC_OBJ_LOGIC_AND, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) + Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_LOGIC_OR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_LOGIC_OR, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) + Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_LOGIC_XOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_LOGIC_XOR, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) + Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)) + 1 );
else if ( pObj->Type == WLC_OBJ_COMP_EQU )
Vec_IntAddToEntry( vAnds, WLC_OBJ_COMP_EQU, 4 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_COMP_NOTEQU )
Vec_IntAddToEntry( vAnds, WLC_OBJ_COMP_NOTEQU, 4 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_COMP_LESS )
Vec_IntAddToEntry( vAnds, WLC_OBJ_COMP_LESS, 6 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 6 );
else if ( pObj->Type == WLC_OBJ_COMP_MORE )
Vec_IntAddToEntry( vAnds, WLC_OBJ_COMP_MORE, 6 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 6 );
else if ( pObj->Type == WLC_OBJ_COMP_LESSEQU )
Vec_IntAddToEntry( vAnds, WLC_OBJ_COMP_LESSEQU, 6 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 6 );
else if ( pObj->Type == WLC_OBJ_COMP_MOREEQU )
Vec_IntAddToEntry( vAnds, WLC_OBJ_COMP_MOREEQU, 6 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 6 );
else if ( pObj->Type == WLC_OBJ_REDUCT_AND )
Vec_IntAddToEntry( vAnds, WLC_OBJ_REDUCT_AND, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_REDUCT_OR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_REDUCT_OR, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_REDUCT_XOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_REDUCT_XOR, 3 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 3 );
else if ( pObj->Type == WLC_OBJ_REDUCT_NAND )
Vec_IntAddToEntry( vAnds, WLC_OBJ_REDUCT_NAND, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_REDUCT_NOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_REDUCT_NOR, Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 1 );
else if ( pObj->Type == WLC_OBJ_REDUCT_NXOR )
Vec_IntAddToEntry( vAnds, WLC_OBJ_REDUCT_NXOR, 3 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 3 );
else if ( pObj->Type == WLC_OBJ_ARI_ADD )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_ADD, 9 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_ARI_SUB )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_SUB, 9 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_ARI_MULTI )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MULTI, 9 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_ARI_DIVIDE )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_DIVIDE, 13 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 19 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) + 10 );
else if ( pObj->Type == WLC_OBJ_ARI_REM )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_REM, 13 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 7 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 2 );
else if ( pObj->Type == WLC_OBJ_ARI_MODULUS )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MODULUS, 13 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 7 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 2 );
else if ( pObj->Type == WLC_OBJ_ARI_POWER )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_POWER, 10 * (int)pow((double)Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)),(double)Wlc_ObjRange(Wlc_ObjFanin0(p, pObj))) );
else if ( pObj->Type == WLC_OBJ_ARI_MINUS )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MINUS, 4 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_ARI_SQRT )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_SQRT, 11 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) / 8 + 5 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) / 2 - 5 );
else if ( pObj->Type == WLC_OBJ_ARI_SQUARE )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_SQUARE, 5 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)) );
}
if ( nCountRange && Vec_IntSize(&p->vNameIds) > 0 )
{
printf( "Warning: %d objects of the design have non-zero-based ranges.\n", nCountRange );
printf( "In particular, object %6d with name \"%s\" has range %d=[%d:%d]\n", Wlc_ObjId(p, pObjRange),
Abc_NamStr(p->pManName, Wlc_ObjNameId(p, Wlc_ObjId(p, pObjRange))), Wlc_ObjRange(pObjRange), pObjRange->End, pObjRange->Beg );
}
// print by occurrence
printf( "ID : name occurrence%s and2 (occurrence)<output_range>=<input_range>.<input_range> ...\n", fTwoSides ? " Left Share Right":"" );
for ( i = 0; i < WLC_OBJ_NUMBER; i++ )
{
Vec_Wrd_t * vType = (Vec_Wrd_t *)Vec_PtrEntry( vTypes, i );
Vec_Wrd_t * vOccur = (Vec_Wrd_t *)Vec_PtrEntry( vOccurs, i );
if ( p->nObjs[i] == 0 )
continue;
printf( "%2d : %-8s %6d", i, Wlc_Names[i], p->nObjs[i] );
if ( fTwoSides )
{
int nTotal = i == WLC_OBJ_PI ? Wlc_NtkCountRealPis(p) : p->nObjs[i];
printf( " " );
printf( "%6d", nObjs[0][i] );
printf( "%6d", nObjs[0][i]+nObjs[1][i]-nTotal );
printf( "%6d", nObjs[1][i] );
}
printf( "%8d ", Vec_IntEntry(vAnds, i) );
// sort by occurence
Wlc_NtkPrintDistribSortOne( vTypes, vOccurs, i );
Vec_WrdForEachEntry( vType, Sign, k )
{
Wlc_NtkPrintDistribFromSign( Sign, &s, &s0, &s1 );
if ( ((k % 6) == 5 && s1) || ((k % 8) == 7 && !s1) )
{
printf( "\n " );
if ( fTwoSides )
printf( " " );
}
printf( "(%d)", (int)Vec_WrdEntry( vOccur, k ) );
printf( "%s%d", Abc_LitIsCompl(s)?"-":"", Abc_Lit2Var(s) );
if ( s0 )
printf( "=%s%d", Abc_LitIsCompl(s0)?"-":"", Abc_Lit2Var(s0) );
if ( s1 )
printf( ".%s%d", Abc_LitIsCompl(s1)?"-":"", Abc_Lit2Var(s1) );
printf( " " );
}
printf( "\n" );
}
Vec_VecFree( (Vec_Vec_t *)vTypes );
Vec_VecFree( (Vec_Vec_t *)vOccurs );
Vec_IntFree( vAnds );
}
void Wlc_NtkPrintNode( Wlc_Ntk_t * p, Wlc_Obj_t * pObj )
{
printf( "%8d : ", Wlc_ObjId(p, pObj) );
if ( Vec_IntSize(&p->vLevels) )
printf( "Lev = %2d ", Vec_IntEntry(&p->vLevels, Wlc_ObjId(p,pObj)) );
printf( "%6d%s = ", Wlc_ObjRange(pObj), Wlc_ObjIsSigned(pObj) ? "s" : " " );
if ( pObj->Type == WLC_OBJ_PI )
{
printf( " PI : %-12s\n", Wlc_ObjName(p, Wlc_ObjId(p, pObj)) );
return;
}
if ( pObj->Type == WLC_OBJ_FO )
{
printf( " FO : %-12s = %-12s\n", Wlc_ObjName(p, Wlc_ObjId(p, pObj)), Wlc_ObjName(p, Wlc_ObjId(p, Wlc_ObjFo2Fi(p, pObj))) );
return;
}
if ( pObj->Type != WLC_OBJ_CONST && Wlc_ObjFaninNum(pObj) == 0 )
{
printf( "Unknown object without fanins : %-12s\n", Wlc_ObjName(p, Wlc_ObjId(p, pObj)) );
return;
}
if ( pObj->Type != WLC_OBJ_CONST )
{
printf( "%6d%s %5s ", Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)), Wlc_ObjIsSigned(Wlc_ObjFanin0(p, pObj)) ? "s" : " ", Wlc_Names[(int)pObj->Type] );
if ( Wlc_ObjFaninNum(pObj) > 1 )
printf( "%6d%s ", Wlc_ObjRange(Wlc_ObjFanin1(p, pObj)), Wlc_ObjIsSigned(Wlc_ObjFanin1(p, pObj)) ? "s" : " " );
else
printf( " " );
if ( Wlc_ObjFaninNum(pObj) > 2 )
printf( "%6d%s ", Wlc_ObjRange(Wlc_ObjFanin2(p, pObj)), Wlc_ObjIsSigned(Wlc_ObjFanin2(p, pObj)) ? "s" : " " );
else
printf( " " );
}
else
printf( " " );
printf( " : " );
printf( "%-12s", Wlc_ObjName(p, Wlc_ObjId(p, pObj)) );
if ( pObj->Type == WLC_OBJ_CONST )
{
printf( " = %d\'%sh", Wlc_ObjRange(pObj), Wlc_ObjIsSigned(pObj) ? "s":"" );
if ( pObj->fXConst )
{
int k;
for ( k = 0; k < (Wlc_ObjRange(pObj) + 3) / 4; k++ )
printf( "x" );
}
else
Abc_TtPrintHexArrayRev( stdout, (word *)Wlc_ObjConstValue(pObj), (Wlc_ObjRange(pObj) + 3) / 4 );
}
else
{
printf( " = %-12s %5s ", Wlc_ObjName(p, Wlc_ObjFaninId0(pObj)), Wlc_Names[(int)pObj->Type] );
if ( Wlc_ObjFaninNum(pObj) > 1 )
printf( "%-12s ", Wlc_ObjName(p, Wlc_ObjFaninId1(pObj)) );
else
printf( " " );
if ( Wlc_ObjFaninNum(pObj) > 2 )
printf( "%-12s ", Wlc_ObjName(p, Wlc_ObjFaninId2(pObj)) );
}
printf( "\n" );
}
void Wlc_NtkPrintNodeArray( Wlc_Ntk_t * p, Vec_Int_t * vArray )
{
Wlc_Obj_t * pObj;
int i;
Wlc_NtkForEachObjVec( vArray, p, pObj, i )
Wlc_NtkPrintNode( p, pObj );
}
void Wlc_NtkPrintNodes( Wlc_Ntk_t * p, int Type )
{
Wlc_Obj_t * pObj;
int i, Counter = 0;
printf( "Operation %s\n", Wlc_Names[Type] );
Wlc_NtkForEachObj( p, pObj, i )
{
if ( (int)pObj->Type != Type )
continue;
printf( "%8d :", Counter++ );
Wlc_NtkPrintNode( p, pObj );
}
}
void Wlc_NtkPrintStats( Wlc_Ntk_t * p, int fDistrib, int fTwoSides, int fVerbose )
{
int i;
printf( "%-20s : ", p->pName );
printf( "PI = %4d ", Wlc_NtkCountRealPis(p) ); //Wlc_NtkPiNum(p) );
printf( "PO = %4d ", Wlc_NtkPoNum(p) );
printf( "FF = %4d ", Wlc_NtkFfNum(p) );
printf( "Obj = %6d ", Wlc_NtkObjNum(p) - Wlc_NtkPiNum(p) - Wlc_NtkPoNum(p) - Wlc_NtkFfNum(p) );
printf( "Mem = %.3f MB", 1.0*Wlc_NtkMemUsage(p)/(1<<20) );
printf( "\n" );
if ( fDistrib )
{
Wlc_NtkPrintDistrib( p, fTwoSides, fVerbose );
return;
}
if ( !fVerbose )
return;
printf( "Node type statistics:\n" );
for ( i = 1; i < WLC_OBJ_NUMBER; i++ )
{
if ( !p->nObjs[i] )
continue;
if ( p->nAnds[0] && p->nAnds[i] )
printf( "%2d : %-8s %6d %7.2f %%\n", i, Wlc_Names[i], p->nObjs[i], 100.0*p->nAnds[i]/p->nAnds[0] );
else
printf( "%2d : %-8s %6d\n", i, Wlc_Names[i], p->nObjs[i] );
}
}
void Wlc_NtkPrintObjects( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj; int i;
Wlc_NtkForEachObj( p, pObj, i )
Wlc_NtkPrintNode( p, pObj );
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_NtkTransferNames( Wlc_Ntk_t * pNew, Wlc_Ntk_t * p )
{
int i;
assert( !Wlc_NtkHasCopy(pNew) && Wlc_NtkHasCopy(p) );
assert( !Wlc_NtkHasNameId(pNew) && Wlc_NtkHasNameId(p) );
assert( pNew->pManName == NULL && p->pManName != NULL );
Wlc_NtkCleanNameId( pNew );
for ( i = 0; i < p->nObjsAlloc; i++ )
if ( Wlc_ObjCopy(p, i) > 0 && i < Vec_IntSize(&p->vNameIds) && Wlc_ObjNameId(p, i) )
Wlc_ObjSetNameId( pNew, Wlc_ObjCopy(p, i), Wlc_ObjNameId(p, i) );
pNew->pManName = p->pManName;
p->pManName = NULL;
Vec_IntErase( &p->vNameIds );
// transfer table
pNew->pMemTable = p->pMemTable; p->pMemTable = NULL;
pNew->vTables = p->vTables; p->vTables = NULL;
}
char * Wlc_NtkNewName( Wlc_Ntk_t * p, int iCoId, int fSeq )
{
static char pBuffer[1000];
sprintf( pBuffer, "%s_o%d_%s", p->pName, iCoId, fSeq ? "seq": "comb" );
return pBuffer;
}
/**Function*************************************************************
Synopsis [Reduce init vector.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t * Wlc_ReduceMarkedInitVec( Wlc_Ntk_t * p, Vec_Int_t * vInit )
{
Vec_Int_t * vInitNew = Vec_IntDup( vInit );
Wlc_Obj_t * pObj; int i, k = 0;
assert( Vec_IntSize(vInit) == Wlc_NtkCiNum(p) - Wlc_NtkPiNum(p) );
Wlc_NtkForEachCi( p, pObj, i )
if ( !Wlc_ObjIsPi(pObj) && pObj->Mark )
Vec_IntWriteEntry( vInitNew, k++, Vec_IntEntry(vInit, i - Wlc_NtkPiNum(p)) );
Vec_IntShrink( vInitNew, k );
return vInitNew;
}
char * Wlc_ReduceMarkedInitStr( Wlc_Ntk_t * p, char * pInit )
{
char * pInitNew = Abc_UtilStrsav( pInit );
Wlc_Obj_t * pObj; int i, b, nBits = 0, k = 0;
Wlc_NtkForEachCi( p, pObj, i )
{
if ( !Wlc_ObjIsPi(pObj) && pObj->Mark )
for ( b = 0; b < Wlc_ObjRange(pObj); b++ )
pInitNew[k++] = pInitNew[nBits+b];
if ( !Wlc_ObjIsPi(pObj) )
nBits += Wlc_ObjRange(pObj);
}
pInitNew[k] = '\0';
assert( nBits == (int)strlen(pInit) );
return pInitNew;
}
/**Function*************************************************************
Synopsis [Duplicates the network in a topological order.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_ObjCollectCopyFanins( Wlc_Ntk_t * p, int iObj, Vec_Int_t * vFanins )
{
int i, iFanin;
Wlc_Obj_t * pObj = Wlc_NtkObj( p, iObj );
Vec_IntClear( vFanins );
Wlc_ObjForEachFanin( pObj, iFanin, i )
Vec_IntPush( vFanins, Wlc_ObjCopy(p, iFanin) );
// special treatment of CONST and SELECT
if ( pObj->Type == WLC_OBJ_CONST )
{
int * pInts = Wlc_ObjConstValue( pObj );
int nInts = Abc_BitWordNum( Wlc_ObjRange(pObj) );
for ( i = 0; i < nInts; i++ )
Vec_IntPush( vFanins, pInts[i] );
}
else if ( pObj->Type == WLC_OBJ_BIT_SELECT )
{
assert( Vec_IntSize(vFanins) == 1 );
Vec_IntPushTwo( vFanins, Wlc_ObjRangeEnd(pObj), Wlc_ObjRangeBeg(pObj) );
}
else if ( pObj->Type == WLC_OBJ_TABLE )
{
assert( Vec_IntSize(vFanins) == 1 );
Vec_IntPush( vFanins, pObj->Fanins[1] );
}
}
int Wlc_ObjDup( Wlc_Ntk_t * pNew, Wlc_Ntk_t * p, int iObj, Vec_Int_t * vFanins )
{
Wlc_Obj_t * pObj = Wlc_NtkObj( p, iObj );
int iFaninNew = Wlc_ObjAlloc( pNew, pObj->Type, Wlc_ObjIsSigned(pObj), pObj->End, pObj->Beg );
Wlc_Obj_t * pObjNew = Wlc_NtkObj(pNew, iFaninNew);
Wlc_ObjCollectCopyFanins( p, iObj, vFanins );
Wlc_ObjAddFanins( pNew, pObjNew, vFanins );
Wlc_ObjSetCopy( p, iObj, iFaninNew );
pObjNew->fXConst = pObj->fXConst;
return iFaninNew;
}
void Wlc_NtkDupDfs_rec( Wlc_Ntk_t * pNew, Wlc_Ntk_t * p, int iObj, Vec_Int_t * vFanins )
{
Wlc_Obj_t * pObj;
int i, iFanin;
if ( iObj == 0 )
return;
if ( Wlc_ObjCopy(p, iObj) )
return;
pObj = Wlc_NtkObj( p, iObj );
//printf( "Visiting node %16s (ID %6d) of type %5s (type ID %2d)\n", Wlc_ObjName(p, iObj), iObj, Wlc_ObjTypeName(pObj), Wlc_NtkObj(p, iObj)->Type );
assert( pObj->Type != WLC_OBJ_FF );
Wlc_ObjForEachFanin( pObj, iFanin, i )
Wlc_NtkDupDfs_rec( pNew, p, iFanin, vFanins );
Wlc_ObjDup( pNew, p, iObj, vFanins );
}
Wlc_Ntk_t * Wlc_NtkDupDfsSimple( Wlc_Ntk_t * p )
{
Wlc_Ntk_t * pNew;
Wlc_Obj_t * pObj;
Vec_Int_t * vFanins;
int i;
Wlc_NtkCleanCopy( p );
vFanins = Vec_IntAlloc( 100 );
pNew = Wlc_NtkAlloc( p->pName, p->nObjsAlloc );
pNew->fSmtLib = p->fSmtLib;
pNew->fAsyncRst = p->fAsyncRst;
pNew->fMemPorts = p->fMemPorts;
pNew->fEasyFfs = p->fEasyFfs;
Wlc_NtkForEachCi( p, pObj, i )
Wlc_ObjDup( pNew, p, Wlc_ObjId(p, pObj), vFanins );
Wlc_NtkForEachCo( p, pObj, i )
Wlc_NtkDupDfs_rec( pNew, p, Wlc_ObjId(p, pObj), vFanins );
Wlc_NtkForEachCo( p, pObj, i )
Wlc_ObjSetCo( pNew, Wlc_ObjCopyObj(pNew, p, pObj), pObj->fIsFi );
if ( p->vInits )
pNew->vInits = Vec_IntDup( p->vInits );
if ( p->pInits )
pNew->pInits = Abc_UtilStrsav( p->pInits );
Vec_IntFree( vFanins );
if ( p->pSpec )
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
return pNew;
}
Wlc_Ntk_t * Wlc_NtkDupDfs( Wlc_Ntk_t * p, int fMarked, int fSeq )
{
Wlc_Ntk_t * pNew;
Wlc_Obj_t * pObj, * pObjNew;
Vec_Int_t * vFanins;
int i, k, iObj, iFanin;
vFanins = Vec_IntAlloc( 100 );
Wlc_NtkCleanCopy( p );
pNew = Wlc_NtkAlloc( p->pName, p->nObjsAlloc );
pNew->fSmtLib = p->fSmtLib;
pNew->fAsyncRst = p->fAsyncRst;
pNew->fMemPorts = p->fMemPorts;
pNew->fEasyFfs = p->fEasyFfs;
Wlc_NtkForEachCi( p, pObj, i )
if ( !fMarked || pObj->Mark )
{
unsigned Type = pObj->Type;
if ( !fSeq ) pObj->Type = WLC_OBJ_PI;
Wlc_ObjDup( pNew, p, Wlc_ObjId(p, pObj), vFanins );
pObj->Type = Type;
}
Wlc_NtkForEachFf2( p, pObj, i )
{
int iObjNew = Wlc_ObjAlloc( pNew, pObj->Type, Wlc_ObjIsSigned(pObj), pObj->End, pObj->Beg );
Wlc_ObjSetCopy( p, Wlc_ObjId(p, pObj), iObjNew );
Vec_IntPush( &pNew->vFfs2, iObjNew );
}
Wlc_NtkForEachCo( p, pObj, i )
if ( !fMarked || pObj->Mark )
Wlc_NtkDupDfs_rec( pNew, p, Wlc_ObjId(p, pObj), vFanins );
Wlc_NtkForEachCo( p, pObj, i )
if ( !fMarked || pObj->Mark )
Wlc_ObjSetCo( pNew, Wlc_ObjCopyObj(pNew, p, pObj), fSeq ? pObj->fIsFi : 0 );
Wlc_NtkForEachFf2( p, pObj, i )
{
iObj = Wlc_ObjId(p, pObj);
Wlc_ObjForEachFanin( pObj, iFanin, k )
Wlc_NtkDupDfs_rec( pNew, p, iFanin, vFanins );
Wlc_ObjCollectCopyFanins( p, iObj, vFanins );
pObjNew = Wlc_NtkObj( pNew, Wlc_ObjCopy(p, iObj) );
Wlc_ObjAddFanins( pNew, pObjNew, vFanins );
pObjNew->fXConst = pObj->fXConst;
}
Vec_IntFree( vFanins );
if ( fSeq && p->vInits )
{
if ( fMarked )
{
if ( p->vInits )
pNew->vInits = Wlc_ReduceMarkedInitVec( p, p->vInits );
if ( p->pInits )
pNew->pInits = Wlc_ReduceMarkedInitStr( p, p->pInits );
}
else
{
if ( p->vInits )
pNew->vInits = Vec_IntDup( p->vInits );
if ( p->pInits )
pNew->pInits = Abc_UtilStrsav( p->pInits );
}
}
if ( p->pSpec )
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
if ( Wlc_NtkHasNameId(p) )
Wlc_NtkTransferNames( pNew, p );
if ( Vec_IntSize(&p->vPoPairs) )
Vec_IntAppend( &pNew->vPoPairs, &p->vPoPairs );
return pNew;
}
Wlc_Ntk_t * Wlc_NtkDupDfsAbs( Wlc_Ntk_t * p, Vec_Int_t * vPisOld, Vec_Int_t * vPisNew, Vec_Int_t * vFlops )
{
Wlc_Ntk_t * pNew;
Wlc_Obj_t * pObj;
Vec_Int_t * vFanins;
int i;
Wlc_NtkCleanCopy( p );
pNew = Wlc_NtkAlloc( p->pName, p->nObjsAlloc );
pNew->fSmtLib = p->fSmtLib;
pNew->fAsyncRst = p->fAsyncRst;
pNew->fMemPorts = p->fMemPorts;
pNew->fEasyFfs = p->fEasyFfs;
// duplicate marked PIs
vFanins = Vec_IntAlloc( 100 );
Wlc_NtkForEachObjVec( vPisOld, p, pObj, i )
{
assert( Wlc_ObjIsPi(pObj) );
Wlc_ObjDup( pNew, p, Wlc_ObjId(p, pObj), vFanins );
}
// duplicate additional PIs
Wlc_NtkForEachObjVec( vPisNew, p, pObj, i )
{
unsigned Type = pObj->Type;
int nFanins = Wlc_ObjFaninNum(pObj);
assert( !Wlc_ObjIsPi(pObj) );
pObj->Type = WLC_OBJ_PI;
pObj->nFanins = 0;
Wlc_ObjDup( pNew, p, Wlc_ObjId(p, pObj), vFanins );
pObj->Type = Type;
pObj->nFanins = (unsigned)nFanins;
}
// duplicate flop outputs
Wlc_NtkForEachObjVec( vFlops, p, pObj, i )
{
assert( !Wlc_ObjIsPi(pObj) && Wlc_ObjIsCi(pObj) );
Wlc_ObjDup( pNew, p, Wlc_ObjId(p, pObj), vFanins );
}
// duplicate logic cones of primary outputs
Wlc_NtkForEachPo( p, pObj, i )
Wlc_NtkDupDfs_rec( pNew, p, Wlc_ObjId(p, pObj), vFanins );
// duplidate logic cone of flop inputs
Wlc_NtkForEachObjVec( vFlops, p, pObj, i )
Wlc_NtkDupDfs_rec( pNew, p, Wlc_ObjId(p, Wlc_ObjFo2Fi(p, pObj)), vFanins );
// duplicate POs
Wlc_NtkForEachPo( p, pObj, i )
Wlc_ObjSetCo( pNew, Wlc_ObjCopyObj(pNew, p, pObj), 0 );
// duplicate flop inputs
Wlc_NtkForEachObjVec( vFlops, p, pObj, i )
Wlc_ObjSetCo( pNew, Wlc_ObjCopyObj(pNew, p, Wlc_ObjFo2Fi(p, pObj)), 1 );
Vec_IntFree( vFanins );
// mark flop outputs
Wlc_NtkForEachObjVec( vFlops, p, pObj, i )
pObj->Mark = 1;
if ( p->vInits )
pNew->vInits = Wlc_ReduceMarkedInitVec( p, p->vInits );
if ( p->pInits )
pNew->pInits = Wlc_ReduceMarkedInitStr( p, p->pInits );
Wlc_NtkCleanMarks( p );
if ( p->pSpec )
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
//Wlc_NtkTransferNames( pNew, p );
return pNew;
}
/**Function*************************************************************
Synopsis [Select the cone of the given output.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_NtkCleanMarks( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
int i;
Wlc_NtkForEachObj( p, pObj, i )
pObj->Mark = 0;
}
int Wlc_NtkCountMarked( Wlc_Ntk_t * p, int * pnPis, int * pnFos, int * pnAdders, int * pnMults )
{
Wlc_Obj_t * pObj;
int i, nNodes = 0;
*pnPis = *pnFos = *pnAdders = *pnMults = 0;
Wlc_NtkForEachObj( p, pObj, i )
{
if ( !pObj->Mark )
continue;
if ( Wlc_ObjIsPi(pObj) )
(*pnPis)++;
else if ( Wlc_ObjIsCi(pObj) )
(*pnFos)++;
else if ( pObj->Mark )
{
nNodes++;
if ( pObj->Type == WLC_OBJ_ARI_ADD || pObj->Type == WLC_OBJ_ARI_SUB )
(*pnAdders)++;
else if ( pObj->Type == WLC_OBJ_ARI_MULTI )
(*pnMults)++;
}
}
return nNodes;
}
void Wlc_NtkMarkCone_rec( Wlc_Ntk_t * p, Wlc_Obj_t * pObj, Vec_Int_t * vFlops )
{
int i, iFanin;
if ( pObj->Mark )
return;
pObj->Mark = 1;
if ( Wlc_ObjIsCi(pObj) )
{
if ( !Wlc_ObjIsPi(pObj) )
Vec_IntPush( vFlops, Wlc_ObjCiId(pObj) );
return;
}
Wlc_ObjForEachFanin( pObj, iFanin, i ) if ( iFanin )
Wlc_NtkMarkCone_rec( p, Wlc_NtkObj(p, iFanin), vFlops );
}
void Wlc_NtkMarkCone( Wlc_Ntk_t * p, int iCoId, int Range, int fSeq, int fAllPis )
{
Vec_Int_t * vFlops;
Wlc_Obj_t * pObj;
int i, CiId, CoId;
Wlc_NtkCleanMarks( p );
if ( fAllPis )
Wlc_NtkForEachPi( p, pObj, i )
pObj->Mark = 1;
vFlops = Vec_IntAlloc( 100 );
Wlc_NtkForEachCo( p, pObj, i )
if ( iCoId == -1 || (i >= iCoId && i < iCoId + Range) )
Wlc_NtkMarkCone_rec( p, pObj, vFlops );
if ( fSeq )
Vec_IntForEachEntry( vFlops, CiId, i )
{
CoId = Wlc_NtkPoNum(p) + CiId - Wlc_NtkPiNum(p);
Wlc_NtkMarkCone_rec( p, Wlc_NtkCo(p, CoId), vFlops );
}
Vec_IntFree( vFlops );
}
void Wlc_NtkProfileCones( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
int i, nPis, nFos, nNodes, nAdders, nMults;
Wlc_NtkForEachCo( p, pObj, i )
{
Wlc_NtkMarkCone( p, i, 1, 0, 0 );
nNodes = Wlc_NtkCountMarked( p, &nPis, &nFos, &nAdders, &nMults );
printf( "Cone %5d : ", i );
printf( "PI = %4d ", nPis );
printf( "FO = %4d ", nFos );
printf( "Node = %6d ", nNodes );
printf( "Add/Sub = %4d ", nAdders );
printf( "Mult = %4d ", nMults );
printf( "\n" );
}
Wlc_NtkCleanMarks( p );
}
/**Function*************************************************************
Synopsis [Duplicates the network by copying each node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Wlc_Ntk_t * Wlc_NtkDupSingleNodes( Wlc_Ntk_t * p )
{
Wlc_Ntk_t * pNew;
Vec_Int_t * vFanins;
Wlc_Obj_t * pObj, * pObjNew;
Wlc_Obj_t * pFanin, * pFaninNew;
int i, k, iFanin, iFaninNew, iObjNew, Count = 0;
// count objects
Wlc_NtkForEachObj( p, pObj, i )
if ( !Wlc_ObjIsCi(pObj) )
Count += 1 + Wlc_ObjFaninNum(pObj);
// copy objects
Wlc_NtkCleanCopy( p );
vFanins = Vec_IntAlloc( 100 );
pNew = Wlc_NtkAlloc( p->pName, p->nObjsAlloc );
pNew->fSmtLib = p->fSmtLib;
pNew->fAsyncRst = p->fAsyncRst;
pNew->fMemPorts = p->fMemPorts;
pNew->fEasyFfs = p->fEasyFfs;
Wlc_NtkForEachObj( p, pObj, i )
{
if ( Wlc_ObjIsCi(pObj) )
continue;
if ( pObj->Type == WLC_OBJ_ARI_MULTI )
continue;
if ( pObj->Type == WLC_OBJ_MUX && Wlc_ObjFaninNum(pObj) > 3 )
continue;
// create CIs for the fanins
Wlc_ObjForEachFanin( pObj, iFanin, k )
{
pFanin = Wlc_NtkObj(p, iFanin);
iFaninNew = Wlc_ObjAlloc( pNew, WLC_OBJ_PI, pFanin->Signed, pFanin->End, pFanin->Beg );
pFaninNew = Wlc_NtkObj(pNew, iFaninNew);
Wlc_ObjSetCopy( p, iFanin, iFaninNew );
//Wlc_ObjSetCi( pNew, pFaninNew );
}
// create object
iObjNew = Wlc_ObjDup( pNew, p, i, vFanins );
pObjNew = Wlc_NtkObj(pNew, iObjNew);
pObjNew->fIsPo = 1;
Vec_IntPush( &pNew->vPos, iObjNew );
}
Vec_IntFree( vFanins );
Wlc_NtkTransferNames( pNew, p );
if ( p->pSpec )
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
return pNew;
}
/**Function*************************************************************
Synopsis [Creates short names for all objects.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_NtkShortNames( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj;
char pBuffer[1000];
int NameId, fFound, i;
int nFlops = Wlc_NtkCoNum(p) - Wlc_NtkPoNum(p);
unsigned char nDigits = (unsigned char)Abc_Base10Log( nFlops );
Wlc_NtkForEachCo( p, pObj, i )
{
if ( Wlc_ObjIsPo(pObj) )
continue;
sprintf( pBuffer, "%s%0*d", "fi", nDigits, i - Wlc_NtkPoNum(p) );
NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound );
Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId );
}
Wlc_NtkForEachCi( p, pObj, i )
{
if ( Wlc_ObjIsPi(pObj) )
continue;
sprintf( pBuffer, "%s%0*d", "fo", nDigits, i - Wlc_NtkPiNum(p) );
NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound );
Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId );
}
nDigits = Abc_Base10Log( Wlc_NtkPoNum(p) );
Wlc_NtkForEachPo( p, pObj, i )
{
sprintf( pBuffer, "%s%0*d", "po", nDigits, i );
NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound );
Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId );
}
nDigits = Abc_Base10Log( Wlc_NtkPiNum(p) );
Wlc_NtkForEachPi( p, pObj, i )
{
sprintf( pBuffer, "%s%0*d", "pi", nDigits, i );
NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound );
Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId );
}
nDigits = Abc_Base10Log( Wlc_NtkObjNum(p) );
Wlc_NtkForEachObj( p, pObj, i )
{
if ( Wlc_ObjIsCi(pObj) || Wlc_ObjIsCo(pObj) )
continue;
sprintf( pBuffer, "%s%0*d", "n", nDigits, i );
NameId = Abc_NamStrFindOrAdd( p->pManName, pBuffer, &fFound );
Wlc_ObjSetNameId( p, Wlc_ObjId(p, pObj), NameId );
}
}
/**Function*************************************************************
Synopsis [Count the number of flops initialized to DC value.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Wlc_NtkDcFlopNum( Wlc_Ntk_t * p )
{
int i, nFlops, Count = 0;
if ( p->pInits == NULL )
return 0;
nFlops = strlen(p->pInits);
for ( i = 0; i < nFlops; i++ )
Count += (p->pInits[i] == 'x' || p->pInits[i] == 'X');
return Count;
}
/**Function*************************************************************
Synopsis [Create references.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Wlc_NtkSetRefs( Wlc_Ntk_t * p )
{
Wlc_Obj_t * pObj; int i, k, Fanin;
Vec_IntFill( &p->vRefs, Wlc_NtkObjNumMax(p), 0 );
Wlc_NtkForEachObj( p, pObj, i )
Wlc_ObjForEachFanin( pObj, Fanin, k )
Vec_IntAddToEntry( &p->vRefs, Fanin, 1 );
Wlc_NtkForEachCo( p, pObj, i )
Vec_IntAddToEntry( &p->vRefs, Wlc_ObjId(p, pObj), 1 );
}
/**Function*************************************************************
Synopsis [This procedure simply count the number of PPI bits.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Wlc_NtkCountObjBits( Wlc_Ntk_t * p, Vec_Int_t * vPisNew )
{
Wlc_Obj_t * pObj;
int i, Count = 0;
Wlc_NtkForEachObjVec( vPisNew, p, pObj, i )
Count += Wlc_ObjRange(pObj);
return Count;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
|
951a2948595bde4ac04a2a8d1af874627ad98740
|
28d0f8c01599f8f6c711bdde0b59f9c2cd221203
|
/sys/arch/macppc/dev/ki2c.c
|
8ce8f122768adfbb920a477befefbb1682ba297e
|
[] |
no_license
|
NetBSD/src
|
1a9cbc22ed778be638b37869ed4fb5c8dd616166
|
23ee83f7c0aea0777bd89d8ebd7f0cde9880d13c
|
refs/heads/trunk
| 2023-08-31T13:24:58.105962
| 2023-08-27T15:50:47
| 2023-08-27T15:50:47
| 88,439,547
| 656
| 348
| null | 2023-07-20T20:07:24
| 2017-04-16T20:03:43
| null |
UTF-8
|
C
| false
| false
| 11,779
|
c
|
ki2c.c
|
/* $NetBSD: ki2c.c,v 1.33 2022/06/29 17:59:40 mlelstv Exp $ */
/* Id: ki2c.c,v 1.7 2002/10/05 09:56:05 tsubai Exp */
/*-
* Copyright (c) 2001 Tsubai Masanari. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/device.h>
#include <sys/systm.h>
#include <sys/mutex.h>
#include <dev/ofw/openfirm.h>
#include <machine/autoconf.h>
#include "opt_ki2c.h"
#include <macppc/dev/ki2cvar.h>
#ifdef KI2C_DEBUG
#define DPRINTF printf
#else
#define DPRINTF while (0) printf
#endif
#define KI2C_EXEC_MAX_CMDLEN 32
#define KI2C_EXEC_MAX_BUFLEN 32
int ki2c_match(device_t, cfdata_t, void *);
void ki2c_attach(device_t, device_t, void *);
inline uint8_t ki2c_readreg(struct ki2c_softc *, int);
inline void ki2c_writereg(struct ki2c_softc *, int, uint8_t);
u_int ki2c_getmode(struct ki2c_softc *);
void ki2c_setmode(struct ki2c_softc *, u_int);
u_int ki2c_getspeed(struct ki2c_softc *);
void ki2c_setspeed(struct ki2c_softc *, u_int);
int ki2c_intr(struct ki2c_softc *);
int ki2c_poll(struct ki2c_softc *, int);
int ki2c_start(struct ki2c_softc *, int, int, void *, int);
int ki2c_read(struct ki2c_softc *, int, int, void *, int);
int ki2c_write(struct ki2c_softc *, int, int, void *, int);
/* I2C glue */
static int ki2c_i2c_exec(void *, i2c_op_t, i2c_addr_t, const void *, size_t,
void *, size_t, int);
CFATTACH_DECL_NEW(ki2c, sizeof(struct ki2c_softc), ki2c_match, ki2c_attach,
NULL, NULL);
int
ki2c_match(device_t parent, cfdata_t match, void *aux)
{
struct confargs *ca = aux;
if (strcmp(ca->ca_name, "i2c") == 0)
return 1;
return 0;
}
void
ki2c_attach(device_t parent, device_t self, void *aux)
{
struct ki2c_softc *sc = device_private(self);
struct confargs *ca = aux;
int node = ca->ca_node;
uint32_t addr, channel, reg;
int rate, child, /*namelen,*/ i2cbus[2] = {0, 0};
struct i2cbus_attach_args iba;
prop_dictionary_t dict = device_properties(self);
prop_array_t cfg;
int devs, devc;
char compat[256], num[8], descr[32];
prop_dictionary_t dev;
prop_data_t data;
char name[32];
sc->sc_dev = self;
sc->sc_tag = ca->ca_tag;
ca->ca_reg[0] += ca->ca_baseaddr;
if (OF_getprop(node, "AAPL,i2c-rate", &rate, 4) != 4) {
aprint_error(": cannot get i2c-rate\n");
return;
}
if (OF_getprop(node, "AAPL,address", &addr, 4) != 4) {
aprint_error(": unable to find i2c address\n");
return;
}
if (bus_space_map(sc->sc_tag, addr, PAGE_SIZE, 0, &sc->sc_bh) != 0) {
aprint_error_dev(sc->sc_dev, "failed to map registers\n");
return;
}
if (OF_getprop(node, "AAPL,address-step", &sc->sc_regstep, 4) != 4) {
aprint_error(": unable to find i2c address step\n");
return;
}
printf("\n");
ki2c_writereg(sc, STATUS, 0);
ki2c_writereg(sc, ISR, 0);
ki2c_writereg(sc, IER, 0);
ki2c_setmode(sc, I2C_STDSUBMODE);
ki2c_setspeed(sc, I2C_100kHz); /* XXX rate */
ki2c_writereg(sc, IER,I2C_INT_DATA|I2C_INT_ADDR|I2C_INT_STOP);
cfg = prop_array_create();
prop_dictionary_set(dict, "i2c-child-devices", cfg);
prop_object_release(cfg);
/*
* newer OF puts I2C devices under 'i2c-bus' instead of attaching them
* directly to the ki2c node so we just check if we have a child named
* 'i2c-bus' and if so we attach its children, not ours
*
* XXX
* should probably check for multiple i2c-bus children
*/
int found_busnode = 0;
channel = 0;
child = OF_child(node);
while (child != 0) {
OF_getprop(child, "name", name, sizeof(name));
if (strcmp(name, "i2c-bus") == 0) {
OF_getprop(child, "reg", &channel, sizeof(channel));
i2cbus[channel] = child;
DPRINTF("found channel %x\n", channel);
found_busnode = 1;
}
child = OF_peer(child);
}
if (found_busnode == 0)
i2cbus[0] = node;
for (channel = 0; channel < 2; channel++) {
devs = OF_child(i2cbus[channel]);
while (devs != 0) {
if (OF_getprop(devs, "name", name, 32) <= 0)
goto skip;
if (OF_getprop(devs, "compatible", compat, 256) <= 0) {
/* some i2c device nodes don't have 'compatible' */
memset(compat, 0, 256);
strncpy(compat, name, 256);
}
if (OF_getprop(devs, "reg", &addr, 4) <= 0)
if (OF_getprop(devs, "i2c-address", &addr, 4) <= 0)
goto skip;
addr |= channel << 8;
addr = addr >> 1;
DPRINTF("-> %s@%x\n", name, addr);
dev = prop_dictionary_create();
prop_dictionary_set_string(dev, "name", name);
data = prop_data_create_copy(compat, strlen(compat)+1);
prop_dictionary_set(dev, "compatible", data);
prop_object_release(data);
prop_dictionary_set_uint32(dev, "addr", addr);
prop_dictionary_set_uint64(dev, "cookie", devs);
/* look for location info for sensors */
devc = OF_child(devs);
while (devc != 0) {
if (OF_getprop(devc, "reg", ®, 4) < 4) goto nope;
if (OF_getprop(devc, "location", descr, 32) <= 0)
goto nope;
DPRINTF("found '%s' at %02x\n", descr, reg);
snprintf(num, 7, "s%02x", reg);
prop_dictionary_set_string(dev, num, descr);
nope:
devc = OF_peer(devc);
}
prop_array_add(cfg, dev);
prop_object_release(dev);
skip:
devs = OF_peer(devs);
}
}
/* fill in the i2c tag */
iic_tag_init(&sc->sc_i2c);
sc->sc_i2c.ic_cookie = sc;
sc->sc_i2c.ic_exec = ki2c_i2c_exec;
memset(&iba, 0, sizeof(iba));
iba.iba_tag = &sc->sc_i2c;
config_found(sc->sc_dev, &iba, iicbus_print, CFARGS_NONE);
}
uint8_t
ki2c_readreg(struct ki2c_softc *sc, int reg)
{
return bus_space_read_1(sc->sc_tag, sc->sc_bh, sc->sc_regstep * reg);
}
void
ki2c_writereg(struct ki2c_softc *sc, int reg, uint8_t val)
{
bus_space_write_1(sc->sc_tag, sc->sc_bh, reg * sc->sc_regstep, val);
delay(10);
}
u_int
ki2c_getmode(struct ki2c_softc *sc)
{
return ki2c_readreg(sc, MODE) & I2C_MODE;
}
void
ki2c_setmode(struct ki2c_softc *sc, u_int mode)
{
ki2c_writereg(sc, MODE, mode);
}
u_int
ki2c_getspeed(struct ki2c_softc *sc)
{
return ki2c_readreg(sc, MODE) & I2C_SPEED;
}
void
ki2c_setspeed(struct ki2c_softc *sc, u_int speed)
{
u_int x;
KASSERT((speed & ~I2C_SPEED) == 0);
x = ki2c_readreg(sc, MODE);
x &= ~I2C_SPEED;
x |= speed;
ki2c_writereg(sc, MODE, x);
}
int
ki2c_intr(struct ki2c_softc *sc)
{
u_int isr, x;
isr = ki2c_readreg(sc, ISR);
if (isr & I2C_INT_ADDR) {
#if 0
if ((ki2c_readreg(sc, STATUS) & I2C_ST_LASTAAK) == 0) {
/* No slave responded. */
sc->sc_flags |= I2C_ERROR;
goto out;
}
#endif
if (sc->sc_flags & I2C_READING) {
if (sc->sc_resid > 1) {
x = ki2c_readreg(sc, CONTROL);
x |= I2C_CT_AAK;
ki2c_writereg(sc, CONTROL, x);
}
} else {
ki2c_writereg(sc, DATA, *sc->sc_data++);
sc->sc_resid--;
}
}
if (isr & I2C_INT_DATA) {
if (sc->sc_flags & I2C_READING) {
*sc->sc_data++ = ki2c_readreg(sc, DATA);
sc->sc_resid--;
if (sc->sc_resid == 0) { /* Completed */
ki2c_writereg(sc, CONTROL, 0);
goto out;
}
} else {
#if 0
if ((ki2c_readreg(sc, STATUS) & I2C_ST_LASTAAK) == 0) {
/* No slave responded. */
sc->sc_flags |= I2C_ERROR;
goto out;
}
#endif
if (sc->sc_resid == 0) {
x = ki2c_readreg(sc, CONTROL) | I2C_CT_STOP;
ki2c_writereg(sc, CONTROL, x);
} else {
ki2c_writereg(sc, DATA, *sc->sc_data++);
sc->sc_resid--;
}
}
}
out:
if (isr & I2C_INT_STOP) {
ki2c_writereg(sc, CONTROL, 0);
sc->sc_flags &= ~I2C_BUSY;
}
ki2c_writereg(sc, ISR, isr);
return 1;
}
int
ki2c_poll(struct ki2c_softc *sc, int timo)
{
while (sc->sc_flags & I2C_BUSY) {
if (ki2c_readreg(sc, ISR))
ki2c_intr(sc);
timo -= 100;
if (timo < 0) {
DPRINTF("i2c_poll: timeout\n");
return -1;
}
delay(100);
}
return 0;
}
int
ki2c_start(struct ki2c_softc *sc, int addr, int subaddr, void *data, int len)
{
int rw = (sc->sc_flags & I2C_READING) ? 1 : 0;
int timo, x;
KASSERT((addr & 1) == 0);
sc->sc_data = data;
sc->sc_resid = len;
sc->sc_flags |= I2C_BUSY;
timo = 1000 + len * 200;
/* XXX TAS3001 sometimes takes 50ms to finish writing registers. */
/* if (addr == 0x68) */
timo += 100000;
ki2c_writereg(sc, ADDR, addr | rw);
ki2c_writereg(sc, SUBADDR, subaddr);
x = ki2c_readreg(sc, CONTROL) | I2C_CT_ADDR;
ki2c_writereg(sc, CONTROL, x);
if (ki2c_poll(sc, timo))
return -1;
if (sc->sc_flags & I2C_ERROR) {
DPRINTF("I2C_ERROR\n");
return -1;
}
return 0;
}
int
ki2c_read(struct ki2c_softc *sc, int addr, int subaddr, void *data, int len)
{
sc->sc_flags = I2C_READING;
DPRINTF("ki2c_read: %02x %d\n", addr, len);
return ki2c_start(sc, addr, subaddr, data, len);
}
int
ki2c_write(struct ki2c_softc *sc, int addr, int subaddr, void *data, int len)
{
sc->sc_flags = 0;
DPRINTF("ki2c_write: %02x %d\n",addr,len);
return ki2c_start(sc, addr, subaddr, data, len);
}
int
ki2c_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, const void *vcmd,
size_t cmdlen, void *vbuf, size_t buflen, int flags)
{
struct ki2c_softc *sc = cookie;
int i;
size_t w_len;
uint8_t *wp;
uint8_t wrbuf[KI2C_EXEC_MAX_CMDLEN + KI2C_EXEC_MAX_CMDLEN];
uint8_t channel;
/*
* We don't have any idea if the ki2c controller can execute
* i2c quick_{read,write} operations, so if someone tries one,
* return an error.
*/
if (cmdlen == 0 && buflen == 0)
return -1;
/*
* Transaction could be much larger now. Bail if it exceeds our
* small combining buffer, we don't expect such devices.
*/
if (cmdlen + buflen > sizeof(wrbuf))
return -1;
channel = (addr & 0xf80) ? 0x10 : 0x00;
addr &= 0x7f;
/* we handle the subaddress stuff ourselves */
ki2c_setmode(sc, channel | I2C_STDMODE);
ki2c_setspeed(sc, I2C_50kHz);
/* Write-buffer defaults to vcmd */
wp = (uint8_t *)(__UNCONST(vcmd));
w_len = cmdlen;
/*
* Concatenate vcmd and vbuf for write operations
*
* Drivers written specifically for ki2c might already do this,
* but "generic" i2c drivers still provide separate arguments
* for the cmd and buf parts of iic_smbus_write_{byte,word}.
*/
if (I2C_OP_WRITE_P(op) && buflen != 0) {
if (cmdlen == 0) {
wp = (uint8_t *)vbuf;
w_len = buflen;
} else {
KASSERT((cmdlen + buflen) <= sizeof(wrbuf));
wp = (uint8_t *)(__UNCONST(vcmd));
w_len = 0;
for (i = 0; i < cmdlen; i++)
wrbuf[w_len++] = *wp++;
wp = (uint8_t *)vbuf;
for (i = 0; i < buflen; i++)
wrbuf[w_len++] = *wp++;
wp = wrbuf;
}
}
if (w_len > 0)
if (ki2c_write(sc, addr << 1, 0, wp, w_len) !=0 )
return -1;
if (I2C_OP_READ_P(op)) {
if (ki2c_read(sc, addr << 1, 0, vbuf, buflen) !=0 )
return -1;
}
return 0;
}
|
0fd64506a92d3ac5f00f681b0541fca0f1268063
|
79d343002bb63a44f8ab0dbac0c9f4ec54078c3a
|
/lib/libc/include/any-linux-any/linux/pcitest.h
|
1a8ea554b06ba3523a9deab25b49056d842764d7
|
[
"MIT"
] |
permissive
|
ziglang/zig
|
4aa75d8d3bcc9e39bf61d265fd84b7f005623fc5
|
f4c9e19bc3213c2bc7e03d7b06d7129882f39f6c
|
refs/heads/master
| 2023-08-31T13:16:45.980913
| 2023-08-31T05:50:29
| 2023-08-31T05:50:29
| 40,276,274
| 25,560
| 2,399
|
MIT
| 2023-09-14T21:09:50
| 2015-08-06T00:51:28
|
Zig
|
UTF-8
|
C
| false
| false
| 877
|
h
|
pcitest.h
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* pcitest.h - PCI test uapi defines
*
* Copyright (C) 2017 Texas Instruments
* Author: Kishon Vijay Abraham I <kishon@ti.com>
*
*/
#ifndef __UAPI_LINUX_PCITEST_H
#define __UAPI_LINUX_PCITEST_H
#define PCITEST_BAR _IO('P', 0x1)
#define PCITEST_LEGACY_IRQ _IO('P', 0x2)
#define PCITEST_MSI _IOW('P', 0x3, int)
#define PCITEST_WRITE _IOW('P', 0x4, unsigned long)
#define PCITEST_READ _IOW('P', 0x5, unsigned long)
#define PCITEST_COPY _IOW('P', 0x6, unsigned long)
#define PCITEST_MSIX _IOW('P', 0x7, int)
#define PCITEST_SET_IRQTYPE _IOW('P', 0x8, int)
#define PCITEST_GET_IRQTYPE _IO('P', 0x9)
#define PCITEST_CLEAR_IRQ _IO('P', 0x10)
#define PCITEST_FLAGS_USE_DMA 0x00000001
struct pci_endpoint_test_xfer_param {
unsigned long size;
unsigned char flags;
};
#endif /* __UAPI_LINUX_PCITEST_H */
|
76d5d87943fc8c51fae57571cca5b498dbdc5946
|
1efb2283837c9b70bc6449cec877799e4efa3268
|
/src/mpid/ch4/netmod/ofi/ofi_spawn.c
|
6ceb2280296af227af7964a3ab4d5cdf7f7adb36
|
[
"mpich2"
] |
permissive
|
pmodels/mpich
|
d2392e8e30536cad3e500c16aa1e71211101d83f
|
2d265f9f5f93ebdd07ad547423bc6212868262a4
|
refs/heads/main
| 2023-09-04T05:50:15.041823
| 2023-09-01T23:07:33
| 2023-09-01T23:07:33
| 70,918,679
| 506
| 313
|
NOASSERTION
| 2023-09-14T14:38:36
| 2016-10-14T14:39:42
|
C
|
UTF-8
|
C
| false
| false
| 9,733
|
c
|
ofi_spawn.c
|
/*
* Copyright (C) by Argonne National Laboratory
* See COPYRIGHT in top-level directory
*/
#include "mpidimpl.h"
#include "ofi_impl.h"
#include "ofi_noinline.h"
int MPIDI_OFI_dynamic_send(uint64_t remote_gpid, int tag, const void *buf, int size, int timeout)
{
int mpi_errno = MPI_SUCCESS;
MPIR_Assert(MPIDI_OFI_ENABLE_TAGGED);
int nic = 0; /* dynamic process only use nic 0 */
int vci = 0; /* dynamic process only use vci 0 */
int ctx_idx = 0;
int avtid = MPIDIU_GPID_GET_AVTID(remote_gpid);
int lpid = MPIDIU_GPID_GET_LPID(remote_gpid);
fi_addr_t remote_addr = MPIDI_OFI_av_to_phys(&MPIDIU_get_av(avtid, lpid), nic, vci);
MPID_THREAD_CS_ENTER(VCI, MPIDI_VCI(vci).lock);
MPIDI_OFI_dynamic_process_request_t req;
req.done = 0;
req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE;
uint64_t match_bits;
match_bits = MPIDI_OFI_init_sendtag(0, 0, tag, MPIDI_OFI_DYNPROC_SEND);
MPL_time_t time_start, time_now;
double time_gap;
MPL_wtime(&time_start);
if (MPIDI_OFI_ENABLE_DATA) {
MPIDI_OFI_CALL_RETRY(fi_tsenddata(MPIDI_OFI_global.ctx[ctx_idx].tx,
buf, size, NULL /* desc */ , 0,
remote_addr, match_bits, (void *) &req.context),
vci, tsenddata);
} else {
MPIDI_OFI_CALL_RETRY(fi_tsend(MPIDI_OFI_global.ctx[ctx_idx].tx, buf, size, NULL /* desc */ ,
remote_addr, match_bits, (void *) &req.context), vci, tsend);
}
do {
mpi_errno = MPIDI_OFI_progress_uninlined(vci);
// mpi_errno = MPID_Progress_test(NULL);
MPIR_ERR_CHECK(mpi_errno);
MPL_wtime(&time_now);
MPL_wtime_diff(&time_start, &time_now, &time_gap);
} while (!req.done && (timeout == 0 || time_gap < (double) timeout));
if (!req.done) {
/* time out, let's cancel the request */
int rc;
rc = fi_cancel((fid_t) MPIDI_OFI_global.ctx[ctx_idx].tx, (void *) &req.context);
if (rc && rc != -FI_ENOENT) {
MPIR_ERR_CHKANDJUMP4(rc < 0, mpi_errno, MPI_ERR_OTHER, "**ofid_cancel",
"**ofid_cancel %s %d %s %s", __SHORT_FILE__, __LINE__, __func__,
fi_strerror(-rc));
}
while (!req.done) {
mpi_errno = MPIDI_OFI_progress_uninlined(vci);
MPIR_ERR_CHECK(mpi_errno);
}
mpi_errno = MPIX_ERR_TIMEOUT;
}
fn_exit:
MPID_THREAD_CS_EXIT(VCI, MPIDI_VCI(vci).lock);
return mpi_errno;
fn_fail:
goto fn_exit;
}
int MPIDI_OFI_dynamic_recv(int tag, void *buf, int size, int timeout)
{
int mpi_errno = MPI_SUCCESS;
MPIR_Assert(MPIDI_OFI_ENABLE_TAGGED);
int vci = 0; /* dynamic process only use vci 0 */
int ctx_idx = 0;
MPIDI_OFI_dynamic_process_request_t req;
req.done = 0;
req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE;
uint64_t match_bits = 0;
uint64_t mask_bits = 0;
match_bits = MPIDI_OFI_init_recvtag(&mask_bits, 0, MPI_ANY_SOURCE, tag);
match_bits |= MPIDI_OFI_DYNPROC_SEND;
MPID_THREAD_CS_ENTER(VCI, MPIDI_VCI(vci).lock);
MPL_time_t time_start, time_now;
double time_gap;
MPL_wtime(&time_start);
MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[ctx_idx].rx,
buf, size, NULL,
FI_ADDR_UNSPEC, match_bits, mask_bits, &req.context), vci, trecv);
do {
mpi_errno = MPIDI_OFI_progress_uninlined(vci);
MPIR_ERR_CHECK(mpi_errno);
MPL_wtime(&time_now);
MPL_wtime_diff(&time_start, &time_now, &time_gap);
} while (!req.done && (timeout == 0 || time_gap < (double) timeout));
if (!req.done) {
/* time out, let's cancel the request */
int rc;
rc = fi_cancel((fid_t) MPIDI_OFI_global.ctx[ctx_idx].rx, (void *) &req.context);
if (rc && rc != -FI_ENOENT) {
MPIR_ERR_CHKANDJUMP4(rc < 0, mpi_errno, MPI_ERR_OTHER, "**ofid_cancel",
"**ofid_cancel %s %d %s %s", __SHORT_FILE__, __LINE__, __func__,
fi_strerror(-rc));
}
while (!req.done) {
mpi_errno = MPIDI_OFI_progress_uninlined(vci);
MPIR_ERR_CHECK(mpi_errno);
}
mpi_errno = MPIX_ERR_TIMEOUT;
}
fn_exit:
MPID_THREAD_CS_EXIT(VCI, MPIDI_VCI(vci).lock);
return mpi_errno;
fn_fail:
goto fn_exit;
}
/* the following functions are "proc" functions, but because they are only used during dynamic
* process spawning, having them here provides better context */
int MPIDI_OFI_upids_to_gpids(int size, int *remote_upid_size, char *remote_upids,
uint64_t * remote_gpids)
{
int i, mpi_errno = MPI_SUCCESS;
int *new_avt_procs;
char **new_upids;
int n_new_procs = 0;
int n_avts;
char *curr_upid;
int nic = 0;
int ctx_idx = MPIDI_OFI_get_ctx_index(0, nic);
MPIR_CHKLMEM_DECL(2);
MPIR_CHKLMEM_MALLOC(new_avt_procs, int *, sizeof(int) * size, mpi_errno, "new_avt_procs",
MPL_MEM_ADDRESS);
MPIR_CHKLMEM_MALLOC(new_upids, char **, sizeof(char *) * size, mpi_errno, "new_upids",
MPL_MEM_ADDRESS);
n_avts = MPIDIU_get_n_avts();
curr_upid = remote_upids;
for (i = 0; i < size; i++) {
int j, k;
char tbladdr[FI_NAME_MAX];
int found = 0;
size_t sz = 0;
char *hostname = curr_upid;
int hostname_len = strlen(hostname);
char *addrname = hostname + hostname_len + 1;
int addrname_len = remote_upid_size[i] - hostname_len - 1;
for (k = 0; k < n_avts; k++) {
if (MPIDIU_get_av_table(k) == NULL) {
continue;
}
for (j = 0; j < MPIDIU_get_av_table(k)->size; j++) {
sz = MPIDI_OFI_global.addrnamelen;
MPIDI_OFI_VCI_CALL(fi_av_lookup(MPIDI_OFI_global.ctx[ctx_idx].av,
MPIDI_OFI_TO_PHYS(k, j, nic), &tbladdr, &sz), 0,
avlookup);
if (sz == addrname_len && !memcmp(tbladdr, addrname, addrname_len)) {
remote_gpids[i] = MPIDIU_GPID_CREATE(k, j);
found = 1;
break;
}
}
if (found) {
break;
}
}
if (!found) {
new_avt_procs[n_new_procs] = i;
new_upids[n_new_procs] = curr_upid;
n_new_procs++;
}
curr_upid += remote_upid_size[i];
}
/* create new av_table, insert processes */
if (n_new_procs > 0) {
int avtid;
mpi_errno = MPIDIU_new_avt(n_new_procs, &avtid);
MPIR_ERR_CHECK(mpi_errno);
for (i = 0; i < n_new_procs; i++) {
char *hostname = new_upids[i];
char *addrname = hostname + strlen(hostname) + 1;
fi_addr_t addr;
MPIDI_OFI_VCI_CALL(fi_av_insert(MPIDI_OFI_global.ctx[ctx_idx].av, addrname,
1, &addr, 0ULL, NULL), 0, avmap);
MPIR_Assert(addr != FI_ADDR_NOTAVAIL);
MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).dest[nic][0] = addr;
int node_id;
mpi_errno = MPIR_nodeid_lookup(hostname, &node_id);
MPIR_ERR_CHECK(mpi_errno);
MPIDIU_get_av(avtid, i).node_id = node_id;
remote_gpids[new_avt_procs[i]] = MPIDIU_GPID_CREATE(avtid, i);
}
}
fn_exit:
MPIR_CHKLMEM_FREEALL();
return mpi_errno;
fn_fail:
goto fn_exit;
}
int MPIDI_OFI_get_local_upids(MPIR_Comm * comm, int **local_upid_size, char **local_upids)
{
int mpi_errno = MPI_SUCCESS;
int i, total_size = 0;
char *temp_buf = NULL;
int nic = 0;
int ctx_idx = MPIDI_OFI_get_ctx_index(0, nic);
MPIR_CHKPMEM_DECL(2);
MPIR_CHKPMEM_MALLOC((*local_upid_size), int *, comm->local_size * sizeof(int),
mpi_errno, "local_upid_size", MPL_MEM_ADDRESS);
MPIR_CHKPMEM_MALLOC(temp_buf, char *, comm->local_size * MPIDI_OFI_global.addrnamelen,
mpi_errno, "temp_buf", MPL_MEM_BUFFER);
int buf_size = 0;
int idx = 0;
for (i = 0; i < comm->local_size; i++) {
/* upid format: hostname + '\0' + addrname */
int hostname_len = 0;
char *hostname = (char *) "";
int node_id = MPIDIU_comm_rank_to_av(comm, i)->node_id;
if (MPIR_Process.node_hostnames && node_id >= 0) {
hostname = utarray_eltptr(MPIR_Process.node_hostnames, node_id);
hostname_len = strlen(hostname);
}
int upid_len = hostname_len + 1 + MPIDI_OFI_global.addrnamelen;
if (idx + upid_len > buf_size) {
buf_size += 1024;
temp_buf = MPL_realloc(temp_buf, buf_size, MPL_MEM_OTHER);
MPIR_Assert(temp_buf);
}
strcpy(temp_buf + idx, hostname);
idx += hostname_len + 1;
size_t sz = MPIDI_OFI_global.addrnamelen;;
MPIDI_OFI_addr_t *av = &MPIDI_OFI_AV(MPIDIU_comm_rank_to_av(comm, i));
MPIDI_OFI_VCI_CALL(fi_av_lookup(MPIDI_OFI_global.ctx[ctx_idx].av, av->dest[nic][0],
temp_buf + idx, &sz), 0, avlookup);
idx += (int) sz;
(*local_upid_size)[i] = upid_len;
total_size += (*local_upid_size)[i];
}
*local_upids = temp_buf;
MPIR_CHKPMEM_COMMIT();
fn_exit:
return mpi_errno;
fn_fail:
MPIR_CHKPMEM_REAP();
goto fn_exit;
}
|
d9c39ac31a0b6364c0e54912fdeebcb74afd7a55
|
b969ef7c2e6dbc7ec223ee8a87054a9c2f736658
|
/sources/Renderer/ModuleInterface.h
|
81a7f5f573b657cf9583116252bfbdc2dec7c36f
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
LukasBanana/LLGL
|
186241fadbd0a3a77f3e008ca385950cce40273c
|
3d3b4d708704a6b430f9240003a09faa45f8e8b8
|
refs/heads/master
| 2023-08-23T10:29:33.190198
| 2023-08-23T03:14:48
| 2023-08-23T03:35:03
| 62,965,106
| 1,848
| 171
|
BSD-3-Clause
| 2023-08-28T22:36:19
| 2016-07-09T19:10:46
|
C++
|
UTF-8
|
C
| false
| false
| 447
|
h
|
ModuleInterface.h
|
/*
* ModuleInterface.h
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/
#ifndef LLGL_MODULE_INTERFACE_H
#define LLGL_MODULE_INTERFACE_H
#ifdef LLGL_BUILD_STATIC_LIB
# include "StaticModuleInterface.h"
#else
# include "DynamicModuleInterface.h"
#endif
#endif
// ================================================================================
|
e582fa567211d374ca9803b41b19bdfdce41fb8e
|
99bdb3251fecee538e0630f15f6574054dfc1468
|
/bsp/Infineon/libraries/IFX_PSOC6_HAL/psoc6cm0p/COMPONENT_CM0P_SECURE/psoc6_03_cm0p_secure.c
|
e78cb26f4ea8917938da6ba436e2ff2eb51448eb
|
[
"Zlib",
"LicenseRef-scancode-proprietary-license",
"MIT",
"BSD-3-Clause",
"X11",
"BSD-4-Clause-UC",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-pbl-1.0"
] |
permissive
|
RT-Thread/rt-thread
|
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
|
3602f891211904a27dcbd51e5ba72fefce7326b2
|
refs/heads/master
| 2023-09-01T04:10:20.295801
| 2023-08-31T16:20:55
| 2023-08-31T16:20:55
| 7,408,108
| 9,599
| 5,805
|
Apache-2.0
| 2023-09-14T13:37:26
| 2013-01-02T14:49:21
|
C
|
UTF-8
|
C
| false
| false
| 283,262
|
c
|
psoc6_03_cm0p_secure.c
|
/***************************************************************************//**
* \file psoc6_03_cm0p_secure.c
*
* \brief
* Cortex-M0+ prebuilt application image.
*
********************************************************************************
* \copyright
* Copyright (c) 2018-2021 Cypress Semiconductor Corporation (an Infineon
* company) or an affiliate of Cypress Semiconductor Corporation
* SPDX-License-Identifier: LicenseRef-PBL
*
* Licensed under the Permissive Binary License
*******************************************************************************/
#include <stdint.h>
#include "cy_device_headers.h"
#if defined(CY_DEVICE_PSOC6A512K)
#if defined(__APPLE__) && defined(__clang__)
__attribute__ ((__section__("__CY_M0P_IMAGE,__cy_m0p_image"), used))
#elif defined(__GNUC__) || defined(__ARMCC_VERSION)
__attribute__ ((__section__(".cy_m0p_image"), used))
#elif defined(__ICCARM__)
#pragma location=".cy_m0p_image"
#else
#error "An unsupported toolchain"
#endif
const uint8_t cy_m0p_image[] = {
0x00u, 0xc0u, 0x02u, 0x08u, 0xebu, 0x04u, 0x00u, 0x10u, 0x0du, 0x00u, 0x00u, 0x00u, 0x49u, 0x05u, 0x00u, 0x10u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x45u, 0x05u, 0x00u, 0x10u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u,
0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u,
0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u,
0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u,
0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u, 0x45u, 0x05u, 0x00u, 0x10u,
0x10u, 0xb5u, 0x06u, 0x4cu, 0x23u, 0x78u, 0x00u, 0x2bu, 0x07u, 0xd1u, 0x05u, 0x4bu, 0x00u, 0x2bu, 0x02u, 0xd0u,
0x04u, 0x48u, 0x00u, 0xe0u, 0x00u, 0xbfu, 0x01u, 0x23u, 0x23u, 0x70u, 0x10u, 0xbdu, 0x00u, 0x06u, 0x02u, 0x08u,
0x00u, 0x00u, 0x00u, 0x00u, 0x80u, 0x96u, 0x00u, 0x10u, 0x04u, 0x4bu, 0x10u, 0xb5u, 0x00u, 0x2bu, 0x03u, 0xd0u,
0x03u, 0x49u, 0x04u, 0x48u, 0x00u, 0xe0u, 0x00u, 0xbfu, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x00u, 0x00u,
0x04u, 0x06u, 0x02u, 0x08u, 0x80u, 0x96u, 0x00u, 0x10u, 0x02u, 0x30u, 0x80u, 0x08u, 0x03u, 0xd0u, 0x01u, 0x30u,
0x02u, 0x38u, 0xfcu, 0xd1u, 0xc0u, 0x46u, 0xc0u, 0x46u, 0x70u, 0x47u, 0xefu, 0xf3u, 0x10u, 0x80u, 0x72u, 0xb6u,
0x70u, 0x47u, 0x80u, 0xf3u, 0x10u, 0x88u, 0x70u, 0x47u, 0x70u, 0x47u, 0xffu, 0xf7u, 0xfdu, 0xffu, 0x72u, 0xb6u,
0x0eu, 0x4cu, 0x0fu, 0x4du, 0xacu, 0x42u, 0x09u, 0xdau, 0x21u, 0x68u, 0x62u, 0x68u, 0xa3u, 0x68u, 0x04u, 0x3bu,
0x02u, 0xdbu, 0xc8u, 0x58u, 0xd0u, 0x50u, 0xfau, 0xe7u, 0x0cu, 0x34u, 0xf3u, 0xe7u, 0x09u, 0x49u, 0x0au, 0x4au,
0x00u, 0x20u, 0x52u, 0x1au, 0x02u, 0xddu, 0x04u, 0x3au, 0x88u, 0x50u, 0xfcu, 0xdcu, 0x07u, 0x48u, 0x08u, 0x49u,
0x08u, 0x60u, 0xbfu, 0xf3u, 0x4fu, 0x8fu, 0x07u, 0xf0u, 0x7fu, 0xf8u, 0xfeu, 0xe7u, 0x8cu, 0x96u, 0x00u, 0x10u,
0xa4u, 0x96u, 0x00u, 0x10u, 0x00u, 0x06u, 0x02u, 0x08u, 0x24u, 0x10u, 0x02u, 0x08u, 0x00u, 0x00u, 0x02u, 0x08u,
0x08u, 0xedu, 0x00u, 0xe0u, 0xfeu, 0xe7u, 0xfeu, 0xe7u, 0x00u, 0xb5u, 0x04u, 0x20u, 0x71u, 0x46u, 0x08u, 0x42u,
0x02u, 0xd0u, 0xefu, 0xf3u, 0x09u, 0x80u, 0x02u, 0xe0u, 0xefu, 0xf3u, 0x08u, 0x80u, 0x04u, 0x30u, 0x06u, 0xf0u,
0x09u, 0xf9u, 0xfeu, 0xe7u, 0x03u, 0x00u, 0x09u, 0x3bu, 0x01u, 0x22u, 0x04u, 0x2bu, 0x02u, 0xd9u, 0x20u, 0x38u,
0x42u, 0x42u, 0x42u, 0x41u, 0x10u, 0x00u, 0x70u, 0x47u, 0xf0u, 0xb5u, 0x00u, 0x25u, 0x17u, 0x00u, 0x06u, 0x00u,
0x2cu, 0x00u, 0x89u, 0xb0u, 0x03u, 0x93u, 0x0eu, 0x9bu, 0x02u, 0x90u, 0x1bu, 0x0cu, 0xdbu, 0xb2u, 0x04u, 0x93u,
0x0eu, 0x9bu, 0x00u, 0x91u, 0x1bu, 0x0au, 0xdbu, 0xb2u, 0x05u, 0x93u, 0x0eu, 0x9bu, 0xdbu, 0xb2u, 0x07u, 0x93u,
0x73u, 0x1cu, 0x06u, 0x93u, 0x33u, 0x78u, 0x01u, 0x93u, 0x00u, 0x2bu, 0x08u, 0xd0u, 0x00u, 0x9bu, 0x00u, 0x2bu,
0x22u, 0xdbu, 0x02u, 0x9au, 0x73u, 0x1cu, 0x9bu, 0x1au, 0x00u, 0x9au, 0x9au, 0x42u, 0x1cu, 0xdau, 0x0eu, 0x9bu,
0xdbu, 0xb2u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0xb4u, 0xe0u, 0x01u, 0x9au, 0x9au, 0x42u, 0x00u, 0xd0u, 0xaeu, 0xe0u,
0x00u, 0x9bu, 0x00u, 0x2bu, 0x06u, 0xdbu, 0x02u, 0x9au, 0x73u, 0x1cu, 0x9bu, 0x1au, 0x00u, 0x9au, 0x93u, 0x42u,
0x00u, 0xddu, 0xa4u, 0xe0u, 0xb3u, 0x1cu, 0x76u, 0x78u, 0x03u, 0x2du, 0x00u, 0xd9u, 0xa1u, 0xe0u, 0x28u, 0x00u,
0x07u, 0xf0u, 0xfcu, 0xf8u, 0x89u, 0x89u, 0x63u, 0x7bu, 0x01u, 0x98u, 0xffu, 0xf7u, 0xb3u, 0xffu, 0x00u, 0x28u,
0x39u, 0xd1u, 0x07u, 0x9bu, 0x01u, 0x9au, 0x93u, 0x42u, 0xd9u, 0xd0u, 0x4fu, 0x4eu, 0x11u, 0x00u, 0x30u, 0x00u,
0x08u, 0xf0u, 0xe0u, 0xfbu, 0x03u, 0x1eu, 0x08u, 0xd1u, 0x04u, 0x9bu, 0x01u, 0x9au, 0x93u, 0x42u, 0x0bu, 0xd0u,
0x05u, 0x9bu, 0x93u, 0x42u, 0x6fu, 0xd1u, 0x33u, 0x00u, 0x3fu, 0x33u, 0x03u, 0x2du, 0x23u, 0xd8u, 0x28u, 0x00u,
0x07u, 0xf0u, 0xdcu, 0xf8u, 0x05u, 0x10u, 0x23u, 0x35u, 0x33u, 0x00u, 0x3eu, 0x33u, 0xf5u, 0xe7u, 0x00u, 0x2fu,
0x06u, 0xd0u, 0x03u, 0x9au, 0x94u, 0x42u, 0x5eu, 0xd2u, 0x3fu, 0x4au, 0x9bu, 0x1au, 0x9bu, 0x00u, 0x3bu, 0x55u,
0x01u, 0x25u, 0x10u, 0xe0u, 0x62u, 0x1cu, 0x00u, 0x2fu, 0x0bu, 0xd0u, 0x03u, 0x99u, 0x8au, 0x42u, 0x52u, 0xd2u,
0x39u, 0x49u, 0x3cu, 0x19u, 0x5bu, 0x1au, 0x21u, 0x78u, 0x18u, 0x11u, 0x01u, 0x43u, 0x1bu, 0x01u, 0x21u, 0x70u,
0xbbu, 0x54u, 0x14u, 0x00u, 0x02u, 0x25u, 0x06u, 0x9eu, 0x92u, 0xe7u, 0x62u, 0x1cu, 0x00u, 0x2fu, 0x0bu, 0xd0u,
0x03u, 0x99u, 0x8au, 0x42u, 0x3fu, 0xd2u, 0x30u, 0x49u, 0x3cu, 0x19u, 0x5bu, 0x1au, 0x21u, 0x78u, 0x98u, 0x10u,
0x01u, 0x43u, 0x9bu, 0x01u, 0x21u, 0x70u, 0xbbu, 0x54u, 0x14u, 0x00u, 0x03u, 0x25u, 0xebu, 0xe7u, 0x00u, 0x2fu,
0x08u, 0xd0u, 0x03u, 0x9au, 0x94u, 0x42u, 0x2eu, 0xd2u, 0x27u, 0x49u, 0x3au, 0x19u, 0x5bu, 0x1au, 0x11u, 0x78u,
0x0bu, 0x43u, 0x13u, 0x70u, 0x01u, 0x34u, 0x00u, 0x25u, 0xddu, 0xe7u, 0x1du, 0x00u, 0x00u, 0x2eu, 0x22u, 0xd0u,
0x00u, 0x9bu, 0x00u, 0x2bu, 0x22u, 0xdbu, 0x02u, 0x9bu, 0x00u, 0x9au, 0xebu, 0x1au, 0x9au, 0x42u, 0x1du, 0xdau,
0x01u, 0x9bu, 0xb3u, 0x42u, 0x17u, 0xd1u, 0x00u, 0x9bu, 0x00u, 0x2bu, 0x04u, 0xddu, 0x02u, 0x9bu, 0x00u, 0x9au,
0xebu, 0x1au, 0x93u, 0x42u, 0x0fu, 0xdcu, 0x2eu, 0x78u, 0x6bu, 0x1cu, 0x02u, 0x9au, 0x9du, 0x1au, 0x00u, 0x2eu,
0x04u, 0xd0u, 0x00u, 0x9bu, 0x00u, 0x2bu, 0x11u, 0xdbu, 0xabu, 0x42u, 0x0fu, 0xdau, 0x00u, 0x2fu, 0x18u, 0xd0u,
0x3bu, 0x5du, 0x00u, 0x2bu, 0x15u, 0xd0u, 0x01u, 0x24u, 0x64u, 0x42u, 0x19u, 0xe0u, 0x30u, 0x00u, 0xffu, 0xf7u,
0x29u, 0xffu, 0x00u, 0x28u, 0xdcu, 0xd0u, 0x2eu, 0x78u, 0x01u, 0x35u, 0xcfu, 0xe7u, 0x30u, 0x00u, 0xffu, 0xf7u,
0x21u, 0xffu, 0x00u, 0x28u, 0xefu, 0xd0u, 0x02u, 0x9bu, 0x5eu, 0x5du, 0x01u, 0x35u, 0xdfu, 0xe7u, 0x00u, 0x2du,
0xe9u, 0xd1u, 0x03u, 0x9bu, 0x9cu, 0x42u, 0xe6u, 0xd2u, 0x00u, 0x2fu, 0x01u, 0xd0u, 0x00u, 0x23u, 0x3bu, 0x55u,
0x20u, 0x00u, 0x09u, 0xb0u, 0xf0u, 0xbdu, 0xc0u, 0x46u, 0x38u, 0x90u, 0x00u, 0x10u, 0x00u, 0x22u, 0x10u, 0xb5u,
0x04u, 0x00u, 0x10u, 0x00u, 0xa1u, 0x5cu, 0x0bu, 0x00u, 0x30u, 0x3bu, 0x09u, 0x2bu, 0x09u, 0xd8u, 0x30u, 0x38u,
0x08u, 0x18u, 0x53u, 0x1cu, 0x03u, 0x2au, 0x03u, 0xd0u, 0x00u, 0x01u, 0x1au, 0x00u, 0x04u, 0x2bu, 0xf1u, 0xd1u,
0x10u, 0xbdu, 0x0bu, 0x00u, 0x41u, 0x3bu, 0x05u, 0x2bu, 0x01u, 0xd8u, 0x37u, 0x38u, 0xf0u, 0xe7u, 0x0bu, 0x00u,
0x61u, 0x3bu, 0x05u, 0x2bu, 0x01u, 0xd8u, 0x57u, 0x38u, 0xeau, 0xe7u, 0x00u, 0x20u, 0xf0u, 0xe7u, 0x00u, 0x00u,
0xf0u, 0xb5u, 0x0bu, 0x78u, 0x85u, 0xb0u, 0x03u, 0x90u, 0x17u, 0x00u, 0x4du, 0x1cu, 0x22u, 0x2bu, 0x17u, 0xd0u,
0x11u, 0x60u, 0x00u, 0x20u, 0x2au, 0xe0u, 0x5cu, 0x2au, 0x07u, 0xd1u, 0x01u, 0x9au, 0x52u, 0x78u, 0x00u, 0x2au,
0xf7u, 0xd0u, 0x01u, 0x9au, 0x01u, 0x33u, 0x01u, 0x32u, 0x01u, 0x92u, 0x01u, 0x9au, 0x01u, 0x32u, 0x01u, 0x92u,
0x01u, 0x9au, 0x12u, 0x78u, 0x22u, 0x2au, 0x00u, 0xd1u, 0xa7u, 0xe0u, 0x00u, 0x2au, 0xebu, 0xd1u, 0xe8u, 0xe7u,
0x01u, 0x95u, 0x00u, 0x23u, 0xf4u, 0xe7u, 0x2bu, 0x78u, 0x5cu, 0x2bu, 0x11u, 0xd0u, 0x23u, 0x70u, 0x01u, 0x35u,
0x01u, 0x34u, 0x01u, 0x9bu, 0x9du, 0x42u, 0xf6u, 0xd3u, 0x00u, 0x23u, 0x03u, 0x9au, 0x23u, 0x70u, 0x08u, 0x33u,
0xd3u, 0x60u, 0x13u, 0x00u, 0x01u, 0x98u, 0x02u, 0x9au, 0x01u, 0x30u, 0x1au, 0x61u, 0x05u, 0xb0u, 0xf0u, 0xbdu,
0x6bu, 0x78u, 0x66u, 0x2bu, 0x63u, 0xd0u, 0x14u, 0xd8u, 0x2fu, 0x2bu, 0x61u, 0xd0u, 0x07u, 0xd8u, 0x22u, 0x2bu,
0x5eu, 0xd0u, 0x48u, 0x4bu, 0x3du, 0x60u, 0x1bu, 0x68u, 0x02u, 0x98u, 0x98u, 0x47u, 0xc1u, 0xe7u, 0x5cu, 0x2bu,
0x56u, 0xd0u, 0x62u, 0x2bu, 0xf5u, 0xd1u, 0x08u, 0x23u, 0x23u, 0x70u, 0x01u, 0x34u, 0x06u, 0x3bu, 0xedu, 0x18u,
0xd7u, 0xe7u, 0x72u, 0x2bu, 0x50u, 0xd0u, 0x06u, 0xd8u, 0x6eu, 0x2bu, 0xeau, 0xd1u, 0x0au, 0x23u, 0x23u, 0x70u,
0x01u, 0x34u, 0x08u, 0x3bu, 0xf3u, 0xe7u, 0x74u, 0x2bu, 0x48u, 0xd0u, 0x75u, 0x2bu, 0xe1u, 0xd1u, 0x01u, 0x9bu,
0x5bu, 0x1bu, 0x05u, 0x2bu, 0xddu, 0xddu, 0xa8u, 0x1cu, 0xffu, 0xf7u, 0x78u, 0xffu, 0x36u, 0x4bu, 0x37u, 0x4au,
0xc3u, 0x18u, 0x06u, 0x00u, 0x93u, 0x42u, 0xd4u, 0xd9u, 0x00u, 0x28u, 0xd2u, 0xd0u, 0x34u, 0x4bu, 0x33u, 0x4au,
0xc3u, 0x18u, 0x93u, 0x42u, 0x34u, 0xd8u, 0x01u, 0x9au, 0xabu, 0x1du, 0xd3u, 0x1au, 0x05u, 0x2bu, 0xc8u, 0xddu,
0xabu, 0x79u, 0x5cu, 0x2bu, 0xc5u, 0xd1u, 0xebu, 0x79u, 0x75u, 0x2bu, 0xc2u, 0xd1u, 0x28u, 0x00u, 0x08u, 0x30u,
0xffu, 0xf7u, 0x5cu, 0xffu, 0x28u, 0x4bu, 0x29u, 0x4au, 0xc3u, 0x18u, 0x93u, 0x42u, 0xb9u, 0xd8u, 0x29u, 0x4bu,
0xb6u, 0x02u, 0x1eu, 0x40u, 0x80u, 0x23u, 0x80u, 0x05u, 0x80u, 0x0du, 0x5bu, 0x02u, 0x06u, 0x43u, 0xf6u, 0x18u,
0x0cu, 0x23u, 0x25u, 0x4au, 0x96u, 0x42u, 0x1fu, 0xd9u, 0x24u, 0x4au, 0x96u, 0x42u, 0xa9u, 0xd8u, 0x3fu, 0x20u,
0x30u, 0x40u, 0x80u, 0x26u, 0x76u, 0x42u, 0x06u, 0x43u, 0xe6u, 0x70u, 0x04u, 0x22u, 0x12u, 0xe0u, 0x0cu, 0x23u,
0x23u, 0x70u, 0x01u, 0x34u, 0x02u, 0x23u, 0xaau, 0xe7u, 0x0du, 0x23u, 0xf9u, 0xe7u, 0x09u, 0x23u, 0xf7u, 0xe7u,
0x7fu, 0x28u, 0x04u, 0xd9u, 0x1au, 0x4bu, 0x98u, 0x42u, 0x0eu, 0xd9u, 0x06u, 0x23u, 0xe1u, 0xe7u, 0x06u, 0x23u,
0x01u, 0x22u, 0x20u, 0x70u, 0xa4u, 0x18u, 0x9au, 0xe7u, 0x3fu, 0x20u, 0x30u, 0x40u, 0x80u, 0x26u, 0x76u, 0x42u,
0x06u, 0x43u, 0xa6u, 0x70u, 0x03u, 0x22u, 0xf5u, 0xe7u, 0x3fu, 0x20u, 0x80u, 0x23u, 0x06u, 0x40u, 0x5bu, 0x42u,
0x1eu, 0x43u, 0x66u, 0x70u, 0x86u, 0x33u, 0x02u, 0x22u, 0xecu, 0xe7u, 0x01u, 0x9au, 0x50u, 0x1au, 0xc0u, 0x1au,
0x0cu, 0x4bu, 0x04u, 0x30u, 0x1bu, 0x68u, 0x98u, 0x47u, 0x02u, 0x90u, 0x04u, 0x1eu, 0x00u, 0xd0u, 0x58u, 0xe7u,
0x37u, 0xe7u, 0xc0u, 0x46u, 0x80u, 0x00u, 0x02u, 0x08u, 0x00u, 0x24u, 0xffu, 0xffu, 0xffu, 0x03u, 0x00u, 0x00u,
0x00u, 0x28u, 0xffu, 0xffu, 0x00u, 0xfcu, 0x0fu, 0x00u, 0xffu, 0xffu, 0x00u, 0x00u, 0xffu, 0xffu, 0x10u, 0x00u,
0xffu, 0x07u, 0x00u, 0x00u, 0x84u, 0x00u, 0x02u, 0x08u, 0x00u, 0x28u, 0x03u, 0xd0u, 0x03u, 0x78u, 0x01u, 0x3bu,
0x1fu, 0x2bu, 0x00u, 0xd9u, 0x70u, 0x47u, 0x01u, 0x30u, 0xf6u, 0xe7u, 0x00u, 0x00u, 0x06u, 0x4bu, 0x10u, 0xb5u,
0x1bu, 0x68u, 0x28u, 0x20u, 0x98u, 0x47u, 0x04u, 0x1eu, 0x03u, 0xd0u, 0x28u, 0x22u, 0x00u, 0x21u, 0x08u, 0xf0u,
0x66u, 0xf9u, 0x20u, 0x00u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x84u, 0x00u, 0x02u, 0x08u, 0x08u, 0x49u, 0x09u, 0x4au,
0x00u, 0x28u, 0x03u, 0xd1u, 0x08u, 0x4bu, 0x0bu, 0x60u, 0x08u, 0x4bu, 0x07u, 0xe0u, 0x03u, 0x68u, 0x00u, 0x2bu,
0x00u, 0xd1u, 0x05u, 0x4bu, 0x0bu, 0x60u, 0x43u, 0x68u, 0x00u, 0x2bu, 0xf5u, 0xd0u, 0x13u, 0x60u, 0x70u, 0x47u,
0x84u, 0x00u, 0x02u, 0x08u, 0x80u, 0x00u, 0x02u, 0x08u, 0xf1u, 0x8bu, 0x00u, 0x10u, 0x05u, 0x8cu, 0x00u, 0x10u,
0xf8u, 0xb5u, 0x80u, 0x26u, 0x04u, 0x00u, 0x76u, 0x00u, 0x00u, 0x2cu, 0x00u, 0xd1u, 0xf8u, 0xbdu, 0xe3u, 0x68u,
0x27u, 0x68u, 0x33u, 0x42u, 0x04u, 0xd1u, 0xa0u, 0x68u, 0x00u, 0x28u, 0x01u, 0xd0u, 0xffu, 0xf7u, 0xf0u, 0xffu,
0xe3u, 0x68u, 0x0bu, 0x4du, 0x33u, 0x42u, 0x04u, 0xd1u, 0x20u, 0x69u, 0x00u, 0x28u, 0x01u, 0xd0u, 0x2bu, 0x68u,
0x98u, 0x47u, 0x80u, 0x22u, 0xe3u, 0x68u, 0x92u, 0x00u, 0x13u, 0x42u, 0x04u, 0xd1u, 0x20u, 0x6au, 0x00u, 0x28u,
0x01u, 0xd0u, 0x2bu, 0x68u, 0x98u, 0x47u, 0x20u, 0x00u, 0x2bu, 0x68u, 0x98u, 0x47u, 0x3cu, 0x00u, 0xdbu, 0xe7u,
0x80u, 0x00u, 0x02u, 0x08u, 0xf0u, 0xb5u, 0x04u, 0x00u, 0x85u, 0xb0u, 0x0fu, 0x00u, 0x16u, 0x00u, 0x00u, 0x29u,
0x01u, 0xd1u, 0x00u, 0x20u, 0x13u, 0xe0u, 0x04u, 0x22u, 0x6fu, 0x49u, 0x38u, 0x00u, 0x08u, 0xf0u, 0xf2u, 0xf9u,
0x00u, 0x28u, 0x03u, 0xd1u, 0x02u, 0x23u, 0xe3u, 0x60u, 0x38u, 0x1du, 0x08u, 0xe0u, 0x05u, 0x22u, 0x6bu, 0x49u,
0x38u, 0x00u, 0x08u, 0xf0u, 0xe7u, 0xf9u, 0x00u, 0x28u, 0x03u, 0xd1u, 0xe0u, 0x60u, 0x78u, 0x1du, 0x05u, 0xb0u,
0xf0u, 0xbdu, 0x04u, 0x22u, 0x66u, 0x49u, 0x38u, 0x00u, 0x08u, 0xf0u, 0xdcu, 0xf9u, 0x00u, 0x28u, 0x06u, 0xd1u,
0x01u, 0x23u, 0x01u, 0x22u, 0xe3u, 0x60u, 0x00u, 0x23u, 0xa2u, 0x61u, 0xe3u, 0x61u, 0xe4u, 0xe7u, 0x3bu, 0x78u,
0x22u, 0x2bu, 0x05u, 0xd1u, 0x32u, 0x00u, 0x39u, 0x00u, 0x20u, 0x00u, 0xffu, 0xf7u, 0x89u, 0xfeu, 0xe6u, 0xe7u,
0x2du, 0x2bu, 0x03u, 0xd0u, 0x1au, 0x00u, 0x30u, 0x3au, 0x09u, 0x2au, 0x24u, 0xd8u, 0x00u, 0x25u, 0x0au, 0x22u,
0x03u, 0xa9u, 0x38u, 0x00u, 0x03u, 0x95u, 0x08u, 0xf0u, 0x7bu, 0xfau, 0x03u, 0x00u, 0x03u, 0x98u, 0x87u, 0x42u,
0xbfu, 0xd0u, 0x5au, 0x1cu, 0x0au, 0xd1u, 0x53u, 0x4au, 0x91u, 0x42u, 0x11u, 0xd1u, 0x01u, 0x22u, 0x51u, 0x4bu,
0x52u, 0x42u, 0xa2u, 0x61u, 0xe3u, 0x61u, 0x04u, 0x23u, 0xe3u, 0x60u, 0xc8u, 0xe7u, 0x00u, 0x2bu, 0x07u, 0xd1u,
0x80u, 0x22u, 0x12u, 0x06u, 0x91u, 0x42u, 0x03u, 0xd1u, 0x80u, 0x23u, 0x00u, 0x22u, 0x1bu, 0x06u, 0xf0u, 0xe7u,
0xa3u, 0x61u, 0xe1u, 0x61u, 0xefu, 0xe7u, 0x5bu, 0x2bu, 0x35u, 0xd1u, 0x78u, 0x1cu, 0xffu, 0xf7u, 0x3cu, 0xffu,
0x03u, 0x78u, 0x05u, 0x00u, 0x5du, 0x2bu, 0x26u, 0xd0u, 0x00u, 0x23u, 0x01u, 0x3du, 0x01u, 0x93u, 0x00u, 0x93u,
0xffu, 0xf7u, 0x3cu, 0xffu, 0x00u, 0x9bu, 0x07u, 0x1eu, 0x6fu, 0xd0u, 0x00u, 0x2bu, 0x19u, 0xd0u, 0x01u, 0x9bu,
0x18u, 0x60u, 0x43u, 0x60u, 0x68u, 0x1cu, 0xffu, 0xf7u, 0x27u, 0xffu, 0x32u, 0x00u, 0x01u, 0x00u, 0x38u, 0x00u,
0xffu, 0xf7u, 0x80u, 0xffu, 0xffu, 0xf7u, 0x20u, 0xffu, 0x05u, 0x1eu, 0x06u, 0xd0u, 0x03u, 0x78u, 0x01u, 0x97u,
0x2cu, 0x2bu, 0xe5u, 0xd0u, 0x5du, 0x2bu, 0x08u, 0xd0u, 0x30u, 0x60u, 0x00u, 0x98u, 0xffu, 0xf7u, 0x48u, 0xffu,
0x77u, 0xe7u, 0x00u, 0x90u, 0xe6u, 0xe7u, 0x00u, 0x23u, 0x00u, 0x93u, 0x10u, 0x23u, 0xe3u, 0x60u, 0x00u, 0x9bu,
0x68u, 0x1cu, 0xa3u, 0x60u, 0x83u, 0xe7u, 0x7bu, 0x2bu, 0x4bu, 0xd1u, 0x78u, 0x1cu, 0xffu, 0xf7u, 0x04u, 0xffu,
0x03u, 0x78u, 0x07u, 0x00u, 0x7du, 0x2bu, 0x38u, 0xd0u, 0x00u, 0x23u, 0x01u, 0x3fu, 0x01u, 0x93u, 0x00u, 0x93u,
0xffu, 0xf7u, 0x04u, 0xffu, 0x00u, 0x9bu, 0x05u, 0x1eu, 0x37u, 0xd0u, 0x00u, 0x2bu, 0x17u, 0xd0u, 0x01u, 0x9bu,
0x18u, 0x60u, 0x43u, 0x60u, 0x78u, 0x1cu, 0xffu, 0xf7u, 0xefu, 0xfeu, 0x32u, 0x00u, 0x01u, 0x00u, 0x28u, 0x00u,
0xffu, 0xf7u, 0x06u, 0xfeu, 0xffu, 0xf7u, 0xe8u, 0xfeu, 0x00u, 0x28u, 0xceu, 0xd0u, 0x2bu, 0x69u, 0x2bu, 0x62u,
0x00u, 0x23u, 0x2bu, 0x61u, 0x03u, 0x78u, 0x3au, 0x2bu, 0x03u, 0xd0u, 0x30u, 0x60u, 0xc5u, 0xe7u, 0x00u, 0x90u,
0xe8u, 0xe7u, 0x01u, 0x30u, 0xffu, 0xf7u, 0xd8u, 0xfeu, 0x32u, 0x00u, 0x01u, 0x00u, 0x28u, 0x00u, 0xffu, 0xf7u,
0x31u, 0xffu, 0xffu, 0xf7u, 0xd1u, 0xfeu, 0x07u, 0x1eu, 0xb7u, 0xd0u, 0x03u, 0x78u, 0x01u, 0x95u, 0x2cu, 0x2bu,
0xceu, 0xd0u, 0x7du, 0x2bu, 0x03u, 0xd0u, 0x30u, 0x60u, 0xafu, 0xe7u, 0x00u, 0x23u, 0x00u, 0x93u, 0x20u, 0x23u,
0xe3u, 0x60u, 0x00u, 0x9bu, 0x78u, 0x1cu, 0xa3u, 0x60u, 0x39u, 0xe7u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x20u, 0xe7u,
0xa3u, 0xe7u, 0x37u, 0x60u, 0x1du, 0xe7u, 0xc0u, 0x46u, 0x77u, 0x90u, 0x00u, 0x10u, 0x7cu, 0x90u, 0x00u, 0x10u,
0x82u, 0x90u, 0x00u, 0x10u, 0xffu, 0xffu, 0xffu, 0x7fu, 0xf7u, 0xb5u, 0x05u, 0x00u, 0x0eu, 0x00u, 0x01u, 0x92u,
0x0fu, 0x1eu, 0x00u, 0xd1u, 0x14u, 0x4fu, 0xffu, 0xf7u, 0xb1u, 0xfeu, 0x00u, 0x23u, 0x04u, 0x00u, 0x3bu, 0x60u,
0x98u, 0x42u, 0x0du, 0xd0u, 0x28u, 0x00u, 0xffu, 0xf7u, 0x9fu, 0xfeu, 0x3au, 0x00u, 0x01u, 0x00u, 0x20u, 0x00u,
0xffu, 0xf7u, 0xf8u, 0xfeu, 0x05u, 0x1eu, 0x05u, 0xd1u, 0x20u, 0x00u, 0xffu, 0xf7u, 0xc9u, 0xfeu, 0x00u, 0x24u,
0x20u, 0x00u, 0xfeu, 0xbdu, 0x01u, 0x9bu, 0x00u, 0x2bu, 0x0au, 0xd0u, 0xffu, 0xf7u, 0x8du, 0xfeu, 0x03u, 0x78u,
0x05u, 0x00u, 0x00u, 0x2bu, 0x04u, 0xd0u, 0x20u, 0x00u, 0xffu, 0xf7u, 0xbau, 0xfeu, 0x3du, 0x60u, 0xeeu, 0xe7u,
0x00u, 0x2eu, 0xedu, 0xd0u, 0x35u, 0x60u, 0xebu, 0xe7u, 0x1cu, 0x06u, 0x02u, 0x08u, 0x00u, 0x22u, 0x10u, 0xb5u,
0x11u, 0x00u, 0xffu, 0xf7u, 0xc9u, 0xffu, 0x10u, 0xbdu, 0x80u, 0x22u, 0x33u, 0xb5u, 0x45u, 0x0au, 0xffu, 0xb0u,
0x6du, 0x02u, 0x04u, 0x00u, 0x29u, 0x00u, 0x92u, 0x00u, 0x68u, 0x46u, 0x07u, 0xf0u, 0xdfu, 0xffu, 0x01u, 0x23u,
0x6au, 0x46u, 0xe4u, 0x05u, 0xe4u, 0x0du, 0x69u, 0x46u, 0x28u, 0x00u, 0x13u, 0x55u, 0x01u, 0xf0u, 0xcau, 0xf9u,
0x7fu, 0xb0u, 0x36u, 0xbdu, 0x10u, 0xb5u, 0x18u, 0x39u, 0x09u, 0x18u, 0x0bu, 0x78u, 0x00u, 0x20u, 0x01u, 0x2bu,
0x02u, 0xd0u, 0x08u, 0x00u, 0xffu, 0xf7u, 0xe0u, 0xffu, 0x10u, 0xbdu, 0x00u, 0x00u, 0xf0u, 0xb5u, 0x8du, 0xb0u,
0x1du, 0x00u, 0x15u, 0xabu, 0x1bu, 0x78u, 0x0eu, 0x00u, 0x03u, 0x93u, 0x00u, 0x23u, 0x17u, 0x00u, 0x05u, 0xa9u,
0x06u, 0xaau, 0x05u, 0x93u, 0x06u, 0x93u, 0x00u, 0xf0u, 0x48u, 0xf9u, 0x04u, 0x1eu, 0x4bu, 0xd1u, 0x2fu, 0x4bu,
0x32u, 0x00u, 0x00u, 0x93u, 0x06u, 0x99u, 0x3bu, 0x00u, 0x05u, 0x98u, 0xffu, 0xf7u, 0x4du, 0xfcu, 0x00u, 0x28u,
0x51u, 0xddu, 0x0cu, 0x22u, 0x21u, 0x00u, 0x09u, 0xa8u, 0x07u, 0xf0u, 0xb1u, 0xffu, 0x02u, 0x20u, 0x08u, 0xaau,
0x07u, 0xa9u, 0xffu, 0x30u, 0x07u, 0x94u, 0x08u, 0x94u, 0x00u, 0xf0u, 0x8eu, 0xffu, 0x00u, 0x28u, 0x02u, 0xd0u,
0x65u, 0x24u, 0x64u, 0x42u, 0x2fu, 0xe0u, 0x29u, 0x00u, 0x07u, 0x98u, 0x00u, 0xf0u, 0x4bu, 0xfeu, 0x00u, 0x28u,
0xf6u, 0xd1u, 0x03u, 0x30u, 0x08u, 0xaau, 0x07u, 0xa9u, 0xffu, 0x30u, 0x00u, 0xf0u, 0x7du, 0xffu, 0x00u, 0x28u,
0xeeu, 0xd1u, 0x12u, 0x99u, 0x07u, 0x98u, 0x00u, 0xf0u, 0xdbu, 0xfdu, 0x04u, 0x1eu, 0x1bu, 0xd1u, 0x09u, 0xa9u,
0x30u, 0x00u, 0x00u, 0xf0u, 0x2au, 0xf9u, 0x04u, 0x1eu, 0x15u, 0xd1u, 0x12u, 0x99u, 0x0au, 0x98u, 0x00u, 0xf0u,
0x2bu, 0xfdu, 0x04u, 0x1eu, 0x0fu, 0xd1u, 0x03u, 0x9au, 0x29u, 0x00u, 0x0bu, 0x98u, 0x00u, 0xf0u, 0x3cu, 0xf9u,
0x04u, 0x1eu, 0x05u, 0xd1u, 0x13u, 0x9bu, 0x00u, 0x2bu, 0x08u, 0xd1u, 0x14u, 0x9bu, 0x00u, 0x2bu, 0x0du, 0xd1u,
0x09u, 0x98u, 0xffu, 0xf7u, 0x2du, 0xfeu, 0x20u, 0x00u, 0x0du, 0xb0u, 0xf0u, 0xbdu, 0x13u, 0x99u, 0x09u, 0x98u,
0x00u, 0xf0u, 0x06u, 0xfcu, 0x00u, 0x28u, 0xf0u, 0xd0u, 0x04u, 0x00u, 0xf1u, 0xe7u, 0x14u, 0x99u, 0x09u, 0x98u,
0x00u, 0xf0u, 0xd4u, 0xfcu, 0xf8u, 0xe7u, 0x14u, 0x24u, 0xbbu, 0xe7u, 0xc0u, 0x46u, 0x00u, 0x5fu, 0x2du, 0x00u,
0xf0u, 0xb5u, 0x8bu, 0xb0u, 0x1fu, 0x00u, 0x10u, 0xabu, 0x05u, 0x92u, 0x04u, 0xcbu, 0x04u, 0x91u, 0x1bu, 0x78u,
0x06u, 0x92u, 0x07u, 0x93u, 0x00u, 0x23u, 0x09u, 0xaau, 0x08u, 0xa9u, 0x06u, 0x00u, 0x08u, 0x93u, 0x09u, 0x93u,
0x00u, 0xf0u, 0xd3u, 0xf8u, 0x04u, 0x1eu, 0x22u, 0xd1u, 0x09u, 0x98u, 0x00u, 0xf0u, 0x6bu, 0xf8u, 0x04u, 0x00u,
0x07u, 0xf0u, 0x16u, 0xffu, 0x05u, 0x1eu, 0x20u, 0xd0u, 0x11u, 0x4bu, 0x02u, 0x00u, 0x00u, 0x93u, 0x09u, 0x99u,
0x23u, 0x00u, 0x08u, 0x98u, 0xffu, 0xf7u, 0xd0u, 0xfbu, 0x00u, 0x28u, 0x13u, 0xddu, 0x07u, 0x9bu, 0x22u, 0x00u,
0x03u, 0x93u, 0x06u, 0x9bu, 0x01u, 0x97u, 0x02u, 0x93u, 0x05u, 0x9bu, 0x29u, 0x00u, 0x00u, 0x93u, 0x30u, 0x00u,
0x04u, 0x9bu, 0xffu, 0xf7u, 0x5bu, 0xffu, 0x04u, 0x00u, 0x28u, 0x00u, 0x07u, 0xf0u, 0x03u, 0xffu, 0x20u, 0x00u,
0x0bu, 0xb0u, 0xf0u, 0xbdu, 0x14u, 0x24u, 0x64u, 0x42u, 0xf6u, 0xe7u, 0x64u, 0x24u, 0x64u, 0x42u, 0xf6u, 0xe7u,
0x00u, 0x5fu, 0x2du, 0x00u, 0x10u, 0xb5u, 0x01u, 0x00u, 0x04u, 0x00u, 0x0bu, 0x48u, 0x07u, 0xf0u, 0xe8u, 0xffu,
0x00u, 0x23u, 0x98u, 0x42u, 0x0du, 0xd0u, 0x21u, 0x00u, 0x08u, 0x48u, 0x07u, 0xf0u, 0xe1u, 0xffu, 0x01u, 0x23u,
0x00u, 0x28u, 0x06u, 0xd0u, 0x21u, 0x00u, 0x06u, 0x48u, 0x07u, 0xf0u, 0xdau, 0xffu, 0x43u, 0x42u, 0x43u, 0x41u,
0x5bu, 0x00u, 0x18u, 0x00u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x5fu, 0x92u, 0x00u, 0x10u, 0x68u, 0x92u, 0x00u, 0x10u,
0x70u, 0x92u, 0x00u, 0x10u, 0x10u, 0xb5u, 0x01u, 0x00u, 0x04u, 0x00u, 0x0bu, 0x48u, 0x07u, 0xf0u, 0xc8u, 0xffu,
0x00u, 0x23u, 0x98u, 0x42u, 0x0du, 0xd0u, 0x21u, 0x00u, 0x08u, 0x48u, 0x07u, 0xf0u, 0xc1u, 0xffu, 0x01u, 0x23u,
0x00u, 0x28u, 0x06u, 0xd0u, 0x21u, 0x00u, 0x06u, 0x48u, 0x07u, 0xf0u, 0xbau, 0xffu, 0x43u, 0x42u, 0x43u, 0x41u,
0x5bu, 0x00u, 0x18u, 0x00u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x45u, 0x92u, 0x00u, 0x10u, 0x4eu, 0x92u, 0x00u, 0x10u,
0x5au, 0x92u, 0x00u, 0x10u, 0x03u, 0x23u, 0x58u, 0x43u, 0x80u, 0x08u, 0x98u, 0x43u, 0x04u, 0x30u, 0x70u, 0x47u,
0xf8u, 0xb5u, 0x0du, 0x00u, 0x00u, 0x28u, 0x1fu, 0xd0u, 0x00u, 0x29u, 0x1du, 0xd0u, 0xc3u, 0x68u, 0x08u, 0x60u,
0x20u, 0x2bu, 0x1cu, 0xd1u, 0x84u, 0x68u, 0x0fu, 0x4fu, 0x00u, 0x2cu, 0x01u, 0xd1u, 0x20u, 0x00u, 0xf8u, 0xbdu,
0x26u, 0x6au, 0x00u, 0x2eu, 0x06u, 0xd0u, 0x31u, 0x00u, 0x0bu, 0x48u, 0x07u, 0xf0u, 0x91u, 0xffu, 0x00u, 0x28u,
0x02u, 0xd1u, 0x6cu, 0x60u, 0x24u, 0x68u, 0xefu, 0xe7u, 0x31u, 0x00u, 0x38u, 0x00u, 0x07u, 0xf0u, 0x88u, 0xffu,
0x00u, 0x28u, 0xf7u, 0xd1u, 0xacu, 0x60u, 0xf5u, 0xe7u, 0x01u, 0x20u, 0x40u, 0x42u, 0xe7u, 0xe7u, 0x02u, 0x20u,
0xfbu, 0xe7u, 0xc0u, 0x46u, 0x7eu, 0x92u, 0x00u, 0x10u, 0x78u, 0x92u, 0x00u, 0x10u, 0xf0u, 0xb5u, 0x07u, 0x00u,
0x0du, 0x00u, 0x00u, 0x24u, 0x91u, 0xb0u, 0x01u, 0xaeu, 0x00u, 0x2du, 0x02u, 0xd1u, 0x28u, 0x00u, 0x11u, 0xb0u,
0xf0u, 0xbdu, 0x29u, 0x6au, 0x00u, 0x29u, 0x04u, 0xd0u, 0x38u, 0x00u, 0x07u, 0xf0u, 0x69u, 0xffu, 0x00u, 0x28u,
0xf4u, 0xd0u, 0xabu, 0x68u, 0x00u, 0x2bu, 0x06u, 0xd0u, 0x0eu, 0x2cu, 0x12u, 0xd8u, 0xa2u, 0x00u, 0x95u, 0x51u,
0x01u, 0x34u, 0x1du, 0x00u, 0xe8u, 0xe7u, 0x2bu, 0x68u, 0x00u, 0x2bu, 0xfau, 0xd1u, 0x00u, 0x2cu, 0x0au, 0xd0u,
0x01u, 0x3cu, 0xa3u, 0x00u, 0x9bu, 0x59u, 0x1bu, 0x68u, 0x00u, 0x2bu, 0xf2u, 0xd1u, 0x00u, 0x2cu, 0xf7u, 0xd1u,
0xefu, 0xe7u, 0x00u, 0x25u, 0xdau, 0xe7u, 0x25u, 0x00u, 0xd8u, 0xe7u, 0xf8u, 0xb5u, 0x0eu, 0x00u, 0x2eu, 0x21u,
0x17u, 0x00u, 0x07u, 0xf0u, 0x37u, 0xffu, 0x04u, 0x1eu, 0x0cu, 0xd0u, 0x45u, 0x1cu, 0x2eu, 0x21u, 0x28u, 0x00u,
0x07u, 0xf0u, 0x30u, 0xffu, 0x00u, 0x28u, 0x05u, 0xd0u, 0x00u, 0x1bu, 0x01u, 0x38u, 0x38u, 0x60u, 0x00u, 0x20u,
0x35u, 0x60u, 0xf8u, 0xbdu, 0x16u, 0x20u, 0x40u, 0x42u, 0xfbu, 0xe7u, 0x70u, 0xb5u, 0x05u, 0x00u, 0x00u, 0x20u,
0x0cu, 0x00u, 0xffu, 0xf7u, 0xfbu, 0xfcu, 0x28u, 0x00u, 0xffu, 0xf7u, 0x60u, 0xfeu, 0x00u, 0x28u, 0x03u, 0xd0u,
0x21u, 0x00u, 0xffu, 0xf7u, 0x7du, 0xffu, 0x70u, 0xbdu, 0x05u, 0x20u, 0x40u, 0x42u, 0xfbu, 0xe7u, 0x00u, 0x23u,
0x04u, 0x22u, 0x01u, 0x33u, 0x00u, 0x29u, 0x01u, 0xd1u, 0x90u, 0x42u, 0x03u, 0xd9u, 0x52u, 0x00u, 0x1du, 0x2bu,
0xf7u, 0xd1u, 0x02u, 0x33u, 0x18u, 0x00u, 0x70u, 0x47u, 0xf0u, 0xb5u, 0x0cu, 0x00u, 0x87u, 0xb0u, 0x01u, 0x00u,
0xc1u, 0x48u, 0x05u, 0x92u, 0xffu, 0xf7u, 0x92u, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x8bu, 0xe2u, 0x83u, 0x68u,
0x00u, 0x93u, 0x01u, 0x93u, 0x00u, 0x23u, 0x1fu, 0x00u, 0x04u, 0x93u, 0x03u, 0x93u, 0x01u, 0x9bu, 0x00u, 0x2bu,
0x6cu, 0xd1u, 0x00u, 0x9bu, 0xdbu, 0x68u, 0x01u, 0x93u, 0x20u, 0x2bu, 0x00u, 0xd0u, 0x7cu, 0xe2u, 0x00u, 0x9eu,
0x31u, 0x00u, 0xb6u, 0x48u, 0xffu, 0xf7u, 0x7au, 0xffu, 0x05u, 0x1eu, 0x00u, 0xd1u, 0xe6u, 0xe0u, 0x03u, 0x7eu,
0x05u, 0x9au, 0x9au, 0x42u, 0x00u, 0xd0u, 0xe1u, 0xe0u, 0x01u, 0x00u, 0xb1u, 0x48u, 0xffu, 0xf7u, 0x6eu, 0xffu,
0x00u, 0x28u, 0x00u, 0xd1u, 0xd4u, 0xe0u, 0x83u, 0x69u, 0x23u, 0x70u, 0x29u, 0x00u, 0xadu, 0x48u, 0xffu, 0xf7u,
0x65u, 0xffu, 0x14u, 0x23u, 0x00u, 0x28u, 0x00u, 0xd0u, 0x83u, 0x69u, 0x63u, 0x60u, 0x29u, 0x00u, 0xaau, 0x48u,
0xffu, 0xf7u, 0x5cu, 0xffu, 0x01u, 0x23u, 0x00u, 0x28u, 0x02u, 0xd0u, 0xc3u, 0x68u, 0x5au, 0x1eu, 0x93u, 0x41u,
0x23u, 0x72u, 0x29u, 0x00u, 0xa5u, 0x48u, 0xffu, 0xf7u, 0x51u, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0xbau, 0xe0u,
0x83u, 0x69u, 0xe3u, 0x60u, 0x00u, 0x23u, 0x29u, 0x00u, 0x63u, 0x76u, 0xa1u, 0x48u, 0xffu, 0xf7u, 0x46u, 0xffu,
0x00u, 0x28u, 0x07u, 0xd0u, 0x01u, 0x69u, 0x9fu, 0x48u, 0x07u, 0xf0u, 0xbau, 0xfeu, 0x00u, 0x28u, 0x01u, 0xd1u,
0x01u, 0x23u, 0x63u, 0x76u, 0x23u, 0x00u, 0x62u, 0x7eu, 0x49u, 0x33u, 0x1au, 0x70u, 0x00u, 0x9eu, 0x00u, 0x2fu,
0x00u, 0xd0u, 0x31u, 0xe2u, 0x31u, 0x00u, 0x91u, 0x48u, 0xffu, 0xf7u, 0x30u, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u,
0xa1u, 0xe0u, 0x22u, 0x78u, 0x03u, 0x7eu, 0x9au, 0x42u, 0x00u, 0xd0u, 0x9cu, 0xe0u, 0x31u, 0x00u, 0x92u, 0x48u,
0xffu, 0xf7u, 0x24u, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x0au, 0xe1u, 0x30u, 0x23u, 0x82u, 0x69u, 0x55u, 0x1eu,
0x6bu, 0x43u, 0xe3u, 0x18u, 0x1au, 0x76u, 0x02u, 0x23u, 0x01u, 0x93u, 0x93u, 0xe0u, 0x01u, 0x99u, 0x8bu, 0x48u,
0xffu, 0xf7u, 0x14u, 0xffu, 0x00u, 0x28u, 0x02u, 0xd0u, 0x86u, 0x68u, 0x00u, 0x2eu, 0x03u, 0xd1u, 0x01u, 0x9bu,
0x1bu, 0x68u, 0x01u, 0x93u, 0x82u, 0xe7u, 0x31u, 0x00u, 0x85u, 0x48u, 0xffu, 0xf7u, 0x07u, 0xffu, 0x00u, 0x28u,
0x4bu, 0xd0u, 0x00u, 0x25u, 0x03u, 0x69u, 0x02u, 0x93u, 0x82u, 0x4au, 0xabu, 0x00u, 0x99u, 0x58u, 0x02u, 0x98u,
0x07u, 0xf0u, 0x76u, 0xfeu, 0x00u, 0x28u, 0x00u, 0xd1u, 0xf9u, 0xe1u, 0x01u, 0x35u, 0x04u, 0x2du, 0xf3u, 0xd1u,
0x00u, 0x25u, 0x7du, 0x4au, 0xabu, 0x00u, 0x99u, 0x58u, 0x02u, 0x98u, 0x07u, 0xf0u, 0x69u, 0xfeu, 0x07u, 0x1eu,
0x05u, 0xd0u, 0x01u, 0x35u, 0x17u, 0x2du, 0xf4u, 0xd1u, 0x05u, 0x27u, 0x18u, 0x3du, 0x7fu, 0x42u, 0x31u, 0x00u,
0x76u, 0x48u, 0xffu, 0xf7u, 0xe3u, 0xfeu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x83u, 0x69u, 0x04u, 0x93u, 0x31u, 0x00u,
0x73u, 0x48u, 0xffu, 0xf7u, 0xdbu, 0xfeu, 0x00u, 0x28u, 0x04u, 0xd0u, 0xc1u, 0x69u, 0x80u, 0x69u, 0xffu, 0xf7u,
0x2eu, 0xffu, 0x03u, 0x90u, 0x6bu, 0x1cu, 0x18u, 0xd0u, 0x03u, 0x9bu, 0x00u, 0x2bu, 0x15u, 0xddu, 0xa9u, 0x22u,
0x6bu, 0x00u, 0xe3u, 0x18u, 0x52u, 0x00u, 0x9au, 0x5cu, 0x01u, 0x2au, 0x04u, 0xd1u, 0x2au, 0x00u, 0x04u, 0x99u,
0x0eu, 0x32u, 0xd2u, 0x00u, 0x11u, 0x51u, 0x54u, 0x22u, 0xffu, 0x32u, 0x9bu, 0x5cu, 0x01u, 0x2bu, 0x04u, 0xd1u,
0x0eu, 0x35u, 0xedu, 0x00u, 0x03u, 0x9bu, 0x65u, 0x19u, 0x6bu, 0x60u, 0x36u, 0x68u, 0xa5u, 0xe7u, 0x61u, 0x49u,
0x02u, 0x98u, 0x07u, 0xf0u, 0x2du, 0xfeu, 0x00u, 0x28u, 0xf7u, 0xd1u, 0x31u, 0x00u, 0x5bu, 0x48u, 0xffu, 0xf7u,
0xadu, 0xfeu, 0x00u, 0x28u, 0x06u, 0xd0u, 0xa2u, 0x23u, 0x5bu, 0x00u, 0xe3u, 0x5cu, 0x01u, 0x2bu, 0x01u, 0xd1u,
0x83u, 0x69u, 0xa3u, 0x66u, 0x31u, 0x00u, 0x56u, 0x48u, 0xffu, 0xf7u, 0xa0u, 0xfeu, 0x00u, 0x28u, 0xe4u, 0xd0u,
0x46u, 0x23u, 0xffu, 0x33u, 0xe3u, 0x5cu, 0x01u, 0x2bu, 0xdfu, 0xd1u, 0x83u, 0x69u, 0xe3u, 0x66u, 0xdcu, 0xe7u,
0x01u, 0x27u, 0x7fu, 0x42u, 0x29u, 0xe7u, 0xfau, 0x23u, 0x1bu, 0x01u, 0x42u, 0xe7u, 0x36u, 0x68u, 0x00u, 0x2eu,
0x00u, 0xd0u, 0x0du, 0xe7u, 0x52u, 0xe7u, 0x36u, 0x68u, 0x00u, 0x2eu, 0x00u, 0xd0u, 0x52u, 0xe7u, 0x01u, 0x23u,
0x35u, 0x00u, 0x01u, 0x93u, 0x00u, 0x2eu, 0x00u, 0xd0u, 0x98u, 0xe0u, 0x31u, 0x00u, 0x46u, 0x48u, 0xffu, 0xf7u,
0x7du, 0xfeu, 0x00u, 0x28u, 0x00u, 0xd0u, 0xffu, 0xe0u, 0x31u, 0x00u, 0x44u, 0x48u, 0xffu, 0xf7u, 0x76u, 0xfeu,
0x00u, 0x28u, 0x0eu, 0xd0u, 0x0du, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x2au, 0x33u, 0xffu, 0x33u, 0x1bu, 0x78u,
0x01u, 0x2bu, 0x06u, 0xd1u, 0xc2u, 0x68u, 0x2fu, 0x33u, 0x51u, 0x1eu, 0x8au, 0x41u, 0x6bu, 0x43u, 0xe3u, 0x18u,
0x5au, 0x70u, 0x31u, 0x00u, 0x3au, 0x48u, 0xffu, 0xf7u, 0x61u, 0xfeu, 0x00u, 0x28u, 0x0eu, 0xd0u, 0x0du, 0x23u,
0x6bu, 0x43u, 0xe3u, 0x18u, 0x2cu, 0x33u, 0xffu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x06u, 0xd1u, 0xc2u, 0x68u,
0x2fu, 0x33u, 0x51u, 0x1eu, 0x8au, 0x41u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x1au, 0x74u, 0x31u, 0x00u, 0x31u, 0x48u,
0xffu, 0xf7u, 0x4cu, 0xfeu, 0x00u, 0x28u, 0x0cu, 0xd0u, 0x0du, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x2cu, 0x33u,
0xffu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x04u, 0xd1u, 0x2fu, 0x33u, 0x6bu, 0x43u, 0x82u, 0x69u, 0xe3u, 0x18u,
0x9au, 0x74u, 0x31u, 0x00u, 0x28u, 0x48u, 0xffu, 0xf7u, 0x39u, 0xfeu, 0x00u, 0x28u, 0x00u, 0xd1u, 0xcbu, 0xe0u,
0xc3u, 0x68u, 0x10u, 0x2bu, 0x00u, 0xd0u, 0xc7u, 0xe0u, 0x82u, 0x68u, 0x0du, 0x21u, 0x23u, 0x20u, 0x00u, 0x23u,
0x69u, 0x43u, 0x68u, 0x43u, 0x61u, 0x18u, 0x02u, 0x90u, 0x00u, 0x2au, 0x00u, 0xd1u, 0xbcu, 0xe0u, 0x1fu, 0x00u,
0x32u, 0x37u, 0xffu, 0x37u, 0xcfu, 0x5du, 0x01u, 0x2fu, 0x04u, 0xd1u, 0x02u, 0x98u, 0xc7u, 0x18u, 0x90u, 0x69u,
0x2cu, 0x37u, 0xc8u, 0x55u, 0x01u, 0x33u, 0x03u, 0x2bu, 0x00u, 0xd1u, 0xadu, 0xe0u, 0x12u, 0x68u, 0xebu, 0xe7u,
0x01u, 0x23u, 0x05u, 0x00u, 0x01u, 0x93u, 0x8du, 0xe7u, 0x45u, 0x92u, 0x00u, 0x10u, 0x27u, 0x91u, 0x00u, 0x10u,
0xa6u, 0x90u, 0x00u, 0x10u, 0xadu, 0x90u, 0x00u, 0x10u, 0xb5u, 0x90u, 0x00u, 0x10u, 0xc0u, 0x90u, 0x00u, 0x10u,
0xccu, 0x90u, 0x00u, 0x10u, 0xd9u, 0x90u, 0x00u, 0x10u, 0xdeu, 0x90u, 0x00u, 0x10u, 0x87u, 0x90u, 0x00u, 0x10u,
0xa0u, 0x92u, 0x00u, 0x10u, 0xe4u, 0x00u, 0x02u, 0x08u, 0x88u, 0x00u, 0x02u, 0x08u, 0x91u, 0x90u, 0x00u, 0x10u,
0x99u, 0x90u, 0x00u, 0x10u, 0x9eu, 0x90u, 0x00u, 0x10u, 0xeau, 0x90u, 0x00u, 0x10u, 0x83u, 0x92u, 0x00u, 0x10u,
0x01u, 0x91u, 0x00u, 0x10u, 0x09u, 0x91u, 0x00u, 0x10u, 0x18u, 0x91u, 0x00u, 0x10u, 0x31u, 0x00u, 0x86u, 0x48u,
0xffu, 0xf7u, 0xe4u, 0xfdu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x5fu, 0xe7u, 0x87u, 0x68u, 0x00u, 0x2fu, 0x00u, 0xd1u,
0x5bu, 0xe7u, 0x39u, 0x00u, 0x81u, 0x48u, 0xffu, 0xf7u, 0xd9u, 0xfdu, 0x00u, 0x28u, 0x2du, 0xd0u, 0x03u, 0x69u,
0x7fu, 0x49u, 0x18u, 0x00u, 0x02u, 0x93u, 0x07u, 0xf0u, 0x4bu, 0xfdu, 0x00u, 0x28u, 0x27u, 0xd1u, 0x39u, 0x00u,
0x7cu, 0x48u, 0xffu, 0xf7u, 0xcbu, 0xfdu, 0x00u, 0x28u, 0x0cu, 0xd0u, 0x0du, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u,
0x2eu, 0x33u, 0xffu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x04u, 0xd1u, 0x2fu, 0x33u, 0x6bu, 0x43u, 0x82u, 0x69u,
0xe3u, 0x18u, 0xdau, 0x61u, 0x39u, 0x00u, 0x74u, 0x48u, 0xffu, 0xf7u, 0xb8u, 0xfdu, 0x00u, 0x28u, 0x0cu, 0xd0u,
0x0du, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x2fu, 0x33u, 0xffu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x04u, 0xd1u,
0x2fu, 0x33u, 0x6bu, 0x43u, 0x82u, 0x69u, 0xe3u, 0x18u, 0x1au, 0x62u, 0x3fu, 0x68u, 0xc6u, 0xe7u, 0x6bu, 0x49u,
0x02u, 0x98u, 0x07u, 0xf0u, 0x1du, 0xfdu, 0x00u, 0x28u, 0xf7u, 0xd1u, 0x39u, 0x00u, 0x65u, 0x48u, 0xffu, 0xf7u,
0x9du, 0xfdu, 0x00u, 0x28u, 0x0cu, 0xd0u, 0x0du, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x30u, 0x33u, 0xffu, 0x33u,
0x1bu, 0x78u, 0x01u, 0x2bu, 0x04u, 0xd1u, 0x2fu, 0x33u, 0x6bu, 0x43u, 0x82u, 0x69u, 0xe3u, 0x18u, 0x5au, 0x62u,
0x39u, 0x00u, 0x5du, 0x48u, 0xffu, 0xf7u, 0x8au, 0xfdu, 0x00u, 0x28u, 0xdeu, 0xd0u, 0x0du, 0x23u, 0x6bu, 0x43u,
0xe3u, 0x18u, 0x30u, 0x33u, 0xffu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0xd6u, 0xd1u, 0x2fu, 0x33u, 0x6bu, 0x43u,
0x82u, 0x69u, 0xe3u, 0x18u, 0x9au, 0x62u, 0xd0u, 0xe7u, 0x0du, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x2du, 0x33u,
0xffu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x00u, 0xd0u, 0xf6u, 0xe6u, 0x2fu, 0x33u, 0x6bu, 0x43u, 0x82u, 0x69u,
0xe3u, 0x18u, 0xd2u, 0xb2u, 0x5au, 0x61u, 0xefu, 0xe6u, 0x31u, 0x00u, 0x4du, 0x48u, 0xffu, 0xf7u, 0x66u, 0xfdu,
0x30u, 0x23u, 0x6bu, 0x43u, 0xe3u, 0x18u, 0x00u, 0x28u, 0x4cu, 0xd0u, 0x82u, 0x69u, 0x9au, 0x70u, 0x31u, 0x00u,
0x48u, 0x48u, 0xffu, 0xf7u, 0x5bu, 0xfdu, 0x00u, 0x28u, 0x46u, 0xd0u, 0x30u, 0x22u, 0xc1u, 0x69u, 0x83u, 0x69u,
0x6au, 0x43u, 0x0bu, 0x43u, 0x59u, 0x1eu, 0x8bu, 0x41u, 0xa2u, 0x18u, 0x53u, 0x74u, 0x00u, 0x2du, 0x1cu, 0xd1u,
0x31u, 0x00u, 0x41u, 0x48u, 0xffu, 0xf7u, 0x4au, 0xfdu, 0x14u, 0x23u, 0x00u, 0x28u, 0x00u, 0xd0u, 0x83u, 0x69u,
0x63u, 0x63u, 0x31u, 0x00u, 0x3du, 0x48u, 0xffu, 0xf7u, 0x41u, 0xfdu, 0x22u, 0x00u, 0x38u, 0x32u, 0x00u, 0x28u,
0x30u, 0xd0u, 0xc3u, 0x68u, 0x59u, 0x1eu, 0x8bu, 0x41u, 0x13u, 0x70u, 0x31u, 0x00u, 0x38u, 0x48u, 0xffu, 0xf7u,
0x35u, 0xfdu, 0x00u, 0x28u, 0x28u, 0xd0u, 0x83u, 0x69u, 0xe3u, 0x63u, 0x01u, 0x9bu, 0x02u, 0x2bu, 0x2au, 0xd1u,
0x00u, 0x9eu, 0x31u, 0x00u, 0x33u, 0x48u, 0xffu, 0xf7u, 0x29u, 0xfdu, 0x00u, 0x28u, 0x1fu, 0xd0u, 0x82u, 0x69u,
0xd3u, 0xb2u, 0x02u, 0x2bu, 0x1bu, 0xd1u, 0x30u, 0x27u, 0x55u, 0x1eu, 0x6fu, 0x43u, 0xe2u, 0x19u, 0x13u, 0x76u,
0x31u, 0x00u, 0x2du, 0x48u, 0xffu, 0xf7u, 0x1au, 0xfdu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x83u, 0x69u, 0x3bu, 0x55u,
0x01u, 0x23u, 0xf9u, 0xe5u, 0x98u, 0x70u, 0xb2u, 0xe7u, 0x30u, 0x23u, 0x01u, 0x22u, 0x6bu, 0x43u, 0xe3u, 0x18u,
0x5au, 0x74u, 0xbbu, 0xe7u, 0x10u, 0x70u, 0xd0u, 0xe7u, 0xfau, 0x23u, 0x1bu, 0x01u, 0xd4u, 0xe7u, 0x36u, 0x68u,
0x00u, 0x2eu, 0xd6u, 0xd1u, 0xecu, 0xe7u, 0x00u, 0x27u, 0x38u, 0x00u, 0x07u, 0xb0u, 0xf0u, 0xbdu, 0x1fu, 0x49u,
0x02u, 0x98u, 0x07u, 0xf0u, 0x75u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x40u, 0xe6u, 0x31u, 0x00u, 0x11u, 0x48u,
0xffu, 0xf7u, 0xf4u, 0xfcu, 0x00u, 0x28u, 0x06u, 0xd0u, 0xa1u, 0x23u, 0x5bu, 0x00u, 0xe3u, 0x5cu, 0x01u, 0x2bu,
0x01u, 0xd1u, 0x83u, 0x69u, 0x23u, 0x66u, 0x31u, 0x00u, 0x0bu, 0x48u, 0xffu, 0xf7u, 0xe7u, 0xfcu, 0x00u, 0x28u,
0x00u, 0xd1u, 0x2au, 0xe6u, 0x44u, 0x23u, 0xffu, 0x33u, 0xe3u, 0x5cu, 0x01u, 0x2bu, 0x00u, 0xd0u, 0x24u, 0xe6u,
0x83u, 0x69u, 0x63u, 0x66u, 0x21u, 0xe6u, 0xc0u, 0x46u, 0x87u, 0x90u, 0x00u, 0x10u, 0xa0u, 0x92u, 0x00u, 0x10u,
0xf4u, 0x90u, 0x00u, 0x10u, 0x91u, 0x90u, 0x00u, 0x10u, 0x99u, 0x90u, 0x00u, 0x10u, 0xf9u, 0x90u, 0x00u, 0x10u,
0x22u, 0x91u, 0x00u, 0x10u, 0x2au, 0x91u, 0x00u, 0x10u, 0xadu, 0x90u, 0x00u, 0x10u, 0xb5u, 0x90u, 0x00u, 0x10u,
0xc0u, 0x90u, 0x00u, 0x10u, 0xdeu, 0x90u, 0x00u, 0x10u, 0x27u, 0x91u, 0x00u, 0x10u, 0x35u, 0x91u, 0x00u, 0x10u,
0xf0u, 0xb5u, 0x55u, 0x4bu, 0xbdu, 0xb0u, 0x03u, 0xacu, 0x63u, 0x60u, 0x0eu, 0x00u, 0x0bu, 0x1du, 0xe3u, 0x60u,
0x52u, 0x4bu, 0x0cu, 0x36u, 0x23u, 0x61u, 0x01u, 0x23u, 0x66u, 0x62u, 0x51u, 0x4eu, 0x0au, 0x00u, 0xa6u, 0x62u,
0xceu, 0x18u, 0x26u, 0x63u, 0x4fu, 0x4eu, 0x08u, 0x32u, 0x66u, 0x63u, 0x0eu, 0x00u, 0x10u, 0x36u, 0xe6u, 0x63u,
0x4du, 0x4eu, 0xa2u, 0x61u, 0x26u, 0x64u, 0x0eu, 0x00u, 0x14u, 0x36u, 0xa6u, 0x64u, 0x4bu, 0x4eu, 0x4cu, 0x4au,
0xe6u, 0x64u, 0x0eu, 0x00u, 0x18u, 0x36u, 0x66u, 0x65u, 0x4au, 0x4eu, 0x00u, 0x25u, 0xa6u, 0x65u, 0x0eu, 0x00u,
0xe2u, 0x61u, 0x02u, 0x22u, 0x1cu, 0x36u, 0x03u, 0x91u, 0x63u, 0x61u, 0x22u, 0x62u, 0xe3u, 0x62u, 0x63u, 0x64u,
0x23u, 0x65u, 0xa5u, 0x60u, 0xa5u, 0x63u, 0xe3u, 0x65u, 0x26u, 0x66u, 0x43u, 0x4eu, 0xa3u, 0x66u, 0x66u, 0x66u,
0x0eu, 0x00u, 0x20u, 0x36u, 0xe6u, 0x66u, 0x41u, 0x4eu, 0x62u, 0x67u, 0x26u, 0x67u, 0x0eu, 0x00u, 0x24u, 0x36u,
0xa6u, 0x67u, 0x3fu, 0x4eu, 0x23u, 0x92u, 0xe6u, 0x67u, 0x0eu, 0x00u, 0x28u, 0x36u, 0x24u, 0x96u, 0x3du, 0x4eu,
0x26u, 0x93u, 0x25u, 0x96u, 0x0eu, 0x00u, 0x2cu, 0x36u, 0x27u, 0x96u, 0x3bu, 0x4eu, 0x29u, 0x93u, 0x28u, 0x96u,
0x8eu, 0x18u, 0x2au, 0x96u, 0x39u, 0x4eu, 0x32u, 0x92u, 0x2bu, 0x96u, 0xceu, 0x1cu, 0x2du, 0x96u, 0x38u, 0x4eu,
0x2cu, 0x95u, 0x2eu, 0x96u, 0x0eu, 0x00u, 0x30u, 0x36u, 0x30u, 0x96u, 0x36u, 0x4eu, 0x2fu, 0x95u, 0x31u, 0x96u,
0x0eu, 0x00u, 0x34u, 0x36u, 0x33u, 0x96u, 0x35u, 0x92u, 0x0au, 0x00u, 0x38u, 0x32u, 0x36u, 0x92u, 0x32u, 0x4au,
0x32u, 0x4eu, 0x37u, 0x92u, 0x3cu, 0x31u, 0x32u, 0x4au, 0x39u, 0x91u, 0x01u, 0x00u, 0x31u, 0x48u, 0x34u, 0x96u,
0x38u, 0x93u, 0x3au, 0x92u, 0x3bu, 0x93u, 0xffu, 0xf7u, 0x49u, 0xfcu, 0x06u, 0x00u, 0xa8u, 0x42u, 0x19u, 0xd0u,
0x83u, 0x68u, 0xabu, 0x42u, 0x16u, 0xd0u, 0x0cu, 0x23u, 0x6bu, 0x43u, 0xe7u, 0x18u, 0x31u, 0x00u, 0x78u, 0x68u,
0x01u, 0x93u, 0xffu, 0xf7u, 0x3bu, 0xfcu, 0x00u, 0x28u, 0x09u, 0xd0u, 0xc3u, 0x68u, 0x04u, 0x2bu, 0x06u, 0xd1u,
0xbbu, 0x68u, 0x01u, 0x2bu, 0x12u, 0xd0u, 0x00u, 0x2bu, 0x07u, 0xd0u, 0x02u, 0x2bu, 0x13u, 0xd0u, 0x01u, 0x35u,
0x13u, 0x2du, 0xe8u, 0xd1u, 0x00u, 0x20u, 0x3du, 0xb0u, 0xf0u, 0xbdu, 0x01u, 0x9bu, 0xc1u, 0x69u, 0xe2u, 0x58u,
0x83u, 0x69u, 0x0bu, 0x43u, 0x59u, 0x1eu, 0x8bu, 0x41u, 0x13u, 0x70u, 0xf0u, 0xe7u, 0x01u, 0x9bu, 0x82u, 0x69u,
0xe3u, 0x58u, 0x1au, 0x60u, 0xebu, 0xe7u, 0x01u, 0x9bu, 0x17u, 0x49u, 0xe2u, 0x58u, 0x83u, 0x69u, 0xdbu, 0x01u,
0x5bu, 0x18u, 0x13u, 0x60u, 0xe3u, 0xe7u, 0xc0u, 0x46u, 0x60u, 0x91u, 0x00u, 0x10u, 0x6du, 0x91u, 0x00u, 0x10u,
0x85u, 0x91u, 0x00u, 0x10u, 0x92u, 0x91u, 0x00u, 0x10u, 0x9cu, 0x91u, 0x00u, 0x10u, 0xa6u, 0x91u, 0x00u, 0x10u,
0x7au, 0x91u, 0x00u, 0x10u, 0xaeu, 0x91u, 0x00u, 0x10u, 0xb5u, 0x91u, 0x00u, 0x10u, 0xc3u, 0x91u, 0x00u, 0x10u,
0xcdu, 0x91u, 0x00u, 0x10u, 0xd8u, 0x91u, 0x00u, 0x10u, 0xe4u, 0x91u, 0x00u, 0x10u, 0xf1u, 0x91u, 0x00u, 0x10u,
0xfbu, 0x91u, 0x00u, 0x10u, 0x08u, 0x92u, 0x00u, 0x10u, 0x1du, 0x92u, 0x00u, 0x10u, 0x12u, 0x92u, 0x00u, 0x10u,
0x29u, 0x92u, 0x00u, 0x10u, 0x36u, 0x92u, 0x00u, 0x10u, 0x00u, 0x00u, 0x31u, 0x40u, 0xf8u, 0xb5u, 0x0eu, 0x00u,
0x01u, 0x00u, 0x16u, 0x48u, 0xffu, 0xf7u, 0xe2u, 0xfbu, 0x01u, 0x1eu, 0x08u, 0xd0u, 0x83u, 0x68u, 0x00u, 0x2bu,
0x05u, 0xd0u, 0x13u, 0x48u, 0xffu, 0xf7u, 0xdau, 0xfbu, 0x04u, 0x00u, 0x00u, 0x2cu, 0x01u, 0xd1u, 0x00u, 0x20u,
0xf8u, 0xbdu, 0xa4u, 0x68u, 0x0fu, 0x4fu, 0xa1u, 0x68u, 0x38u, 0x00u, 0xffu, 0xf7u, 0xcfu, 0xfbu, 0x35u, 0x00u,
0x00u, 0x28u, 0xf2u, 0xd0u, 0xc3u, 0x68u, 0x04u, 0x2bu, 0xefu, 0xd1u, 0x83u, 0x69u, 0x32u, 0x1du, 0x2bu, 0x60u,
0x03u, 0x68u, 0x24u, 0x68u, 0x9bu, 0x69u, 0x21u, 0x00u, 0x6bu, 0x60u, 0xd3u, 0x6fu, 0x38u, 0x00u, 0x01u, 0x33u,
0xd3u, 0x67u, 0xffu, 0xf7u, 0xbbu, 0xfbu, 0x08u, 0x35u, 0xeau, 0xe7u, 0xc0u, 0x46u, 0x8bu, 0x92u, 0x00u, 0x10u,
0xdfu, 0x92u, 0x00u, 0x10u, 0x97u, 0x92u, 0x00u, 0x10u, 0x70u, 0xb5u, 0x0cu, 0x00u, 0x01u, 0x00u, 0x16u, 0x48u,
0xffu, 0xf7u, 0xacu, 0xfbu, 0x05u, 0x1eu, 0x24u, 0xd0u, 0x01u, 0x00u, 0x14u, 0x48u, 0xffu, 0xf7u, 0xa6u, 0xfbu,
0x00u, 0x28u, 0x06u, 0xd0u, 0xe3u, 0x78u, 0x01u, 0x2bu, 0x03u, 0xd1u, 0x00u, 0x69u, 0xffu, 0xf7u, 0x2au, 0xfbu,
0x20u, 0x70u, 0x29u, 0x00u, 0x0eu, 0x48u, 0xffu, 0xf7u, 0x99u, 0xfbu, 0x00u, 0x28u, 0x06u, 0xd0u, 0x23u, 0x79u,
0x01u, 0x2bu, 0x03u, 0xd1u, 0x00u, 0x69u, 0xffu, 0xf7u, 0x3du, 0xfbu, 0x60u, 0x70u, 0x29u, 0x00u, 0x09u, 0x48u,
0xffu, 0xf7u, 0x8cu, 0xfbu, 0x00u, 0x28u, 0x04u, 0xd0u, 0x63u, 0x79u, 0x01u, 0x2bu, 0x01u, 0xd1u, 0x83u, 0x69u,
0xa3u, 0x70u, 0x00u, 0x20u, 0x70u, 0xbdu, 0xc0u, 0x46u, 0x46u, 0x91u, 0x00u, 0x10u, 0x49u, 0x91u, 0x00u, 0x10u,
0x54u, 0x91u, 0x00u, 0x10u, 0x5cu, 0x91u, 0x00u, 0x10u, 0x70u, 0xb5u, 0x04u, 0x00u, 0x0du, 0x00u, 0x86u, 0xb0u,
0x00u, 0x21u, 0x14u, 0x22u, 0x01u, 0xa8u, 0x07u, 0xf0u, 0x1au, 0xfau, 0x29u, 0x00u, 0x20u, 0x00u, 0xffu, 0xf7u,
0x6du, 0xfbu, 0x04u, 0x00u, 0x00u, 0x2cu, 0x18u, 0xd0u, 0x21u, 0x00u, 0x1cu, 0x48u, 0xffu, 0xf7u, 0x66u, 0xfbu,
0x00u, 0x28u, 0xf7u, 0xd0u, 0x05u, 0x69u, 0x00u, 0x2du, 0x0au, 0xd0u, 0x19u, 0x4eu, 0x29u, 0x00u, 0x30u, 0x00u,
0x07u, 0xf0u, 0xd6u, 0xfau, 0x00u, 0x28u, 0x0bu, 0xd1u, 0x31u, 0x00u, 0x01u, 0xa8u, 0x07u, 0xf0u, 0xdau, 0xfau,
0x21u, 0x00u, 0x01u, 0xa8u, 0xffu, 0xf7u, 0x52u, 0xfbu, 0x04u, 0x00u, 0x20u, 0x00u, 0x06u, 0xb0u, 0x70u, 0xbdu,
0x10u, 0x4eu, 0x29u, 0x00u, 0x30u, 0x00u, 0x07u, 0xf0u, 0xc3u, 0xfau, 0x00u, 0x28u, 0xecu, 0xd0u, 0x29u, 0x00u,
0x0du, 0x48u, 0x07u, 0xf0u, 0xbdu, 0xfau, 0x00u, 0x28u, 0xe6u, 0xd0u, 0x0cu, 0x4eu, 0x29u, 0x00u, 0x30u, 0x00u,
0x07u, 0xf0u, 0xb6u, 0xfau, 0x00u, 0x28u, 0xdfu, 0xd0u, 0x29u, 0x00u, 0x09u, 0x48u, 0x07u, 0xf0u, 0xb0u, 0xfau,
0x00u, 0x28u, 0xddu, 0xd1u, 0x21u, 0x00u, 0x07u, 0x48u, 0xc1u, 0xe7u, 0xc0u, 0x46u, 0xa0u, 0x92u, 0x00u, 0x10u,
0xc8u, 0x92u, 0x00u, 0x10u, 0xb1u, 0x92u, 0x00u, 0x10u, 0xb8u, 0x92u, 0x00u, 0x10u, 0xc0u, 0x92u, 0x00u, 0x10u,
0xa5u, 0x92u, 0x00u, 0x10u, 0xabu, 0x92u, 0x00u, 0x10u, 0x10u, 0xb5u, 0xffu, 0xf7u, 0x1fu, 0xfbu, 0x01u, 0x24u,
0x00u, 0x28u, 0x09u, 0xd0u, 0x81u, 0x68u, 0x00u, 0x29u, 0x06u, 0xd0u, 0x04u, 0x48u, 0xffu, 0xf7u, 0x16u, 0xfbu,
0x00u, 0x28u, 0x01u, 0xd0u, 0xc4u, 0x68u, 0xe4u, 0xb2u, 0x20u, 0x00u, 0x10u, 0xbdu, 0x3du, 0x92u, 0x00u, 0x10u,
0xf7u, 0xb5u, 0x04u, 0x00u, 0x00u, 0x20u, 0x0du, 0x00u, 0xffu, 0xf7u, 0x50u, 0xf8u, 0x20u, 0x00u, 0xffu, 0xf7u,
0xb5u, 0xf9u, 0x07u, 0x1eu, 0x4au, 0xd0u, 0x01u, 0x00u, 0x26u, 0x48u, 0xffu, 0xf7u, 0xffu, 0xfau, 0x04u, 0x1eu,
0x06u, 0xd1u, 0x01u, 0x26u, 0x76u, 0x42u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x5au, 0xf8u, 0x30u, 0x00u, 0xfeu, 0xbdu,
0x01u, 0x00u, 0x21u, 0x48u, 0xffu, 0xf7u, 0x78u, 0xffu, 0x21u, 0x00u, 0x06u, 0x00u, 0x1eu, 0x48u, 0xffu, 0xf7u,
0xcbu, 0xffu, 0x00u, 0x90u, 0x00u, 0x2eu, 0x2bu, 0xd0u, 0x30u, 0x69u, 0xffu, 0xf7u, 0x73u, 0xfau, 0x6bu, 0x46u,
0x00u, 0x26u, 0x1bu, 0x78u, 0x28u, 0x70u, 0xebu, 0x70u, 0x21u, 0x00u, 0x18u, 0x48u, 0xffu, 0xf7u, 0x64u, 0xffu,
0x21u, 0x00u, 0x00u, 0x90u, 0x15u, 0x48u, 0xffu, 0xf7u, 0xb7u, 0xffu, 0x00u, 0x9bu, 0x01u, 0x90u, 0x00u, 0x2bu,
0x19u, 0xd0u, 0x18u, 0x69u, 0xffu, 0xf7u, 0x7eu, 0xfau, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x68u, 0x70u, 0x2bu, 0x71u,
0x21u, 0x00u, 0x0fu, 0x48u, 0xffu, 0xf7u, 0x50u, 0xffu, 0x21u, 0x00u, 0x00u, 0x90u, 0x0cu, 0x48u, 0xffu, 0xf7u,
0xa3u, 0xffu, 0x00u, 0x9bu, 0x00u, 0x2bu, 0xc4u, 0xd0u, 0x9bu, 0x69u, 0x68u, 0x71u, 0xabu, 0x70u, 0xc2u, 0xe7u,
0x01u, 0x26u, 0x76u, 0x42u, 0xd8u, 0xe7u, 0x01u, 0x26u, 0x76u, 0x42u, 0xe9u, 0xe7u, 0x05u, 0x26u, 0x76u, 0x42u,
0xbcu, 0xe7u, 0xc0u, 0x46u, 0x46u, 0x91u, 0x00u, 0x10u, 0x49u, 0x91u, 0x00u, 0x10u, 0x54u, 0x91u, 0x00u, 0x10u,
0x5cu, 0x91u, 0x00u, 0x10u, 0xf0u, 0xb5u, 0x05u, 0x00u, 0x85u, 0xb0u, 0x00u, 0x20u, 0x0cu, 0x00u, 0xfeu, 0xf7u,
0xedu, 0xffu, 0x28u, 0x00u, 0xffu, 0xf7u, 0x52u, 0xf9u, 0x01u, 0x90u, 0x00u, 0x28u, 0x00u, 0xd1u, 0x15u, 0xe1u,
0x01u, 0x00u, 0x8cu, 0x48u, 0xffu, 0xf7u, 0x9au, 0xfau, 0x05u, 0x1eu, 0x00u, 0xd1u, 0x0au, 0xe1u, 0x8au, 0x4fu,
0x01u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x18u, 0xffu, 0x29u, 0x00u, 0x06u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u,
0x6bu, 0xffu, 0x00u, 0x2eu, 0x00u, 0xd1u, 0xe1u, 0xe0u, 0x94u, 0x22u, 0xb3u, 0x69u, 0x52u, 0x00u, 0xdbu, 0xb2u,
0x23u, 0x70u, 0xa0u, 0x54u, 0x22u, 0x00u, 0x30u, 0x32u, 0x13u, 0x70u, 0x36u, 0x23u, 0xffu, 0x33u, 0xe0u, 0x54u,
0x00u, 0x23u, 0x7eu, 0x4fu, 0x29u, 0x00u, 0x38u, 0x00u, 0x00u, 0x93u, 0xffu, 0xf7u, 0xfdu, 0xfeu, 0x29u, 0x00u,
0x06u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x50u, 0xffu, 0x00u, 0x2eu, 0x00u, 0xd1u, 0xc9u, 0xe0u, 0xf3u, 0x68u,
0x5au, 0x1eu, 0x93u, 0x41u, 0x2au, 0x22u, 0xdbu, 0xb2u, 0xffu, 0x32u, 0x63u, 0x70u, 0xa0u, 0x54u, 0x22u, 0x00u,
0x31u, 0x32u, 0x13u, 0x70u, 0x9bu, 0x23u, 0x5bu, 0x00u, 0xe0u, 0x54u, 0x71u, 0x4fu, 0x29u, 0x00u, 0x38u, 0x00u,
0xffu, 0xf7u, 0xe2u, 0xfeu, 0x29u, 0x00u, 0x06u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x35u, 0xffu, 0x00u, 0x2eu,
0x00u, 0xd1u, 0xb2u, 0xe0u, 0xf3u, 0x68u, 0x5au, 0x1eu, 0x93u, 0x41u, 0x2cu, 0x22u, 0xdbu, 0xb2u, 0xffu, 0x32u,
0x23u, 0x74u, 0xa0u, 0x54u, 0x22u, 0x00u, 0x40u, 0x32u, 0x13u, 0x70u, 0x9cu, 0x23u, 0x5bu, 0x00u, 0xe0u, 0x54u,
0x64u, 0x4fu, 0x29u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u, 0xc7u, 0xfeu, 0x29u, 0x00u, 0x06u, 0x00u, 0x38u, 0x00u,
0xffu, 0xf7u, 0x1au, 0xffu, 0x00u, 0x2eu, 0x00u, 0xd1u, 0x9bu, 0xe0u, 0x96u, 0x22u, 0xb3u, 0x69u, 0x52u, 0x00u,
0xdbu, 0xb2u, 0x63u, 0x61u, 0xa0u, 0x54u, 0x63u, 0x64u, 0x3au, 0x23u, 0xffu, 0x33u, 0xe0u, 0x54u, 0x5au, 0x4eu,
0x29u, 0x00u, 0x30u, 0x00u, 0xffu, 0xf7u, 0xb0u, 0xfeu, 0x29u, 0x00u, 0x07u, 0x00u, 0x30u, 0x00u, 0xffu, 0xf7u,
0x03u, 0xffu, 0x00u, 0x2fu, 0x00u, 0xd1u, 0x88u, 0xe0u, 0x22u, 0x00u, 0xbbu, 0x69u, 0x2cu, 0x32u, 0xdbu, 0xb2u,
0x13u, 0x70u, 0x32u, 0x22u, 0xffu, 0x32u, 0xa0u, 0x54u, 0x22u, 0x00u, 0x5cu, 0x32u, 0x13u, 0x70u, 0x9fu, 0x22u,
0x52u, 0x00u, 0xa0u, 0x54u, 0x22u, 0x00u, 0x2du, 0x32u, 0x13u, 0x70u, 0x99u, 0x22u, 0x52u, 0x00u, 0xa0u, 0x54u,
0x22u, 0x00u, 0x5du, 0x32u, 0x13u, 0x70u, 0x40u, 0x22u, 0xffu, 0x32u, 0xa0u, 0x54u, 0x22u, 0x00u, 0x2eu, 0x32u,
0x13u, 0x70u, 0x34u, 0x22u, 0xffu, 0x32u, 0xa0u, 0x54u, 0x22u, 0x00u, 0x5eu, 0x32u, 0x13u, 0x70u, 0xa0u, 0x23u,
0x5bu, 0x00u, 0xe0u, 0x54u, 0x01u, 0x99u, 0x41u, 0x48u, 0xffu, 0xf7u, 0xf8u, 0xf9u, 0x06u, 0x00u, 0x00u, 0x2fu,
0x68u, 0xd0u, 0x2eu, 0x22u, 0x01u, 0x23u, 0xffu, 0x32u, 0xa3u, 0x54u, 0xd2u, 0x18u, 0xa3u, 0x54u, 0x30u, 0x22u,
0xffu, 0x32u, 0xa3u, 0x54u, 0xd2u, 0x18u, 0xa3u, 0x54u, 0x23u, 0x00u, 0x02u, 0x22u, 0x38u, 0x4fu, 0xfeu, 0x33u,
0xffu, 0x32u, 0x01u, 0x00u, 0x9au, 0x87u, 0xdau, 0x87u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x65u, 0xfeu, 0x31u, 0x00u,
0x05u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u, 0xb8u, 0xfeu, 0x03u, 0x90u, 0x00u, 0x2du, 0x41u, 0xd0u, 0xabu, 0x69u,
0x02u, 0x93u, 0x30u, 0x4fu, 0x31u, 0x00u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x56u, 0xfeu, 0x31u, 0x00u, 0x05u, 0x00u,
0x38u, 0x00u, 0xffu, 0xf7u, 0xa9u, 0xfeu, 0x00u, 0x2du, 0x38u, 0xd0u, 0xadu, 0x69u, 0x22u, 0x00u, 0x21u, 0x00u,
0x23u, 0x00u, 0x53u, 0x32u, 0x29u, 0x31u, 0x70u, 0x33u, 0xffu, 0x32u, 0xffu, 0x31u, 0x02u, 0x9eu, 0x5du, 0x60u,
0x1eu, 0x60u, 0x6eu, 0x46u, 0x36u, 0x7bu, 0x08u, 0x33u, 0x16u, 0x70u, 0x50u, 0x70u, 0x02u, 0x32u, 0x99u, 0x42u,
0xf4u, 0xd1u, 0xa1u, 0x23u, 0x02u, 0x22u, 0x5bu, 0x00u, 0xffu, 0x32u, 0xe2u, 0x52u, 0x02u, 0x33u, 0xe2u, 0x52u,
0x01u, 0x98u, 0xfeu, 0xf7u, 0x0du, 0xffu, 0x00u, 0x98u, 0x05u, 0xb0u, 0xf0u, 0xbdu, 0x01u, 0x23u, 0x5bu, 0x42u,
0x27u, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0x00u, 0x93u, 0x3fu, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0x00u, 0x93u,
0x56u, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0x00u, 0x93u, 0x69u, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0x00u, 0x93u,
0x98u, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0x02u, 0x95u, 0x00u, 0x93u, 0xbau, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u,
0x00u, 0x93u, 0xc3u, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0x00u, 0x93u, 0xd2u, 0xe7u, 0x05u, 0x23u, 0x5bu, 0x42u,
0x00u, 0x93u, 0xd8u, 0xe7u, 0x45u, 0x92u, 0x00u, 0x10u, 0x27u, 0x91u, 0x00u, 0x10u, 0x83u, 0x92u, 0x00u, 0x10u,
0x01u, 0x91u, 0x00u, 0x10u, 0xeau, 0x90u, 0x00u, 0x10u, 0x18u, 0x91u, 0x00u, 0x10u, 0x87u, 0x90u, 0x00u, 0x10u,
0x91u, 0x90u, 0x00u, 0x10u, 0x99u, 0x90u, 0x00u, 0x10u, 0xdcu, 0x23u, 0xf0u, 0xb5u, 0x9bu, 0x05u, 0x85u, 0xb0u,
0x00u, 0x93u, 0x00u, 0x23u, 0x02u, 0xadu, 0x01u, 0x95u, 0x02u, 0x90u, 0x18u, 0x48u, 0x18u, 0x4cu, 0x06u, 0x68u,
0x6bu, 0x60u, 0x30u, 0x6au, 0x07u, 0x68u, 0x00u, 0x2fu, 0x07u, 0xdbu, 0xa3u, 0x42u, 0x03u, 0xd1u, 0x01u, 0x20u,
0x40u, 0x42u, 0x05u, 0xb0u, 0xf0u, 0xbdu, 0x01u, 0x33u, 0xf4u, 0xe7u, 0xa3u, 0x42u, 0xf7u, 0xd0u, 0x6bu, 0x46u,
0xc3u, 0x60u, 0x01u, 0x23u, 0xbcu, 0x36u, 0x83u, 0x60u, 0x33u, 0x68u, 0xc0u, 0x18u, 0x00u, 0x23u, 0x06u, 0x68u,
0x00u, 0x2eu, 0x03u, 0xdau, 0xa3u, 0x42u, 0xeau, 0xd0u, 0x01u, 0x33u, 0xf8u, 0xe7u, 0xa3u, 0x42u, 0xe6u, 0xd0u,
0xa0u, 0x23u, 0x00u, 0x98u, 0x1bu, 0x06u, 0x98u, 0x42u, 0x01u, 0xd0u, 0x00u, 0x98u, 0xe1u, 0xe7u, 0x02u, 0x9bu,
0x00u, 0x20u, 0x13u, 0x60u, 0x6bu, 0x68u, 0x0bu, 0x60u, 0xdbu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x98u, 0x3au, 0x00u, 0x00u, 0x01u, 0x22u, 0xf0u, 0xb5u, 0x00u, 0x24u, 0x18u, 0x4bu, 0x06u, 0x68u, 0x19u, 0x68u,
0x32u, 0x40u, 0x0bu, 0x6au, 0xbcu, 0x31u, 0x0du, 0x68u, 0x15u, 0x49u, 0x5du, 0x19u, 0x1fu, 0x68u, 0x00u, 0x2fu,
0x06u, 0xdbu, 0x8cu, 0x42u, 0x02u, 0xd1u, 0x01u, 0x20u, 0x40u, 0x42u, 0xf0u, 0xbdu, 0x01u, 0x34u, 0xf5u, 0xe7u,
0x8cu, 0x42u, 0xf8u, 0xd0u, 0x00u, 0x2au, 0x00u, 0xd1u, 0x06u, 0x00u, 0x01u, 0x20u, 0xdeu, 0x60u, 0x98u, 0x60u,
0x00u, 0x20u, 0x2cu, 0x68u, 0x00u, 0x2cu, 0x03u, 0xdau, 0x88u, 0x42u, 0xecu, 0xd0u, 0x01u, 0x30u, 0xf8u, 0xe7u,
0x88u, 0x42u, 0xe8u, 0xd0u, 0xdbu, 0x68u, 0x00u, 0x2au, 0x00u, 0xd1u, 0x1bu, 0x68u, 0xa0u, 0x22u, 0x00u, 0x20u,
0x12u, 0x06u, 0x93u, 0x42u, 0xe1u, 0xd0u, 0x18u, 0x00u, 0xdfu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x98u, 0x3au, 0x00u, 0x00u, 0x0au, 0x4bu, 0x37u, 0xb5u, 0x1bu, 0x78u, 0x05u, 0x00u, 0x01u, 0x3bu, 0x00u, 0x24u,
0x01u, 0x2bu, 0x05u, 0xd8u, 0x07u, 0x4bu, 0x01u, 0xa8u, 0x01u, 0x93u, 0xffu, 0xf7u, 0xbbu, 0xffu, 0x04u, 0x00u,
0x00u, 0x2du, 0x02u, 0xd0u, 0x28u, 0x00u, 0x04u, 0xf0u, 0xcfu, 0xfcu, 0x20u, 0x00u, 0x3eu, 0xbdu, 0xc0u, 0x46u,
0x18u, 0x10u, 0x02u, 0x08u, 0x01u, 0x01u, 0x01u, 0x3au, 0x07u, 0xb5u, 0x03u, 0x4bu, 0x01u, 0xa8u, 0x01u, 0x93u,
0xffu, 0xf7u, 0xa8u, 0xffu, 0x0eu, 0xbdu, 0xc0u, 0x46u, 0x01u, 0x01u, 0x00u, 0x32u, 0x10u, 0xb5u, 0xffu, 0xf7u,
0xf3u, 0xffu, 0x00u, 0x28u, 0x01u, 0xd1u, 0x07u, 0xf0u, 0x67u, 0xf9u, 0x10u, 0xbdu, 0xf8u, 0xb5u, 0x06u, 0x00u,
0x08u, 0x00u, 0x17u, 0x00u, 0xffu, 0xf7u, 0xceu, 0xffu, 0x1du, 0x4bu, 0x1bu, 0x68u, 0x00u, 0x2bu, 0x20u, 0xdau,
0x80u, 0x24u, 0x1cu, 0x4bu, 0x1cu, 0x4du, 0xa4u, 0x00u, 0x2bu, 0x51u, 0x1cu, 0x4bu, 0x1cu, 0x48u, 0x1bu, 0x68u,
0x1au, 0x00u, 0x98u, 0x32u, 0x19u, 0x68u, 0x12u, 0x68u, 0x8au, 0x18u, 0x11u, 0x68u, 0x08u, 0x40u, 0x19u, 0x49u,
0x01u, 0x43u, 0x11u, 0x60u, 0x1au, 0x00u, 0x90u, 0x32u, 0x12u, 0x68u, 0x1bu, 0x68u, 0x9bu, 0x18u, 0x10u, 0x22u,
0x19u, 0x68u, 0x11u, 0x42u, 0xfcu, 0xd0u, 0x01u, 0x20u, 0x04u, 0xf0u, 0x8eu, 0xfcu, 0x2eu, 0x51u, 0xffu, 0xf7u,
0xcdu, 0xffu, 0x00u, 0x2fu, 0x0cu, 0xd0u, 0x05u, 0xf0u, 0xc1u, 0xfbu, 0xc0u, 0x22u, 0x01u, 0x23u, 0x0eu, 0x49u,
0x52u, 0x00u, 0x88u, 0x58u, 0x03u, 0x43u, 0x8bu, 0x50u, 0x05u, 0xf0u, 0xf4u, 0xfbu, 0x05u, 0xf0u, 0x9eu, 0xfbu,
0x30u, 0x00u, 0x05u, 0xf0u, 0xe5u, 0xfcu, 0x00u, 0x20u, 0x05u, 0xf0u, 0x06u, 0xf8u, 0xfbu, 0xe7u, 0xc0u, 0x46u,
0x00u, 0x01u, 0x26u, 0x40u, 0x00u, 0x40u, 0x00u, 0x16u, 0x00u, 0x00u, 0x20u, 0x40u, 0xf8u, 0x0au, 0x02u, 0x08u,
0xfcu, 0xffu, 0x00u, 0x00u, 0x03u, 0x00u, 0xfau, 0x05u, 0x00u, 0x00u, 0x26u, 0x40u, 0xc0u, 0x22u, 0x01u, 0x23u,
0x04u, 0x49u, 0x10u, 0xb5u, 0x52u, 0x00u, 0x88u, 0x58u, 0x03u, 0x43u, 0x8bu, 0x50u, 0x05u, 0xf0u, 0xd2u, 0xfbu,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0xf8u, 0xb5u, 0x28u, 0x4bu, 0x42u, 0x1eu, 0x05u, 0x00u,
0x9au, 0x42u, 0x48u, 0xd8u, 0x26u, 0x4bu, 0x1au, 0x78u, 0x00u, 0x2au, 0x44u, 0xd1u, 0x01u, 0x24u, 0x25u, 0x4fu,
0x1cu, 0x70u, 0x3bu, 0x78u, 0x24u, 0x4eu, 0x00u, 0x2bu, 0x07u, 0xd1u, 0xffu, 0xf7u, 0xdfu, 0xffu, 0xe1u, 0x22u,
0xd2u, 0x00u, 0xb3u, 0x58u, 0xa3u, 0x43u, 0xb3u, 0x50u, 0x3cu, 0x70u, 0xc0u, 0x22u, 0x01u, 0x21u, 0x00u, 0x24u,
0x52u, 0x00u, 0xb3u, 0x58u, 0x8bu, 0x43u, 0xb3u, 0x50u, 0x1cu, 0x4bu, 0x1du, 0x80u, 0x1cu, 0x4bu, 0xa2u, 0x00u,
0x99u, 0x18u, 0x49u, 0x88u, 0xa9u, 0x42u, 0x21u, 0xd8u, 0xd3u, 0x5au, 0x9du, 0x42u, 0x00u, 0xd2u, 0x1du, 0x00u,
0x18u, 0x4bu, 0x20u, 0x00u, 0x1cu, 0x70u, 0x05u, 0xf0u, 0x85u, 0xfbu, 0xc2u, 0x23u, 0x28u, 0x00u, 0x5bu, 0x00u,
0xf6u, 0x58u, 0x06u, 0xf0u, 0x07u, 0xfdu, 0x14u, 0x4au, 0x14u, 0x4bu, 0x05u, 0xf0u, 0x83u, 0xfeu, 0x05u, 0xf0u,
0xa1u, 0xfdu, 0x11u, 0x23u, 0x1cu, 0x1bu, 0x10u, 0x3bu, 0xa3u, 0x40u, 0x80u, 0x19u, 0xc0u, 0x1au, 0x80u, 0xb2u,
0x05u, 0xf0u, 0x5eu, 0xfbu, 0xffu, 0xf7u, 0xaau, 0xffu, 0x00u, 0x20u, 0xf8u, 0xbdu, 0x01u, 0x34u, 0x0du, 0x2cu,
0xd5u, 0xd1u, 0x01u, 0x3cu, 0xdcu, 0xe7u, 0x01u, 0x20u, 0x40u, 0x42u, 0xf6u, 0xe7u, 0x6fu, 0x17u, 0x00u, 0x00u,
0x24u, 0x06u, 0x02u, 0x08u, 0x25u, 0x06u, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x22u, 0x06u, 0x02u, 0x08u,
0x0cu, 0x94u, 0x00u, 0x10u, 0x20u, 0x06u, 0x02u, 0x08u, 0x33u, 0xdfu, 0xc1u, 0x4fu, 0x1cu, 0x40u, 0x9fu, 0x3fu,
0xc0u, 0x22u, 0x01u, 0x20u, 0x04u, 0x49u, 0x52u, 0x00u, 0x8bu, 0x58u, 0x83u, 0x43u, 0x8bu, 0x50u, 0x00u, 0x22u,
0x02u, 0x4bu, 0x1au, 0x70u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x24u, 0x06u, 0x02u, 0x08u,
0xc0u, 0x22u, 0x01u, 0x20u, 0x02u, 0x49u, 0x52u, 0x00u, 0x8bu, 0x58u, 0x83u, 0x43u, 0x8bu, 0x50u, 0x70u, 0x47u,
0x00u, 0x00u, 0x26u, 0x40u, 0x01u, 0x4bu, 0x18u, 0x60u, 0x70u, 0x47u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x04u, 0x4bu, 0x1bu, 0x68u, 0x1au, 0x00u, 0xbau, 0x32u, 0x12u, 0x88u, 0x1bu, 0x6au, 0x50u, 0x43u, 0xc0u, 0x18u,
0x70u, 0x47u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x1du, 0x4bu, 0x98u, 0x42u, 0x0fu, 0xd0u, 0x10u, 0xd8u,
0x40u, 0x28u, 0x2fu, 0xd0u, 0x05u, 0xd8u, 0x00u, 0x28u, 0x30u, 0xd0u, 0x10u, 0x28u, 0x28u, 0xd0u, 0x19u, 0x48u,
0x1eu, 0xe0u, 0x80u, 0x28u, 0x28u, 0xd0u, 0x80u, 0x23u, 0x5bu, 0x00u, 0x98u, 0x42u, 0xf7u, 0xd1u, 0x14u, 0x48u,
0x16u, 0xe0u, 0x15u, 0x4bu, 0x98u, 0x42u, 0x14u, 0xd0u, 0x08u, 0xd8u, 0xa0u, 0x23u, 0x1bu, 0x06u, 0x98u, 0x42u,
0x1cu, 0xd0u, 0x12u, 0x4bu, 0x98u, 0x42u, 0xeau, 0xd1u, 0xa0u, 0x20u, 0x0bu, 0xe0u, 0x10u, 0x4bu, 0x98u, 0x42u,
0x0au, 0xd0u, 0x10u, 0x4bu, 0x98u, 0x42u, 0x09u, 0xd0u, 0x0fu, 0x4bu, 0x98u, 0x42u, 0xdfu, 0xd1u, 0x0fu, 0x48u,
0x70u, 0x47u, 0xa4u, 0x20u, 0xc0u, 0x03u, 0xfbu, 0xe7u, 0x0du, 0x48u, 0xf9u, 0xe7u, 0x0du, 0x48u, 0xf7u, 0xe7u,
0x0du, 0x48u, 0xf5u, 0xe7u, 0x0du, 0x48u, 0xf3u, 0xe7u, 0x0du, 0x48u, 0xf1u, 0xe7u, 0x00u, 0x20u, 0xefu, 0xe7u,
0x06u, 0x00u, 0x52u, 0x00u, 0xffu, 0x00u, 0x52u, 0x00u, 0x01u, 0x00u, 0x00u, 0xf0u, 0x09u, 0x00u, 0x00u, 0xa0u,
0x04u, 0x00u, 0x00u, 0xf0u, 0x05u, 0x00u, 0x00u, 0xf0u, 0x03u, 0x00u, 0x00u, 0xf0u, 0x01u, 0x00u, 0x52u, 0x00u,
0x02u, 0x00u, 0x52u, 0x00u, 0x03u, 0x00u, 0x52u, 0x00u, 0x01u, 0x00u, 0x50u, 0x00u, 0x02u, 0x00u, 0x50u, 0x00u,
0x05u, 0x00u, 0x52u, 0x00u, 0x10u, 0xb5u, 0x00u, 0x20u, 0xffu, 0xf7u, 0x9au, 0xffu, 0x0au, 0x4bu, 0x1cu, 0x68u,
0x23u, 0x00u, 0xbcu, 0x33u, 0x1bu, 0x68u, 0xc0u, 0x18u, 0x03u, 0x68u, 0x00u, 0x2bu, 0x0au, 0xdbu, 0x07u, 0x4bu,
0x18u, 0x68u, 0xffu, 0xf7u, 0x99u, 0xffu, 0x01u, 0x22u, 0x63u, 0x68u, 0x9au, 0x60u, 0x9au, 0x68u, 0x00u, 0x2au,
0xfcu, 0xd1u, 0x10u, 0xbdu, 0x02u, 0x48u, 0xfcu, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x28u, 0x06u, 0x02u, 0x08u,
0x02u, 0x00u, 0x50u, 0x00u, 0x70u, 0xb5u, 0xc4u, 0x05u, 0x06u, 0x00u, 0x0du, 0x00u, 0xe4u, 0x0du, 0x20u, 0xd1u,
0x00u, 0x29u, 0x1eu, 0xd0u, 0x05u, 0xf0u, 0x54u, 0xfbu, 0x0fu, 0x4bu, 0x10u, 0x4au, 0x1au, 0x60u, 0x5cu, 0x60u,
0x9eu, 0x60u, 0xddu, 0x60u, 0x0eu, 0x4bu, 0x1bu, 0x68u, 0x52u, 0x33u, 0x19u, 0x78u, 0x00u, 0x29u, 0x0bu, 0xd0u,
0x04u, 0xf0u, 0xa3u, 0xfau, 0xfau, 0x21u, 0x89u, 0x00u, 0x05u, 0xf0u, 0xe6u, 0xfbu, 0x01u, 0x00u, 0x09u, 0x48u,
0x05u, 0xf0u, 0xe2u, 0xfbu, 0x08u, 0x4bu, 0xc1u, 0x18u, 0x80u, 0x20u, 0x40u, 0x00u, 0x06u, 0xf0u, 0xccu, 0xffu,
0x70u, 0xbdu, 0x06u, 0x48u, 0xfcu, 0xe7u, 0xc0u, 0x46u, 0x28u, 0x06u, 0x02u, 0x08u, 0x00u, 0x01u, 0x00u, 0x05u,
0xf8u, 0x0au, 0x02u, 0x08u, 0xc0u, 0xeau, 0x21u, 0x01u, 0x48u, 0x26u, 0x00u, 0x00u, 0x06u, 0x00u, 0x52u, 0x00u,
0x0eu, 0x4bu, 0x10u, 0xb5u, 0x1bu, 0x68u, 0x9cu, 0x69u, 0x5bu, 0x69u, 0x00u, 0x1bu, 0xc0u, 0x09u, 0x00u, 0x01u,
0xc0u, 0x18u, 0x1fu, 0x23u, 0x1au, 0x40u, 0x03u, 0x29u, 0x07u, 0xd8u, 0xc9u, 0x00u, 0x8bu, 0x40u, 0x8au, 0x40u,
0x04u, 0x68u, 0x9cu, 0x43u, 0x22u, 0x43u, 0x02u, 0x60u, 0x10u, 0xbdu, 0x04u, 0x39u, 0xc9u, 0x00u, 0x8bu, 0x40u,
0x8au, 0x40u, 0x44u, 0x68u, 0x9cu, 0x43u, 0x22u, 0x43u, 0x42u, 0x60u, 0xf5u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u,
0xf8u, 0xb5u, 0x1fu, 0x00u, 0x06u, 0xabu, 0x15u, 0x00u, 0x1au, 0x78u, 0x06u, 0x00u, 0x0cu, 0x00u, 0xffu, 0xf7u,
0xd7u, 0xffu, 0x01u, 0x22u, 0x11u, 0x00u, 0x17u, 0x40u, 0xa1u, 0x40u, 0xa7u, 0x40u, 0x33u, 0x68u, 0xa4u, 0x00u,
0x8bu, 0x43u, 0x3bu, 0x43u, 0x33u, 0x60u, 0x07u, 0x4bu, 0x1bu, 0x68u, 0x81u, 0x33u, 0x1bu, 0x78u, 0xf6u, 0x18u,
0x0fu, 0x23u, 0x19u, 0x00u, 0x1du, 0x40u, 0xa1u, 0x40u, 0xa5u, 0x40u, 0x32u, 0x68u, 0x8au, 0x43u, 0x2au, 0x43u,
0x32u, 0x60u, 0xf8u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u, 0x06u, 0x4bu, 0x1bu, 0x68u, 0xbcu, 0x33u, 0x1bu, 0x68u,
0xc3u, 0x18u, 0x1bu, 0x68u, 0x00u, 0x2bu, 0x03u, 0xdau, 0x89u, 0xb2u, 0x41u, 0x60u, 0x00u, 0x20u, 0x70u, 0x47u,
0x01u, 0x48u, 0xfcu, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x01u, 0x00u, 0x8au, 0x00u, 0x03u, 0x68u, 0x00u, 0x2bu,
0x04u, 0xdau, 0x89u, 0xb2u, 0xc2u, 0x60u, 0x81u, 0x60u, 0x00u, 0x20u, 0x70u, 0x47u, 0x00u, 0x48u, 0xfcu, 0xe7u,
0x01u, 0x00u, 0x8au, 0x00u, 0x06u, 0x4bu, 0x1bu, 0x68u, 0xbcu, 0x33u, 0x1bu, 0x68u, 0xc3u, 0x18u, 0x1bu, 0x68u,
0x00u, 0x2bu, 0x03u, 0xdau, 0xc3u, 0x68u, 0x00u, 0x20u, 0x0bu, 0x60u, 0x70u, 0x47u, 0x01u, 0x48u, 0xfcu, 0xe7u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x01u, 0x00u, 0x8au, 0x00u, 0x02u, 0x4bu, 0x1au, 0x68u, 0x00u, 0x2au, 0x00u, 0xd1u,
0x18u, 0x60u, 0x70u, 0x47u, 0x3cu, 0x06u, 0x02u, 0x08u, 0xf0u, 0xb5u, 0x2cu, 0x24u, 0x60u, 0x43u, 0x15u, 0x4cu,
0x1fu, 0x00u, 0x24u, 0x68u, 0x1du, 0x0au, 0x20u, 0x18u, 0xffu, 0x24u, 0x25u, 0x40u, 0x27u, 0x40u, 0x12u, 0x4cu,
0x1bu, 0x0cu, 0x26u, 0x68u, 0x07u, 0x60u, 0x34u, 0x6au, 0x45u, 0x60u, 0x83u, 0x60u, 0xbau, 0x36u, 0x36u, 0x88u,
0x77u, 0x43u, 0x3fu, 0x19u, 0x07u, 0x61u, 0x2fu, 0x00u, 0x80u, 0x37u, 0x6du, 0x01u, 0x7fu, 0x01u, 0xe7u, 0x19u,
0x64u, 0x19u, 0x0au, 0x4du, 0x47u, 0x61u, 0x1fu, 0x04u, 0x3bu, 0x43u, 0x64u, 0x19u, 0x23u, 0x60u, 0x00u, 0x23u,
0x83u, 0x61u, 0x05u, 0x9bu, 0xc2u, 0x61u, 0x01u, 0x62u, 0x00u, 0x2bu, 0x01u, 0xd0u, 0x1bu, 0x88u, 0x83u, 0x81u,
0xf0u, 0xbdu, 0xc0u, 0x46u, 0x3cu, 0x06u, 0x02u, 0x08u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x08u, 0x10u, 0x00u, 0x00u,
0xf0u, 0xb5u, 0x83u, 0x68u, 0x85u, 0xb0u, 0x02u, 0xadu, 0x2bu, 0x80u, 0x03u, 0x68u, 0x06u, 0x6au, 0x17u, 0x33u,
0x6bu, 0x80u, 0x43u, 0x68u, 0x47u, 0x6au, 0x00u, 0x95u, 0x82u, 0x6au, 0xc1u, 0x6au, 0x04u, 0x00u, 0x03u, 0x93u,
0x03u, 0x69u, 0xc0u, 0x68u, 0xffu, 0xf7u, 0xb8u, 0xffu, 0x00u, 0x21u, 0x3bu, 0x00u, 0x0au, 0x00u, 0x00u, 0x91u,
0x30u, 0x00u, 0xffu, 0xf7u, 0xb1u, 0xffu, 0x21u, 0x6bu, 0x28u, 0x00u, 0x04u, 0xf0u, 0x03u, 0xfau, 0x00u, 0x22u,
0xabu, 0x5eu, 0x00u, 0x2bu, 0x06u, 0xdbu, 0x1fu, 0x22u, 0x13u, 0x40u, 0x1eu, 0x3au, 0x9au, 0x40u, 0x13u, 0x00u,
0x01u, 0x4au, 0x13u, 0x60u, 0x05u, 0xb0u, 0xf0u, 0xbdu, 0x00u, 0xe1u, 0x00u, 0xe0u, 0xf7u, 0xb5u, 0x2cu, 0x25u,
0x13u, 0x4cu, 0x68u, 0x43u, 0x26u, 0x68u, 0x69u, 0x43u, 0x34u, 0x18u, 0x25u, 0x69u, 0x01u, 0x93u, 0x71u, 0x18u,
0x00u, 0x2du, 0x19u, 0xd0u, 0x88u, 0x69u, 0x00u, 0x28u, 0x18u, 0xd1u, 0x2eu, 0x68u, 0x00u, 0x2eu, 0x15u, 0xdau,
0x67u, 0x68u, 0x01u, 0x24u, 0x26u, 0x00u, 0x4bu, 0x68u, 0x9eu, 0x40u, 0xb4u, 0x46u, 0x13u, 0x68u, 0x9eu, 0xb2u,
0x63u, 0x46u, 0x1bu, 0x04u, 0x1eu, 0x43u, 0x16u, 0x60u, 0xeau, 0x60u, 0x8cu, 0x61u, 0xbcu, 0x40u, 0x01u, 0x9bu,
0xa4u, 0xb2u, 0x4bu, 0x62u, 0xacu, 0x60u, 0xfeu, 0xbdu, 0x02u, 0x48u, 0xfcu, 0xe7u, 0x02u, 0x48u, 0xfau, 0xe7u,
0x3cu, 0x06u, 0x02u, 0x08u, 0x04u, 0x02u, 0x8au, 0x00u, 0x07u, 0x02u, 0x8au, 0x00u, 0x73u, 0xb5u, 0x00u, 0x26u,
0x42u, 0x69u, 0x04u, 0x00u, 0xd5u, 0x68u, 0x01u, 0x96u, 0x2bu, 0x0cu, 0xb3u, 0x42u, 0x21u, 0xd0u, 0x1bu, 0x04u,
0x13u, 0x60u, 0x13u, 0x68u, 0x19u, 0x4bu, 0x00u, 0x69u, 0x1bu, 0x68u, 0xbcu, 0x33u, 0x1bu, 0x68u, 0xc3u, 0x18u,
0x1bu, 0x68u, 0xb3u, 0x42u, 0x15u, 0xdau, 0x01u, 0xa9u, 0xffu, 0xf7u, 0x3cu, 0xffu, 0xb0u, 0x42u, 0x0cu, 0xd1u,
0x01u, 0x98u, 0xe2u, 0x69u, 0x03u, 0x68u, 0x1eu, 0x0cu, 0xdbu, 0xb2u, 0x9au, 0x42u, 0x05u, 0xd9u, 0x22u, 0x6au,
0x9bu, 0x00u, 0x9bu, 0x58u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x98u, 0x47u, 0x31u, 0x00u, 0x20u, 0x69u, 0xffu, 0xf7u,
0x0bu, 0xffu, 0xadu, 0xb2u, 0x00u, 0x2du, 0x09u, 0xd0u, 0x63u, 0x69u, 0x1du, 0x60u, 0x00u, 0x25u, 0x1bu, 0x68u,
0x63u, 0x6au, 0xabu, 0x42u, 0x05u, 0xd0u, 0x98u, 0x47u, 0x65u, 0x62u, 0xa5u, 0x61u, 0x63u, 0x69u, 0x1bu, 0x68u,
0x73u, 0xbdu, 0xa3u, 0x6au, 0x00u, 0x2bu, 0xf8u, 0xd0u, 0x98u, 0x47u, 0xf6u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x2cu, 0x23u, 0x10u, 0xb5u, 0x43u, 0x43u, 0x03u, 0x4au, 0x10u, 0x68u, 0xc0u, 0x18u, 0xffu, 0xf7u, 0xb6u, 0xffu,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x3cu, 0x06u, 0x02u, 0x08u, 0xf8u, 0xb5u, 0x19u, 0x4bu, 0x0fu, 0x00u, 0x1bu, 0x68u,
0x1au, 0x00u, 0x33u, 0x32u, 0x12u, 0x78u, 0x82u, 0x42u, 0x27u, 0xd9u, 0x00u, 0x29u, 0x25u, 0xd0u, 0x1fu, 0x25u,
0x0au, 0x68u, 0x15u, 0x40u, 0x21u, 0xd1u, 0x19u, 0x00u, 0xbau, 0x31u, 0x0cu, 0x88u, 0x11u, 0x4eu, 0x60u, 0x43u,
0x1cu, 0x6au, 0xd2u, 0x08u, 0x04u, 0x19u, 0x29u, 0x00u, 0x78u, 0x68u, 0x34u, 0x60u, 0x06u, 0xf0u, 0x67u, 0xfcu,
0x29u, 0x00u, 0x20u, 0x00u, 0xffu, 0xf7u, 0xc8u, 0xfeu, 0x3au, 0x00u, 0x29u, 0x00u, 0x30u, 0x68u, 0xffu, 0xf7u,
0xd5u, 0xfeu, 0x04u, 0x1eu, 0x07u, 0xd1u, 0x01u, 0x00u, 0x30u, 0x68u, 0xffu, 0xf7u, 0xbdu, 0xfeu, 0x03u, 0x00u,
0x20u, 0x00u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x04u, 0x48u, 0xf8u, 0xbdu, 0x04u, 0x48u, 0xfcu, 0xe7u, 0xc0u, 0x46u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x40u, 0x06u, 0x02u, 0x08u, 0x01u, 0x01u, 0x8au, 0x00u, 0x03u, 0x01u, 0x8au, 0x00u,
0x10u, 0xb5u, 0x00u, 0x2au, 0x0du, 0xd1u, 0x00u, 0x29u, 0x14u, 0xd1u, 0x0bu, 0x4bu, 0x1au, 0x68u, 0x13u, 0x00u,
0xbau, 0x33u, 0x1bu, 0x88u, 0x58u, 0x43u, 0x13u, 0x6au, 0xc0u, 0x18u, 0x08u, 0x4bu, 0x18u, 0x60u, 0x08u, 0x00u,
0x10u, 0xbdu, 0x00u, 0x29u, 0x06u, 0xd0u, 0x06u, 0x4bu, 0x19u, 0x60u, 0x19u, 0x00u, 0x5au, 0x60u, 0xffu, 0xf7u,
0xabu, 0xffu, 0xf5u, 0xe7u, 0x03u, 0x48u, 0xf3u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x40u, 0x06u, 0x02u, 0x08u,
0x04u, 0x00u, 0x00u, 0x08u, 0x03u, 0x01u, 0x8au, 0x00u, 0xf7u, 0xb5u, 0x18u, 0x4fu, 0x04u, 0x00u, 0x3bu, 0x68u,
0x01u, 0x91u, 0xdeu, 0x68u, 0x33u, 0x68u, 0x83u, 0x42u, 0x26u, 0xd9u, 0x00u, 0x25u, 0xa9u, 0x42u, 0x02u, 0xd1u,
0xfeu, 0xf7u, 0x5bu, 0xf8u, 0x05u, 0x00u, 0x38u, 0x68u, 0x03u, 0x68u, 0x00u, 0x2bu, 0x1au, 0xdau, 0x1fu, 0x22u,
0x01u, 0x23u, 0x22u, 0x40u, 0x93u, 0x40u, 0x64u, 0x09u, 0x72u, 0x68u, 0xa4u, 0x00u, 0x14u, 0x19u, 0x22u, 0x68u,
0x13u, 0x42u, 0x0du, 0xd0u, 0x9au, 0x43u, 0x22u, 0x60u, 0x00u, 0x24u, 0x00u, 0x21u, 0xffu, 0xf7u, 0x64u, 0xfeu,
0x01u, 0x9bu, 0x00u, 0x2bu, 0x02u, 0xd1u, 0x28u, 0x00u, 0xfeu, 0xf7u, 0x43u, 0xf8u, 0x20u, 0x00u, 0xfeu, 0xbdu,
0x03u, 0x4cu, 0xf2u, 0xe7u, 0x03u, 0x4cu, 0xf3u, 0xe7u, 0x03u, 0x4cu, 0xf7u, 0xe7u, 0x40u, 0x06u, 0x02u, 0x08u,
0x02u, 0x01u, 0x88u, 0x00u, 0x03u, 0x01u, 0x88u, 0x00u, 0x04u, 0x01u, 0x8au, 0x00u, 0x0au, 0x4bu, 0x1bu, 0x68u,
0xdbu, 0x68u, 0x1au, 0x68u, 0x82u, 0x42u, 0x0du, 0xd9u, 0x59u, 0x68u, 0x1fu, 0x23u, 0x42u, 0x09u, 0x18u, 0x40u,
0x1eu, 0x3bu, 0x83u, 0x40u, 0x92u, 0x00u, 0x50u, 0x58u, 0x18u, 0x40u, 0x43u, 0x1eu, 0x98u, 0x41u, 0x03u, 0x4bu,
0xc0u, 0x18u, 0x70u, 0x47u, 0x02u, 0x48u, 0xfcu, 0xe7u, 0x40u, 0x06u, 0x02u, 0x08u, 0x00u, 0x01u, 0x88u, 0x00u,
0x04u, 0x01u, 0x8au, 0x00u, 0x70u, 0xb5u, 0x96u, 0x21u, 0x00u, 0x20u, 0x04u, 0xf0u, 0x73u, 0xf9u, 0x00u, 0x21u,
0x08u, 0x00u, 0x03u, 0xf0u, 0xabu, 0xf9u, 0x44u, 0x42u, 0x44u, 0x41u, 0x2du, 0x4bu, 0x64u, 0x42u, 0x1cu, 0x40u,
0x2cu, 0x4bu, 0x05u, 0x00u, 0x00u, 0x20u, 0xe4u, 0x18u, 0x03u, 0xf0u, 0xfeu, 0xf8u, 0x01u, 0x20u, 0x03u, 0xf0u,
0xd7u, 0xf8u, 0x00u, 0x20u, 0x02u, 0xf0u, 0xb0u, 0xffu, 0x05u, 0xf0u, 0xfau, 0xf8u, 0x26u, 0x4eu, 0x33u, 0x68u,
0x3fu, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x03u, 0xd0u, 0x01u, 0x20u, 0x03u, 0xf0u, 0x87u, 0xfdu, 0x05u, 0x00u,
0x00u, 0x2du, 0x00u, 0xd0u, 0x21u, 0x4cu, 0x33u, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x03u, 0xd9u,
0x02u, 0x20u, 0x03u, 0xf0u, 0x7bu, 0xfdu, 0x05u, 0x00u, 0x00u, 0x2du, 0x00u, 0xd0u, 0x1cu, 0x4cu, 0x00u, 0x21u,
0x01u, 0x20u, 0x03u, 0xf0u, 0xb1u, 0xfbu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x1au, 0x4cu, 0x00u, 0x20u, 0x03u, 0xf0u,
0x6bu, 0xf9u, 0x05u, 0x1eu, 0x0eu, 0xd1u, 0x03u, 0xf0u, 0xddu, 0xfbu, 0x12u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u,
0x08u, 0xd1u, 0x01u, 0x21u, 0x28u, 0x00u, 0x03u, 0xf0u, 0x37u, 0xf9u, 0x00u, 0x28u, 0x00u, 0xd0u, 0x0du, 0x4cu,
0x05u, 0xf0u, 0xc6u, 0xf8u, 0x03u, 0xf0u, 0x30u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x0eu, 0x4cu, 0x00u, 0x21u,
0x08u, 0x00u, 0x03u, 0xf0u, 0x91u, 0xfbu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x0cu, 0x4cu, 0x00u, 0x21u, 0x08u, 0x00u,
0x03u, 0xf0u, 0x22u, 0xf9u, 0x00u, 0x28u, 0x00u, 0xd0u, 0x02u, 0x4cu, 0x20u, 0x00u, 0x70u, 0xbdu, 0xc0u, 0x46u,
0xf1u, 0xf0u, 0xe5u, 0xfeu, 0x0fu, 0x0fu, 0x1au, 0x01u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x2fu, 0x0fu, 0x1au, 0x01u,
0x2eu, 0x0fu, 0x1au, 0x01u, 0x4eu, 0x0fu, 0x1au, 0x01u, 0x3fu, 0x0fu, 0x1au, 0x01u, 0x4fu, 0x0fu, 0x1au, 0x01u,
0x30u, 0xb5u, 0x13u, 0x4cu, 0xc0u, 0x00u, 0x03u, 0x19u, 0x08u, 0x30u, 0x00u, 0x19u, 0x00u, 0x29u, 0x01u, 0xd0u,
0x07u, 0x2au, 0x06u, 0xd9u, 0x01u, 0x22u, 0x00u, 0x21u, 0x52u, 0x42u, 0x19u, 0x60u, 0x5au, 0x60u, 0x06u, 0xc0u,
0x30u, 0xbdu, 0x0cu, 0x4cu, 0x24u, 0x68u, 0xa5u, 0x69u, 0x64u, 0x69u, 0x49u, 0x1bu, 0xc9u, 0x09u, 0x09u, 0x01u,
0x09u, 0x19u, 0x19u, 0x60u, 0x04u, 0x31u, 0x01u, 0x60u, 0x1fu, 0x21u, 0x03u, 0x2au, 0x03u, 0xd8u, 0xd2u, 0x00u,
0x91u, 0x40u, 0x59u, 0x60u, 0xecu, 0xe7u, 0x04u, 0x3au, 0xd2u, 0x00u, 0x91u, 0x40u, 0x41u, 0x60u, 0xe7u, 0xe7u,
0xfcu, 0x0au, 0x02u, 0x08u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xf0u, 0xb5u, 0xc4u, 0x00u, 0x45u, 0x4eu, 0x00u, 0x29u,
0x00u, 0xd1u, 0x7au, 0xe0u, 0x07u, 0x2au, 0x00u, 0xd9u, 0x77u, 0xe0u, 0x00u, 0x23u, 0x36u, 0x19u, 0x9du, 0x00u,
0xdfu, 0x00u, 0x4du, 0x19u, 0x01u, 0x33u, 0xf5u, 0x51u, 0x15u, 0x2bu, 0xf8u, 0xd1u, 0x14u, 0x3bu, 0x93u, 0x40u,
0x3du, 0x49u, 0x73u, 0x60u, 0x09u, 0x19u, 0x4bu, 0x60u, 0x3cu, 0x49u, 0x03u, 0x25u, 0x09u, 0x19u, 0x4bu, 0x60u,
0x3bu, 0x49u, 0x38u, 0x4fu, 0x09u, 0x19u, 0x4bu, 0x60u, 0x3au, 0x49u, 0x09u, 0x19u, 0x4bu, 0x60u, 0x3au, 0x49u,
0x09u, 0x19u, 0x4bu, 0x60u, 0x39u, 0x49u, 0x09u, 0x19u, 0x4bu, 0x60u, 0x39u, 0x49u, 0x09u, 0x19u, 0x4bu, 0x60u,
0x38u, 0x49u, 0x0cu, 0x19u, 0x51u, 0x00u, 0x0eu, 0x00u, 0x37u, 0x49u, 0x63u, 0x60u, 0x0cu, 0x68u, 0xb5u, 0x40u,
0x21u, 0x00u, 0x80u, 0x31u, 0x09u, 0x78u, 0x92u, 0x00u, 0x02u, 0x31u, 0x89u, 0x08u, 0x09u, 0x18u, 0xc9u, 0x00u,
0xc9u, 0x19u, 0x4du, 0x60u, 0x0fu, 0x25u, 0x21u, 0x00u, 0x95u, 0x40u, 0x81u, 0x31u, 0x09u, 0x78u, 0x02u, 0x31u,
0x89u, 0x08u, 0x09u, 0x18u, 0xc9u, 0x00u, 0xc9u, 0x19u, 0x4du, 0x60u, 0x35u, 0x00u, 0x10u, 0x35u, 0xacu, 0x46u,
0x21u, 0x00u, 0x66u, 0x46u, 0x03u, 0x25u, 0x82u, 0x31u, 0x09u, 0x78u, 0xb5u, 0x40u, 0x02u, 0x31u, 0x89u, 0x08u,
0x09u, 0x18u, 0xc9u, 0x00u, 0xc9u, 0x19u, 0x4bu, 0x60u, 0x21u, 0x00u, 0x83u, 0x31u, 0x09u, 0x78u, 0x2bu, 0x43u,
0x02u, 0x31u, 0x89u, 0x08u, 0x09u, 0x18u, 0xc9u, 0x00u, 0xc9u, 0x19u, 0x4bu, 0x60u, 0xfeu, 0x23u, 0x01u, 0x21u,
0x9bu, 0x00u, 0x84u, 0x34u, 0x1au, 0x40u, 0x23u, 0x78u, 0x01u, 0x25u, 0x02u, 0x33u, 0x9bu, 0x08u, 0x18u, 0x18u,
0x53u, 0x1cu, 0xc0u, 0x00u, 0x99u, 0x40u, 0xc7u, 0x19u, 0x01u, 0x20u, 0x0bu, 0x00u, 0x91u, 0x1cu, 0x88u, 0x40u,
0x95u, 0x40u, 0x03u, 0x26u, 0x03u, 0x43u, 0x1du, 0x43u, 0xd3u, 0x1cu, 0x9eu, 0x40u, 0x2eu, 0x43u, 0x07u, 0x25u,
0x05u, 0x32u, 0x95u, 0x40u, 0x2eu, 0x43u, 0x7eu, 0x60u, 0xf0u, 0xbdu, 0x00u, 0x23u, 0x01u, 0x21u, 0x18u, 0x00u,
0x34u, 0x19u, 0x49u, 0x42u, 0xe0u, 0x50u, 0xe2u, 0x18u, 0x08u, 0x33u, 0x51u, 0x60u, 0xa8u, 0x2bu, 0xf9u, 0xd1u,
0xf2u, 0xe7u, 0xc0u, 0x46u, 0xfcu, 0x0au, 0x02u, 0x08u, 0x04u, 0x0bu, 0x02u, 0x08u, 0x0cu, 0x0bu, 0x02u, 0x08u,
0x14u, 0x0bu, 0x02u, 0x08u, 0x1cu, 0x0bu, 0x02u, 0x08u, 0x24u, 0x0bu, 0x02u, 0x08u, 0x2cu, 0x0bu, 0x02u, 0x08u,
0x34u, 0x0bu, 0x02u, 0x08u, 0x3cu, 0x0bu, 0x02u, 0x08u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xf7u, 0xb5u, 0x07u, 0x00u,
0x00u, 0x88u, 0x01u, 0x38u, 0x08u, 0x28u, 0x00u, 0xd9u, 0xefu, 0xe0u, 0x05u, 0xf0u, 0x63u, 0xf8u, 0x3eu, 0x00u,
0x09u, 0x00u, 0x24u, 0x00u, 0x4bu, 0x00u, 0x96u, 0x00u, 0xe0u, 0x00u, 0xc3u, 0x02u, 0x4eu, 0x00u, 0x5au, 0x00u,
0x7du, 0x88u, 0xaau, 0x49u, 0xe8u, 0x00u, 0x0bu, 0x18u, 0x5bu, 0x68u, 0xfau, 0x68u, 0x1cu, 0x00u, 0x14u, 0x40u,
0x0eu, 0xd1u, 0x5eu, 0x1cu, 0x0cu, 0xd0u, 0x92u, 0x2du, 0x0au, 0xd8u, 0x41u, 0x58u, 0x00u, 0x29u, 0x07u, 0xd0u,
0xbdu, 0x68u, 0x08u, 0x68u, 0x2bu, 0x43u, 0x03u, 0x40u, 0x1au, 0x43u, 0x0au, 0x60u, 0x7cu, 0x60u, 0xf7u, 0xbdu,
0x9fu, 0x4bu, 0x7bu, 0x60u, 0xfbu, 0xe7u, 0x78u, 0x88u, 0x9cu, 0x4bu, 0xc2u, 0x00u, 0x99u, 0x18u, 0x49u, 0x68u,
0x4cu, 0x1cu, 0xf5u, 0xd0u, 0x92u, 0x28u, 0xf3u, 0xd8u, 0xd0u, 0x58u, 0x00u, 0x28u, 0xf0u, 0xd0u, 0xbbu, 0x68u,
0x02u, 0x68u, 0x0bu, 0x42u, 0x03u, 0xd0u, 0x1cu, 0x00u, 0x54u, 0x40u, 0x21u, 0x42u, 0xe8u, 0xd1u, 0x0au, 0x40u,
0x13u, 0x43u, 0x03u, 0x60u, 0x00u, 0x23u, 0x7bu, 0x60u, 0xe1u, 0xe7u, 0x7bu, 0x88u, 0x92u, 0x2bu, 0xdfu, 0xd8u,
0x8eu, 0x4au, 0xdbu, 0x00u, 0x9bu, 0x58u, 0x00u, 0x2bu, 0xdau, 0xd0u, 0x1bu, 0x68u, 0xbbu, 0x60u, 0x00u, 0x23u,
0x7bu, 0x60u, 0xd4u, 0xe7u, 0x00u, 0x23u, 0x7bu, 0x60u, 0xd1u, 0xe7u, 0xbbu, 0x68u, 0x02u, 0x2bu, 0x05u, 0xd1u,
0xfbu, 0x68u, 0x1eu, 0x2bu, 0x02u, 0xd1u, 0x00u, 0x23u, 0x7bu, 0x60u, 0xc8u, 0xe7u, 0x85u, 0x4bu, 0x7bu, 0x60u,
0xc5u, 0xe7u, 0xbbu, 0x68u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x1cu, 0xe2u, 0xfau, 0x68u, 0x05u, 0x2au, 0x00u, 0xd9u,
0x18u, 0xe2u, 0x00u, 0x22u, 0x7au, 0x60u, 0x80u, 0x4au, 0x12u, 0x68u, 0x11u, 0x78u, 0x00u, 0x29u, 0x24u, 0xd0u,
0x91u, 0x68u, 0x19u, 0x60u, 0xd1u, 0x68u, 0x59u, 0x60u, 0x7cu, 0x49u, 0x99u, 0x60u, 0x51u, 0x78u, 0x00u, 0x29u,
0x1du, 0xd0u, 0x11u, 0x6au, 0xd9u, 0x60u, 0x91u, 0x6au, 0x19u, 0x61u, 0x79u, 0x49u, 0x59u, 0x61u, 0x51u, 0x6au,
0x99u, 0x61u, 0xd1u, 0x6au, 0xd9u, 0x61u, 0x77u, 0x49u, 0x19u, 0x62u, 0x91u, 0x78u, 0x00u, 0x29u, 0x11u, 0xd0u,
0x11u, 0x6bu, 0x59u, 0x62u, 0x91u, 0x6bu, 0x99u, 0x62u, 0x73u, 0x49u, 0xd9u, 0x62u, 0x51u, 0x6bu, 0xd2u, 0x6bu,
0x19u, 0x63u, 0x5au, 0x63u, 0x71u, 0x4au, 0x9au, 0x63u, 0x91u, 0xe7u, 0x19u, 0x60u, 0xdeu, 0xe7u, 0xd9u, 0x60u,
0x99u, 0x61u, 0xeau, 0xe7u, 0x59u, 0x62u, 0x19u, 0x63u, 0x89u, 0xe7u, 0xb9u, 0x68u, 0x00u, 0x29u, 0x00u, 0xd1u,
0xe0u, 0xe1u, 0x6bu, 0x4cu, 0x6bu, 0x4du, 0x23u, 0x78u, 0xf0u, 0x22u, 0x01u, 0x93u, 0x00u, 0x23u, 0x28u, 0x00u,
0x7bu, 0x60u, 0x06u, 0xf0u, 0xd3u, 0xf9u, 0x03u, 0xf0u, 0x4du, 0xffu, 0x00u, 0x28u, 0x11u, 0xd0u, 0xffu, 0xf7u,
0x09u, 0xfeu, 0x78u, 0x60u, 0x7bu, 0x68u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x70u, 0xe7u, 0x28u, 0x00u, 0x23u, 0x70u,
0x01u, 0xf0u, 0x8au, 0xfdu, 0x78u, 0x60u, 0x00u, 0x28u, 0x26u, 0xd0u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x23u, 0x70u,
0x65u, 0xe7u, 0x23u, 0x78u, 0x00u, 0x2bu, 0xedu, 0xd1u, 0xebu, 0x78u, 0x00u, 0x2bu, 0xe7u, 0xd0u, 0xebu, 0x79u,
0x00u, 0x2bu, 0xe4u, 0xd0u, 0x2bu, 0x00u, 0x55u, 0x33u, 0x1eu, 0x78u, 0x03u, 0xf0u, 0x19u, 0xffu, 0x00u, 0x28u,
0x02u, 0xd0u, 0x55u, 0x4bu, 0x7bu, 0x60u, 0xdau, 0xe7u, 0x03u, 0xf0u, 0x70u, 0xf8u, 0x00u, 0x28u, 0x06u, 0xd1u,
0x03u, 0xf0u, 0x58u, 0xf8u, 0x30u, 0x00u, 0x03u, 0xf0u, 0x91u, 0xf8u, 0x00u, 0x23u, 0xf2u, 0xe7u, 0x03u, 0xf0u,
0x6fu, 0xf8u, 0x00u, 0x28u, 0xf4u, 0xd0u, 0xecu, 0xe7u, 0x01u, 0x23u, 0x23u, 0x70u, 0x3fu, 0xe7u, 0x7bu, 0x88u,
0x67u, 0x2bu, 0x64u, 0xd0u, 0x19u, 0xd8u, 0x2fu, 0x2bu, 0x00u, 0xd1u, 0xc2u, 0xe1u, 0x08u, 0xd8u, 0x2cu, 0x2bu,
0x00u, 0xd1u, 0x97u, 0xe0u, 0x2du, 0x2bu, 0x00u, 0xd1u, 0xeeu, 0xe0u, 0x39u, 0x4bu, 0x7bu, 0x60u, 0x2eu, 0xe7u,
0x32u, 0x2bu, 0x00u, 0xd1u, 0xadu, 0xe1u, 0x66u, 0x2bu, 0x32u, 0xd0u, 0x30u, 0x2bu, 0xf5u, 0xd1u, 0xb8u, 0x68u,
0x03u, 0xf0u, 0x22u, 0xf8u, 0x00u, 0x23u, 0x7bu, 0x60u, 0x21u, 0xe7u, 0x6eu, 0x2bu, 0x00u, 0xd1u, 0x3fu, 0xe1u,
0x09u, 0xd8u, 0x6cu, 0x2bu, 0x00u, 0xd1u, 0x36u, 0xe1u, 0x6du, 0x2bu, 0xe6u, 0xd1u, 0x04u, 0xf0u, 0xf4u, 0xfbu,
0x00u, 0x23u, 0x7bu, 0x60u, 0x13u, 0xe7u, 0x70u, 0x2bu, 0x00u, 0xd1u, 0x44u, 0xe1u, 0x00u, 0xd2u, 0x38u, 0xe1u,
0x71u, 0x2bu, 0xdau, 0xd1u, 0xbau, 0x68u, 0x13u, 0x78u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x62u, 0xe1u, 0x04u, 0x25u,
0x01u, 0x26u, 0x11u, 0x7au, 0x2du, 0x4au, 0x10u, 0x1du, 0xc4u, 0x6fu, 0xa3u, 0x42u, 0x00u, 0xd0u, 0x66u, 0xe1u,
0x00u, 0x20u, 0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd0u, 0xf9u, 0xe6u, 0x04u, 0xf0u, 0x41u, 0xfbu, 0x4bu, 0xe1u,
0xbau, 0x68u, 0x27u, 0x4bu, 0x00u, 0x2au, 0x10u, 0xd1u, 0x5au, 0x68u, 0x26u, 0x49u, 0x11u, 0x40u, 0x1bu, 0x22u,
0x0au, 0x43u, 0x5au, 0x60u, 0x59u, 0x68u, 0x24u, 0x4au, 0x11u, 0x43u, 0x59u, 0x60u, 0x59u, 0x68u, 0x11u, 0x43u,
0x59u, 0x60u, 0x59u, 0x68u, 0x0au, 0x43u, 0x5au, 0x60u, 0x15u, 0xe7u, 0xe8u, 0x21u, 0x58u, 0x68u, 0x1fu, 0x4cu,
0x89u, 0x01u, 0x20u, 0x40u, 0x01u, 0x43u, 0x59u, 0x60u, 0x5au, 0x68u, 0x22u, 0x40u, 0xf3u, 0xe7u, 0x1cu, 0x4bu,
0x1au, 0x68u, 0x13u, 0x00u, 0xbau, 0x33u, 0x19u, 0x88u, 0x07u, 0x23u, 0x4bu, 0x43u, 0x12u, 0x6au, 0x9bu, 0x18u,
0x1au, 0x68u, 0x00u, 0x2au, 0xfcu, 0xdau, 0x80u, 0x22u, 0xd9u, 0x68u, 0x52u, 0x05u, 0x0au, 0x43u, 0xdau, 0x60u,
0x00u, 0x22u, 0x5au, 0x60u, 0x5bu, 0x68u, 0x7au, 0x60u, 0xc1u, 0xe6u, 0xc0u, 0x46u, 0xfcu, 0x0au, 0x02u, 0x08u,
0xffu, 0x0fu, 0x1au, 0x01u, 0xf9u, 0x0fu, 0x1au, 0x01u, 0x3cu, 0x07u, 0x02u, 0x08u, 0x20u, 0x00u, 0x89u, 0x00u,
0x35u, 0x00u, 0x8bu, 0x00u, 0x4au, 0x00u, 0x8du, 0x00u, 0x5fu, 0x00u, 0x8fu, 0x00u, 0x74u, 0x00u, 0x91u, 0x00u,
0x38u, 0x07u, 0x02u, 0x08u, 0x48u, 0x06u, 0x02u, 0x08u, 0x6fu, 0x0fu, 0x1au, 0x01u, 0x94u, 0x0fu, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0x00u, 0x00u, 0xfcu, 0x0fu, 0x00u, 0x3au, 0x02u, 0x80u, 0xffu, 0x00u, 0xfcu, 0x0fu,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x24u, 0xb1u, 0x25u, 0x80u, 0x26u, 0x94u, 0x4bu, 0xedu, 0x00u, 0x1cu, 0x80u,
0x93u, 0x4bu, 0xb6u, 0x05u, 0x1cu, 0x80u, 0x93u, 0x4bu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x9cu, 0x42u,
0x00u, 0xd9u, 0xc0u, 0xe6u, 0x00u, 0x2cu, 0x1fu, 0xd1u, 0x03u, 0xf0u, 0x8cu, 0xf9u, 0x00u, 0x28u, 0x19u, 0xd0u,
0x20u, 0x00u, 0x03u, 0xf0u, 0x37u, 0xf9u, 0x02u, 0x28u, 0x35u, 0xd1u, 0x8bu, 0x4bu, 0x9cu, 0x46u, 0x00u, 0x2cu,
0x16u, 0xd1u, 0x61u, 0x46u, 0x89u, 0x4bu, 0x5au, 0x59u, 0x0au, 0x40u, 0x32u, 0x43u, 0x5au, 0x51u, 0x00u, 0x21u,
0x20u, 0x00u, 0x03u, 0xf0u, 0xf1u, 0xf8u, 0x01u, 0x23u, 0xa3u, 0x40u, 0x80u, 0x4au, 0x12u, 0x88u, 0x13u, 0x43u,
0x7eu, 0x4au, 0x13u, 0x80u, 0x01u, 0x34u, 0xd6u, 0xe7u, 0x20u, 0x00u, 0x03u, 0xf0u, 0x93u, 0xfau, 0xddu, 0xe7u,
0x03u, 0x20u, 0x7eu, 0x4au, 0xa3u, 0x00u, 0x7eu, 0x49u, 0x9bu, 0x18u, 0x5au, 0x58u, 0x12u, 0x0fu, 0x02u, 0x42u,
0x04u, 0xd0u, 0x5au, 0x58u, 0x12u, 0x0fu, 0x02u, 0x40u, 0x01u, 0x2au, 0x06u, 0xd1u, 0x01u, 0x20u, 0xa0u, 0x40u,
0x73u, 0x4au, 0x12u, 0x88u, 0x10u, 0x43u, 0x72u, 0x4au, 0x10u, 0x80u, 0x60u, 0x46u, 0x5au, 0x58u, 0x02u, 0x40u,
0x32u, 0x43u, 0x5au, 0x50u, 0xd3u, 0xe7u, 0x00u, 0x2cu, 0xdcu, 0xd1u, 0x70u, 0x4au, 0x6eu, 0x49u, 0x53u, 0x59u,
0x0bu, 0x40u, 0x33u, 0x43u, 0x53u, 0x51u, 0xd5u, 0xe7u, 0x68u, 0x4bu, 0x1bu, 0x88u, 0x00u, 0x2bu, 0x0fu, 0xd1u,
0x03u, 0xf0u, 0x40u, 0xf9u, 0x00u, 0x28u, 0x49u, 0xd1u, 0x00u, 0x24u, 0x07u, 0xe0u, 0x01u, 0x3du, 0x02u, 0xf0u,
0xb5u, 0xffu, 0x02u, 0x28u, 0x06u, 0xd0u, 0x00u, 0x2du, 0xf8u, 0xd1u, 0x66u, 0x4cu, 0x7cu, 0x60u, 0x2eu, 0xe6u,
0x65u, 0x4du, 0xf4u, 0xe7u, 0x00u, 0x2du, 0xf8u, 0xd0u, 0x00u, 0x26u, 0x62u, 0x4cu, 0x09u, 0xe0u, 0x01u, 0x3du,
0x03u, 0xf0u, 0x30u, 0xf9u, 0x00u, 0x28u, 0x01u, 0xd0u, 0x01u, 0xf0u, 0x89u, 0xf8u, 0x00u, 0x2du, 0xf6u, 0xd1u,
0x01u, 0x36u, 0x58u, 0x4bu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x9eu, 0x42u, 0xe6u, 0xd8u, 0x01u, 0x23u,
0xb3u, 0x40u, 0x9bu, 0xb2u, 0x01u, 0x93u, 0x51u, 0x4bu, 0x01u, 0x9au, 0x1bu, 0x88u, 0x13u, 0x42u, 0xefu, 0xd0u,
0x02u, 0x21u, 0x30u, 0x00u, 0x03u, 0xf0u, 0x88u, 0xf8u, 0x00u, 0x2eu, 0xe1u, 0xd0u, 0x30u, 0x00u, 0x03u, 0xf0u,
0x3bu, 0xfau, 0x00u, 0x28u, 0x01u, 0xd0u, 0x01u, 0xf0u, 0x79u, 0xf8u, 0x00u, 0x2du, 0xe0u, 0xd0u, 0x01u, 0x3du,
0xf4u, 0xe7u, 0xc0u, 0x20u, 0x80u, 0x05u, 0x01u, 0x43u, 0x99u, 0x50u, 0xd9u, 0xe7u, 0x01u, 0x3cu, 0x03u, 0xf0u,
0x01u, 0xf9u, 0x00u, 0x28u, 0x04u, 0xd1u, 0x00u, 0x2cu, 0xf8u, 0xd1u, 0xbeu, 0xe7u, 0x46u, 0x4cu, 0xf6u, 0xe7u,
0x00u, 0x2cu, 0xbau, 0xd0u, 0xb1u, 0x22u, 0xc0u, 0x23u, 0x40u, 0x49u, 0xd2u, 0x00u, 0x88u, 0x58u, 0x9bu, 0x05u,
0x03u, 0x43u, 0x8bu, 0x50u, 0xa8u, 0xe7u, 0x04u, 0xf0u, 0x6du, 0xfau, 0x00u, 0x23u, 0x7bu, 0x60u, 0xdeu, 0xe5u,
0xb8u, 0x68u, 0x43u, 0x1eu, 0x98u, 0x41u, 0xc0u, 0xb2u, 0x04u, 0xf0u, 0xc6u, 0xfau, 0x00u, 0x23u, 0x7bu, 0x60u,
0xd5u, 0xe5u, 0xbbu, 0x68u, 0x18u, 0x78u, 0x07u, 0x28u, 0x2cu, 0xd8u, 0x59u, 0x78u, 0x04u, 0xf0u, 0x8cu, 0xfau,
0x00u, 0x23u, 0x7bu, 0x60u, 0xcbu, 0xe5u, 0xbau, 0x68u, 0x13u, 0x78u, 0x00u, 0x2bu, 0x22u, 0xd1u, 0x51u, 0x68u,
0xc8u, 0xb2u, 0x0fu, 0x28u, 0x1eu, 0xd8u, 0x01u, 0x24u, 0x8cu, 0x40u, 0x30u, 0x48u, 0x12u, 0x7au, 0x84u, 0x46u,
0x04u, 0x30u, 0xc6u, 0x6fu, 0xb3u, 0x42u, 0x0au, 0xd0u, 0xd8u, 0x00u, 0x60u, 0x44u, 0x05u, 0x68u, 0x25u, 0x42u,
0x1bu, 0xd0u, 0x02u, 0x2au, 0x11u, 0xd0u, 0x03u, 0x2au, 0x13u, 0xd0u, 0x00u, 0x2au, 0x07u, 0xd0u, 0x00u, 0x23u,
0x00u, 0x20u, 0x7bu, 0x60u, 0x04u, 0xf0u, 0xbau, 0xf9u, 0x00u, 0x28u, 0x03u, 0xd1u, 0xa7u, 0xe5u, 0x43u, 0x68u,
0xdbu, 0x07u, 0xf4u, 0xd4u, 0x22u, 0x4bu, 0x7bu, 0x60u, 0xa1u, 0xe5u, 0x43u, 0x68u, 0x13u, 0x42u, 0xeeu, 0xd1u,
0xf8u, 0xe7u, 0x43u, 0x68u, 0x5bu, 0x07u, 0xeau, 0xd4u, 0xf4u, 0xe7u, 0x01u, 0x33u, 0xdau, 0xe7u, 0x02u, 0x29u,
0x0au, 0xd0u, 0x03u, 0x29u, 0x0fu, 0xd0u, 0x00u, 0x29u, 0x0bu, 0xd1u, 0xd8u, 0x00u, 0x10u, 0x18u, 0x40u, 0x68u,
0x30u, 0x42u, 0x06u, 0xd1u, 0x16u, 0x48u, 0x8cu, 0xe6u, 0xd8u, 0x00u, 0x10u, 0x18u, 0x40u, 0x68u, 0x08u, 0x42u,
0xf8u, 0xd0u, 0x01u, 0x33u, 0x81u, 0xe6u, 0xd8u, 0x00u, 0x10u, 0x18u, 0x40u, 0x68u, 0x28u, 0x42u, 0xf8u, 0xd1u,
0xf0u, 0xe7u, 0xbbu, 0x68u, 0x1au, 0x89u, 0x18u, 0x88u, 0x59u, 0x68u, 0x03u, 0xf0u, 0xc3u, 0xfau, 0x78u, 0x60u,
0x75u, 0xe5u, 0xb8u, 0x68u, 0x03u, 0xf0u, 0x74u, 0xfbu, 0x78u, 0x60u, 0x70u, 0xe5u, 0x44u, 0x06u, 0x02u, 0x08u,
0x46u, 0x06u, 0x02u, 0x08u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xffu, 0xffu, 0xffu, 0xcfu, 0x00u, 0x00u, 0x26u, 0x40u,
0xfcu, 0x05u, 0x00u, 0x00u, 0xfau, 0x0fu, 0x1au, 0x01u, 0x40u, 0x42u, 0x0fu, 0x00u, 0x94u, 0x0fu, 0x02u, 0x08u,
0xfeu, 0x0fu, 0x1au, 0x01u, 0xadu, 0x4bu, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u, 0xbbu, 0xffu,
0x78u, 0x88u, 0x08u, 0x38u, 0x63u, 0x28u, 0x00u, 0xd9u, 0x1fu, 0xe6u, 0x04u, 0xf0u, 0x89u, 0xfdu, 0xdbu, 0x00u,
0xecu, 0x00u, 0x00u, 0x01u, 0x28u, 0x01u, 0x3bu, 0x01u, 0x57u, 0x01u, 0x6du, 0x01u, 0x81u, 0x01u, 0x1eu, 0xfeu,
0x95u, 0x01u, 0xa9u, 0x01u, 0xbdu, 0x01u, 0xddu, 0x01u, 0x2cu, 0x02u, 0x7bu, 0x02u, 0x51u, 0x03u, 0x08u, 0x04u,
0x25u, 0x04u, 0x42u, 0x04u, 0x5fu, 0x04u, 0x7bu, 0x04u, 0x97u, 0x04u, 0xabu, 0x04u, 0xbfu, 0x04u, 0xf1u, 0x04u,
0x0du, 0x05u, 0x21u, 0x05u, 0x35u, 0x05u, 0x52u, 0x05u, 0x66u, 0x05u, 0x7au, 0x05u, 0x9fu, 0x06u, 0xcau, 0x06u,
0xfdu, 0x06u, 0x32u, 0x07u, 0x8eu, 0x07u, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0xabu, 0x07u, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu,
0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x1eu, 0xfeu, 0x64u, 0x00u,
0x87u, 0x00u, 0xaau, 0x00u, 0xc2u, 0x00u, 0x01u, 0x22u, 0x75u, 0x4cu, 0x23u, 0x79u, 0x65u, 0x78u, 0x01u, 0x93u,
0xbbu, 0x68u, 0xe1u, 0x1cu, 0xdbu, 0xb2u, 0x26u, 0x78u, 0x62u, 0x70u, 0x22u, 0x70u, 0xcbu, 0x77u, 0x00u, 0x2bu,
0x11u, 0xd1u, 0x22u, 0x71u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x00u, 0xd1u, 0x0cu, 0xe5u, 0x20u, 0x00u, 0x01u, 0xf0u,
0xf3u, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u, 0xd1u, 0xe4u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x26u, 0x70u,
0x65u, 0x70u, 0x23u, 0x71u, 0xcbu, 0xe4u, 0x00u, 0x23u, 0x23u, 0x71u, 0xebu, 0xe7u, 0x01u, 0x21u, 0x00u, 0x22u,
0x63u, 0x4cu, 0x23u, 0x79u, 0x65u, 0x78u, 0x01u, 0x93u, 0xbbu, 0x68u, 0x20u, 0x1du, 0xdbu, 0xb2u, 0x26u, 0x78u,
0x62u, 0x70u, 0x21u, 0x70u, 0xc3u, 0x77u, 0x02u, 0x2bu, 0x11u, 0xd1u, 0x21u, 0x71u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x00u, 0xd1u, 0xe8u, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u, 0xcfu, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u,
0xadu, 0xe4u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x26u, 0x70u, 0x65u, 0x70u, 0x23u, 0x71u, 0xa7u, 0xe4u, 0x22u, 0x71u,
0xecu, 0xe7u, 0x53u, 0x4cu, 0x23u, 0x78u, 0x65u, 0x1du, 0x01u, 0x93u, 0x01u, 0x23u, 0xeeu, 0x7fu, 0x23u, 0x70u,
0xebu, 0x77u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x00u, 0xd1u, 0xcdu, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u, 0xb4u, 0xfau,
0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u, 0x92u, 0xe4u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0xeeu, 0x77u, 0x23u, 0x70u,
0x8du, 0xe4u, 0x47u, 0x4cu, 0x65u, 0x1du, 0xebu, 0x7fu, 0x26u, 0x78u, 0x01u, 0x93u, 0x01u, 0x23u, 0x23u, 0x70u,
0x00u, 0x23u, 0xebu, 0x77u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x00u, 0xd1u, 0xb4u, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u,
0x9bu, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u, 0x79u, 0xe4u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x26u, 0x70u,
0xebu, 0x77u, 0x74u, 0xe4u, 0x00u, 0x23u, 0x3au, 0x4cu, 0x65u, 0x79u, 0x63u, 0x71u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x00u, 0xd1u, 0xa0u, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u, 0x87u, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u,
0x65u, 0xe4u, 0x65u, 0x71u, 0x63u, 0xe4u, 0x00u, 0x23u, 0x31u, 0x4cu, 0xa5u, 0x6eu, 0x66u, 0x7au, 0xa3u, 0x66u,
0x63u, 0x72u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x00u, 0xd1u, 0x8du, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u, 0x74u, 0xfau,
0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u, 0x52u, 0xe4u, 0x66u, 0x72u, 0xa5u, 0x66u, 0x4fu, 0xe4u, 0xbbu, 0x68u,
0x00u, 0x2bu, 0x20u, 0xd0u, 0x27u, 0x4au, 0x12u, 0x68u, 0x3fu, 0x32u, 0x12u, 0x78u, 0x93u, 0x42u, 0x1au, 0xd8u,
0x00u, 0x22u, 0x23u, 0x4cu, 0x01u, 0x2bu, 0x11u, 0xd1u, 0xa5u, 0x7au, 0xa2u, 0x72u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x00u, 0xd1u, 0x70u, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u, 0x57u, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x00u, 0xd1u,
0x35u, 0xe4u, 0xbbu, 0x68u, 0x01u, 0x2bu, 0x04u, 0xd1u, 0xa5u, 0x72u, 0x30u, 0xe4u, 0xe5u, 0x7au, 0xe2u, 0x72u,
0xecu, 0xe7u, 0xe5u, 0x72u, 0x2bu, 0xe4u, 0x18u, 0x4bu, 0x7bu, 0x60u, 0xffu, 0xf7u, 0x28u, 0xfcu, 0x01u, 0x23u,
0x13u, 0x4cu, 0xe5u, 0x79u, 0xe3u, 0x71u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x00u, 0xd1u, 0x53u, 0xe4u, 0x20u, 0x00u,
0x01u, 0xf0u, 0x3au, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x18u, 0xfcu, 0xe5u, 0x71u,
0xffu, 0xf7u, 0x15u, 0xfcu, 0x00u, 0x23u, 0x0au, 0x4cu, 0xe5u, 0x79u, 0xe3u, 0x71u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x00u, 0xd1u, 0x40u, 0xe4u, 0x20u, 0x00u, 0x01u, 0xf0u, 0x27u, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u,
0xffu, 0xf7u, 0x05u, 0xfcu, 0xe5u, 0x71u, 0xffu, 0xf7u, 0x02u, 0xfcu, 0xc0u, 0x46u, 0x38u, 0x07u, 0x02u, 0x08u,
0x48u, 0x06u, 0x02u, 0x08u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xbdu, 0x0fu, 0x1au, 0x01u, 0xcfu, 0x48u, 0xbbu, 0x68u,
0x04u, 0x00u, 0x5au, 0x1eu, 0x93u, 0x41u, 0x55u, 0x34u, 0x25u, 0x78u, 0x23u, 0x70u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x00u, 0xd1u, 0x20u, 0xe4u, 0x01u, 0xf0u, 0x08u, 0xfau, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u,
0xe6u, 0xfbu, 0x25u, 0x70u, 0xffu, 0xf7u, 0xe3u, 0xfbu, 0x01u, 0x23u, 0xc4u, 0x48u, 0x44u, 0x1cu, 0xe5u, 0x7fu,
0xe3u, 0x77u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x0du, 0xfcu, 0x01u, 0xf0u, 0xf4u, 0xf9u,
0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xd2u, 0xfbu, 0xe5u, 0x77u, 0xffu, 0xf7u, 0xcfu, 0xfbu,
0x00u, 0x23u, 0xbau, 0x48u, 0x44u, 0x1cu, 0xe5u, 0x7fu, 0xe3u, 0x77u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u,
0xffu, 0xf7u, 0xf9u, 0xfbu, 0x01u, 0xf0u, 0xe0u, 0xf9u, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u,
0xbeu, 0xfbu, 0xe5u, 0x77u, 0xffu, 0xf7u, 0xbbu, 0xfbu, 0x01u, 0x23u, 0xb0u, 0x4cu, 0x25u, 0x7au, 0x23u, 0x72u,
0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xe6u, 0xfbu, 0x20u, 0x00u, 0x01u, 0xf0u, 0xccu, 0xf9u,
0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xaau, 0xfbu, 0x25u, 0x72u, 0xffu, 0xf7u, 0xa7u, 0xfbu,
0x00u, 0x23u, 0xa6u, 0x4cu, 0x25u, 0x7au, 0x23u, 0x72u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u,
0xd2u, 0xfbu, 0x20u, 0x00u, 0x01u, 0xf0u, 0xb8u, 0xf9u, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u,
0x96u, 0xfbu, 0x25u, 0x72u, 0xffu, 0xf7u, 0x93u, 0xfbu, 0xbbu, 0x68u, 0x9cu, 0x48u, 0xdbu, 0xb2u, 0x04u, 0x00u,
0x01u, 0x3bu, 0x5au, 0x42u, 0x53u, 0x41u, 0x56u, 0x34u, 0x25u, 0x78u, 0x23u, 0x70u, 0x00u, 0x23u, 0x7bu, 0x60u,
0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x82u, 0xfbu, 0x03u, 0x7au, 0x00u, 0x2bu, 0x01u, 0xd1u,
0xffu, 0xf7u, 0x7du, 0xfbu, 0x01u, 0xf0u, 0x98u, 0xf9u, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u,
0x76u, 0xfbu, 0x25u, 0x70u, 0xffu, 0xf7u, 0x73u, 0xfbu, 0x00u, 0x24u, 0xb8u, 0x68u, 0x7cu, 0x60u, 0x05u, 0x28u,
0x34u, 0xd8u, 0x8au, 0x4bu, 0x01u, 0x22u, 0x04u, 0xf0u, 0x99u, 0xfbu, 0x03u, 0x22u, 0x25u, 0x28u, 0x2bu, 0x2eu,
0x5cu, 0x7du, 0x5au, 0x75u, 0x7bu, 0x68u, 0x00u, 0x2bu, 0x01u, 0xd0u, 0xffu, 0xf7u, 0x60u, 0xfbu, 0xfbu, 0x68u,
0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x5bu, 0xfbu, 0x80u, 0x4du, 0x28u, 0x00u, 0x01u, 0xf0u, 0x74u, 0xf9u,
0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x52u, 0xfbu, 0xb8u, 0x68u, 0x05u, 0x28u, 0x01u, 0xd9u,
0xffu, 0xf7u, 0x4du, 0xfbu, 0x04u, 0xf0u, 0x7au, 0xfbu, 0x15u, 0x18u, 0x1bu, 0x1eu, 0x21u, 0x24u, 0x9cu, 0x7du,
0x9au, 0x75u, 0xdfu, 0xe7u, 0xdcu, 0x7du, 0xdau, 0x75u, 0xdcu, 0xe7u, 0x1cu, 0x7eu, 0x1au, 0x76u, 0xd9u, 0xe7u,
0x5cu, 0x7eu, 0x5au, 0x76u, 0xd6u, 0xe7u, 0x9cu, 0x7eu, 0x9au, 0x76u, 0xd3u, 0xe7u, 0x70u, 0x4bu, 0x7bu, 0x60u,
0xd0u, 0xe7u, 0x6cu, 0x75u, 0xffu, 0xf7u, 0x33u, 0xfbu, 0xacu, 0x75u, 0xffu, 0xf7u, 0x30u, 0xfbu, 0xecu, 0x75u,
0xffu, 0xf7u, 0x2du, 0xfbu, 0x2cu, 0x76u, 0xffu, 0xf7u, 0x2au, 0xfbu, 0x6cu, 0x76u, 0xffu, 0xf7u, 0x27u, 0xfbu,
0xacu, 0x76u, 0xffu, 0xf7u, 0x24u, 0xfbu, 0x00u, 0x24u, 0xb8u, 0x68u, 0x7cu, 0x60u, 0x05u, 0x28u, 0x34u, 0xd8u,
0x22u, 0x00u, 0x62u, 0x4bu, 0x04u, 0xf0u, 0x4au, 0xfbu, 0x03u, 0x22u, 0x25u, 0x28u, 0x2bu, 0x2eu, 0x5cu, 0x7du,
0x5au, 0x75u, 0x7bu, 0x68u, 0x00u, 0x2bu, 0x01u, 0xd0u, 0xffu, 0xf7u, 0x11u, 0xfbu, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x0cu, 0xfbu, 0x59u, 0x4du, 0x28u, 0x00u, 0x01u, 0xf0u, 0x25u, 0xf9u, 0x78u, 0x60u,
0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x03u, 0xfbu, 0xb8u, 0x68u, 0x05u, 0x28u, 0x01u, 0xd9u, 0xffu, 0xf7u,
0xfeu, 0xfau, 0x04u, 0xf0u, 0x2bu, 0xfbu, 0x15u, 0x18u, 0x1bu, 0x1eu, 0x21u, 0x24u, 0x9cu, 0x7du, 0x9au, 0x75u,
0xdfu, 0xe7u, 0xdcu, 0x7du, 0xdau, 0x75u, 0xdcu, 0xe7u, 0x1cu, 0x7eu, 0x1au, 0x76u, 0xd9u, 0xe7u, 0x5cu, 0x7eu,
0x5au, 0x76u, 0xd6u, 0xe7u, 0x9cu, 0x7eu, 0x9au, 0x76u, 0xd3u, 0xe7u, 0x49u, 0x4bu, 0x7bu, 0x60u, 0xd0u, 0xe7u,
0x6cu, 0x75u, 0xffu, 0xf7u, 0xe4u, 0xfau, 0xacu, 0x75u, 0xffu, 0xf7u, 0xe1u, 0xfau, 0xecu, 0x75u, 0xffu, 0xf7u,
0xdeu, 0xfau, 0x2cu, 0x76u, 0xffu, 0xf7u, 0xdbu, 0xfau, 0x6cu, 0x76u, 0xffu, 0xf7u, 0xd8u, 0xfau, 0xacu, 0x76u,
0xffu, 0xf7u, 0xd5u, 0xfau, 0x00u, 0x22u, 0xbbu, 0x68u, 0x7au, 0x60u, 0x18u, 0x68u, 0x05u, 0x28u, 0x00u, 0xd9u,
0xa6u, 0xe0u, 0x3au, 0x4cu, 0x1bu, 0x79u, 0x22u, 0x00u, 0x04u, 0xf0u, 0xf8u, 0xfau, 0x03u, 0x39u, 0x4bu, 0x5du,
0x7eu, 0x90u, 0xa5u, 0x32u, 0x16u, 0x78u, 0x13u, 0x70u, 0x36u, 0x4au, 0x18u, 0x00u, 0x15u, 0x68u, 0x62u, 0x7du,
0xa6u, 0x34u, 0x01u, 0x92u, 0x03u, 0xf0u, 0x84u, 0xf9u, 0x23u, 0x78u, 0x33u, 0x49u, 0xd8u, 0x40u, 0x04u, 0xf0u,
0x03u, 0xfbu, 0x30u, 0x4bu, 0x18u, 0x60u, 0x7bu, 0x68u, 0x00u, 0x2bu, 0x01u, 0xd0u, 0xffu, 0xf7u, 0xafu, 0xfau,
0x01u, 0x9bu, 0x00u, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xaau, 0xfau, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u,
0xffu, 0xf7u, 0xa5u, 0xfau, 0x25u, 0x4cu, 0x20u, 0x00u, 0x01u, 0xf0u, 0xbeu, 0xf8u, 0x78u, 0x60u, 0x00u, 0x28u,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x9cu, 0xfau, 0xbbu, 0x68u, 0x18u, 0x68u, 0x05u, 0x28u, 0x01u, 0xd9u, 0xffu, 0xf7u,
0x96u, 0xfau, 0x23u, 0x00u, 0x04u, 0xf0u, 0xc2u, 0xfau, 0x70u, 0x76u, 0x7cu, 0x82u, 0x88u, 0x8eu, 0xacu, 0x32u,
0x16u, 0x78u, 0x13u, 0x70u, 0x1du, 0x4au, 0x18u, 0x00u, 0x15u, 0x68u, 0xa2u, 0x7du, 0xadu, 0x34u, 0x01u, 0x92u,
0x03u, 0xf0u, 0x4eu, 0xf9u, 0x23u, 0x78u, 0x18u, 0x49u, 0xd8u, 0x40u, 0x04u, 0xf0u, 0xcdu, 0xfau, 0x17u, 0x4bu,
0xc8u, 0xe7u, 0xb4u, 0x32u, 0x16u, 0x78u, 0x13u, 0x70u, 0x15u, 0x4au, 0x18u, 0x00u, 0x15u, 0x68u, 0xe2u, 0x7du,
0xb5u, 0x34u, 0x01u, 0x92u, 0x03u, 0xf0u, 0x3cu, 0xf9u, 0x23u, 0x78u, 0x0fu, 0x49u, 0xd8u, 0x40u, 0x04u, 0xf0u,
0xbbu, 0xfau, 0x0fu, 0x4bu, 0xb6u, 0xe7u, 0xbcu, 0x32u, 0x16u, 0x78u, 0x13u, 0x70u, 0x0du, 0x4au, 0x18u, 0x00u,
0x15u, 0x68u, 0x22u, 0x7eu, 0xbdu, 0x34u, 0x01u, 0x92u, 0x03u, 0xf0u, 0x2au, 0xf9u, 0x23u, 0x78u, 0x06u, 0x49u,
0xd8u, 0x40u, 0x04u, 0xf0u, 0xa9u, 0xfau, 0x07u, 0x4bu, 0xa4u, 0xe7u, 0xc0u, 0x46u, 0x48u, 0x06u, 0x02u, 0x08u,
0xffu, 0x0fu, 0x1au, 0x01u, 0xf0u, 0x06u, 0x02u, 0x08u, 0x40u, 0x42u, 0x0fu, 0x00u, 0xf8u, 0x06u, 0x02u, 0x08u,
0x00u, 0x07u, 0x02u, 0x08u, 0x08u, 0x07u, 0x02u, 0x08u, 0xc4u, 0x32u, 0x16u, 0x78u, 0x13u, 0x70u, 0xe9u, 0x4au,
0x18u, 0x00u, 0x15u, 0x68u, 0x62u, 0x7eu, 0xc5u, 0x34u, 0x01u, 0x92u, 0x03u, 0xf0u, 0x09u, 0xf9u, 0x23u, 0x78u,
0xe5u, 0x49u, 0xd8u, 0x40u, 0x04u, 0xf0u, 0x88u, 0xfau, 0xe2u, 0x4bu, 0x83u, 0xe7u, 0xccu, 0x32u, 0x16u, 0x78u,
0x13u, 0x70u, 0xe2u, 0x4au, 0x18u, 0x00u, 0x15u, 0x68u, 0xa2u, 0x7eu, 0xcdu, 0x34u, 0x01u, 0x92u, 0x03u, 0xf0u,
0xf7u, 0xf8u, 0x23u, 0x78u, 0xdcu, 0x49u, 0xd8u, 0x40u, 0x04u, 0xf0u, 0x76u, 0xfau, 0xdbu, 0x4bu, 0x71u, 0xe7u,
0xdbu, 0x4bu, 0x01u, 0x92u, 0x7bu, 0x60u, 0x6eu, 0xe7u, 0xa5u, 0x33u, 0xa8u, 0x34u, 0x1eu, 0x70u, 0x25u, 0x60u,
0xffu, 0xf7u, 0x1du, 0xfau, 0xacu, 0x33u, 0xb0u, 0x34u, 0x1eu, 0x70u, 0x25u, 0x60u, 0xffu, 0xf7u, 0x17u, 0xfau,
0xb4u, 0x33u, 0xb8u, 0x34u, 0x1eu, 0x70u, 0x25u, 0x60u, 0xffu, 0xf7u, 0x11u, 0xfau, 0xbcu, 0x33u, 0xc0u, 0x34u,
0x1eu, 0x70u, 0x25u, 0x60u, 0xffu, 0xf7u, 0x0bu, 0xfau, 0xc4u, 0x33u, 0xc8u, 0x34u, 0x1eu, 0x70u, 0x25u, 0x60u,
0xffu, 0xf7u, 0x05u, 0xfau, 0xccu, 0x33u, 0xd0u, 0x34u, 0x1eu, 0x70u, 0x25u, 0x60u, 0xffu, 0xf7u, 0xffu, 0xf9u,
0x00u, 0x25u, 0xbau, 0x68u, 0x7du, 0x60u, 0x10u, 0x68u, 0x05u, 0x28u, 0x00u, 0xd9u, 0x82u, 0xe0u, 0xc5u, 0x4bu,
0x12u, 0x79u, 0x04u, 0xf0u, 0x23u, 0xfau, 0x03u, 0x39u, 0x47u, 0x55u, 0x63u, 0x71u, 0x1eu, 0x00u, 0xc2u, 0x49u,
0xa8u, 0x36u, 0x0cu, 0x78u, 0x0au, 0x70u, 0x32u, 0x68u, 0x01u, 0x92u, 0x5du, 0x7du, 0xa5u, 0x33u, 0x18u, 0x78u,
0x03u, 0xf0u, 0xaeu, 0xf8u, 0xbcu, 0x4bu, 0x1bu, 0x78u, 0xb7u, 0x49u, 0xd8u, 0x40u, 0x04u, 0xf0u, 0x2cu, 0xfau,
0x30u, 0x60u, 0x7bu, 0x68u, 0x00u, 0x2bu, 0x01u, 0xd0u, 0xffu, 0xf7u, 0xd9u, 0xf9u, 0x00u, 0x2du, 0x01u, 0xd1u,
0xffu, 0xf7u, 0xd5u, 0xf9u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xd0u, 0xf9u, 0xb1u, 0x4du,
0x28u, 0x00u, 0x00u, 0xf0u, 0xe9u, 0xffu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xc7u, 0xf9u,
0xbbu, 0x68u, 0x18u, 0x68u, 0x05u, 0x28u, 0x01u, 0xd9u, 0xffu, 0xf7u, 0xc1u, 0xf9u, 0x2bu, 0x00u, 0x04u, 0xf0u,
0xedu, 0xf9u, 0x4cu, 0x53u, 0x5au, 0x61u, 0x68u, 0x6fu, 0x1eu, 0x00u, 0xa8u, 0x49u, 0xb0u, 0x36u, 0x0cu, 0x78u,
0x0au, 0x70u, 0x32u, 0x68u, 0x01u, 0x92u, 0x9du, 0x7du, 0xacu, 0x33u, 0x18u, 0x78u, 0x03u, 0xf0u, 0x78u, 0xf8u,
0xa2u, 0x4bu, 0xc8u, 0xe7u, 0x1eu, 0x00u, 0xa2u, 0x49u, 0xb8u, 0x36u, 0x0cu, 0x78u, 0x0au, 0x70u, 0x32u, 0x68u,
0x01u, 0x92u, 0xddu, 0x7du, 0xb4u, 0x33u, 0x18u, 0x78u, 0x03u, 0xf0u, 0x6au, 0xf8u, 0x9cu, 0x4bu, 0xbau, 0xe7u,
0x1eu, 0x00u, 0x9cu, 0x49u, 0xc0u, 0x36u, 0x0cu, 0x78u, 0x0au, 0x70u, 0x32u, 0x68u, 0x01u, 0x92u, 0x1du, 0x7eu,
0xbcu, 0x33u, 0x18u, 0x78u, 0x03u, 0xf0u, 0x5cu, 0xf8u, 0x96u, 0x4bu, 0xacu, 0xe7u, 0x1eu, 0x00u, 0x96u, 0x49u,
0xc8u, 0x36u, 0x0cu, 0x78u, 0x0au, 0x70u, 0x32u, 0x68u, 0x01u, 0x92u, 0x5du, 0x7eu, 0xc4u, 0x33u, 0x18u, 0x78u,
0x03u, 0xf0u, 0x4eu, 0xf8u, 0x90u, 0x4bu, 0x9eu, 0xe7u, 0x1eu, 0x00u, 0x90u, 0x49u, 0xd0u, 0x36u, 0x0cu, 0x78u,
0x0au, 0x70u, 0x32u, 0x68u, 0x01u, 0x92u, 0x9du, 0x7eu, 0xccu, 0x33u, 0x18u, 0x78u, 0x03u, 0xf0u, 0x40u, 0xf8u,
0x8au, 0x4bu, 0x90u, 0xe7u, 0x82u, 0x4bu, 0x7bu, 0x60u, 0x93u, 0xe7u, 0xa6u, 0x33u, 0x1cu, 0x70u, 0x01u, 0x9bu,
0xa8u, 0x35u, 0x2bu, 0x60u, 0xffu, 0xf7u, 0x6bu, 0xf9u, 0xadu, 0x33u, 0x1cu, 0x70u, 0x01u, 0x9bu, 0xb0u, 0x35u,
0x2bu, 0x60u, 0xffu, 0xf7u, 0x64u, 0xf9u, 0xb5u, 0x33u, 0x1cu, 0x70u, 0x01u, 0x9bu, 0xb8u, 0x35u, 0x2bu, 0x60u,
0xffu, 0xf7u, 0x5du, 0xf9u, 0xbdu, 0x33u, 0x1cu, 0x70u, 0x01u, 0x9bu, 0xc0u, 0x35u, 0x2bu, 0x60u, 0xffu, 0xf7u,
0x56u, 0xf9u, 0xc5u, 0x33u, 0x1cu, 0x70u, 0x01u, 0x9bu, 0xc8u, 0x35u, 0x2bu, 0x60u, 0xffu, 0xf7u, 0x4fu, 0xf9u,
0xcdu, 0x33u, 0x1cu, 0x70u, 0x01u, 0x9bu, 0xd0u, 0x35u, 0x2bu, 0x60u, 0xffu, 0xf7u, 0x48u, 0xf9u, 0x6du, 0x4cu,
0x25u, 0x00u, 0xa2u, 0x35u, 0x2bu, 0x78u, 0xa6u, 0x7cu, 0x01u, 0x93u, 0x01u, 0x23u, 0xa3u, 0x74u, 0xbbu, 0x68u,
0x2bu, 0x70u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x6du, 0xf9u, 0x20u, 0x00u, 0x00u, 0xf0u,
0x53u, 0xffu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x31u, 0xf9u, 0x6bu, 0x46u, 0x1bu, 0x79u,
0xa6u, 0x74u, 0x2bu, 0x70u, 0xffu, 0xf7u, 0x2bu, 0xf9u, 0x5eu, 0x4cu, 0x25u, 0x00u, 0xa3u, 0x35u, 0x2bu, 0x78u,
0x01u, 0x93u, 0x01u, 0x23u, 0xe6u, 0x7cu, 0xe3u, 0x74u, 0xbbu, 0x68u, 0x2bu, 0x70u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x50u, 0xf9u, 0x20u, 0x00u, 0x00u, 0xf0u, 0x36u, 0xffu, 0x78u, 0x60u, 0x00u, 0x28u,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x14u, 0xf9u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0xe6u, 0x74u, 0x2bu, 0x70u, 0xffu, 0xf7u,
0x0eu, 0xf9u, 0x50u, 0x4cu, 0x25u, 0x00u, 0xd6u, 0x35u, 0x2bu, 0x78u, 0x26u, 0x7fu, 0x01u, 0x93u, 0x01u, 0x23u,
0x23u, 0x77u, 0xbbu, 0x68u, 0x2bu, 0x70u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x33u, 0xf9u,
0x20u, 0x00u, 0x00u, 0xf0u, 0x19u, 0xffu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xf7u, 0xf8u,
0x6bu, 0x46u, 0x1bu, 0x79u, 0x26u, 0x77u, 0x2bu, 0x70u, 0xffu, 0xf7u, 0xf1u, 0xf8u, 0x41u, 0x48u, 0xbbu, 0x68u,
0x04u, 0x00u, 0xd8u, 0x34u, 0x25u, 0x88u, 0x23u, 0x80u, 0x00u, 0x23u, 0x7bu, 0x60u, 0x83u, 0x7fu, 0x00u, 0x2bu,
0x01u, 0xd1u, 0xffu, 0xf7u, 0xe4u, 0xf8u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xdfu, 0xf8u,
0x00u, 0xf0u, 0xfau, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xd8u, 0xf8u, 0x25u, 0x80u,
0xffu, 0xf7u, 0xd5u, 0xf8u, 0x33u, 0x48u, 0xbbu, 0x68u, 0x04u, 0x00u, 0xdau, 0x34u, 0x25u, 0x78u, 0x23u, 0x70u,
0x00u, 0x23u, 0x7bu, 0x60u, 0x83u, 0x7fu, 0x00u, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xc8u, 0xf8u, 0xfbu, 0x68u,
0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xc3u, 0xf8u, 0x00u, 0xf0u, 0xdeu, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u,
0x01u, 0xd1u, 0xffu, 0xf7u, 0xbcu, 0xf8u, 0x25u, 0x70u, 0xffu, 0xf7u, 0xb9u, 0xf8u, 0x01u, 0x23u, 0x25u, 0x4cu,
0xa5u, 0x7fu, 0xa3u, 0x77u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xe4u, 0xf8u, 0x20u, 0x00u,
0x00u, 0xf0u, 0xcau, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xa8u, 0xf8u, 0xa5u, 0x77u,
0xffu, 0xf7u, 0xa5u, 0xf8u, 0x00u, 0x23u, 0x1bu, 0x4cu, 0xa5u, 0x7fu, 0xa3u, 0x77u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x01u, 0xd1u, 0xffu, 0xf7u, 0xd0u, 0xf8u, 0x20u, 0x00u, 0x00u, 0xf0u, 0xb6u, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x94u, 0xf8u, 0xa5u, 0x77u, 0xffu, 0xf7u, 0x91u, 0xf8u, 0x11u, 0x48u, 0xbbu, 0x68u,
0x04u, 0x00u, 0xd4u, 0x34u, 0x25u, 0x78u, 0x23u, 0x70u, 0x00u, 0x23u, 0x7bu, 0x60u, 0xc3u, 0x7eu, 0x00u, 0x2bu,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x84u, 0xf8u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x7fu, 0xf8u,
0x00u, 0xf0u, 0x9au, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x78u, 0xf8u, 0x25u, 0x70u,
0xffu, 0xf7u, 0x75u, 0xf8u, 0x10u, 0x07u, 0x02u, 0x08u, 0x40u, 0x42u, 0x0fu, 0x00u, 0x18u, 0x07u, 0x02u, 0x08u,
0xffu, 0x0fu, 0x1au, 0x01u, 0x48u, 0x06u, 0x02u, 0x08u, 0xeeu, 0x06u, 0x02u, 0x08u, 0xf5u, 0x06u, 0x02u, 0x08u,
0xfdu, 0x06u, 0x02u, 0x08u, 0x05u, 0x07u, 0x02u, 0x08u, 0x0du, 0x07u, 0x02u, 0x08u, 0x15u, 0x07u, 0x02u, 0x08u,
0xd2u, 0x48u, 0xbbu, 0x68u, 0x04u, 0x00u, 0xd5u, 0x34u, 0x25u, 0x78u, 0x23u, 0x70u, 0x00u, 0x23u, 0x7bu, 0x60u,
0xc3u, 0x7eu, 0x00u, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x52u, 0xf8u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u,
0xffu, 0xf7u, 0x4du, 0xf8u, 0x00u, 0xf0u, 0x68u, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u,
0x46u, 0xf8u, 0x25u, 0x70u, 0xffu, 0xf7u, 0x43u, 0xf8u, 0x01u, 0x23u, 0xc4u, 0x4cu, 0xe5u, 0x7eu, 0xe3u, 0x76u,
0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x6eu, 0xf8u, 0x20u, 0x00u, 0x00u, 0xf0u, 0x54u, 0xfeu,
0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x32u, 0xf8u, 0xe5u, 0x76u, 0xffu, 0xf7u, 0x2fu, 0xf8u,
0x00u, 0x23u, 0xbau, 0x4cu, 0xe5u, 0x7eu, 0xe3u, 0x76u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u,
0x5au, 0xf8u, 0x20u, 0x00u, 0x00u, 0xf0u, 0x40u, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xffu, 0xf7u,
0x1eu, 0xf8u, 0xe5u, 0x76u, 0xffu, 0xf7u, 0x1bu, 0xf8u, 0xb0u, 0x4cu, 0x25u, 0x00u, 0xd7u, 0x35u, 0x2bu, 0x78u,
0x66u, 0x7fu, 0x01u, 0x93u, 0x01u, 0x23u, 0x63u, 0x77u, 0xbbu, 0x68u, 0x2bu, 0x70u, 0xfbu, 0x68u, 0xffu, 0x2bu,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x40u, 0xf8u, 0x20u, 0x00u, 0x00u, 0xf0u, 0x26u, 0xfeu, 0x78u, 0x60u, 0x00u, 0x28u,
0x01u, 0xd1u, 0xffu, 0xf7u, 0x04u, 0xf8u, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x66u, 0x77u, 0x2bu, 0x70u, 0xfeu, 0xf7u,
0xfeu, 0xffu, 0xa2u, 0x4bu, 0x59u, 0x79u, 0x00u, 0x29u, 0x03u, 0xd0u, 0xa1u, 0x4bu, 0x7bu, 0x60u, 0xfeu, 0xf7u,
0xf6u, 0xffu, 0xbau, 0x68u, 0x10u, 0x68u, 0x98u, 0x62u, 0x50u, 0x68u, 0xd8u, 0x62u, 0x90u, 0x68u, 0xd2u, 0x68u,
0x18u, 0x63u, 0x5au, 0x63u, 0x79u, 0x60u, 0xfeu, 0xf7u, 0xeau, 0xffu, 0x01u, 0x23u, 0x97u, 0x4cu, 0x65u, 0x79u,
0x63u, 0x71u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xffu, 0xf7u, 0x15u, 0xf8u, 0x20u, 0x00u, 0x00u, 0xf0u,
0xfbu, 0xfdu, 0x78u, 0x60u, 0x00u, 0x28u, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0xd9u, 0xffu, 0x65u, 0x71u, 0xfeu, 0xf7u,
0xd6u, 0xffu, 0x00u, 0x25u, 0xbau, 0x68u, 0x7du, 0x60u, 0x10u, 0x68u, 0x05u, 0x28u, 0x4cu, 0xd8u, 0x8bu, 0x4bu,
0x03u, 0xf0u, 0xfcu, 0xffu, 0x03u, 0x27u, 0x2eu, 0x35u, 0x3cu, 0x43u, 0x19u, 0x00u, 0x01u, 0x20u, 0x96u, 0x31u,
0x1eu, 0x7bu, 0x0du, 0x88u, 0x18u, 0x73u, 0x93u, 0x88u, 0x0bu, 0x80u, 0x7bu, 0x68u, 0x00u, 0x2bu, 0x01u, 0xd0u,
0xfeu, 0xf7u, 0xbdu, 0xffu, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0xb8u, 0xffu, 0x7fu, 0x4cu,
0x20u, 0x00u, 0x00u, 0xf0u, 0xd1u, 0xfdu, 0xbbu, 0x68u, 0x78u, 0x60u, 0x00u, 0x28u, 0x4eu, 0xd0u, 0x18u, 0x68u,
0x05u, 0x28u, 0x01u, 0xd9u, 0xffu, 0xf7u, 0x79u, 0xf8u, 0x03u, 0xf0u, 0xd8u, 0xffu, 0x2au, 0x2fu, 0x34u, 0x39u,
0x3eu, 0x43u, 0x19u, 0x00u, 0x01u, 0x20u, 0x98u, 0x31u, 0x5eu, 0x7bu, 0x0du, 0x88u, 0x58u, 0x73u, 0xdau, 0xe7u,
0x19u, 0x00u, 0x01u, 0x20u, 0x9au, 0x31u, 0x9eu, 0x7bu, 0x0du, 0x88u, 0x98u, 0x73u, 0xd3u, 0xe7u, 0x19u, 0x00u,
0x01u, 0x20u, 0x9cu, 0x31u, 0xdeu, 0x7bu, 0x0du, 0x88u, 0xd8u, 0x73u, 0xccu, 0xe7u, 0x19u, 0x00u, 0x01u, 0x20u,
0x9eu, 0x31u, 0x1eu, 0x7cu, 0x0du, 0x88u, 0x18u, 0x74u, 0xc5u, 0xe7u, 0x19u, 0x00u, 0x01u, 0x20u, 0xa0u, 0x31u,
0x5eu, 0x7cu, 0x0du, 0x88u, 0x58u, 0x74u, 0xbeu, 0xe7u, 0x66u, 0x4bu, 0x2eu, 0x00u, 0x7bu, 0x60u, 0xbcu, 0xe7u,
0x26u, 0x73u, 0x96u, 0x34u, 0x25u, 0x80u, 0xfeu, 0xf7u, 0x7au, 0xffu, 0x66u, 0x73u, 0x98u, 0x34u, 0x25u, 0x80u,
0xfeu, 0xf7u, 0x75u, 0xffu, 0xa6u, 0x73u, 0x9au, 0x34u, 0x25u, 0x80u, 0xfeu, 0xf7u, 0x70u, 0xffu, 0xe6u, 0x73u,
0x9cu, 0x34u, 0x25u, 0x80u, 0xfeu, 0xf7u, 0x6bu, 0xffu, 0x26u, 0x74u, 0x9eu, 0x34u, 0x25u, 0x80u, 0xfeu, 0xf7u,
0x66u, 0xffu, 0x66u, 0x74u, 0xa0u, 0x34u, 0x25u, 0x80u, 0xfeu, 0xf7u, 0x61u, 0xffu, 0x18u, 0x68u, 0x05u, 0x28u,
0x01u, 0xd9u, 0xfeu, 0xf7u, 0x5cu, 0xffu, 0x03u, 0xf0u, 0x89u, 0xffu, 0x03u, 0x20u, 0x3fu, 0x5fu, 0x75u, 0x8bu,
0x63u, 0x7au, 0x00u, 0x2bu, 0x03u, 0xd0u, 0x20u, 0x00u, 0x00u, 0xf0u, 0xbau, 0xfcu, 0xa0u, 0x66u, 0x23u, 0x00u,
0xa5u, 0x33u, 0x18u, 0x78u, 0x00u, 0x28u, 0x01u, 0xd0u, 0xfeu, 0xf7u, 0x49u, 0xffu, 0x02u, 0xf0u, 0x10u, 0xfeu,
0x23u, 0x00u, 0xa6u, 0x33u, 0x1bu, 0x78u, 0x48u, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u,
0x03u, 0xf0u, 0x8au, 0xffu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0x3au, 0xffu, 0xa3u, 0x7au, 0x00u, 0x2bu, 0x05u, 0xd0u,
0x21u, 0x00u, 0x01u, 0x20u, 0x00u, 0xf0u, 0xbau, 0xfcu, 0x23u, 0x1du, 0xd8u, 0x67u, 0x23u, 0x00u, 0xa5u, 0x33u,
0x18u, 0x78u, 0x01u, 0x28u, 0x01u, 0xd0u, 0xfeu, 0xf7u, 0x2au, 0xffu, 0x02u, 0xf0u, 0xf1u, 0xfdu, 0x23u, 0x00u,
0xa6u, 0x33u, 0x1bu, 0x78u, 0x38u, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u, 0x03u, 0xf0u,
0x6bu, 0xffu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0x1bu, 0xffu, 0xe3u, 0x7au, 0x00u, 0x2bu, 0x06u, 0xd0u, 0x21u, 0x00u,
0x02u, 0x20u, 0x00u, 0xf0u, 0x9bu, 0xfcu, 0x23u, 0x00u, 0x8cu, 0x33u, 0x18u, 0x60u, 0x23u, 0x00u, 0xa5u, 0x33u,
0x18u, 0x78u, 0x02u, 0x28u, 0x01u, 0xd0u, 0xfeu, 0xf7u, 0x0au, 0xffu, 0x02u, 0xf0u, 0xd1u, 0xfdu, 0x23u, 0x00u,
0xa6u, 0x33u, 0x1bu, 0x78u, 0x28u, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u, 0x03u, 0xf0u,
0x4bu, 0xffu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0xfbu, 0xfeu, 0x23u, 0x00u, 0xa5u, 0x33u, 0x18u, 0x78u, 0x03u, 0x28u,
0x01u, 0xd0u, 0xfeu, 0xf7u, 0xf4u, 0xfeu, 0x02u, 0xf0u, 0xbbu, 0xfdu, 0x23u, 0x00u, 0xa6u, 0x33u, 0x1bu, 0x78u,
0x1du, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u, 0x03u, 0xf0u, 0x35u, 0xffu, 0x20u, 0x60u,
0xfeu, 0xf7u, 0xe5u, 0xfeu, 0x23u, 0x00u, 0xa5u, 0x33u, 0x18u, 0x78u, 0x04u, 0x28u, 0x01u, 0xd0u, 0xfeu, 0xf7u,
0xdeu, 0xfeu, 0x02u, 0xf0u, 0xa5u, 0xfdu, 0x23u, 0x00u, 0xa6u, 0x33u, 0x1bu, 0x78u, 0x12u, 0x49u, 0xa8u, 0x34u,
0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u, 0x03u, 0xf0u, 0x1fu, 0xffu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0xcfu, 0xfeu,
0x23u, 0x00u, 0xa5u, 0x33u, 0x18u, 0x78u, 0x05u, 0x28u, 0x01u, 0xd0u, 0xfeu, 0xf7u, 0xc8u, 0xfeu, 0x02u, 0xf0u,
0x8fu, 0xfdu, 0x23u, 0x00u, 0xa6u, 0x33u, 0x1bu, 0x78u, 0x07u, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u,
0x18u, 0x18u, 0x03u, 0xf0u, 0x09u, 0xffu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0xb9u, 0xfeu, 0x48u, 0x06u, 0x02u, 0x08u,
0x59u, 0x0fu, 0x1au, 0x01u, 0xffu, 0x0fu, 0x1au, 0x01u, 0x40u, 0x42u, 0x0fu, 0x00u, 0xbau, 0x68u, 0x9eu, 0x4bu,
0x11u, 0x68u, 0xd9u, 0x66u, 0x19u, 0x00u, 0x90u, 0x88u, 0x70u, 0x31u, 0x08u, 0x80u, 0x19u, 0x00u, 0x90u, 0x79u,
0x72u, 0x31u, 0x08u, 0x70u, 0x19u, 0x00u, 0xd0u, 0x79u, 0x73u, 0x31u, 0x08u, 0x70u, 0x19u, 0x00u, 0x10u, 0x89u,
0x74u, 0x31u, 0x08u, 0x80u, 0x19u, 0x00u, 0x90u, 0x7au, 0x76u, 0x31u, 0x08u, 0x70u, 0x19u, 0x00u, 0xd0u, 0x7au,
0x77u, 0x31u, 0x08u, 0x70u, 0x19u, 0x00u, 0x90u, 0x89u, 0x78u, 0x31u, 0x08u, 0x80u, 0x19u, 0x00u, 0x90u, 0x7bu,
0x7au, 0x31u, 0x08u, 0x70u, 0x12u, 0x8au, 0x7cu, 0x33u, 0x1au, 0x80u, 0x00u, 0x23u, 0x7bu, 0x60u, 0xfeu, 0xf7u,
0x86u, 0xfeu, 0x89u, 0x4cu, 0x65u, 0x7au, 0x00u, 0x2du, 0x03u, 0xd0u, 0x88u, 0x4bu, 0x7bu, 0x60u, 0xfeu, 0xf7u,
0x7eu, 0xfeu, 0x01u, 0x23u, 0x20u, 0x00u, 0x63u, 0x72u, 0x00u, 0xf0u, 0xe2u, 0xfbu, 0xfbu, 0x68u, 0xa0u, 0x66u,
0xffu, 0x2bu, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0xa7u, 0xfeu, 0x20u, 0x00u, 0x00u, 0xf0u, 0x8du, 0xfcu, 0x78u, 0x60u,
0x00u, 0x28u, 0x03u, 0xd0u, 0xa5u, 0x66u, 0x65u, 0x72u, 0xfeu, 0xf7u, 0x69u, 0xfeu, 0x23u, 0x00u, 0xa5u, 0x33u,
0x18u, 0x78u, 0x00u, 0x28u, 0x01u, 0xd0u, 0xfeu, 0xf7u, 0x62u, 0xfeu, 0x02u, 0xf0u, 0x29u, 0xfdu, 0x23u, 0x00u,
0xa6u, 0x33u, 0x1bu, 0x78u, 0x76u, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u, 0x03u, 0xf0u,
0xa3u, 0xfeu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0x53u, 0xfeu, 0xb9u, 0x68u, 0x0au, 0x68u, 0x00u, 0x2au, 0x05u, 0xd0u,
0x70u, 0x4bu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x9au, 0x42u, 0x03u, 0xd9u, 0x6eu, 0x4bu, 0x7bu, 0x60u,
0xfeu, 0xf7u, 0x45u, 0xfeu, 0x4bu, 0x68u, 0x1eu, 0x78u, 0x5du, 0x78u, 0x9cu, 0x78u, 0xd8u, 0x78u, 0x19u, 0x79u,
0x65u, 0x4bu, 0x01u, 0x2au, 0x0fu, 0xd1u, 0x1au, 0x00u, 0x84u, 0x32u, 0x16u, 0x70u, 0x1au, 0x00u, 0x85u, 0x32u,
0x15u, 0x70u, 0x1au, 0x00u, 0x86u, 0x32u, 0x14u, 0x70u, 0x1au, 0x00u, 0x87u, 0x32u, 0x10u, 0x70u, 0x88u, 0x33u,
0x19u, 0x70u, 0xfeu, 0xf7u, 0x60u, 0xfeu, 0x1au, 0x00u, 0x90u, 0x32u, 0x16u, 0x70u, 0x1au, 0x00u, 0x91u, 0x32u,
0x15u, 0x70u, 0x1au, 0x00u, 0x92u, 0x32u, 0x14u, 0x70u, 0x1au, 0x00u, 0x93u, 0x32u, 0x10u, 0x70u, 0x94u, 0x33u,
0xeeu, 0xe7u, 0xbdu, 0x68u, 0x01u, 0x2du, 0x0fu, 0xd1u, 0x53u, 0x4bu, 0x9bu, 0x7au, 0x00u, 0x2bu, 0x07u, 0xd1u,
0x54u, 0x4bu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x9du, 0x42u, 0x01u, 0xd8u, 0x00u, 0x2du, 0x08u, 0xd1u,
0x52u, 0x4bu, 0x7bu, 0x60u, 0xfeu, 0xf7u, 0x0bu, 0xfeu, 0x02u, 0x2du, 0xf1u, 0xd1u, 0x4au, 0x4bu, 0xdbu, 0x7au,
0xecu, 0xe7u, 0x49u, 0x4cu, 0x21u, 0x00u, 0x01u, 0x2du, 0x19u, 0xd1u, 0x28u, 0x00u, 0x00u, 0xf0u, 0x86u, 0xfbu,
0x23u, 0x1du, 0xd8u, 0x67u, 0xa5u, 0x72u, 0xfbu, 0x68u, 0xffu, 0x2bu, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0x2bu, 0xfeu,
0x20u, 0x00u, 0x00u, 0xf0u, 0x11u, 0xfcu, 0x78u, 0x60u, 0x00u, 0x28u, 0x17u, 0xd0u, 0xbau, 0x68u, 0x00u, 0x23u,
0x01u, 0x2au, 0x0du, 0xd1u, 0x22u, 0x1du, 0xd3u, 0x67u, 0xa3u, 0x72u, 0xfeu, 0xf7u, 0xe8u, 0xfdu, 0x02u, 0x20u,
0x00u, 0xf0u, 0x6cu, 0xfbu, 0x23u, 0x00u, 0x8cu, 0x33u, 0x18u, 0x60u, 0x01u, 0x23u, 0xe3u, 0x72u, 0xe2u, 0xe7u,
0x22u, 0x00u, 0x8cu, 0x32u, 0x13u, 0x60u, 0xe3u, 0x72u, 0xfeu, 0xf7u, 0xd9u, 0xfdu, 0x23u, 0x00u, 0xa5u, 0x33u,
0x18u, 0x78u, 0x43u, 0x1eu, 0x01u, 0x2bu, 0x01u, 0xd9u, 0xfeu, 0xf7u, 0xd1u, 0xfdu, 0x02u, 0xf0u, 0x98u, 0xfcu,
0x23u, 0x00u, 0xa6u, 0x33u, 0x1bu, 0x78u, 0x2eu, 0x49u, 0xa8u, 0x34u, 0x99u, 0x40u, 0x4bu, 0x08u, 0x18u, 0x18u,
0x03u, 0xf0u, 0x12u, 0xfeu, 0x20u, 0x60u, 0xfeu, 0xf7u, 0xc2u, 0xfdu, 0x27u, 0x4cu, 0x25u, 0x00u, 0xa4u, 0x35u,
0x2bu, 0x78u, 0x26u, 0x7du, 0x01u, 0x93u, 0x01u, 0x23u, 0x23u, 0x75u, 0xbbu, 0x68u, 0x2bu, 0x70u, 0xfbu, 0x68u,
0xffu, 0x2bu, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0xe7u, 0xfdu, 0x20u, 0x00u, 0x00u, 0xf0u, 0xcdu, 0xfbu, 0x78u, 0x60u,
0x00u, 0x28u, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0xabu, 0xfdu, 0x6bu, 0x46u, 0x1bu, 0x79u, 0x26u, 0x75u, 0x2bu, 0x70u,
0xfeu, 0xf7u, 0xa5u, 0xfdu, 0x01u, 0x22u, 0x18u, 0x4bu, 0x9au, 0x71u, 0xbau, 0x68u, 0x9au, 0x64u, 0x00u, 0x23u,
0x7bu, 0x60u, 0xfeu, 0xf7u, 0x9cu, 0xfdu, 0x1au, 0x4bu, 0x7bu, 0x60u, 0xfeu, 0xf7u, 0x98u, 0xfdu, 0x00u, 0x2du,
0x01u, 0xd1u, 0xfeu, 0xf7u, 0x75u, 0xffu, 0xb1u, 0x22u, 0xc0u, 0x20u, 0x16u, 0x49u, 0xd2u, 0x00u, 0x8bu, 0x58u,
0x80u, 0x05u, 0x03u, 0x43u, 0x8bu, 0x50u, 0x00u, 0x24u, 0xfeu, 0xf7u, 0x6au, 0xffu, 0x00u, 0x2du, 0x01u, 0xd1u,
0xfeu, 0xf7u, 0x66u, 0xffu, 0x10u, 0x4bu, 0x0fu, 0x49u, 0x1cu, 0x88u, 0x01u, 0x9bu, 0x0fu, 0x4au, 0x1cu, 0x40u,
0xb3u, 0x00u, 0x5bu, 0x18u, 0x99u, 0x58u, 0x00u, 0x2cu, 0x01u, 0xd1u, 0xfeu, 0xf7u, 0x7au, 0xffu, 0x0cu, 0x48u,
0x01u, 0x40u, 0x99u, 0x50u, 0xe7u, 0xe7u, 0xc0u, 0x46u, 0x48u, 0x06u, 0x02u, 0x08u, 0x3eu, 0x0fu, 0x1au, 0x01u,
0x40u, 0x42u, 0x0fu, 0x00u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xbdu, 0x0fu, 0x1au, 0x01u, 0x2du, 0x0fu, 0x1au, 0x01u,
0xffu, 0x0fu, 0x1au, 0x01u, 0x00u, 0x00u, 0x26u, 0x40u, 0x46u, 0x06u, 0x02u, 0x08u, 0xfcu, 0x05u, 0x00u, 0x00u,
0xffu, 0xffu, 0xffu, 0xcfu, 0xf0u, 0xb5u, 0x15u, 0x4du, 0x87u, 0xb0u, 0x2au, 0x68u, 0x02u, 0xacu, 0x13u, 0x00u,
0xbau, 0x33u, 0x1bu, 0x88u, 0x12u, 0x6au, 0x9bu, 0x00u, 0x9bu, 0x18u, 0xdbu, 0x68u, 0x27u, 0x00u, 0x1eu, 0x00u,
0x01u, 0x93u, 0x0eu, 0xceu, 0x0eu, 0xc7u, 0x33u, 0x68u, 0x20u, 0x00u, 0x3bu, 0x60u, 0xfeu, 0xf7u, 0x1eu, 0xfdu,
0x01u, 0x9bu, 0x07u, 0xccu, 0x07u, 0xc3u, 0x85u, 0x21u, 0x80u, 0x20u, 0x3bu, 0x68u, 0x49u, 0x01u, 0x33u, 0x60u,
0x2bu, 0x68u, 0x40u, 0x03u, 0x1au, 0x6au, 0xbau, 0x33u, 0x50u, 0x50u, 0x18u, 0x88u, 0x51u, 0x58u, 0x80u, 0x00u,
0x80u, 0x18u, 0x00u, 0x21u, 0xfeu, 0xf7u, 0xf8u, 0xf9u, 0x07u, 0xb0u, 0xf0u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u,
0x73u, 0xb5u, 0x93u, 0x22u, 0x00u, 0x20u, 0x35u, 0x4bu, 0xd1u, 0x00u, 0x35u, 0x4cu, 0x59u, 0x1au, 0x09u, 0x19u,
0x01u, 0x3au, 0x08u, 0x60u, 0x00u, 0x2au, 0xf7u, 0xd1u, 0x32u, 0x49u, 0x19u, 0x60u, 0x32u, 0x49u, 0x99u, 0x60u,
0x32u, 0x49u, 0x19u, 0x61u, 0x32u, 0x49u, 0x99u, 0x61u, 0x32u, 0x49u, 0x19u, 0x62u, 0x32u, 0x49u, 0x99u, 0x62u,
0x32u, 0x49u, 0x19u, 0x63u, 0x32u, 0x49u, 0x99u, 0x63u, 0x32u, 0x49u, 0x19u, 0x64u, 0x32u, 0x49u, 0x09u, 0x68u,
0x08u, 0x00u, 0x40u, 0x30u, 0x00u, 0x78u, 0x04u, 0x28u, 0x00u, 0xd9u, 0x30u, 0x4au, 0x9au, 0x64u, 0x00u, 0x22u,
0x05u, 0x28u, 0x00u, 0xd9u, 0x2eu, 0x4au, 0x1au, 0x65u, 0x4au, 0x68u, 0x01u, 0x24u, 0x10u, 0x00u, 0x08u, 0x30u,
0x98u, 0x65u, 0x2cu, 0x48u, 0x64u, 0x42u, 0x18u, 0x66u, 0x2bu, 0x48u, 0xdcu, 0x67u, 0x58u, 0x66u, 0x2bu, 0x48u,
0x98u, 0x66u, 0x2bu, 0x48u, 0x18u, 0x67u, 0x2bu, 0x48u, 0x12u, 0x18u, 0x9au, 0x67u, 0x00u, 0x22u, 0x15u, 0x00u,
0x98u, 0x18u, 0x06u, 0x00u, 0x08u, 0x32u, 0x80u, 0x36u, 0x84u, 0x30u, 0x35u, 0x60u, 0x04u, 0x60u, 0x80u, 0x2au,
0xf6u, 0xd1u, 0x85u, 0x22u, 0x24u, 0x4bu, 0x52u, 0x01u, 0x04u, 0x33u, 0xddu, 0x67u, 0x0bu, 0x6au, 0x68u, 0x46u,
0x9bu, 0x18u, 0x80u, 0x22u, 0x52u, 0x03u, 0x9au, 0x60u, 0x04u, 0x23u, 0x6au, 0x46u, 0x13u, 0x80u, 0x0bu, 0x8fu,
0x1eu, 0x49u, 0x05u, 0x33u, 0x53u, 0x80u, 0x01u, 0x95u, 0x02u, 0xf0u, 0x24u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u,
0x01u, 0xbeu, 0x6bu, 0x46u, 0x00u, 0x22u, 0x9bu, 0x5eu, 0x00u, 0x2bu, 0x06u, 0xdbu, 0x1fu, 0x22u, 0x13u, 0x40u,
0x1eu, 0x3au, 0x9au, 0x40u, 0x13u, 0x00u, 0x16u, 0x4au, 0x13u, 0x60u, 0x73u, 0xbdu, 0xfcu, 0x0au, 0x02u, 0x08u,
0x9cu, 0x04u, 0x00u, 0x00u, 0x08u, 0x00u, 0x26u, 0x40u, 0x00u, 0x07u, 0x26u, 0x40u, 0x04u, 0x07u, 0x26u, 0x40u,
0x08u, 0x07u, 0x26u, 0x40u, 0x10u, 0x07u, 0x26u, 0x40u, 0x84u, 0x03u, 0x26u, 0x40u, 0x88u, 0x03u, 0x26u, 0x40u,
0x8cu, 0x03u, 0x26u, 0x40u, 0x90u, 0x03u, 0x26u, 0x40u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x94u, 0x03u, 0x26u, 0x40u,
0x98u, 0x03u, 0x26u, 0x40u, 0x04u, 0x00u, 0x26u, 0x40u, 0x00u, 0xffu, 0x03u, 0xf0u, 0x48u, 0x05u, 0x26u, 0x40u,
0x44u, 0x05u, 0x26u, 0x40u, 0x60u, 0xf0u, 0x00u, 0x00u, 0x94u, 0x0fu, 0x02u, 0x08u, 0xd5u, 0x3cu, 0x00u, 0x10u,
0x00u, 0xe1u, 0x00u, 0xe0u, 0x10u, 0xb5u, 0x24u, 0x4cu, 0x23u, 0x68u, 0x00u, 0x2bu, 0x43u, 0xd0u, 0x1au, 0x78u,
0x00u, 0x2au, 0x0au, 0xd0u, 0xdau, 0x68u, 0x99u, 0x68u, 0x20u, 0x20u, 0xfeu, 0xf7u, 0xbdu, 0xfbu, 0x23u, 0x68u,
0x89u, 0x20u, 0xdau, 0x68u, 0x99u, 0x68u, 0xfeu, 0xf7u, 0x8bu, 0xfbu, 0x23u, 0x68u, 0x5au, 0x78u, 0x00u, 0x2au,
0x16u, 0xd0u, 0x9au, 0x6au, 0x19u, 0x6au, 0x35u, 0x20u, 0xfeu, 0xf7u, 0xaeu, 0xfbu, 0x23u, 0x68u, 0x4au, 0x20u,
0xdau, 0x6au, 0x59u, 0x6au, 0xfeu, 0xf7u, 0xa8u, 0xfbu, 0x23u, 0x68u, 0x8bu, 0x20u, 0x9au, 0x6au, 0x19u, 0x6au,
0xfeu, 0xf7u, 0x76u, 0xfbu, 0x23u, 0x68u, 0x8du, 0x20u, 0xdau, 0x6au, 0x59u, 0x6au, 0xfeu, 0xf7u, 0x70u, 0xfbu,
0x23u, 0x68u, 0x9au, 0x78u, 0x00u, 0x2au, 0x16u, 0xd0u, 0x9au, 0x6bu, 0x19u, 0x6bu, 0x5fu, 0x20u, 0xfeu, 0xf7u,
0x93u, 0xfbu, 0x23u, 0x68u, 0x74u, 0x20u, 0xdau, 0x6bu, 0x59u, 0x6bu, 0xfeu, 0xf7u, 0x8du, 0xfbu, 0x23u, 0x68u,
0x8fu, 0x20u, 0x9au, 0x6bu, 0x19u, 0x6bu, 0xfeu, 0xf7u, 0x5bu, 0xfbu, 0x23u, 0x68u, 0x91u, 0x20u, 0xdau, 0x6bu,
0x59u, 0x6bu, 0xfeu, 0xf7u, 0x55u, 0xfbu, 0x10u, 0xbdu, 0x3cu, 0x07u, 0x02u, 0x08u, 0x1fu, 0xb5u, 0x6cu, 0x46u,
0x20u, 0x80u, 0x0du, 0x4cu, 0x02u, 0x92u, 0x01u, 0x94u, 0x6cu, 0x46u, 0x61u, 0x80u, 0x07u, 0x28u, 0x07u, 0xd1u,
0xffu, 0x23u, 0x68u, 0x46u, 0x03u, 0x93u, 0xfeu, 0xf7u, 0x11u, 0xfcu, 0x00u, 0x20u, 0x04u, 0xb0u, 0x10u, 0xbdu,
0x05u, 0x28u, 0x07u, 0xd1u, 0x00u, 0x29u, 0x05u, 0xd1u, 0x68u, 0x46u, 0x03u, 0x93u, 0xfeu, 0xf7u, 0x06u, 0xfcu,
0x01u, 0x98u, 0xf3u, 0xe7u, 0x01u, 0x48u, 0xf1u, 0xe7u, 0xfcu, 0x0fu, 0x18u, 0x01u, 0xffu, 0x0fu, 0x1au, 0x01u,
0x02u, 0x28u, 0x17u, 0xd0u, 0x06u, 0xd8u, 0x00u, 0x28u, 0x27u, 0xd0u, 0x01u, 0x28u, 0x10u, 0xd0u, 0x02u, 0x20u,
0x40u, 0x42u, 0x0cu, 0xe0u, 0x12u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x0du, 0xd0u, 0x14u, 0x23u, 0xffu, 0x33u,
0x98u, 0x42u, 0x0cu, 0xd0u, 0x03u, 0x3bu, 0x98u, 0x42u, 0xf1u, 0xd1u, 0xfau, 0x20u, 0xc0u, 0x01u, 0x70u, 0x47u,
0x88u, 0x6cu, 0xfcu, 0xe7u, 0x88u, 0x6au, 0xfau, 0xe7u, 0x80u, 0x20u, 0x00u, 0x02u, 0xf7u, 0xe7u, 0x08u, 0x4bu,
0x1bu, 0x68u, 0x41u, 0x33u, 0x18u, 0x78u, 0x01u, 0x38u, 0x43u, 0x1eu, 0x98u, 0x41u, 0x05u, 0x4bu, 0x40u, 0x42u,
0x18u, 0x40u, 0x80u, 0x23u, 0x1bu, 0x02u, 0xc0u, 0x18u, 0xe9u, 0xe7u, 0x03u, 0x48u, 0xe7u, 0xe7u, 0xc0u, 0x46u,
0xf8u, 0x0au, 0x02u, 0x08u, 0xfeu, 0x7fu, 0xffu, 0xffu, 0x00u, 0x12u, 0x7au, 0x00u, 0x02u, 0x23u, 0x5bu, 0x42u,
0x10u, 0xb5u, 0x13u, 0x60u, 0x31u, 0x4bu, 0x14u, 0x00u, 0x1bu, 0x68u, 0x1au, 0x00u, 0x3eu, 0x32u, 0x12u, 0x78u,
0x82u, 0x42u, 0x58u, 0xd9u, 0x05u, 0x28u, 0x56u, 0xd8u, 0x03u, 0xf0u, 0x10u, 0xfcu, 0x03u, 0x19u, 0x2eu, 0x43u,
0x49u, 0x4fu, 0x0bu, 0x7bu, 0x00u, 0x2bu, 0x4eu, 0xd0u, 0x4bu, 0x7au, 0x00u, 0x2bu, 0x08u, 0xd0u, 0x0bu, 0x00u,
0x7au, 0x33u, 0x1bu, 0x78u, 0x02u, 0x2bu, 0x03u, 0xd0u, 0x8bu, 0x6eu, 0x23u, 0x60u, 0x00u, 0x20u, 0x10u, 0xbdu,
0x0bu, 0x00u, 0x96u, 0x33u, 0x18u, 0x88u, 0xffu, 0xf7u, 0xa3u, 0xffu, 0x20u, 0x60u, 0xf6u, 0xe7u, 0x4au, 0x7bu,
0x00u, 0x2au, 0x38u, 0xd0u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x0au, 0xd0u, 0x8bu, 0x7au, 0x00u, 0x2bu,
0x07u, 0xd0u, 0x0bu, 0x00u, 0x88u, 0x33u, 0x1bu, 0x78u, 0x02u, 0x2bu, 0x02u, 0xd0u, 0x04u, 0x31u, 0xcbu, 0x6fu,
0xe3u, 0xe7u, 0x0bu, 0x00u, 0x98u, 0x33u, 0xe5u, 0xe7u, 0x8au, 0x7bu, 0x00u, 0x2au, 0x23u, 0xd0u, 0x3fu, 0x33u,
0x1bu, 0x78u, 0x01u, 0x2bu, 0x0au, 0xd9u, 0xcbu, 0x7au, 0x00u, 0x2bu, 0x07u, 0xd0u, 0x0bu, 0x00u, 0x94u, 0x33u,
0x1bu, 0x78u, 0x02u, 0x2bu, 0x02u, 0xd0u, 0x8cu, 0x31u, 0x0bu, 0x68u, 0xceu, 0xe7u, 0x0bu, 0x00u, 0x9au, 0x33u,
0xd0u, 0xe7u, 0xcbu, 0x7bu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x0bu, 0x00u, 0x9cu, 0x33u, 0xcau, 0xe7u, 0x0bu, 0x7cu,
0x00u, 0x2bu, 0x08u, 0xd0u, 0x0bu, 0x00u, 0x9eu, 0x33u, 0xc4u, 0xe7u, 0x4bu, 0x7cu, 0x00u, 0x2bu, 0x02u, 0xd0u,
0x0bu, 0x00u, 0xa0u, 0x33u, 0xbeu, 0xe7u, 0x02u, 0x48u, 0xb9u, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0xfeu, 0x0fu, 0x1au, 0x01u, 0x19u, 0x4bu, 0x00u, 0xb5u, 0x13u, 0x60u, 0x00u, 0x23u, 0x05u, 0x28u, 0x09u, 0xd8u,
0x03u, 0xf0u, 0xacu, 0xfbu, 0x03u, 0x0au, 0x13u, 0x19u, 0x1fu, 0x25u, 0x00u, 0x23u, 0x08u, 0x7bu, 0x96u, 0x31u,
0x98u, 0x42u, 0x06u, 0xd1u, 0x18u, 0x00u, 0x00u, 0xbdu, 0x00u, 0x23u, 0x48u, 0x7bu, 0x98u, 0x31u, 0x98u, 0x42u,
0xf8u, 0xd0u, 0x0bu, 0x88u, 0x00u, 0x21u, 0x11u, 0x60u, 0xf4u, 0xe7u, 0x00u, 0x23u, 0x88u, 0x7bu, 0x9au, 0x31u,
0x98u, 0x42u, 0xf6u, 0xd1u, 0xeeu, 0xe7u, 0x00u, 0x23u, 0xc8u, 0x7bu, 0x9cu, 0x31u, 0x98u, 0x42u, 0xf0u, 0xd1u,
0xe8u, 0xe7u, 0x00u, 0x23u, 0x08u, 0x7cu, 0x9eu, 0x31u, 0x98u, 0x42u, 0xeau, 0xd1u, 0xe2u, 0xe7u, 0x00u, 0x23u,
0x48u, 0x7cu, 0x98u, 0x42u, 0xdeu, 0xd0u, 0xa0u, 0x31u, 0xe3u, 0xe7u, 0xc0u, 0x46u, 0xfeu, 0x0fu, 0x1au, 0x01u,
0x03u, 0x28u, 0x19u, 0xd0u, 0x04u, 0xd8u, 0x01u, 0x28u, 0x0fu, 0xd0u, 0x28u, 0xd9u, 0x48u, 0x79u, 0x0du, 0xe0u,
0x12u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x14u, 0xd0u, 0x14u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x12u, 0xd0u,
0x03u, 0x3bu, 0x98u, 0x42u, 0x0bu, 0xd0u, 0x0fu, 0x48u, 0x05u, 0xe0u, 0x88u, 0x79u, 0x43u, 0x42u, 0x58u, 0x41u,
0x0cu, 0x4bu, 0x40u, 0x42u, 0x18u, 0x40u, 0x70u, 0x47u, 0x02u, 0x31u, 0xc8u, 0x7fu, 0xf6u, 0xe7u, 0xc8u, 0x79u,
0xf4u, 0xe7u, 0x08u, 0x7au, 0xf2u, 0xe7u, 0x01u, 0x31u, 0xcbu, 0x7fu, 0x00u, 0x2bu, 0xebu, 0xd0u, 0x06u, 0x4bu,
0x1bu, 0x68u, 0x41u, 0x33u, 0x18u, 0x78u, 0x01u, 0x38u, 0x43u, 0x1eu, 0x98u, 0x41u, 0xe8u, 0xe7u, 0x00u, 0x20u,
0xe9u, 0xe7u, 0xc0u, 0x46u, 0xfeu, 0x0fu, 0x1au, 0x01u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x10u, 0xb5u, 0x1bu, 0x4bu,
0x1bu, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x2du, 0xd9u, 0x05u, 0x28u, 0x2bu, 0xd8u, 0x03u, 0xf0u,
0x3du, 0xfbu, 0x03u, 0x0cu, 0x12u, 0x18u, 0x1eu, 0x24u, 0x0bu, 0x7bu, 0x00u, 0x2bu, 0x23u, 0xd0u, 0x0bu, 0x00u,
0x96u, 0x33u, 0x18u, 0x88u, 0xffu, 0xf7u, 0xb4u, 0xffu, 0x10u, 0xbdu, 0x4bu, 0x7bu, 0x00u, 0x2bu, 0x1au, 0xd0u,
0x0bu, 0x00u, 0x98u, 0x33u, 0xf5u, 0xe7u, 0x8bu, 0x7bu, 0x00u, 0x2bu, 0x14u, 0xd0u, 0x0bu, 0x00u, 0x9au, 0x33u,
0xefu, 0xe7u, 0xcbu, 0x7bu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x0bu, 0x00u, 0x9cu, 0x33u, 0xe9u, 0xe7u, 0x0bu, 0x7cu,
0x00u, 0x2bu, 0x08u, 0xd0u, 0x0bu, 0x00u, 0x9eu, 0x33u, 0xe3u, 0xe7u, 0x4bu, 0x7cu, 0x00u, 0x2bu, 0x02u, 0xd0u,
0x0bu, 0x00u, 0xa0u, 0x33u, 0xddu, 0xe7u, 0x02u, 0x48u, 0xdeu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0xfeu, 0x0fu, 0x1au, 0x01u, 0x03u, 0x00u, 0xa8u, 0x33u, 0x1bu, 0x68u, 0x10u, 0xb5u, 0x04u, 0x00u, 0x00u, 0x2bu,
0x02u, 0xd0u, 0x08u, 0x48u, 0x58u, 0x43u, 0x10u, 0xbdu, 0x03u, 0x00u, 0xa5u, 0x33u, 0x18u, 0x78u, 0x02u, 0xf0u,
0x97u, 0xf9u, 0x02u, 0x00u, 0x01u, 0x20u, 0xa6u, 0x34u, 0x23u, 0x78u, 0x98u, 0x40u, 0x40u, 0x08u, 0x80u, 0x18u,
0xd8u, 0x40u, 0xf0u, 0xe7u, 0x40u, 0x42u, 0x0fu, 0x00u, 0x10u, 0xb5u, 0x04u, 0x00u, 0x01u, 0xf0u, 0x2eu, 0xffu,
0x00u, 0x28u, 0x01u, 0xd0u, 0x04u, 0x48u, 0x10u, 0xbdu, 0x04u, 0x49u, 0x20u, 0x00u, 0x01u, 0xf0u, 0xaau, 0xffu,
0x00u, 0x28u, 0xf8u, 0xd0u, 0xf6u, 0xe7u, 0xc0u, 0x46u, 0xfdu, 0x0fu, 0x1au, 0x01u, 0x10u, 0x27u, 0x00u, 0x00u,
0x70u, 0xb5u, 0x04u, 0x00u, 0x15u, 0x00u, 0x01u, 0xf0u, 0xbfu, 0xfau, 0x00u, 0x28u, 0x01u, 0xd0u, 0x07u, 0x48u,
0x70u, 0xbdu, 0x29u, 0x00u, 0x20u, 0x00u, 0x01u, 0xf0u, 0xe9u, 0xfau, 0x00u, 0x28u, 0xf7u, 0xd1u, 0x20u, 0x00u,
0x01u, 0xf0u, 0x5cu, 0xfau, 0x00u, 0x28u, 0xf3u, 0xd0u, 0xf1u, 0xe7u, 0xc0u, 0x46u, 0xfdu, 0x0fu, 0x1au, 0x01u,
0x03u, 0x00u, 0x10u, 0xb5u, 0x04u, 0x00u, 0x96u, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x68u, 0xfeu,
0x03u, 0x00u, 0x00u, 0x20u, 0x9au, 0x1cu, 0x0fu, 0xd0u, 0x22u, 0x00u, 0x70u, 0x32u, 0x11u, 0x88u, 0x81u, 0x42u,
0x0au, 0xd0u, 0xe0u, 0x6eu, 0x73u, 0x34u, 0x58u, 0x43u, 0x03u, 0xf0u, 0xceu, 0xfau, 0x21u, 0x78u, 0x4bu, 0x1eu,
0x99u, 0x41u, 0x01u, 0x31u, 0x03u, 0xf0u, 0xc8u, 0xfau, 0x10u, 0xbdu, 0x00u, 0x00u, 0x70u, 0xb5u, 0x00u, 0x25u,
0x0cu, 0x00u, 0xa8u, 0x42u, 0x21u, 0xd0u, 0x1bu, 0x4bu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u,
0x1bu, 0xd3u, 0x01u, 0x28u, 0x1bu, 0xd1u, 0x0bu, 0x00u, 0x98u, 0x33u, 0x18u, 0x88u, 0xffu, 0xf7u, 0x40u, 0xfeu,
0x23u, 0x00u, 0x22u, 0x00u, 0x84u, 0x33u, 0x85u, 0x32u, 0x1bu, 0x78u, 0x11u, 0x78u, 0x86u, 0x34u, 0x25u, 0x78u,
0x82u, 0x1cu, 0x1bu, 0xd0u, 0x00u, 0x29u, 0x1bu, 0xd0u, 0x00u, 0x2du, 0x06u, 0xd0u, 0x58u, 0x43u, 0x03u, 0xf0u,
0xa3u, 0xfau, 0x29u, 0x00u, 0x03u, 0xf0u, 0xa0u, 0xfau, 0x05u, 0x00u, 0x28u, 0x00u, 0x70u, 0xbdu, 0x02u, 0x28u,
0xfbu, 0xd1u, 0x0bu, 0x00u, 0x9au, 0x33u, 0x18u, 0x88u, 0xffu, 0xf7u, 0x22u, 0xfeu, 0x23u, 0x00u, 0x22u, 0x00u,
0x90u, 0x33u, 0x91u, 0x32u, 0x1bu, 0x78u, 0x11u, 0x78u, 0x92u, 0x34u, 0xe0u, 0xe7u, 0x00u, 0x25u, 0xecu, 0xe7u,
0x0du, 0x00u, 0xeau, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xf8u, 0xb5u, 0x04u, 0x00u, 0x0fu, 0x00u, 0x01u, 0x29u,
0x32u, 0xd1u, 0x03u, 0x00u, 0x81u, 0x7au, 0x42u, 0x7bu, 0x04u, 0x30u, 0x98u, 0x33u, 0xc6u, 0x6fu, 0x83u, 0x30u,
0x1bu, 0x88u, 0x05u, 0x78u, 0x00u, 0x20u, 0x81u, 0x42u, 0x25u, 0xd0u, 0x82u, 0x42u, 0x31u, 0xd0u, 0x18u, 0x00u,
0x21u, 0x00u, 0xffu, 0xf7u, 0xfdu, 0xfdu, 0x18u, 0x4bu, 0xc0u, 0x18u, 0x18u, 0x4bu, 0x98u, 0x42u, 0x28u, 0xd8u,
0x6bu, 0x1eu, 0x9du, 0x41u, 0x16u, 0x4bu, 0x6du, 0x42u, 0x1du, 0x40u, 0x16u, 0x4bu, 0xedu, 0x18u, 0x23u, 0x79u,
0x00u, 0x2bu, 0x1au, 0xd0u, 0xaeu, 0x42u, 0x1cu, 0xd3u, 0x13u, 0x4bu, 0x9eu, 0x42u, 0x19u, 0xd8u, 0x21u, 0x00u,
0x38u, 0x00u, 0xffu, 0xf7u, 0x93u, 0xffu, 0x30u, 0x1au, 0x46u, 0x42u, 0x70u, 0x41u, 0x0fu, 0x4eu, 0x40u, 0x42u,
0x0fu, 0x4bu, 0x30u, 0x40u, 0xc0u, 0x18u, 0xf8u, 0xbdu, 0x03u, 0x00u, 0xc1u, 0x7au, 0x82u, 0x7bu, 0x9au, 0x33u,
0x8cu, 0x30u, 0x1bu, 0x88u, 0x06u, 0x68u, 0xc5u, 0x79u, 0xccu, 0xe7u, 0xaeu, 0x42u, 0x01u, 0xd3u, 0x09u, 0x4bu,
0xe3u, 0xe7u, 0x07u, 0x48u, 0xefu, 0xe7u, 0xc0u, 0x46u, 0x00u, 0xf7u, 0xc2u, 0xffu, 0x00u, 0x87u, 0x93u, 0x03u,
0xc8u, 0x63u, 0xe3u, 0xffu, 0x20u, 0xbcu, 0xbeu, 0x00u, 0x80u, 0xf0u, 0xfau, 0x02u, 0x02u, 0xf0u, 0xe5u, 0xfeu,
0xfeu, 0x0fu, 0x1au, 0x01u, 0x80u, 0xd1u, 0xf0u, 0x08u, 0xf0u, 0xb5u, 0x04u, 0x00u, 0x8bu, 0xb0u, 0x00u, 0x28u,
0x01u, 0xd1u, 0x00u, 0xf0u, 0xd2u, 0xffu, 0x07u, 0x00u, 0x40u, 0x4eu, 0xa5u, 0x37u, 0x33u, 0x68u, 0x38u, 0x78u,
0x3eu, 0x33u, 0x1bu, 0x78u, 0x98u, 0x42u, 0x07u, 0xd3u, 0x00u, 0x20u, 0x3du, 0x4bu, 0x05u, 0x93u, 0x05u, 0x9du,
0x00u, 0x2du, 0x06u, 0xd0u, 0x3bu, 0x4du, 0x6eu, 0xe0u, 0x05u, 0xaau, 0x21u, 0x00u, 0xffu, 0xf7u, 0x42u, 0xfeu,
0xf5u, 0xe7u, 0x02u, 0x28u, 0x20u, 0xd0u, 0x12u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x45u, 0xd0u, 0x01u, 0x28u,
0x00u, 0xd0u, 0x71u, 0xe0u, 0x34u, 0x4bu, 0x1bu, 0x68u, 0x00u, 0x2bu, 0x13u, 0xd0u, 0x1au, 0x78u, 0x00u, 0x2au,
0x10u, 0xd0u, 0x5au, 0x68u, 0xa1u, 0x6cu, 0x8au, 0x42u, 0x0cu, 0xd1u, 0x9au, 0x68u, 0xe1u, 0x6cu, 0x8au, 0x42u,
0x08u, 0xd1u, 0xdbu, 0x68u, 0x22u, 0x6du, 0x93u, 0x42u, 0x04u, 0xd1u, 0x23u, 0x00u, 0x54u, 0x33u, 0x1bu, 0x78u,
0x10u, 0x2bu, 0x59u, 0xd0u, 0x29u, 0x4du, 0x46u, 0xe0u, 0x27u, 0x4bu, 0x1bu, 0x68u, 0x00u, 0x2bu, 0x22u, 0xd0u,
0x5au, 0x78u, 0x00u, 0x2au, 0x1fu, 0xd0u, 0x1au, 0x69u, 0xa1u, 0x6au, 0x8au, 0x42u, 0x1bu, 0xd1u, 0x5au, 0x69u,
0xe1u, 0x6au, 0x8au, 0x42u, 0x17u, 0xd1u, 0x9au, 0x69u, 0x21u, 0x6bu, 0x8au, 0x42u, 0x13u, 0xd1u, 0xdau, 0x69u,
0x61u, 0x6bu, 0x8au, 0x42u, 0x0fu, 0xd1u, 0x1au, 0x6au, 0xa1u, 0x6bu, 0x8au, 0x42u, 0x0bu, 0xd1u, 0x5au, 0x6au,
0xe1u, 0x6bu, 0x8au, 0x42u, 0x07u, 0xd1u, 0x9au, 0x6au, 0x21u, 0x6cu, 0x8au, 0x42u, 0x03u, 0xd1u, 0xdbu, 0x6au,
0x62u, 0x6cu, 0x93u, 0x42u, 0x30u, 0xd0u, 0x16u, 0x4du, 0x1du, 0xe0u, 0x13u, 0x4bu, 0x1bu, 0x68u, 0x00u, 0x2bu,
0x18u, 0xd0u, 0x9au, 0x78u, 0x00u, 0x2au, 0x15u, 0xd0u, 0x22u, 0x00u, 0x56u, 0x32u, 0xd9u, 0x78u, 0x12u, 0x78u,
0x91u, 0x42u, 0x0fu, 0xd1u, 0x1au, 0x6bu, 0xa1u, 0x6du, 0x8au, 0x42u, 0x0bu, 0xd1u, 0x5au, 0x6bu, 0xe1u, 0x6du,
0x8au, 0x42u, 0x07u, 0xd1u, 0x9au, 0x6bu, 0x21u, 0x6eu, 0x8au, 0x42u, 0x03u, 0xd1u, 0xdbu, 0x6bu, 0x62u, 0x6eu,
0x93u, 0x42u, 0x11u, 0xd0u, 0x07u, 0x4du, 0x28u, 0x00u, 0x0bu, 0xb0u, 0xf0u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u,
0xfeu, 0x0fu, 0x1au, 0x01u, 0x9fu, 0x0fu, 0x1au, 0x01u, 0x3cu, 0x07u, 0x02u, 0x08u, 0x57u, 0x0fu, 0x1au, 0x01u,
0x58u, 0x0fu, 0x1au, 0x01u, 0x56u, 0x0fu, 0x1au, 0x01u, 0x01u, 0xf0u, 0xc8u, 0xfau, 0x02u, 0x28u, 0x1du, 0xd0u,
0x63u, 0x79u, 0x00u, 0x2bu, 0x1au, 0xd0u, 0xd7u, 0x4au, 0xa3u, 0x6au, 0x9bu, 0x18u, 0xd6u, 0x4au, 0x93u, 0x42u,
0x01u, 0xd9u, 0x00u, 0xf0u, 0x35u, 0xffu, 0xe3u, 0x6au, 0x01u, 0x3bu, 0x63u, 0x2bu, 0x01u, 0xd9u, 0x00u, 0xf0u,
0x2fu, 0xffu, 0x23u, 0x6bu, 0xd1u, 0x4au, 0x01u, 0x3bu, 0x93u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x28u, 0xffu,
0x63u, 0x6bu, 0x01u, 0x3bu, 0x93u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x22u, 0xffu, 0xa3u, 0x79u, 0x00u, 0x2bu,
0x0eu, 0xd0u, 0x22u, 0x79u, 0xa3u, 0x6cu, 0x00u, 0x2au, 0x00u, 0xd1u, 0x20u, 0xe2u, 0xc8u, 0x4au, 0x93u, 0x42u,
0x01u, 0xd9u, 0x00u, 0xf0u, 0x18u, 0xffu, 0xe3u, 0x6cu, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u, 0x13u, 0xffu,
0x23u, 0x7bu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x33u, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x09u, 0xd0u,
0x23u, 0x00u, 0x96u, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0xbau, 0xfdu, 0x00u, 0x28u, 0x01u, 0xd0u,
0x00u, 0xf0u, 0x04u, 0xffu, 0x63u, 0x7bu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x33u, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u,
0x01u, 0x2bu, 0x09u, 0xd9u, 0x23u, 0x00u, 0x98u, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0xa8u, 0xfdu,
0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0xf5u, 0xfeu, 0xa3u, 0x7bu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x33u, 0x68u,
0x3eu, 0x33u, 0x1bu, 0x78u, 0x02u, 0x2bu, 0x09u, 0xd9u, 0x23u, 0x00u, 0x9au, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u,
0xffu, 0xf7u, 0x96u, 0xfdu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0xe6u, 0xfeu, 0xe3u, 0x7bu, 0x00u, 0x2bu,
0x0eu, 0xd0u, 0x33u, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x03u, 0x2bu, 0x09u, 0xd9u, 0x23u, 0x00u, 0x9cu, 0x33u,
0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x84u, 0xfdu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0xd7u, 0xfeu,
0x23u, 0x7cu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x33u, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x04u, 0x2bu, 0x09u, 0xd9u,
0x23u, 0x00u, 0x9eu, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x72u, 0xfdu, 0x00u, 0x28u, 0x01u, 0xd0u,
0x00u, 0xf0u, 0xc8u, 0xfeu, 0x63u, 0x7cu, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0x33u, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u,
0x05u, 0x2bu, 0x09u, 0xd9u, 0x23u, 0x00u, 0xa0u, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x60u, 0xfdu,
0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0xb9u, 0xfeu, 0x01u, 0xf0u, 0xacu, 0xfbu, 0x00u, 0x28u, 0x5du, 0xd1u,
0x63u, 0x7au, 0x00u, 0x2bu, 0x5au, 0xd0u, 0x23u, 0x7bu, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u, 0xb0u, 0xfeu,
0x23u, 0x00u, 0x96u, 0x33u, 0x18u, 0x88u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x72u, 0xfcu, 0x85u, 0x4bu, 0xc0u, 0x18u,
0x85u, 0x4bu, 0x98u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0xa3u, 0xfeu, 0x84u, 0x4au, 0xa3u, 0x6eu, 0x9bu, 0x18u,
0x22u, 0x79u, 0x00u, 0x2au, 0x00u, 0xd1u, 0x8cu, 0xe1u, 0x81u, 0x4au, 0x93u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u,
0x97u, 0xfeu, 0xe3u, 0x6eu, 0x7fu, 0x4au, 0x01u, 0x3bu, 0x93u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x90u, 0xfeu,
0x23u, 0x00u, 0x70u, 0x33u, 0x1bu, 0x88u, 0x7cu, 0x4au, 0x01u, 0x3bu, 0x9bu, 0xb2u, 0x93u, 0x42u, 0x01u, 0xd9u,
0x00u, 0xf0u, 0x86u, 0xfeu, 0x23u, 0x00u, 0x72u, 0x33u, 0x1bu, 0x78u, 0x04u, 0x2bu, 0x01u, 0xd9u, 0x00u, 0xf0u,
0x7fu, 0xfeu, 0x23u, 0x00u, 0x74u, 0x33u, 0x75u, 0x4au, 0x1bu, 0x88u, 0x93u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u,
0x77u, 0xfeu, 0x23u, 0x00u, 0x76u, 0x33u, 0x1bu, 0x78u, 0x0fu, 0x2bu, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x70u, 0xfeu,
0x23u, 0x00u, 0x77u, 0x33u, 0x1bu, 0x78u, 0x0fu, 0x2bu, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x69u, 0xfeu, 0x23u, 0x00u,
0x78u, 0x33u, 0x6bu, 0x49u, 0x1bu, 0x88u, 0x8bu, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x61u, 0xfeu, 0x23u, 0x00u,
0x7cu, 0x33u, 0x1bu, 0x88u, 0x93u, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x5au, 0xfeu, 0x33u, 0x68u, 0x3fu, 0x33u,
0x1bu, 0x78u, 0x00u, 0x2bu, 0x13u, 0xd0u, 0xa3u, 0x7au, 0x00u, 0x2bu, 0x10u, 0xd0u, 0x01u, 0x20u, 0x01u, 0xf0u,
0x69u, 0xfcu, 0x00u, 0x28u, 0x0bu, 0xd1u, 0x33u, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x05u, 0xd0u,
0x01u, 0x21u, 0x20u, 0x00u, 0xffu, 0xf7u, 0xf8u, 0xfdu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x59u, 0x4du, 0x33u, 0x68u,
0x3fu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x00u, 0xd8u, 0x3bu, 0xe1u, 0xe3u, 0x7au, 0x00u, 0x2bu, 0x00u, 0xd1u,
0x37u, 0xe1u, 0x00u, 0x2du, 0x00u, 0xd0u, 0xc6u, 0xe6u, 0x02u, 0x20u, 0x01u, 0xf0u, 0x4bu, 0xfcu, 0x00u, 0x28u,
0x00u, 0xd1u, 0x20u, 0xe1u, 0x23u, 0x7fu, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x2eu, 0xe1u, 0x63u, 0x7du, 0x00u, 0x2bu,
0x00u, 0xd1u, 0x47u, 0xe6u, 0x33u, 0x68u, 0x02u, 0x93u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x00u, 0xd1u,
0x40u, 0xe6u, 0x3du, 0x78u, 0x21u, 0x00u, 0x28u, 0x00u, 0xffu, 0xf7u, 0xf0u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u,
0x38u, 0xe6u, 0x02u, 0x9bu, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x9du, 0x42u, 0x00u, 0xd2u, 0x32u, 0xe1u, 0x42u, 0x4bu,
0x04u, 0x93u, 0x04u, 0x9bu, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x2cu, 0xe6u, 0x05u, 0xaau, 0x38u, 0x78u, 0x21u, 0x00u,
0xffu, 0xf7u, 0x04u, 0xfcu, 0x3du, 0x4bu, 0x05u, 0x9au, 0x05u, 0x00u, 0x04u, 0x90u, 0x9au, 0x42u, 0x00u, 0xd8u,
0x20u, 0xe6u, 0x00u, 0x28u, 0x00u, 0xd0u, 0x1du, 0xe6u, 0x23u, 0x00u, 0xa8u, 0x33u, 0x1bu, 0x68u, 0x00u, 0x2bu,
0x00u, 0xd1u, 0x17u, 0xe6u, 0x22u, 0x00u, 0xa6u, 0x32u, 0x11u, 0x78u, 0x35u, 0x4au, 0x35u, 0x4fu, 0x53u, 0x43u,
0x02u, 0x92u, 0xbbu, 0x42u, 0x00u, 0xd9u, 0x0du, 0xe6u, 0x03u, 0x29u, 0x00u, 0xd9u, 0x0au, 0xe6u, 0xa3u, 0x7du,
0x00u, 0x2bu, 0x1du, 0xd0u, 0x33u, 0x68u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x18u, 0xd9u, 0x23u, 0x00u,
0xacu, 0x33u, 0x18u, 0x78u, 0x21u, 0x00u, 0xffu, 0xf7u, 0xb1u, 0xfcu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u,
0xb0u, 0xfcu, 0x23u, 0x00u, 0xadu, 0x33u, 0x1au, 0x78u, 0x03u, 0x33u, 0x1bu, 0x68u, 0x02u, 0x99u, 0x4bu, 0x43u,
0xbbu, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0xa5u, 0xfcu, 0x03u, 0x2au, 0x01u, 0xd9u, 0x00u, 0xf0u, 0xa1u, 0xfcu,
0xe3u, 0x7du, 0x00u, 0x2bu, 0x40u, 0xd0u, 0x33u, 0x68u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x02u, 0x2bu, 0x3bu, 0xd9u,
0x23u, 0x00u, 0xb4u, 0x33u, 0x18u, 0x78u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x90u, 0xfcu, 0x00u, 0x28u, 0x01u, 0xd0u,
0x00u, 0xf0u, 0xbau, 0xfcu, 0x23u, 0x00u, 0xb5u, 0x33u, 0x1au, 0x78u, 0x03u, 0x33u, 0x1bu, 0x68u, 0x02u, 0x99u,
0x4bu, 0x43u, 0xbbu, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u, 0xafu, 0xfcu, 0x03u, 0x2au, 0x01u, 0xd9u, 0x00u, 0xf0u,
0xabu, 0xfcu, 0x21u, 0xe0u, 0x00u, 0xdcu, 0x0bu, 0xffu, 0xc0u, 0xeau, 0x21u, 0x01u, 0xe7u, 0x03u, 0x00u, 0x00u,
0x80u, 0xf0u, 0xfau, 0x02u, 0x18u, 0xfcu, 0xffu, 0xffu, 0x18u, 0xddu, 0xf5u, 0x05u, 0x00u, 0xcau, 0x91u, 0xfeu,
0x80u, 0xbau, 0x8cu, 0x01u, 0xfeu, 0xffu, 0x03u, 0x00u, 0xfeu, 0x1fu, 0x00u, 0x00u, 0xffu, 0x01u, 0x00u, 0x00u,
0xffu, 0x1fu, 0x00u, 0x00u, 0xbfu, 0x0fu, 0x1au, 0x01u, 0xfeu, 0x0fu, 0x1au, 0x01u, 0x3fu, 0x0du, 0x03u, 0x00u,
0x40u, 0x42u, 0x0fu, 0x00u, 0x80u, 0xd1u, 0xf0u, 0x08u, 0x23u, 0x7eu, 0x00u, 0x2bu, 0x1du, 0xd0u, 0x33u, 0x68u,
0x40u, 0x33u, 0x1bu, 0x78u, 0x03u, 0x2bu, 0x18u, 0xd9u, 0x23u, 0x00u, 0xbcu, 0x33u, 0x18u, 0x78u, 0x21u, 0x00u,
0xffu, 0xf7u, 0x4cu, 0xfcu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0x6eu, 0xfcu, 0x23u, 0x00u, 0xbdu, 0x33u,
0x1au, 0x78u, 0x03u, 0x33u, 0x1bu, 0x68u, 0x02u, 0x99u, 0x4bu, 0x43u, 0xbbu, 0x42u, 0x01u, 0xd9u, 0x00u, 0xf0u,
0x63u, 0xfcu, 0x03u, 0x2au, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x5fu, 0xfcu, 0x63u, 0x7eu, 0x00u, 0x2bu, 0x1du, 0xd0u,
0x33u, 0x68u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x04u, 0x2bu, 0x18u, 0xd9u, 0x23u, 0x00u, 0xc4u, 0x33u, 0x18u, 0x78u,
0x21u, 0x00u, 0xffu, 0xf7u, 0x2bu, 0xfcu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0x6au, 0xfcu, 0x23u, 0x00u,
0xc5u, 0x33u, 0x1au, 0x78u, 0x03u, 0x33u, 0x1bu, 0x68u, 0x02u, 0x99u, 0x4bu, 0x43u, 0xbbu, 0x42u, 0x01u, 0xd9u,
0x00u, 0xf0u, 0x5fu, 0xfcu, 0x03u, 0x2au, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x5bu, 0xfcu, 0xa3u, 0x7eu, 0x00u, 0x2bu,
0x1du, 0xd0u, 0x33u, 0x68u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x05u, 0x2bu, 0x18u, 0xd9u, 0x23u, 0x00u, 0xccu, 0x33u,
0x18u, 0x78u, 0x21u, 0x00u, 0xffu, 0xf7u, 0x0au, 0xfcu, 0x00u, 0x28u, 0x01u, 0xd0u, 0x00u, 0xf0u, 0x8au, 0xfcu,
0x23u, 0x00u, 0xcdu, 0x33u, 0x1au, 0x78u, 0x03u, 0x33u, 0x1bu, 0x68u, 0x02u, 0x99u, 0x59u, 0x43u, 0xb9u, 0x42u,
0x01u, 0xd9u, 0x00u, 0xf0u, 0x7fu, 0xfcu, 0x03u, 0x2au, 0x01u, 0xd9u, 0x00u, 0xf0u, 0x7bu, 0xfcu, 0xe3u, 0x7eu,
0x00u, 0x2bu, 0x52u, 0xd1u, 0x63u, 0x7fu, 0x00u, 0x2bu, 0x6fu, 0xd1u, 0xa3u, 0x7cu, 0x00u, 0x2bu, 0x00u, 0xd0u,
0x91u, 0xe0u, 0xe3u, 0x7cu, 0x00u, 0x2bu, 0x00u, 0xd0u, 0xa0u, 0xe0u, 0x9bu, 0x4du, 0xa3u, 0xe5u, 0x9bu, 0x4au,
0xddu, 0xe5u, 0x9bu, 0x4au, 0x71u, 0xe6u, 0x33u, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x06u, 0xd9u,
0x02u, 0x21u, 0x20u, 0x00u, 0xffu, 0xf7u, 0xb8u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd1u, 0xd2u, 0xe6u, 0x95u, 0x4du,
0x91u, 0xe5u, 0x00u, 0x2du, 0x00u, 0xd1u, 0xcdu, 0xe6u, 0x8du, 0xe5u, 0x23u, 0x00u, 0xd6u, 0x33u, 0x1bu, 0x78u,
0x01u, 0x2bu, 0x0au, 0xd0u, 0x00u, 0x2bu, 0x03u, 0xd0u, 0x03u, 0x2bu, 0x08u, 0xd0u, 0x8eu, 0x4du, 0x82u, 0xe5u,
0xe3u, 0x79u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0xc1u, 0xe6u, 0xf8u, 0xe7u, 0x23u, 0x7au, 0xf9u, 0xe7u, 0x63u, 0x1cu,
0xdbu, 0x7fu, 0x00u, 0x2bu, 0xf2u, 0xd0u, 0x33u, 0x68u, 0x41u, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x00u, 0xd1u,
0xb4u, 0xe6u, 0xebu, 0xe7u, 0x04u, 0xaau, 0x21u, 0x00u, 0x28u, 0x00u, 0xffu, 0xf7u, 0x43u, 0xfbu, 0x88u, 0x23u,
0x5bu, 0x00u, 0x98u, 0x42u, 0x00u, 0xd1u, 0xf5u, 0xe4u, 0x14u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x00u, 0xd1u,
0xf0u, 0xe4u, 0x03u, 0x28u, 0x00u, 0xd0u, 0xbcu, 0xe6u, 0xecu, 0xe4u, 0x23u, 0x00u, 0xd4u, 0x33u, 0x1eu, 0x78u,
0x21u, 0x00u, 0x30u, 0x00u, 0xffu, 0xf7u, 0x9au, 0xfbu, 0x00u, 0x28u, 0x14u, 0xd1u, 0x23u, 0x00u, 0xd5u, 0x33u,
0x02u, 0x93u, 0x1bu, 0x78u, 0x04u, 0x2bu, 0x0eu, 0xd8u, 0x05u, 0xaau, 0x21u, 0x00u, 0x30u, 0x00u, 0xffu, 0xf7u,
0xb5u, 0xfau, 0x00u, 0x28u, 0x07u, 0xd1u, 0x02u, 0x9bu, 0x05u, 0x9au, 0x1bu, 0x78u, 0xdau, 0x40u, 0x13u, 0x00u,
0x6eu, 0x4au, 0x93u, 0x42u, 0x8eu, 0xd9u, 0x6eu, 0x4du, 0x3du, 0xe5u, 0x23u, 0x00u, 0xd7u, 0x33u, 0x1bu, 0x78u,
0x00u, 0x2bu, 0x03u, 0xd0u, 0x01u, 0x2bu, 0x05u, 0xd0u, 0x6au, 0x4du, 0x34u, 0xe5u, 0x23u, 0x7au, 0x00u, 0x2bu,
0x83u, 0xd1u, 0xf9u, 0xe7u, 0x23u, 0x7fu, 0x00u, 0x2bu, 0xf6u, 0xd0u, 0x23u, 0x00u, 0xd6u, 0x33u, 0x1bu, 0x78u,
0x01u, 0x2bu, 0xf3u, 0xd0u, 0x00u, 0x2bu, 0x0cu, 0xd0u, 0x03u, 0x2bu, 0xedu, 0xd1u, 0x63u, 0x1cu, 0xdbu, 0x7fu,
0x00u, 0x2bu, 0xe9u, 0xd0u, 0x60u, 0x4bu, 0x1bu, 0x68u, 0x41u, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0xe3u, 0xd1u,
0x6bu, 0xe7u, 0xe3u, 0x79u, 0xe3u, 0xe7u, 0x63u, 0x7du, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x5bu, 0x4du, 0x12u, 0xe5u,
0x20u, 0x00u, 0xffu, 0xf7u, 0x8fu, 0xfbu, 0x23u, 0x00u, 0xa2u, 0x33u, 0x19u, 0x78u, 0x01u, 0x31u, 0x02u, 0xf0u,
0xb3u, 0xfeu, 0x52u, 0x4bu, 0x98u, 0x42u, 0x00u, 0xd8u, 0x5bu, 0xe7u, 0xefu, 0xe7u, 0x63u, 0x7du, 0x00u, 0x2bu,
0x00u, 0xd1u, 0x5au, 0xe7u, 0x20u, 0x00u, 0xffu, 0xf7u, 0x7du, 0xfbu, 0xb8u, 0x42u, 0x00u, 0xd9u, 0x54u, 0xe7u,
0x23u, 0x00u, 0xa3u, 0x33u, 0x02u, 0x93u, 0x19u, 0x78u, 0x01u, 0x31u, 0x02u, 0xf0u, 0x9du, 0xfeu, 0x23u, 0x79u,
0x00u, 0x2bu, 0x0bu, 0xd0u, 0x4au, 0x4bu, 0x98u, 0x42u, 0x00u, 0xd9u, 0x46u, 0xe7u, 0xa3u, 0x7fu, 0x00u, 0x2bu,
0x06u, 0xd1u, 0x23u, 0x7du, 0x00u, 0x2bu, 0x39u, 0xd1u, 0x46u, 0x4du, 0xe4u, 0xe4u, 0x3bu, 0x4bu, 0xf2u, 0xe7u,
0x23u, 0x00u, 0x02u, 0x22u, 0xd8u, 0x33u, 0x1bu, 0x88u, 0xffu, 0x32u, 0x93u, 0x42u, 0x04u, 0xd0u, 0x22u, 0xd8u,
0x00u, 0x2bu, 0x28u, 0xd0u, 0x01u, 0x2bu, 0x24u, 0xd1u, 0x61u, 0x7du, 0x00u, 0x29u, 0x21u, 0xd0u, 0x02u, 0x26u,
0x93u, 0x42u, 0x08u, 0xd0u, 0x3cu, 0x4au, 0xb6u, 0x19u, 0x93u, 0x42u, 0x04u, 0xd0u, 0x3bu, 0x4au, 0x04u, 0x36u,
0x93u, 0x42u, 0x00u, 0xd0u, 0x07u, 0x3eu, 0x20u, 0x00u, 0xffu, 0xf7u, 0x44u, 0xfbu, 0x23u, 0x00u, 0xdau, 0x33u,
0x19u, 0x78u, 0x01u, 0x31u, 0x02u, 0xf0u, 0x68u, 0xfeu, 0x31u, 0x00u, 0x02u, 0xf0u, 0x65u, 0xfeu, 0x2bu, 0x4bu,
0x98u, 0x42u, 0xceu, 0xd9u, 0x05u, 0xe0u, 0x30u, 0x49u, 0x8bu, 0x42u, 0xddu, 0xd0u, 0x2fu, 0x49u, 0x8bu, 0x42u,
0xdau, 0xd0u, 0x2fu, 0x4du, 0xafu, 0xe4u, 0x01u, 0x26u, 0x2eu, 0x48u, 0xe7u, 0xe7u, 0xe3u, 0x7cu, 0x00u, 0x2bu,
0xc2u, 0xd0u, 0x20u, 0x00u, 0xffu, 0xf7u, 0x26u, 0xfbu, 0xb8u, 0x42u, 0x00u, 0xd9u, 0xfdu, 0xe6u, 0x27u, 0x00u,
0xe3u, 0x1cu, 0x03u, 0x93u, 0x02u, 0x9bu, 0xa4u, 0x37u, 0x19u, 0x78u, 0x26u, 0x1du, 0x01u, 0x31u, 0x02u, 0xf0u,
0x43u, 0xfeu, 0x39u, 0x78u, 0x01u, 0x31u, 0x02u, 0xf0u, 0x3fu, 0xfeu, 0x14u, 0x4bu, 0x98u, 0x42u, 0xabu, 0xd8u,
0x96u, 0x21u, 0x00u, 0x20u, 0x01u, 0xf0u, 0xf6u, 0xfdu, 0x23u, 0x78u, 0x00u, 0x2bu, 0x49u, 0xd0u, 0x63u, 0x78u,
0x00u, 0x2bu, 0x10u, 0xd0u, 0xe3u, 0x1cu, 0xd8u, 0x7fu, 0x01u, 0x28u, 0x06u, 0xd9u, 0x63u, 0x1du, 0xdbu, 0x7fu,
0x00u, 0x2bu, 0x33u, 0xd1u, 0x02u, 0xf0u, 0x34u, 0xfbu, 0x32u, 0xe0u, 0x02u, 0xf0u, 0x8fu, 0xfbu, 0x00u, 0x28u,
0xf4u, 0xd0u, 0x15u, 0x4du, 0x77u, 0xe4u, 0xf0u, 0x7fu, 0x02u, 0x28u, 0x01u, 0xd0u, 0x05u, 0x28u, 0xedu, 0xd1u,
0x02u, 0xf0u, 0xe4u, 0xfbu, 0xf3u, 0xe7u, 0xc0u, 0x46u, 0x8cu, 0x0fu, 0x1au, 0x01u, 0x00u, 0xe1u, 0xf5u, 0x05u,
0x00u, 0xabu, 0x87u, 0x04u, 0xbeu, 0x0fu, 0x1au, 0x01u, 0xafu, 0x0fu, 0x1au, 0x01u, 0x00u, 0x84u, 0xd7u, 0x17u,
0x8fu, 0x0fu, 0x1au, 0x01u, 0x8eu, 0x0fu, 0x1au, 0x01u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x8du, 0x0fu, 0x1au, 0x01u,
0x40u, 0x78u, 0x7du, 0x01u, 0x8bu, 0x0fu, 0x1au, 0x01u, 0x01u, 0x02u, 0x00u, 0x00u, 0x01u, 0x03u, 0x00u, 0x00u,
0x89u, 0x0fu, 0x1au, 0x01u, 0x00u, 0x12u, 0x7au, 0x00u, 0x6fu, 0x0fu, 0x1au, 0x01u, 0x02u, 0xf0u, 0xd0u, 0xfau,
0x00u, 0x28u, 0xceu, 0xd1u, 0x02u, 0xf0u, 0x54u, 0xfcu, 0xa3u, 0x78u, 0x00u, 0x2bu, 0x74u, 0xd0u, 0x02u, 0xf0u,
0x2du, 0xfcu, 0xa6u, 0x4bu, 0x1bu, 0x68u, 0x41u, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x09u, 0xd1u, 0x00u, 0xf0u,
0x77u, 0xfeu, 0x63u, 0x1cu, 0xdbu, 0x7fu, 0x00u, 0x28u, 0x69u, 0xd0u, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u,
0x79u, 0xfeu, 0x08u, 0x22u, 0x9eu, 0x4bu, 0x1eu, 0x68u, 0x23u, 0x7au, 0x16u, 0x40u, 0x66u, 0xd0u, 0x00u, 0x2bu,
0x04u, 0xd1u, 0x7bu, 0x20u, 0x01u, 0xf0u, 0x3au, 0xfdu, 0x00u, 0xf0u, 0x1eu, 0xfeu, 0x23u, 0x7fu, 0x00u, 0x2bu,
0x0eu, 0xd0u, 0x23u, 0x00u, 0xd6u, 0x33u, 0x1eu, 0x78u, 0x00u, 0xf0u, 0xf0u, 0xfcu, 0x86u, 0x42u, 0x07u, 0xd0u,
0x02u, 0xf0u, 0x40u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x85u, 0xe3u, 0x30u, 0x00u, 0x00u, 0xf0u, 0xd2u, 0xfcu,
0x00u, 0xf0u, 0xecu, 0xfeu, 0x63u, 0x79u, 0x02u, 0x28u, 0x70u, 0xd1u, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u,
0xd3u, 0xfeu, 0xa3u, 0x79u, 0x00u, 0x2bu, 0x0eu, 0xd0u, 0xe0u, 0x6cu, 0x00u, 0x28u, 0x08u, 0xd0u, 0x23u, 0x00u,
0x54u, 0x33u, 0x1bu, 0x78u, 0x08u, 0x22u, 0x00u, 0x93u, 0x21u, 0x6du, 0x00u, 0x23u, 0xfdu, 0xf7u, 0xf8u, 0xf9u,
0xa0u, 0x6cu, 0x00u, 0xf0u, 0xafu, 0xfeu, 0xa3u, 0x7cu, 0x00u, 0x2bu, 0x04u, 0xd0u, 0x23u, 0x00u, 0xa2u, 0x33u,
0x18u, 0x78u, 0x00u, 0xf0u, 0xf1u, 0xfcu, 0xe3u, 0x7cu, 0x00u, 0x2bu, 0x03u, 0xd0u, 0x02u, 0x9bu, 0x18u, 0x78u,
0x00u, 0xf0u, 0xc6u, 0xfcu, 0x23u, 0x7du, 0x00u, 0x2bu, 0x02u, 0xd0u, 0x38u, 0x78u, 0x00u, 0xf0u, 0x9cu, 0xfbu,
0x26u, 0x00u, 0x12u, 0x22u, 0x96u, 0x36u, 0x33u, 0x88u, 0xffu, 0x32u, 0x93u, 0x42u, 0x7cu, 0xd1u, 0x23u, 0x00u,
0xa5u, 0x33u, 0x19u, 0x78u, 0x00u, 0x29u, 0x77u, 0xd1u, 0x01u, 0x20u, 0x00u, 0xf0u, 0xadu, 0xffu, 0x00u, 0x28u,
0x5eu, 0xd0u, 0x70u, 0x4du, 0xffu, 0xf7u, 0xcfu, 0xfbu, 0x02u, 0xf0u, 0xc8u, 0xfbu, 0x89u, 0xe7u, 0x00u, 0x2bu,
0x97u, 0xd0u, 0x02u, 0xf0u, 0xcdu, 0xfcu, 0x00u, 0xf0u, 0xe7u, 0xfdu, 0x92u, 0xe7u, 0x00u, 0x2bu, 0x9du, 0xd0u,
0x02u, 0xf0u, 0xc6u, 0xfcu, 0xa0u, 0x6du, 0x00u, 0x28u, 0x0fu, 0xd0u, 0xe3u, 0x6du, 0x00u, 0x2bu, 0x0cu, 0xd0u,
0x33u, 0x00u, 0x32u, 0x00u, 0x21u, 0x6eu, 0x00u, 0x96u, 0xfdu, 0xf7u, 0xb2u, 0xf9u, 0x00u, 0x96u, 0x33u, 0x00u,
0x32u, 0x00u, 0x61u, 0x6eu, 0xe0u, 0x6du, 0xfdu, 0xf7u, 0xabu, 0xf9u, 0x23u, 0x00u, 0x56u, 0x33u, 0x18u, 0x78u,
0x00u, 0x28u, 0x00u, 0xd0u, 0x01u, 0x20u, 0x00u, 0xf0u, 0xafu, 0xfdu, 0x5bu, 0x48u, 0x00u, 0xf0u, 0x78u, 0xfdu,
0x00u, 0x28u, 0x00u, 0xd1u, 0x7au, 0xe7u, 0x59u, 0x4du, 0xffu, 0xf7u, 0x9du, 0xfbu, 0x00u, 0x2bu, 0x90u, 0xd0u,
0x02u, 0xf0u, 0x9eu, 0xfcu, 0xa0u, 0x6bu, 0x00u, 0x28u, 0x10u, 0xd0u, 0xe3u, 0x6bu, 0x00u, 0x2bu, 0x0du, 0xd0u,
0x00u, 0x26u, 0x21u, 0x6cu, 0x33u, 0x00u, 0x32u, 0x00u, 0x00u, 0x96u, 0xfdu, 0xf7u, 0x89u, 0xf9u, 0x00u, 0x96u,
0x33u, 0x00u, 0x32u, 0x00u, 0x61u, 0x6cu, 0xe0u, 0x6bu, 0xfdu, 0xf7u, 0x82u, 0xf9u, 0x63u, 0x6bu, 0x22u, 0x6bu,
0xe1u, 0x6au, 0xa0u, 0x6au, 0x00u, 0xf0u, 0x68u, 0xfeu, 0x00u, 0x28u, 0x02u, 0xd0u, 0x48u, 0x4du, 0xffu, 0xf7u,
0x7au, 0xfbu, 0x48u, 0x48u, 0x00u, 0xf0u, 0x0cu, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x69u, 0xe7u, 0xf5u, 0xe7u,
0x01u, 0x21u, 0x00u, 0xf0u, 0xe1u, 0xfcu, 0x00u, 0x28u, 0x0bu, 0xd1u, 0x23u, 0x7bu, 0x00u, 0x2bu, 0x14u, 0xd0u,
0x31u, 0x88u, 0x00u, 0x20u, 0x00u, 0xf0u, 0x40u, 0xffu, 0x00u, 0x28u, 0x0eu, 0xd0u, 0x3eu, 0x4du, 0xffu, 0xf7u,
0x62u, 0xfbu, 0x3eu, 0x4du, 0xffu, 0xf7u, 0x5fu, 0xfbu, 0x23u, 0x00u, 0x98u, 0x33u, 0x19u, 0x88u, 0x01u, 0x20u,
0x00u, 0xf0u, 0x32u, 0xffu, 0x00u, 0x28u, 0xe8u, 0xd0u, 0x83u, 0xe7u, 0xa3u, 0x7bu, 0x00u, 0x2bu, 0x0au, 0xd0u,
0x23u, 0x00u, 0x9au, 0x33u, 0x19u, 0x88u, 0x02u, 0x20u, 0x00u, 0xf0u, 0x26u, 0xffu, 0x00u, 0x28u, 0x02u, 0xd0u,
0x33u, 0x4du, 0xffu, 0xf7u, 0x48u, 0xfbu, 0xe3u, 0x7bu, 0x00u, 0x2bu, 0x1bu, 0xd1u, 0x23u, 0x7cu, 0x00u, 0x2bu,
0x29u, 0xd1u, 0x63u, 0x7cu, 0x00u, 0x2bu, 0x37u, 0xd1u, 0x00u, 0xf0u, 0x9cu, 0xffu, 0x00u, 0x28u, 0x61u, 0xd0u,
0x01u, 0xf0u, 0xcau, 0xfau, 0x07u, 0x00u, 0x20u, 0x00u, 0xffu, 0xf7u, 0xfau, 0xf9u, 0x63u, 0x7au, 0x00u, 0x2bu,
0x01u, 0xd0u, 0x87u, 0x42u, 0x56u, 0xd0u, 0x00u, 0xf0u, 0x9fu, 0xffu, 0x00u, 0x28u, 0x52u, 0xd0u, 0x25u, 0x4du,
0xffu, 0xf7u, 0x29u, 0xfbu, 0x19u, 0x4bu, 0x1bu, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x03u, 0x2bu, 0xddu, 0xd9u,
0x23u, 0x00u, 0x9cu, 0x33u, 0x19u, 0x88u, 0x03u, 0x20u, 0x00u, 0xf0u, 0xf6u, 0xfeu, 0x00u, 0x28u, 0xd5u, 0xd0u,
0x1du, 0x4du, 0xffu, 0xf7u, 0x18u, 0xfbu, 0x11u, 0x4bu, 0x1bu, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x04u, 0x2bu,
0xcfu, 0xd9u, 0x23u, 0x00u, 0x9eu, 0x33u, 0x19u, 0x88u, 0x04u, 0x20u, 0x00u, 0xf0u, 0xe5u, 0xfeu, 0x00u, 0x28u,
0xc7u, 0xd0u, 0x16u, 0x4du, 0xffu, 0xf7u, 0x07u, 0xfbu, 0x08u, 0x4bu, 0x1bu, 0x68u, 0x3eu, 0x33u, 0x1bu, 0x78u,
0x05u, 0x2bu, 0xc1u, 0xd9u, 0x23u, 0x00u, 0xa0u, 0x33u, 0x19u, 0x88u, 0x05u, 0x20u, 0x00u, 0xf0u, 0xd4u, 0xfeu,
0x00u, 0x28u, 0xb9u, 0xd0u, 0x0eu, 0x4du, 0xffu, 0xf7u, 0xf6u, 0xfau, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x27u, 0x40u, 0x4eu, 0x0fu, 0x1au, 0x01u, 0x40u, 0x42u, 0x0fu, 0x00u, 0x5au, 0x0fu, 0x1au, 0x01u,
0x5fu, 0x0fu, 0x1au, 0x01u, 0xb8u, 0x0bu, 0x00u, 0x00u, 0x4fu, 0x0fu, 0x1au, 0x01u, 0x0fu, 0x0fu, 0x1au, 0x01u,
0x4du, 0x0fu, 0x1au, 0x01u, 0x3fu, 0x0fu, 0x1au, 0x01u, 0x4cu, 0x0fu, 0x1au, 0x01u, 0x4bu, 0x0fu, 0x1au, 0x01u,
0x4au, 0x0fu, 0x1au, 0x01u, 0x63u, 0x7au, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x96u, 0xe0u, 0x27u, 0x00u, 0xa5u, 0x37u,
0x39u, 0x78u, 0x00u, 0x20u, 0x00u, 0xf0u, 0x40u, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x69u, 0xe7u, 0x23u, 0x00u,
0xa6u, 0x33u, 0x19u, 0x78u, 0x00u, 0xf0u, 0x6au, 0xfcu, 0x00u, 0x28u, 0x00u, 0xd0u, 0x61u, 0xe7u, 0x12u, 0x22u,
0x33u, 0x88u, 0xffu, 0x32u, 0x93u, 0x42u, 0x00u, 0xd1u, 0xb9u, 0xe0u, 0xc9u, 0x4fu, 0x3bu, 0x68u, 0x3fu, 0x33u,
0x1bu, 0x78u, 0x00u, 0x2bu, 0x5cu, 0xd0u, 0x01u, 0x20u, 0x01u, 0xf0u, 0x3cu, 0xf8u, 0x00u, 0x28u, 0x00u, 0xd0u,
0xbfu, 0xe0u, 0xa3u, 0x7au, 0x00u, 0x2bu, 0x22u, 0xd0u, 0x01u, 0x20u, 0x01u, 0xf0u, 0x33u, 0xf8u, 0x00u, 0x28u,
0x1du, 0xd1u, 0x23u, 0x00u, 0x84u, 0x33u, 0x1bu, 0x78u, 0x05u, 0xaeu, 0x33u, 0x70u, 0x23u, 0x00u, 0x85u, 0x33u,
0x1bu, 0x78u, 0x73u, 0x70u, 0x23u, 0x00u, 0x86u, 0x33u, 0x1bu, 0x78u, 0xb3u, 0x70u, 0x23u, 0x00u, 0x87u, 0x33u,
0x1bu, 0x78u, 0xf3u, 0x70u, 0x23u, 0x00u, 0x88u, 0x33u, 0x1bu, 0x78u, 0x33u, 0x71u, 0x02u, 0xf0u, 0x98u, 0xfbu,
0x31u, 0x00u, 0x01u, 0x20u, 0xffu, 0xf7u, 0x28u, 0xf9u, 0x00u, 0x28u, 0x00u, 0xd0u, 0xafu, 0xe0u, 0x3bu, 0x68u,
0x3fu, 0x33u, 0x1bu, 0x78u, 0x01u, 0x2bu, 0x2bu, 0xd9u, 0x02u, 0x20u, 0x01u, 0xf0u, 0x0bu, 0xf8u, 0x00u, 0x28u,
0x00u, 0xd0u, 0xa7u, 0xe0u, 0xe3u, 0x7au, 0x00u, 0x2bu, 0x22u, 0xd0u, 0x02u, 0x20u, 0x01u, 0xf0u, 0x02u, 0xf8u,
0x00u, 0x28u, 0x1du, 0xd1u, 0x23u, 0x00u, 0x90u, 0x33u, 0x1bu, 0x78u, 0x05u, 0xaeu, 0x33u, 0x70u, 0x23u, 0x00u,
0x91u, 0x33u, 0x1bu, 0x78u, 0x73u, 0x70u, 0x23u, 0x00u, 0x92u, 0x33u, 0x1bu, 0x78u, 0xb3u, 0x70u, 0x23u, 0x00u,
0x93u, 0x33u, 0x1bu, 0x78u, 0xf3u, 0x70u, 0x23u, 0x00u, 0x94u, 0x33u, 0x1bu, 0x78u, 0x33u, 0x71u, 0x02u, 0xf0u,
0x67u, 0xfbu, 0x31u, 0x00u, 0x02u, 0x20u, 0xffu, 0xf7u, 0xf7u, 0xf8u, 0x00u, 0x28u, 0x00u, 0xd0u, 0x97u, 0xe0u,
0x01u, 0x20u, 0x00u, 0xf0u, 0x95u, 0xfbu, 0xa3u, 0x7du, 0x00u, 0x28u, 0x00u, 0xd1u, 0x9cu, 0xe0u, 0x00u, 0x2bu,
0x00u, 0xd1u, 0x90u, 0xe0u, 0x02u, 0x20u, 0x00u, 0xf0u, 0x8bu, 0xfbu, 0xe3u, 0x7du, 0x00u, 0x28u, 0x00u, 0xd0u,
0x9eu, 0xe0u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x9du, 0xe0u, 0x23u, 0x00u, 0xb5u, 0x33u, 0x1au, 0x78u, 0x01u, 0x3bu,
0x19u, 0x78u, 0x02u, 0x20u, 0xffu, 0xf7u, 0xecu, 0xf8u, 0xacu, 0xe0u, 0x00u, 0xf0u, 0x9bu, 0xfeu, 0x00u, 0x28u,
0x00u, 0xd0u, 0x63u, 0xe7u, 0x02u, 0xf0u, 0x3cu, 0xfbu, 0xe3u, 0x6eu, 0x05u, 0xa8u, 0x05u, 0x93u, 0x23u, 0x00u,
0x70u, 0x33u, 0x1bu, 0x88u, 0x83u, 0x80u, 0x23u, 0x00u, 0x72u, 0x33u, 0x1bu, 0x78u, 0x83u, 0x71u, 0x23u, 0x00u,
0x73u, 0x33u, 0x1bu, 0x78u, 0xc3u, 0x71u, 0x23u, 0x00u, 0x74u, 0x33u, 0x1bu, 0x88u, 0x03u, 0x81u, 0x23u, 0x00u,
0x76u, 0x33u, 0x1bu, 0x78u, 0x83u, 0x72u, 0x23u, 0x00u, 0x77u, 0x33u, 0x1bu, 0x78u, 0xc3u, 0x72u, 0x23u, 0x00u,
0x78u, 0x33u, 0x1bu, 0x88u, 0x83u, 0x81u, 0x23u, 0x00u, 0x7au, 0x33u, 0x1bu, 0x78u, 0x83u, 0x73u, 0x23u, 0x00u,
0x7cu, 0x33u, 0x1bu, 0x88u, 0x03u, 0x82u, 0x00u, 0xf0u, 0xa3u, 0xfeu, 0x00u, 0x28u, 0x00u, 0xd0u, 0xdeu, 0xe6u,
0x70u, 0x48u, 0x00u, 0xf0u, 0x2du, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x2fu, 0xe7u, 0xd7u, 0xe6u, 0x3bu, 0x78u,
0x00u, 0x2bu, 0x00u, 0xd0u, 0x41u, 0xe7u, 0x63u, 0x7bu, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x29u, 0xe6u, 0x23u, 0x00u,
0x98u, 0x33u, 0x19u, 0x88u, 0x01u, 0x20u, 0x00u, 0xf0u, 0xcfu, 0xfdu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x34u, 0xe7u,
0x1fu, 0xe6u, 0x01u, 0x20u, 0x01u, 0xf0u, 0xc4u, 0xf9u, 0x21u, 0x00u, 0x06u, 0x00u, 0x01u, 0x20u, 0xffu, 0xf7u,
0xcdu, 0xf8u, 0xa3u, 0x7au, 0x00u, 0x2bu, 0x02u, 0xd0u, 0x86u, 0x42u, 0x00u, 0xd1u, 0x31u, 0xe7u, 0x02u, 0xf0u,
0xe7u, 0xfau, 0x01u, 0x20u, 0x00u, 0xf0u, 0x7au, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x29u, 0xe7u, 0x5au, 0x4du,
0xffu, 0xf7u, 0xd9u, 0xf9u, 0x02u, 0x20u, 0x01u, 0xf0u, 0xabu, 0xf9u, 0x21u, 0x00u, 0x06u, 0x00u, 0x02u, 0x20u,
0xffu, 0xf7u, 0xb4u, 0xf8u, 0xe3u, 0x7au, 0x00u, 0x2bu, 0x02u, 0xd0u, 0x86u, 0x42u, 0x00u, 0xd1u, 0x49u, 0xe7u,
0x02u, 0xf0u, 0xceu, 0xfau, 0x02u, 0x20u, 0x00u, 0xf0u, 0x61u, 0xffu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x41u, 0xe7u,
0x4eu, 0x4du, 0xffu, 0xf7u, 0xc0u, 0xf9u, 0x01u, 0x20u, 0x00u, 0xf0u, 0x0cu, 0xfbu, 0x00u, 0x28u, 0x00u, 0xd1u,
0x68u, 0xe7u, 0x4bu, 0x4du, 0xffu, 0xf7u, 0xb7u, 0xf9u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x62u, 0xe7u, 0x23u, 0x00u,
0xadu, 0x33u, 0x1au, 0x78u, 0x01u, 0x3bu, 0x19u, 0x78u, 0x01u, 0x20u, 0xffu, 0xf7u, 0x59u, 0xf8u, 0xedu, 0xe7u,
0x00u, 0x2bu, 0x14u, 0xd0u, 0x3bu, 0x68u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x03u, 0x2bu, 0x17u, 0xd9u, 0x03u, 0x20u,
0x00u, 0xf0u, 0xdeu, 0xfau, 0x23u, 0x7eu, 0x00u, 0x28u, 0x26u, 0xd0u, 0x00u, 0x2bu, 0x0fu, 0xd1u, 0x03u, 0x20u,
0x00u, 0xf0u, 0xe8u, 0xfau, 0x00u, 0x28u, 0x0au, 0xd0u, 0x3au, 0x4du, 0xffu, 0xf7u, 0x94u, 0xf9u, 0x02u, 0x20u,
0x00u, 0xf0u, 0xe0u, 0xfau, 0x00u, 0x28u, 0xe5u, 0xd0u, 0x37u, 0x4du, 0xffu, 0xf7u, 0x8cu, 0xf9u, 0x3bu, 0x68u,
0x40u, 0x33u, 0x1bu, 0x78u, 0x04u, 0x2bu, 0x1au, 0xd9u, 0x04u, 0x20u, 0x00u, 0xf0u, 0xc1u, 0xfau, 0x63u, 0x7eu,
0x00u, 0x28u, 0x2fu, 0xd0u, 0x00u, 0x2bu, 0x12u, 0xd1u, 0x04u, 0x20u, 0x00u, 0xf0u, 0xcbu, 0xfau, 0x00u, 0x28u,
0x0du, 0xd0u, 0x2eu, 0x4du, 0xffu, 0xf7u, 0x77u, 0xf9u, 0x00u, 0x2bu, 0xe8u, 0xd0u, 0x23u, 0x00u, 0xbdu, 0x33u,
0x1au, 0x78u, 0x01u, 0x3bu, 0x19u, 0x78u, 0x03u, 0x20u, 0xffu, 0xf7u, 0x1au, 0xf8u, 0xd2u, 0xe7u, 0x3bu, 0x68u,
0x40u, 0x33u, 0x1bu, 0x78u, 0x05u, 0x2bu, 0x20u, 0xd8u, 0x00u, 0xf0u, 0x08u, 0xfau, 0xa3u, 0x7fu, 0x00u, 0x28u,
0x48u, 0xd1u, 0x00u, 0x2bu, 0x4au, 0xd0u, 0x23u, 0x00u, 0xd8u, 0x33u, 0x1fu, 0x88u, 0x9eu, 0x78u, 0x00u, 0xf0u,
0x07u, 0xfau, 0x38u, 0x00u, 0x00u, 0xf0u, 0xb4u, 0xf9u, 0x30u, 0x00u, 0x00u, 0xf0u, 0xcbu, 0xf9u, 0x00u, 0xf0u,
0xe1u, 0xf9u, 0x3bu, 0xe0u, 0x00u, 0x2bu, 0xe2u, 0xd0u, 0x23u, 0x00u, 0xc5u, 0x33u, 0x1au, 0x78u, 0x01u, 0x3bu,
0x19u, 0x78u, 0x04u, 0x20u, 0xfeu, 0xf7u, 0xf4u, 0xffu, 0xc9u, 0xe7u, 0x05u, 0x20u, 0x00u, 0xf0u, 0x80u, 0xfau,
0xa3u, 0x7eu, 0x00u, 0x28u, 0x09u, 0xd0u, 0x00u, 0x2bu, 0xd6u, 0xd1u, 0x05u, 0x20u, 0x00u, 0xf0u, 0x8au, 0xfau,
0x00u, 0x28u, 0xd1u, 0xd0u, 0x0eu, 0x4du, 0xffu, 0xf7u, 0x36u, 0xf9u, 0x00u, 0x2bu, 0xccu, 0xd0u, 0x23u, 0x00u,
0xcdu, 0x33u, 0x1au, 0x78u, 0x01u, 0x3bu, 0x19u, 0x78u, 0x05u, 0x20u, 0xfeu, 0xf7u, 0xd9u, 0xffu, 0xefu, 0xe7u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x40u, 0x0du, 0x03u, 0x00u, 0x2fu, 0x0fu, 0x1au, 0x01u, 0x2eu, 0x0fu, 0x1au, 0x01u,
0x9eu, 0x0fu, 0x1au, 0x01u, 0x9cu, 0x0fu, 0x1au, 0x01u, 0x9du, 0x0fu, 0x1au, 0x01u, 0x9bu, 0x0fu, 0x1au, 0x01u,
0x9au, 0x0fu, 0x1au, 0x01u, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u, 0xc2u, 0xf9u, 0x00u, 0xf0u, 0x3au, 0xf9u,
0xe3u, 0x7eu, 0x00u, 0x28u, 0x19u, 0xd0u, 0x00u, 0x2bu, 0x01u, 0xd1u, 0x00u, 0xf0u, 0x3du, 0xf9u, 0x63u, 0x7fu,
0x00u, 0x2bu, 0x04u, 0xd0u, 0x23u, 0x00u, 0xd7u, 0x33u, 0x18u, 0x78u, 0x00u, 0xf0u, 0x49u, 0xf9u, 0x23u, 0x00u,
0x3au, 0x4fu, 0x55u, 0x33u, 0x1eu, 0x78u, 0x3bu, 0x78u, 0xb3u, 0x42u, 0x1bu, 0xd0u, 0x02u, 0xf0u, 0x22u, 0xf9u,
0x00u, 0x28u, 0x13u, 0xd0u, 0x36u, 0x4du, 0xffu, 0xf7u, 0xf6u, 0xf8u, 0x00u, 0x2bu, 0xe7u, 0xd0u, 0x23u, 0x00u,
0xd4u, 0x33u, 0x1fu, 0x78u, 0x5eu, 0x78u, 0x00u, 0xf0u, 0x1fu, 0xf9u, 0x38u, 0x00u, 0x00u, 0xf0u, 0xccu, 0xf8u,
0x30u, 0x00u, 0x00u, 0xf0u, 0xe3u, 0xf8u, 0x00u, 0xf0u, 0xfbu, 0xf8u, 0xd8u, 0xe7u, 0x30u, 0x00u, 0x00u, 0xf0u,
0x85u, 0xfbu, 0x3eu, 0x70u, 0x00u, 0xf0u, 0x5au, 0xfbu, 0xe3u, 0x79u, 0x00u, 0x28u, 0x20u, 0xd0u, 0x00u, 0x2bu,
0x0eu, 0xd1u, 0xa3u, 0x20u, 0x01u, 0xf0u, 0xeau, 0xf9u, 0x00u, 0xf0u, 0x50u, 0xfbu, 0x00u, 0x28u, 0x07u, 0xd0u,
0x02u, 0xf0u, 0xf8u, 0xf8u, 0x00u, 0x28u, 0xd5u, 0xd1u, 0x00u, 0xf0u, 0x52u, 0xfbu, 0x00u, 0x28u, 0xd1u, 0xd1u,
0x23u, 0x78u, 0x00u, 0x2bu, 0x08u, 0xd0u, 0x63u, 0x7du, 0x00u, 0x2bu, 0x05u, 0xd0u, 0x23u, 0x00u, 0xa8u, 0x33u,
0x20u, 0x79u, 0x19u, 0x68u, 0x01u, 0xf0u, 0x26u, 0xfau, 0x02u, 0xf0u, 0xc2u, 0xf9u, 0xffu, 0xf7u, 0xbbu, 0xf8u,
0x00u, 0x2bu, 0xedu, 0xd0u, 0x00u, 0xf0u, 0x32u, 0xfbu, 0x00u, 0x28u, 0xe9u, 0xd1u, 0x02u, 0xf0u, 0xdau, 0xf8u,
0x00u, 0x28u, 0xb7u, 0xd1u, 0x00u, 0xf0u, 0x16u, 0xfbu, 0xe2u, 0xe7u, 0x12u, 0x4du, 0xffu, 0xf7u, 0xabu, 0xf8u,
0x11u, 0x4du, 0xffu, 0xf7u, 0xa8u, 0xf8u, 0x11u, 0x4du, 0xffu, 0xf7u, 0xa5u, 0xf8u, 0x10u, 0x4du, 0xffu, 0xf7u,
0xa2u, 0xf8u, 0x10u, 0x4du, 0xffu, 0xf7u, 0x9fu, 0xf8u, 0x0fu, 0x4du, 0xffu, 0xf7u, 0x9cu, 0xf8u, 0x0fu, 0x4du,
0xffu, 0xf7u, 0x99u, 0xf8u, 0x0eu, 0x4du, 0xffu, 0xf7u, 0x96u, 0xf8u, 0x0eu, 0x4du, 0xffu, 0xf7u, 0x93u, 0xf8u,
0x0du, 0x4du, 0xffu, 0xf7u, 0x90u, 0xf8u, 0x0du, 0x4du, 0xffu, 0xf7u, 0x8du, 0xf8u, 0x40u, 0x07u, 0x02u, 0x08u,
0x5cu, 0x0fu, 0x1au, 0x01u, 0xfeu, 0x0fu, 0x1au, 0x01u, 0xefu, 0x0fu, 0x1au, 0x01u, 0xeeu, 0x0fu, 0x1au, 0x01u,
0xdfu, 0x0fu, 0x1au, 0x01u, 0xdeu, 0x0fu, 0x1au, 0x01u, 0xddu, 0x0fu, 0x1au, 0x01u, 0xdcu, 0x0fu, 0x1au, 0x01u,
0xdbu, 0x0fu, 0x1au, 0x01u, 0xdau, 0x0fu, 0x1au, 0x01u, 0xcfu, 0x0fu, 0x1au, 0x01u, 0x1fu, 0x0fu, 0x1au, 0x01u,
0x70u, 0x47u, 0x70u, 0x47u, 0xf0u, 0x23u, 0x0au, 0x04u, 0x1bu, 0x03u, 0x30u, 0xb5u, 0x1au, 0x40u, 0x0fu, 0x24u,
0x0bu, 0x00u, 0x23u, 0x40u, 0x1au, 0x43u, 0x08u, 0x4bu, 0x1du, 0x68u, 0x83u, 0x02u, 0x28u, 0x69u, 0x1bu, 0x18u,
0x80u, 0x20u, 0xc0u, 0x01u, 0x1au, 0x50u, 0x18u, 0x58u, 0x20u, 0x40u, 0x40u, 0x1au, 0x41u, 0x1eu, 0x88u, 0x41u,
0x02u, 0x49u, 0x40u, 0x42u, 0x08u, 0x40u, 0x30u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u, 0x03u, 0x00u, 0xc2u, 0x00u,
0x04u, 0x4bu, 0x10u, 0x30u, 0x1bu, 0x68u, 0x80u, 0x02u, 0x1bu, 0x69u, 0xc0u, 0x58u, 0x0fu, 0x23u, 0x18u, 0x40u,
0x70u, 0x47u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u,
0x2bu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x52u, 0xfdu, 0x06u, 0x4bu, 0x24u, 0x02u, 0x1bu, 0x68u, 0x1au, 0x00u,
0x88u, 0x32u, 0x12u, 0x68u, 0x1bu, 0x68u, 0x9bu, 0x18u, 0x18u, 0x68u, 0x03u, 0x4au, 0x10u, 0x40u, 0x20u, 0x43u,
0x18u, 0x60u, 0x10u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u, 0xffu, 0x00u, 0xffu, 0xffu, 0x05u, 0x4bu, 0x1bu, 0x68u,
0x1au, 0x00u, 0x88u, 0x32u, 0x1bu, 0x68u, 0x12u, 0x68u, 0x9bu, 0x18u, 0x18u, 0x68u, 0x00u, 0x0au, 0xc0u, 0xb2u,
0x70u, 0x47u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u,
0x1fu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x2au, 0xfdu, 0xa0u, 0x22u, 0xf0u, 0x20u, 0x05u, 0x49u, 0xd2u, 0x00u,
0x00u, 0x01u, 0x24u, 0x02u, 0x8bu, 0x58u, 0x04u, 0x40u, 0x03u, 0x48u, 0x03u, 0x40u, 0x1cu, 0x43u, 0x8cu, 0x50u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0xffu, 0xf0u, 0xffu, 0xffu, 0x10u, 0xb5u, 0x02u, 0x00u,
0x04u, 0x00u, 0x00u, 0x23u, 0x20u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x10u, 0xfdu, 0xa0u, 0x22u, 0xe0u, 0x20u,
0x05u, 0x49u, 0xd2u, 0x00u, 0xc0u, 0x01u, 0x24u, 0x03u, 0x8bu, 0x58u, 0x04u, 0x40u, 0x03u, 0x48u, 0x03u, 0x40u,
0x1cu, 0x43u, 0x8cu, 0x50u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0xffu, 0x8fu, 0xffu, 0xffu,
0x10u, 0xb5u, 0x00u, 0x23u, 0x01u, 0x22u, 0x21u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0xf7u, 0xfcu, 0xa0u, 0x22u,
0x80u, 0x23u, 0x03u, 0x49u, 0xd2u, 0x00u, 0x88u, 0x58u, 0x1bu, 0x02u, 0x03u, 0x43u, 0x8bu, 0x50u, 0x10u, 0xbdu,
0x00u, 0x00u, 0x26u, 0x40u, 0xa0u, 0x23u, 0x03u, 0x4au, 0xdbu, 0x00u, 0xd0u, 0x58u, 0x00u, 0x04u, 0xc0u, 0x0fu,
0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x22u, 0x21u,
0x07u, 0x20u, 0xfeu, 0xf7u, 0xdbu, 0xfcu, 0xa0u, 0x22u, 0x03u, 0x49u, 0xd2u, 0x00u, 0x8bu, 0x58u, 0x03u, 0x48u,
0x03u, 0x40u, 0x8bu, 0x50u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0xffu, 0x7fu, 0xffu, 0xffu,
0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u, 0x23u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0xc6u, 0xfcu,
0xc0u, 0x21u, 0x05u, 0x4au, 0x89u, 0x00u, 0x24u, 0x02u, 0x13u, 0x68u, 0x0cu, 0x40u, 0x03u, 0x49u, 0x0bu, 0x40u,
0x1cu, 0x43u, 0x14u, 0x60u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x27u, 0x40u, 0xffu, 0xfcu, 0xffu, 0xffu,
0x10u, 0xb5u, 0x04u, 0x00u, 0x02u, 0x00u, 0x00u, 0x23u, 0x1bu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0xaeu, 0xfcu,
0x04u, 0x4au, 0x05u, 0x4bu, 0x05u, 0x49u, 0xd0u, 0x58u, 0x08u, 0x40u, 0x05u, 0x49u, 0x0cu, 0x40u, 0x20u, 0x43u,
0xd0u, 0x50u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u, 0x04u, 0x05u, 0x00u, 0x00u, 0xfeu, 0xfcu, 0xffu, 0xffu,
0x01u, 0x03u, 0x00u, 0x00u, 0x10u, 0xb5u, 0x04u, 0x00u, 0x02u, 0x00u, 0x00u, 0x23u, 0x1cu, 0x21u, 0x07u, 0x20u,
0xfeu, 0xf7u, 0x94u, 0xfcu, 0x04u, 0x4au, 0x05u, 0x4bu, 0x05u, 0x49u, 0xd0u, 0x58u, 0x24u, 0x04u, 0x08u, 0x40u,
0x20u, 0x43u, 0xd0u, 0x50u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x04u, 0x05u, 0x00u, 0x00u,
0xffu, 0xffu, 0x00u, 0xffu, 0x10u, 0xb5u, 0x00u, 0x23u, 0x01u, 0x22u, 0x1du, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u,
0x7du, 0xfcu, 0x80u, 0x23u, 0x03u, 0x49u, 0x04u, 0x4au, 0x1bu, 0x06u, 0x88u, 0x58u, 0x03u, 0x43u, 0x8bu, 0x50u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x04u, 0x05u, 0x00u, 0x00u, 0x02u, 0x4au, 0x03u, 0x4bu,
0xd0u, 0x58u, 0xc0u, 0x0fu, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x04u, 0x05u, 0x00u, 0x00u,
0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x1eu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x5fu, 0xfcu, 0x03u, 0x49u,
0x03u, 0x4au, 0x8bu, 0x58u, 0x5bu, 0x00u, 0x5bu, 0x08u, 0x8bu, 0x50u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u,
0x04u, 0x05u, 0x00u, 0x00u, 0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u, 0x1au, 0x21u, 0x07u, 0x20u,
0xfeu, 0xf7u, 0x4cu, 0xfcu, 0xa0u, 0x23u, 0x03u, 0x21u, 0x03u, 0x4au, 0xdbu, 0x00u, 0xd0u, 0x58u, 0x0cu, 0x40u,
0x88u, 0x43u, 0x20u, 0x43u, 0xd0u, 0x50u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u, 0xa0u, 0x23u, 0x03u, 0x4au,
0xdbu, 0x00u, 0xd0u, 0x58u, 0x03u, 0x23u, 0x18u, 0x40u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u,
0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u, 0x19u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x2eu, 0xfcu,
0x06u, 0x4bu, 0x24u, 0x06u, 0x1bu, 0x68u, 0x1au, 0x00u, 0x88u, 0x32u, 0x1bu, 0x68u, 0x12u, 0x68u, 0x9bu, 0x18u,
0x18u, 0x68u, 0x00u, 0x02u, 0x00u, 0x0au, 0x20u, 0x43u, 0x18u, 0x60u, 0x10u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u,
0x04u, 0x4bu, 0x1bu, 0x68u, 0x1au, 0x00u, 0x88u, 0x32u, 0x1bu, 0x68u, 0x12u, 0x68u, 0x9bu, 0x18u, 0x18u, 0x68u,
0x00u, 0x0eu, 0x70u, 0x47u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u,
0x18u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x0au, 0xfcu, 0x06u, 0x4bu, 0x24u, 0x02u, 0x1bu, 0x68u, 0x1au, 0x00u,
0x8cu, 0x32u, 0x12u, 0x68u, 0x1bu, 0x68u, 0x9bu, 0x18u, 0x18u, 0x68u, 0x03u, 0x4au, 0x10u, 0x40u, 0x20u, 0x43u,
0x18u, 0x60u, 0x10u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u, 0xffu, 0x00u, 0xffu, 0xffu, 0x10u, 0xb5u, 0x0du, 0x4bu,
0x04u, 0x00u, 0x1bu, 0x68u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x11u, 0xd9u, 0x02u, 0x00u, 0x00u, 0x23u,
0x14u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0xeau, 0xfbu, 0x07u, 0x4bu, 0xe0u, 0x22u, 0xa4u, 0x00u, 0xe4u, 0x18u,
0x80u, 0x23u, 0x00u, 0x20u, 0x92u, 0x00u, 0xa1u, 0x58u, 0x1bu, 0x06u, 0x0bu, 0x43u, 0xa3u, 0x50u, 0x10u, 0xbdu,
0x02u, 0x48u, 0xfcu, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x01u, 0x00u, 0x4au, 0x00u,
0x06u, 0x4au, 0x03u, 0x00u, 0x12u, 0x68u, 0x00u, 0x20u, 0x40u, 0x32u, 0x12u, 0x78u, 0x9au, 0x42u, 0x04u, 0xd9u,
0xe0u, 0x33u, 0x03u, 0x4au, 0x9bu, 0x00u, 0x98u, 0x58u, 0xc0u, 0x0fu, 0x70u, 0x47u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0x10u, 0xb5u, 0x04u, 0x1eu, 0x16u, 0xd0u, 0x0cu, 0x4bu, 0x1bu, 0x68u, 0x40u, 0x33u,
0x1bu, 0x78u, 0x83u, 0x42u, 0x10u, 0xd9u, 0x02u, 0x00u, 0x00u, 0x23u, 0x15u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u,
0xb5u, 0xfbu, 0xe0u, 0x22u, 0x00u, 0x20u, 0x06u, 0x4bu, 0xa4u, 0x00u, 0xe4u, 0x18u, 0x92u, 0x00u, 0xa3u, 0x58u,
0x5bu, 0x00u, 0x5bu, 0x08u, 0xa3u, 0x50u, 0x10u, 0xbdu, 0x02u, 0x48u, 0xfcu, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0x01u, 0x00u, 0x4au, 0x00u, 0x37u, 0xb5u, 0x10u, 0x4bu, 0x04u, 0x00u, 0x1bu, 0x68u,
0x0du, 0x00u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x16u, 0xd9u, 0x0fu, 0x29u, 0x14u, 0xd8u, 0x6bu, 0x46u,
0x00u, 0x90u, 0x19u, 0x71u, 0x6au, 0x46u, 0x00u, 0x23u, 0x16u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x8eu, 0xfbu,
0x07u, 0x4bu, 0xa4u, 0x00u, 0xe4u, 0x18u, 0xe0u, 0x23u, 0x0fu, 0x22u, 0x00u, 0x20u, 0x9bu, 0x00u, 0xe1u, 0x58u,
0x91u, 0x43u, 0x29u, 0x43u, 0xe1u, 0x50u, 0x3eu, 0xbdu, 0x02u, 0x48u, 0xfcu, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0x01u, 0x00u, 0x4au, 0x00u, 0x03u, 0x4bu, 0xe0u, 0x30u, 0x80u, 0x00u, 0xc0u, 0x58u,
0x0fu, 0x23u, 0x18u, 0x40u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x37u, 0xb5u, 0x11u, 0x4bu,
0x04u, 0x00u, 0x1bu, 0x68u, 0x0du, 0x00u, 0x40u, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x17u, 0xd9u, 0x03u, 0x29u,
0x15u, 0xd8u, 0x6bu, 0x46u, 0x00u, 0x90u, 0x19u, 0x71u, 0x6au, 0x46u, 0x00u, 0x23u, 0x17u, 0x21u, 0x07u, 0x20u,
0xfeu, 0xf7u, 0x5cu, 0xfbu, 0x08u, 0x4bu, 0xa4u, 0x00u, 0xe4u, 0x18u, 0xe0u, 0x23u, 0x30u, 0x22u, 0x00u, 0x20u,
0x9bu, 0x00u, 0xe1u, 0x58u, 0x2du, 0x01u, 0x91u, 0x43u, 0x29u, 0x43u, 0xe1u, 0x50u, 0x3eu, 0xbdu, 0x03u, 0x48u,
0xfcu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x01u, 0x00u, 0x4au, 0x00u,
0x02u, 0x4bu, 0x18u, 0x69u, 0x40u, 0x07u, 0xc0u, 0x0fu, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x27u, 0x40u,
0x02u, 0x00u, 0x10u, 0xb5u, 0x00u, 0x23u, 0x11u, 0x21u, 0x04u, 0x00u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x36u, 0xfbu,
0x08u, 0x23u, 0x0bu, 0x4au, 0x11u, 0x68u, 0x0bu, 0x43u, 0x13u, 0x60u, 0xffu, 0xf7u, 0xe9u, 0xffu, 0x00u, 0x28u,
0x08u, 0xd1u, 0x00u, 0x2cu, 0x01u, 0xd1u, 0x07u, 0x48u, 0x10u, 0xbdu, 0x01u, 0x20u, 0x00u, 0xf0u, 0x26u, 0xffu,
0x01u, 0x3cu, 0xf2u, 0xe7u, 0x60u, 0x42u, 0x60u, 0x41u, 0x02u, 0x4cu, 0x40u, 0x42u, 0x20u, 0x40u, 0xf3u, 0xe7u,
0x00u, 0x00u, 0x27u, 0x40u, 0x02u, 0x00u, 0x4au, 0x00u, 0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x12u, 0x21u,
0x07u, 0x20u, 0xfeu, 0xf7u, 0x13u, 0xfbu, 0x08u, 0x21u, 0x02u, 0x4au, 0x13u, 0x68u, 0x8bu, 0x43u, 0x13u, 0x60u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x27u, 0x40u, 0x10u, 0xb5u, 0x02u, 0x00u, 0x04u, 0x00u, 0x00u, 0x23u,
0x13u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x02u, 0xfbu, 0x80u, 0x21u, 0x05u, 0x4au, 0x49u, 0x02u, 0x24u, 0x04u,
0x13u, 0x68u, 0x0cu, 0x40u, 0x03u, 0x49u, 0x0bu, 0x40u, 0x1cu, 0x43u, 0x14u, 0x60u, 0x10u, 0xbdu, 0xc0u, 0x46u,
0x00u, 0x00u, 0x27u, 0x40u, 0xffu, 0xffu, 0xfeu, 0xffu, 0x70u, 0xb5u, 0x0eu, 0x21u, 0x00u, 0x23u, 0x01u, 0x22u,
0x07u, 0x20u, 0xfeu, 0xf7u, 0xebu, 0xfau, 0x80u, 0x23u, 0x07u, 0x4du, 0x08u, 0x4cu, 0x1bu, 0x06u, 0x2au, 0x59u,
0x01u, 0x20u, 0x13u, 0x43u, 0x2bu, 0x51u, 0x00u, 0xf0u, 0xc7u, 0xfeu, 0xc0u, 0x23u, 0x2au, 0x59u, 0xdbu, 0x05u,
0x13u, 0x43u, 0x2bu, 0x51u, 0x70u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x3cu, 0x05u, 0x00u, 0x00u,
0x02u, 0x4au, 0x03u, 0x4bu, 0xd0u, 0x58u, 0x80u, 0x00u, 0xc0u, 0x0fu, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u,
0x3cu, 0x05u, 0x00u, 0x00u, 0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x0fu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u,
0xc5u, 0xfau, 0x03u, 0x49u, 0x03u, 0x4au, 0x8bu, 0x58u, 0xdbu, 0x00u, 0xdbu, 0x08u, 0x8bu, 0x50u, 0x10u, 0xbdu,
0x00u, 0x00u, 0x26u, 0x40u, 0x3cu, 0x05u, 0x00u, 0x00u, 0x04u, 0x49u, 0x05u, 0x4au, 0x80u, 0x05u, 0x8bu, 0x58u,
0x80u, 0x0du, 0x9bu, 0x0au, 0x9bu, 0x02u, 0x18u, 0x43u, 0x88u, 0x50u, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u,
0x3cu, 0x05u, 0x00u, 0x00u, 0x10u, 0xb5u, 0x00u, 0x23u, 0x01u, 0x22u, 0x0bu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u,
0xa5u, 0xfau, 0x80u, 0x23u, 0x03u, 0x49u, 0x04u, 0x4au, 0x1bu, 0x06u, 0x88u, 0x58u, 0x03u, 0x43u, 0x8bu, 0x50u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x0cu, 0x05u, 0x00u, 0x00u, 0x02u, 0x4au, 0x03u, 0x4bu,
0xd0u, 0x58u, 0xc0u, 0x0fu, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x0cu, 0x05u, 0x00u, 0x00u,
0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x0cu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x87u, 0xfau, 0xc0u, 0x23u,
0x07u, 0x4au, 0x5bu, 0x00u, 0xd0u, 0x58u, 0x80u, 0x3bu, 0xffu, 0x3bu, 0x18u, 0x40u, 0x05u, 0xd1u, 0x05u, 0x49u,
0x53u, 0x58u, 0x5bu, 0x00u, 0x5bu, 0x08u, 0x53u, 0x50u, 0x10u, 0xbdu, 0x03u, 0x48u, 0xfcu, 0xe7u, 0xc0u, 0x46u,
0x00u, 0x00u, 0x26u, 0x40u, 0x0cu, 0x05u, 0x00u, 0x00u, 0x03u, 0x00u, 0x4au, 0x00u, 0x10u, 0xb5u, 0x02u, 0x00u,
0x04u, 0x00u, 0x00u, 0x23u, 0x0du, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x68u, 0xfau, 0x01u, 0x21u, 0x03u, 0x4au,
0x03u, 0x4bu, 0xd0u, 0x58u, 0x88u, 0x43u, 0x20u, 0x43u, 0xd0u, 0x50u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u,
0x0cu, 0x05u, 0x00u, 0x00u, 0x06u, 0x4bu, 0x10u, 0xb5u, 0x04u, 0x00u, 0x98u, 0x42u, 0x07u, 0xd8u, 0x00u, 0x23u,
0x02u, 0x00u, 0x2eu, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x51u, 0xfau, 0x02u, 0x4bu, 0x1cu, 0x60u, 0x10u, 0xbdu,
0x00u, 0xe1u, 0xf5u, 0x05u, 0x4cu, 0x07u, 0x02u, 0x08u, 0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x08u, 0x21u,
0x07u, 0x20u, 0xfeu, 0xf7u, 0x43u, 0xfau, 0x03u, 0x49u, 0x03u, 0x4au, 0x8bu, 0x58u, 0x5bu, 0x00u, 0x5bu, 0x08u,
0x8bu, 0x50u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u, 0x2cu, 0x05u, 0x00u, 0x00u, 0xa6u, 0x22u, 0x05u, 0x49u,
0xd2u, 0x00u, 0x8bu, 0x58u, 0x02u, 0x20u, 0xdbu, 0x43u, 0x9bu, 0x07u, 0x02u, 0xd0u, 0x01u, 0x23u, 0x88u, 0x58u,
0x18u, 0x40u, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u, 0xf0u, 0xb5u, 0x89u, 0xb0u, 0x04u, 0x90u, 0x05u, 0x91u,
0x06u, 0x92u, 0x07u, 0x93u, 0x06u, 0x00u, 0x0cu, 0x00u, 0x15u, 0x00u, 0x1fu, 0x00u, 0x04u, 0xaau, 0x00u, 0x23u,
0x24u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x1au, 0xfau, 0x00u, 0x90u, 0x00u, 0x28u, 0x01u, 0xd1u, 0x3bu, 0x4bu,
0x1eu, 0x60u, 0x3bu, 0x4au, 0x3bu, 0x4bu, 0xd1u, 0x58u, 0x01u, 0x92u, 0x03u, 0x93u, 0x00u, 0x29u, 0x6au, 0xdbu,
0x39u, 0x4bu, 0x3au, 0x4au, 0xf3u, 0x18u, 0x93u, 0x42u, 0x62u, 0xd8u, 0x63u, 0x1eu, 0x63u, 0x2bu, 0x5fu, 0xd8u,
0x37u, 0x4au, 0x6bu, 0x1eu, 0x93u, 0x42u, 0x5bu, 0xd8u, 0x36u, 0x4au, 0x7bu, 0x1eu, 0x93u, 0x42u, 0x57u, 0xd8u,
0x30u, 0x00u, 0xfau, 0x21u, 0xf5u, 0x30u, 0x89u, 0x00u, 0xffu, 0x30u, 0x01u, 0xf0u, 0x8du, 0xfeu, 0x02u, 0x90u,
0x31u, 0x48u, 0x29u, 0x00u, 0x47u, 0x43u, 0x68u, 0x08u, 0x38u, 0x18u, 0x01u, 0xf0u, 0x85u, 0xfeu, 0x80u, 0x22u,
0x84u, 0x46u, 0x10u, 0x23u, 0x00u, 0x20u, 0x12u, 0x02u, 0x01u, 0x00u, 0x11u, 0x43u, 0x0fu, 0x00u, 0x4fu, 0x43u,
0xbcu, 0x45u, 0x00u, 0xd3u, 0x08u, 0x00u, 0x01u, 0x3bu, 0x52u, 0x08u, 0x00u, 0x2bu, 0xf4u, 0xd1u, 0x02u, 0x99u,
0x26u, 0x4bu, 0x61u, 0x43u, 0x58u, 0x43u, 0x4bu, 0x08u, 0xc0u, 0x18u, 0x01u, 0xf0u, 0x6du, 0xfeu, 0x24u, 0x4bu,
0x98u, 0x42u, 0x2du, 0xd9u, 0x02u, 0x98u, 0x23u, 0x4bu, 0x40u, 0x43u, 0x23u, 0x49u, 0xc0u, 0x18u, 0x01u, 0xf0u,
0x63u, 0xfeu, 0x64u, 0x43u, 0x60u, 0x43u, 0x64u, 0x21u, 0x32u, 0x30u, 0x01u, 0xf0u, 0x5du, 0xfeu, 0x1fu, 0x49u,
0x68u, 0x43u, 0x01u, 0xf0u, 0x59u, 0xfeu, 0x03u, 0x28u, 0x1au, 0xd8u, 0x01u, 0x28u, 0x01u, 0xd8u, 0x01u, 0x23u,
0x58u, 0x40u, 0x1bu, 0x4au, 0x01u, 0x9bu, 0x1bu, 0x49u, 0x9bu, 0x58u, 0x00u, 0x03u, 0x19u, 0x40u, 0x1au, 0x4bu,
0x0bu, 0x43u, 0x18u, 0x43u, 0x01u, 0x9bu, 0x03u, 0x99u, 0x98u, 0x50u, 0x01u, 0x9bu, 0x03u, 0x9au, 0x9au, 0x58u,
0x02u, 0x23u, 0x13u, 0x43u, 0x01u, 0x9au, 0x53u, 0x50u, 0x04u, 0x4bu, 0x1eu, 0x60u, 0x00u, 0x23u, 0x00u, 0x93u,
0x00u, 0x98u, 0x09u, 0xb0u, 0xf0u, 0xbdu, 0x11u, 0x4bu, 0xf9u, 0xe7u, 0xc0u, 0x46u, 0x50u, 0x07u, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0x2cu, 0x05u, 0x00u, 0x00u, 0x00u, 0xdcu, 0x0bu, 0xffu, 0xc0u, 0xeau, 0x21u, 0x01u,
0xe7u, 0x03u, 0x00u, 0x00u, 0xcfu, 0x07u, 0x00u, 0x00u, 0x80u, 0x84u, 0x1eu, 0x00u, 0xb3u, 0x6du, 0x02u, 0x00u,
0x89u, 0x02u, 0x00u, 0x00u, 0x5du, 0xf7u, 0x00u, 0x00u, 0xbbu, 0xeeu, 0x01u, 0x00u, 0xa0u, 0xbbu, 0x0du, 0x00u,
0x20u, 0xffu, 0x00u, 0x00u, 0x08u, 0xc0u, 0xffu, 0xffu, 0xf7u, 0x03u, 0x00u, 0x00u, 0x03u, 0x00u, 0x4au, 0x00u,
0xf8u, 0xb5u, 0x17u, 0x4cu, 0x17u, 0x4du, 0x00u, 0x23u, 0x02u, 0x00u, 0x06u, 0x00u, 0x25u, 0x21u, 0x07u, 0x20u,
0xfeu, 0xf7u, 0x74u, 0xf9u, 0x63u, 0x59u, 0x00u, 0x2bu, 0x1fu, 0xdbu, 0x80u, 0x23u, 0x37u, 0x00u, 0x62u, 0x59u,
0x1bu, 0x06u, 0x13u, 0x43u, 0x63u, 0x51u, 0xffu, 0xf7u, 0x31u, 0xffu, 0x02u, 0x28u, 0x0au, 0xd0u, 0x00u, 0x2fu,
0x03u, 0xd1u, 0x38u, 0x00u, 0x00u, 0x2eu, 0x0fu, 0xd0u, 0x09u, 0xe0u, 0x01u, 0x20u, 0x00u, 0xf0u, 0x5eu, 0xfdu,
0x01u, 0x3fu, 0xf0u, 0xe7u, 0x30u, 0x1eu, 0x07u, 0xd0u, 0x00u, 0x20u, 0x87u, 0x42u, 0x04u, 0xd1u, 0x63u, 0x59u,
0x05u, 0x48u, 0x5bu, 0x00u, 0x5bu, 0x08u, 0x63u, 0x51u, 0xf8u, 0xbdu, 0x04u, 0x48u, 0xfcu, 0xe7u, 0xc0u, 0x46u,
0x00u, 0x00u, 0x26u, 0x40u, 0x2cu, 0x05u, 0x00u, 0x00u, 0x02u, 0x00u, 0x4au, 0x00u, 0x03u, 0x00u, 0x4au, 0x00u,
0x10u, 0xb5u, 0xffu, 0xf7u, 0x0bu, 0xffu, 0x00u, 0x23u, 0x02u, 0x28u, 0x01u, 0xd1u, 0x01u, 0x4bu, 0x1bu, 0x68u,
0x18u, 0x00u, 0x10u, 0xbdu, 0x50u, 0x07u, 0x02u, 0x08u, 0x37u, 0xb5u, 0x17u, 0x4bu, 0x04u, 0x00u, 0x1bu, 0x68u,
0x0du, 0x00u, 0x3eu, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x24u, 0xd9u, 0x04u, 0x29u, 0x03u, 0xd9u, 0x4bu, 0x1eu,
0xffu, 0x3bu, 0x13u, 0x2bu, 0x1eu, 0xd8u, 0x6bu, 0x46u, 0x6au, 0x46u, 0x9du, 0x80u, 0x26u, 0x21u, 0x00u, 0x23u,
0x07u, 0x20u, 0x00u, 0x94u, 0xfeu, 0xf7u, 0x22u, 0xf9u, 0xffu, 0x2du, 0x0cu, 0xd9u, 0x1fu, 0x23u, 0x1du, 0x40u,
0x0au, 0x4bu, 0xa4u, 0x00u, 0xe4u, 0x18u, 0xc0u, 0x23u, 0x04u, 0x22u, 0x9bu, 0x00u, 0xe5u, 0x50u, 0x40u, 0x33u,
0xe2u, 0x50u, 0x00u, 0x20u, 0x3eu, 0xbdu, 0x07u, 0x23u, 0xd0u, 0x34u, 0x1du, 0x40u, 0x03u, 0x4bu, 0xa4u, 0x00u,
0xe5u, 0x50u, 0xf6u, 0xe7u, 0x02u, 0x48u, 0xf5u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u,
0x01u, 0x00u, 0x4au, 0x00u, 0x09u, 0x4au, 0x83u, 0x00u, 0x9bu, 0x18u, 0xd0u, 0x22u, 0x92u, 0x00u, 0x98u, 0x58u,
0x07u, 0x22u, 0x10u, 0x40u, 0x04u, 0x28u, 0x07u, 0xd1u, 0xc0u, 0x22u, 0x92u, 0x00u, 0x98u, 0x58u, 0x1fu, 0x23u,
0x03u, 0x40u, 0x80u, 0x20u, 0x40u, 0x00u, 0x18u, 0x43u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u,
0x10u, 0xb5u, 0xffu, 0xf7u, 0xe7u, 0xffu, 0x02u, 0x28u, 0x1cu, 0xd0u, 0x05u, 0xd8u, 0x00u, 0x28u, 0x24u, 0xd0u,
0x01u, 0x28u, 0x14u, 0xd0u, 0x00u, 0x20u, 0x14u, 0xe0u, 0x12u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x14u, 0xd0u,
0x14u, 0x23u, 0xffu, 0x33u, 0x98u, 0x42u, 0x15u, 0xd0u, 0x03u, 0x3bu, 0x98u, 0x42u, 0xf2u, 0xd1u, 0x0cu, 0x4au,
0x0cu, 0x4bu, 0xd3u, 0x58u, 0x00u, 0x2bu, 0xedu, 0xdau, 0x80u, 0x20u, 0x00u, 0x02u, 0x01u, 0xe0u, 0x0au, 0x4bu,
0x18u, 0x68u, 0x10u, 0xbdu, 0xffu, 0xf7u, 0x84u, 0xffu, 0xfbu, 0xe7u, 0xffu, 0xf7u, 0x81u, 0xfdu, 0x00u, 0x28u,
0xe0u, 0xd0u, 0xf1u, 0xe7u, 0x02u, 0x4au, 0x05u, 0x4bu, 0xebu, 0xe7u, 0x05u, 0x48u, 0xf1u, 0xe7u, 0xc0u, 0x46u,
0x00u, 0x00u, 0x26u, 0x40u, 0x0cu, 0x05u, 0x00u, 0x00u, 0x4cu, 0x07u, 0x02u, 0x08u, 0x3cu, 0x05u, 0x00u, 0x00u,
0x00u, 0x12u, 0x7au, 0x00u, 0xb0u, 0x23u, 0x02u, 0x4au, 0xdbu, 0x00u, 0xd0u, 0x58u, 0xc0u, 0x0fu, 0x70u, 0x47u,
0x00u, 0x00u, 0x26u, 0x40u, 0xb2u, 0x23u, 0x03u, 0x4au, 0xdbu, 0x00u, 0xd0u, 0x58u, 0x01u, 0x23u, 0x18u, 0x40u,
0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x00u, 0x23u, 0x10u, 0xb5u, 0x1au, 0x00u, 0x09u, 0x21u,
0x07u, 0x20u, 0xfeu, 0xf7u, 0x9bu, 0xf8u, 0xb1u, 0x20u, 0x0au, 0x4bu, 0xc0u, 0x00u, 0x1au, 0x58u, 0x0au, 0x49u,
0x11u, 0x40u, 0x80u, 0x22u, 0x92u, 0x05u, 0x0au, 0x43u, 0xb0u, 0x21u, 0x1au, 0x50u, 0xc9u, 0x00u, 0x5au, 0x58u,
0x00u, 0x20u, 0x52u, 0x00u, 0x52u, 0x08u, 0x5au, 0x50u, 0x04u, 0x49u, 0x5au, 0x58u, 0x52u, 0x00u, 0x52u, 0x08u,
0x5au, 0x50u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u, 0xffu, 0xffu, 0xffu, 0xcfu, 0x8cu, 0x05u, 0x00u, 0x00u,
0x02u, 0x00u, 0x70u, 0xb5u, 0x00u, 0x23u, 0x04u, 0x00u, 0x27u, 0x21u, 0x07u, 0x20u, 0xfeu, 0xf7u, 0x76u, 0xf8u,
0xb0u, 0x20u, 0x22u, 0x4au, 0xc0u, 0x00u, 0x13u, 0x58u, 0x00u, 0x2bu, 0x3du, 0xdbu, 0xe1u, 0x79u, 0x23u, 0x68u,
0x4du, 0x1eu, 0xa9u, 0x41u, 0x9bu, 0x03u, 0x09u, 0x06u, 0x9bu, 0x0bu, 0x0bu, 0x43u, 0x13u, 0x50u, 0x23u, 0x89u,
0xa0u, 0x88u, 0x1bu, 0x49u, 0x1bu, 0x04u, 0xc0u, 0x04u, 0x0bu, 0x40u, 0xc0u, 0x0cu, 0x03u, 0x43u, 0x19u, 0x48u,
0x19u, 0x4du, 0x13u, 0x50u, 0xffu, 0x20u, 0xe3u, 0x7au, 0xe0u, 0x26u, 0x1bu, 0x01u, 0x03u, 0x40u, 0xa0u, 0x89u,
0xf6u, 0x00u, 0x00u, 0x02u, 0x28u, 0x40u, 0x0fu, 0x25u, 0x03u, 0x43u, 0xa0u, 0x7au, 0x28u, 0x40u, 0xc0u, 0x25u,
0x03u, 0x43u, 0xa0u, 0x7bu, 0xadu, 0x05u, 0x00u, 0x07u, 0x28u, 0x40u, 0x03u, 0x43u, 0xb1u, 0x20u, 0xc0u, 0x00u,
0x13u, 0x50u, 0xa3u, 0x79u, 0x0du, 0x48u, 0x1bu, 0x02u, 0x15u, 0x58u, 0x33u, 0x40u, 0x0cu, 0x4eu, 0x35u, 0x40u,
0x2bu, 0x43u, 0x13u, 0x50u, 0x23u, 0x8au, 0x15u, 0x58u, 0x1bu, 0x04u, 0x0bu, 0x40u, 0x09u, 0x49u, 0x29u, 0x40u,
0x0bu, 0x43u, 0x13u, 0x50u, 0x00u, 0x20u, 0x70u, 0xbdu, 0x07u, 0x48u, 0xfcu, 0xe7u, 0x00u, 0x00u, 0x26u, 0x40u,
0x00u, 0x00u, 0xffu, 0x01u, 0x84u, 0x05u, 0x00u, 0x00u, 0x00u, 0xffu, 0x1fu, 0x00u, 0x8cu, 0x05u, 0x00u, 0x00u,
0xffu, 0xf8u, 0xffu, 0xffu, 0xffu, 0xffu, 0x00u, 0xfeu, 0x03u, 0x00u, 0x4au, 0x00u, 0xb0u, 0x23u, 0x15u, 0x4au,
0xdbu, 0x00u, 0xd3u, 0x58u, 0x10u, 0xb5u, 0x99u, 0x03u, 0xdbu, 0x01u, 0xdbu, 0x0fu, 0x89u, 0x0bu, 0xc3u, 0x71u,
0x11u, 0x4bu, 0x01u, 0x60u, 0xd3u, 0x58u, 0x0fu, 0x24u, 0xd9u, 0x04u, 0xdbu, 0x01u, 0xdbu, 0x0du, 0x03u, 0x81u,
0xb1u, 0x23u, 0xdbu, 0x00u, 0xd3u, 0x58u, 0xc9u, 0x0cu, 0x81u, 0x80u, 0x19u, 0x00u, 0x21u, 0x40u, 0x81u, 0x72u,
0x19u, 0x09u, 0x21u, 0x40u, 0xc1u, 0x72u, 0xd9u, 0x02u, 0x9bu, 0x00u, 0x9bu, 0x0fu, 0x83u, 0x73u, 0x07u, 0x4bu,
0xc9u, 0x0cu, 0xd3u, 0x58u, 0x81u, 0x81u, 0x5au, 0x05u, 0xdbu, 0x01u, 0x52u, 0x0fu, 0xdbu, 0x0du, 0x82u, 0x71u,
0x03u, 0x82u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u, 0x84u, 0x05u, 0x00u, 0x00u, 0x8cu, 0x05u, 0x00u, 0x00u,
0xf8u, 0xb5u, 0x06u, 0x00u, 0x02u, 0x00u, 0x00u, 0x23u, 0x28u, 0x21u, 0x07u, 0x20u, 0xfdu, 0xf7u, 0xe6u, 0xffu,
0x80u, 0x23u, 0x35u, 0x00u, 0x04u, 0x27u, 0x26u, 0x4cu, 0x26u, 0x4au, 0x1bu, 0x06u, 0xa1u, 0x58u, 0x0bu, 0x43u,
0xa3u, 0x50u, 0xb2u, 0x23u, 0xdbu, 0x00u, 0xe3u, 0x58u, 0x3bu, 0x42u, 0x01u, 0xd1u, 0x00u, 0x2du, 0x1fu, 0xd1u,
0xb1u, 0x21u, 0xc9u, 0x00u, 0x63u, 0x58u, 0x20u, 0x4au, 0x1au, 0x40u, 0x80u, 0x23u, 0x9bu, 0x05u, 0x13u, 0x43u,
0x63u, 0x50u, 0x00u, 0x2eu, 0x01u, 0xd0u, 0x00u, 0x2du, 0x06u, 0xd0u, 0xb0u, 0x22u, 0x80u, 0x23u, 0xd2u, 0x00u,
0xa1u, 0x58u, 0x1bu, 0x06u, 0x0bu, 0x43u, 0xa3u, 0x50u, 0xffu, 0xf7u, 0x14u, 0xffu, 0x00u, 0x28u, 0x11u, 0xd1u,
0x00u, 0x2du, 0x0au, 0xd1u, 0x00u, 0x2eu, 0x11u, 0xd0u, 0xffu, 0xf7u, 0x16u, 0xffu, 0x13u, 0x48u, 0xf8u, 0xbdu,
0x01u, 0x20u, 0x00u, 0xf0u, 0xb3u, 0xfbu, 0x01u, 0x3du, 0xd3u, 0xe7u, 0x01u, 0x20u, 0x00u, 0xf0u, 0xaeu, 0xfbu,
0x01u, 0x3du, 0xe9u, 0xe7u, 0x00u, 0x2eu, 0x01u, 0xd0u, 0x00u, 0x2du, 0xedu, 0xd0u, 0xb1u, 0x22u, 0xc0u, 0x23u,
0x00u, 0x20u, 0xd2u, 0x00u, 0xa1u, 0x58u, 0x9bu, 0x05u, 0x0bu, 0x43u, 0xa3u, 0x50u, 0x86u, 0x42u, 0xe6u, 0xd0u,
0x68u, 0x1eu, 0x85u, 0x41u, 0x68u, 0x42u, 0x06u, 0x4du, 0x04u, 0x4bu, 0x28u, 0x40u, 0xc0u, 0x18u, 0xdeu, 0xe7u,
0x00u, 0x00u, 0x26u, 0x40u, 0x8cu, 0x05u, 0x00u, 0x00u, 0xffu, 0xffu, 0xffu, 0xcfu, 0x02u, 0x00u, 0x4au, 0x00u,
0xfeu, 0xffu, 0xb5u, 0xffu, 0x80u, 0x30u, 0x03u, 0x4bu, 0xffu, 0x30u, 0x80u, 0x00u, 0xc0u, 0x58u, 0xc0u, 0x0fu,
0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x90u, 0x30u, 0x03u, 0x4bu, 0xffu, 0x30u, 0x80u, 0x00u,
0xc0u, 0x58u, 0x01u, 0x23u, 0x18u, 0x40u, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u, 0x70u, 0xb5u, 0x12u, 0x4bu,
0x04u, 0x00u, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1au, 0x78u, 0x43u, 0x1eu, 0x9au, 0x42u, 0x19u, 0xd9u, 0x02u, 0x00u,
0x00u, 0x23u, 0x0au, 0x21u, 0x07u, 0x20u, 0xfdu, 0xf7u, 0x69u, 0xffu, 0x0cu, 0x4bu, 0x0cu, 0x4du, 0xa4u, 0x00u,
0xe4u, 0x18u, 0x63u, 0x59u, 0x0bu, 0x4au, 0x01u, 0x20u, 0x1au, 0x40u, 0x80u, 0x23u, 0x9bu, 0x05u, 0x13u, 0x43u,
0x63u, 0x51u, 0x00u, 0xf0u, 0x5bu, 0xfbu, 0x00u, 0x20u, 0x63u, 0x59u, 0x5bu, 0x00u, 0x5bu, 0x08u, 0x63u, 0x51u,
0x70u, 0xbdu, 0x05u, 0x48u, 0xfcu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u,
0xfcu, 0x05u, 0x00u, 0x00u, 0xffu, 0xffu, 0xffu, 0xcfu, 0x01u, 0x00u, 0x4au, 0x00u, 0xf7u, 0xb5u, 0x27u, 0x4bu,
0x0cu, 0x00u, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x15u, 0xd3u, 0x24u, 0x4bu, 0x85u, 0x00u,
0x24u, 0x4eu, 0xedu, 0x18u, 0xabu, 0x59u, 0x00u, 0x2bu, 0x10u, 0xdbu, 0x8bu, 0x78u, 0x02u, 0x3bu, 0x0eu, 0x2bu,
0x0au, 0xd8u, 0x4bu, 0x78u, 0x01u, 0x3bu, 0x11u, 0x2bu, 0x06u, 0xd8u, 0xcau, 0x78u, 0x0bu, 0x78u, 0x00u, 0x2au,
0x06u, 0xd1u, 0x70u, 0x22u, 0x15u, 0x2bu, 0x06u, 0xd8u, 0x1bu, 0x48u, 0x2du, 0xe0u, 0x1bu, 0x48u, 0x2bu, 0xe0u,
0x38u, 0x22u, 0x12u, 0x2bu, 0xf8u, 0xd9u, 0x93u, 0x42u, 0xf6u, 0xd8u, 0x00u, 0x90u, 0x00u, 0x23u, 0x6au, 0x46u,
0x29u, 0x21u, 0x07u, 0x20u, 0x01u, 0x94u, 0xfdu, 0xf7u, 0x19u, 0xffu, 0x23u, 0x79u, 0x02u, 0x2bu, 0x12u, 0xd0u,
0x7fu, 0x22u, 0x21u, 0x78u, 0xe7u, 0x78u, 0x11u, 0x40u, 0xffu, 0x06u, 0x39u, 0x43u, 0xf8u, 0x27u, 0x62u, 0x78u,
0x7fu, 0x01u, 0x12u, 0x02u, 0x3au, 0x40u, 0x11u, 0x43u, 0xa2u, 0x78u, 0xf8u, 0x24u, 0x12u, 0x04u, 0x64u, 0x03u,
0x22u, 0x40u, 0x0au, 0x43u, 0xaau, 0x51u, 0xc0u, 0x21u, 0x1bu, 0x07u, 0x89u, 0x05u, 0xaau, 0x59u, 0x0bu, 0x40u,
0x07u, 0x49u, 0x0au, 0x40u, 0x13u, 0x43u, 0xabu, 0x51u, 0xfeu, 0xbdu, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0xfcu, 0x05u, 0x00u, 0x00u, 0x01u, 0x00u, 0x4au, 0x00u, 0x03u, 0x00u, 0x4au, 0x00u,
0xffu, 0xffu, 0xffu, 0xcfu, 0x10u, 0xb5u, 0x10u, 0x4bu, 0x42u, 0x1eu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u,
0x93u, 0x42u, 0x16u, 0xd9u, 0x7fu, 0x22u, 0x1fu, 0x24u, 0x80u, 0x30u, 0xffu, 0x30u, 0x0bu, 0x4bu, 0x80u, 0x00u,
0xc3u, 0x58u, 0x1au, 0x40u, 0x0au, 0x70u, 0x1au, 0x0cu, 0x22u, 0x40u, 0x18u, 0x0au, 0x8au, 0x70u, 0x1au, 0x01u,
0x20u, 0x40u, 0xe2u, 0x40u, 0x48u, 0x70u, 0x00u, 0x20u, 0x9bu, 0x00u, 0x9bu, 0x0fu, 0xcau, 0x70u, 0x0bu, 0x71u,
0x10u, 0xbdu, 0x03u, 0x48u, 0xfcu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u,
0x01u, 0x00u, 0x4au, 0x00u, 0xf8u, 0xb5u, 0x24u, 0x4bu, 0x04u, 0x00u, 0x1bu, 0x68u, 0x0fu, 0x00u, 0x3fu, 0x33u,
0x1au, 0x78u, 0x43u, 0x1eu, 0x9au, 0x42u, 0x3du, 0xd9u, 0x02u, 0x00u, 0x00u, 0x23u, 0x2au, 0x21u, 0x07u, 0x20u,
0xfdu, 0xf7u, 0xb4u, 0xfeu, 0x1du, 0x4bu, 0xa4u, 0x00u, 0xe4u, 0x18u, 0x80u, 0x23u, 0x3eu, 0x00u, 0x1cu, 0x4du,
0x1bu, 0x06u, 0x62u, 0x59u, 0x13u, 0x43u, 0x63u, 0x51u, 0x01u, 0x22u, 0x1au, 0x4bu, 0xe3u, 0x58u, 0x13u, 0x42u,
0x18u, 0xd1u, 0x00u, 0x2eu, 0x11u, 0xd1u, 0x00u, 0x2fu, 0x18u, 0xd0u, 0x63u, 0x59u, 0x16u, 0x4au, 0x01u, 0x20u,
0x1au, 0x40u, 0x80u, 0x23u, 0x9bu, 0x05u, 0x13u, 0x43u, 0x63u, 0x51u, 0x00u, 0xf0u, 0x97u, 0xfau, 0x63u, 0x59u,
0x12u, 0x48u, 0x5bu, 0x00u, 0x5bu, 0x08u, 0x63u, 0x51u, 0x13u, 0xe0u, 0x01u, 0x20u, 0x00u, 0xf0u, 0x8eu, 0xfau,
0x01u, 0x3eu, 0xe1u, 0xe7u, 0x00u, 0x2fu, 0x01u, 0xd0u, 0x00u, 0x2eu, 0xe6u, 0xd0u, 0x63u, 0x59u, 0x00u, 0x20u,
0x9bu, 0x00u, 0x9bu, 0x0fu, 0x02u, 0x2bu, 0x04u, 0xd1u, 0xc0u, 0x23u, 0x62u, 0x59u, 0x9bu, 0x05u, 0x13u, 0x43u,
0x63u, 0x51u, 0xf8u, 0xbdu, 0x06u, 0x48u, 0xfcu, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u,
0xfcu, 0x05u, 0x00u, 0x00u, 0x3cu, 0x06u, 0x00u, 0x00u, 0xffu, 0xffu, 0xffu, 0xcfu, 0x02u, 0x00u, 0x4au, 0x00u,
0x01u, 0x00u, 0x4au, 0x00u, 0xf7u, 0xb5u, 0x48u, 0x4bu, 0x00u, 0x91u, 0x15u, 0x00u, 0x98u, 0x42u, 0x00u, 0xd9u,
0x87u, 0xe0u, 0x9au, 0x42u, 0x00u, 0xd9u, 0x84u, 0xe0u, 0x44u, 0x4bu, 0x99u, 0x42u, 0x00u, 0xd9u, 0x80u, 0xe0u,
0x01u, 0x22u, 0x43u, 0x4bu, 0x1au, 0x70u, 0xffu, 0x28u, 0x45u, 0xd8u, 0x0fu, 0x23u, 0x07u, 0x26u, 0x1cu, 0x00u,
0x18u, 0x40u, 0xffu, 0x2du, 0x58u, 0xd8u, 0xffu, 0x22u, 0x2du, 0x01u, 0x15u, 0x40u, 0x28u, 0x43u, 0xf0u, 0x25u,
0xe0u, 0x22u, 0x2cu, 0x43u, 0xf0u, 0x25u, 0xd2u, 0x02u, 0x32u, 0x43u, 0x2du, 0x03u, 0x2bu, 0x43u, 0x39u, 0x4du,
0x07u, 0x26u, 0x2fu, 0x68u, 0x3du, 0x00u, 0xbau, 0x35u, 0x2du, 0x88u, 0x6eu, 0x43u, 0x35u, 0x00u, 0x01u, 0x96u,
0x3eu, 0x6au, 0xadu, 0x19u, 0x2eu, 0x68u, 0x00u, 0x2eu, 0xfcu, 0xdau, 0x33u, 0x4du, 0x2eu, 0x78u, 0x33u, 0x4du,
0x00u, 0x2eu, 0x03u, 0xd0u, 0x32u, 0x4eu, 0xaeu, 0x59u, 0x00u, 0x2eu, 0x50u, 0xdau, 0x31u, 0x4eu, 0x32u, 0x49u,
0x31u, 0x60u, 0x32u, 0x4eu, 0x32u, 0x49u, 0x31u, 0x60u, 0xa3u, 0x21u, 0xc9u, 0x00u, 0x6eu, 0x58u, 0xa6u, 0x43u,
0x06u, 0x43u, 0x30u, 0x4cu, 0x6eu, 0x50u, 0x28u, 0x59u, 0x98u, 0x43u, 0x02u, 0x43u, 0x00u, 0x20u, 0x2au, 0x51u,
0x2du, 0x4bu, 0x00u, 0x9au, 0x1au, 0x60u, 0x26u, 0x4bu, 0xeau, 0x50u, 0x3bu, 0x6au, 0x01u, 0x9au, 0xd3u, 0x18u,
0x00u, 0x22u, 0x5au, 0x60u, 0xfeu, 0xbdu, 0x29u, 0x4bu, 0x98u, 0x42u, 0x05u, 0xd8u, 0x0fu, 0x23u, 0x18u, 0x40u,
0x06u, 0x00u, 0x00u, 0x24u, 0x20u, 0x00u, 0xb4u, 0xe7u, 0x25u, 0x4bu, 0x06u, 0x0au, 0x98u, 0x42u, 0x04u, 0xd8u,
0xffu, 0x23u, 0x04u, 0x01u, 0x1cu, 0x40u, 0x26u, 0x43u, 0xf3u, 0xe7u, 0xf0u, 0x23u, 0x00u, 0x02u, 0x1bu, 0x01u,
0x18u, 0x40u, 0x06u, 0x43u, 0x1fu, 0x4bu, 0xecu, 0xe7u, 0x1cu, 0x4au, 0x95u, 0x42u, 0x05u, 0xd8u, 0x2au, 0x04u,
0xf0u, 0x25u, 0x2du, 0x03u, 0x2au, 0x40u, 0x32u, 0x43u, 0xa8u, 0xe7u, 0x2au, 0x0au, 0x12u, 0x04u, 0x32u, 0x43u,
0x17u, 0x4eu, 0xb5u, 0x42u, 0x07u, 0xd8u, 0xf0u, 0x26u, 0x2du, 0x05u, 0x36u, 0x04u, 0x35u, 0x40u, 0x2au, 0x43u,
0xffu, 0x25u, 0x2du, 0x04u, 0x9au, 0xe7u, 0x2du, 0x06u, 0x2au, 0x43u, 0x13u, 0x4du, 0x96u, 0xe7u, 0x13u, 0x48u,
0xc3u, 0xe7u, 0x12u, 0x48u, 0xc6u, 0xe7u, 0xc0u, 0x46u, 0x0fu, 0x06u, 0x00u, 0x00u, 0xffu, 0xffu, 0xffu, 0x00u,
0x48u, 0x07u, 0x02u, 0x08u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x54u, 0x07u, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u,
0x1cu, 0x05u, 0x00u, 0x00u, 0x08u, 0x01u, 0x26u, 0x40u, 0x1fu, 0x1fu, 0x00u, 0x00u, 0x04u, 0x01u, 0x26u, 0x40u,
0x3du, 0x3du, 0x00u, 0x00u, 0x14u, 0x05u, 0x00u, 0x00u, 0x44u, 0x07u, 0x02u, 0x08u, 0xffu, 0x04u, 0x00u, 0x00u,
0xffu, 0x05u, 0x00u, 0x00u, 0x0fu, 0x0fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x0fu, 0x0fu, 0x01u, 0x00u, 0x4au, 0x00u,
0xf8u, 0xb5u, 0x14u, 0x4bu, 0x98u, 0x42u, 0x19u, 0xd9u, 0x00u, 0x27u, 0x13u, 0x4bu, 0xc0u, 0x18u, 0xf6u, 0x21u,
0x3fu, 0x23u, 0x12u, 0x4du, 0x12u, 0x4cu, 0xf6u, 0x30u, 0x2eu, 0x59u, 0x49u, 0x00u, 0x1eu, 0x40u, 0x01u, 0xf0u,
0x3bu, 0xfau, 0x32u, 0x1au, 0x00u, 0x2fu, 0x00u, 0xd0u, 0x32u, 0x18u, 0x3fu, 0x21u, 0x2bu, 0x59u, 0x0au, 0x40u,
0x8bu, 0x43u, 0x13u, 0x43u, 0x2bu, 0x51u, 0x00u, 0x2fu, 0x09u, 0xd0u, 0xf8u, 0xbdu, 0x09u, 0x4bu, 0x98u, 0x42u,
0x04u, 0xd8u, 0xeeu, 0x33u, 0xffu, 0x33u, 0x18u, 0x1au, 0x01u, 0x27u, 0xe0u, 0xe7u, 0x00u, 0x20u, 0x40u, 0x42u,
0xf3u, 0xe7u, 0xc0u, 0x46u, 0xecu, 0x81u, 0x00u, 0x00u, 0x00u, 0x80u, 0xffu, 0xffu, 0x00u, 0x00u, 0x26u, 0x40u,
0x18u, 0xffu, 0x00u, 0x00u, 0x13u, 0x7eu, 0x00u, 0x00u, 0xf0u, 0xb5u, 0x89u, 0xb0u, 0x03u, 0xacu, 0x14u, 0x22u,
0x00u, 0x21u, 0x20u, 0x00u, 0x02u, 0xf0u, 0x23u, 0xfcu, 0x20u, 0x00u, 0xffu, 0xf7u, 0x57u, 0xfdu, 0xb0u, 0x23u,
0x1au, 0x4au, 0xdbu, 0x00u, 0xd2u, 0x58u, 0x00u, 0x23u, 0x9au, 0x42u, 0x03u, 0xdau, 0xa3u, 0x7bu, 0x02u, 0x3bu,
0x5au, 0x1eu, 0x93u, 0x41u, 0xe5u, 0x79u, 0x00u, 0x26u, 0x6au, 0x1eu, 0x95u, 0x41u, 0x01u, 0x35u, 0xb3u, 0x42u,
0x21u, 0xd0u, 0xa4u, 0x88u, 0xb4u, 0x42u, 0x1eu, 0xd0u, 0x03u, 0x9bu, 0x30u, 0x00u, 0x01u, 0x93u, 0xffu, 0xf7u,
0x6fu, 0xfcu, 0x2au, 0x00u, 0x33u, 0x00u, 0x07u, 0x00u, 0x31u, 0x00u, 0x20u, 0x00u, 0x01u, 0xf0u, 0x98u, 0xfau,
0x0cu, 0x00u, 0x05u, 0x00u, 0x33u, 0x00u, 0x01u, 0x9au, 0x31u, 0x00u, 0x38u, 0x00u, 0x01u, 0xf0u, 0x90u, 0xfau,
0xe6u, 0x07u, 0x6au, 0x08u, 0x32u, 0x43u, 0x63u, 0x08u, 0x80u, 0x18u, 0x59u, 0x41u, 0x2au, 0x00u, 0x23u, 0x00u,
0x01u, 0xf0u, 0x66u, 0xfau, 0x06u, 0x00u, 0x30u, 0x00u, 0x09u, 0xb0u, 0xf0u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u,
0xf0u, 0xb5u, 0x00u, 0x26u, 0x24u, 0x4bu, 0x85u, 0xb0u, 0x1bu, 0x68u, 0x07u, 0x00u, 0x3fu, 0x33u, 0x1bu, 0x78u,
0xb3u, 0x42u, 0x3eu, 0xd0u, 0xb0u, 0x42u, 0x3cu, 0xd0u, 0x83u, 0x42u, 0x3au, 0xd3u, 0x05u, 0x22u, 0x31u, 0x00u,
0x02u, 0xa8u, 0x02u, 0xf0u, 0xd4u, 0xfbu, 0x02u, 0xa9u, 0x38u, 0x00u, 0xffu, 0xf7u, 0x3bu, 0xfeu, 0x3bu, 0x00u,
0x80u, 0x33u, 0xffu, 0x33u, 0x19u, 0x4au, 0x9bu, 0x00u, 0x9bu, 0x58u, 0xb3u, 0x42u, 0x29u, 0xdau, 0x02u, 0xabu,
0x1bu, 0x79u, 0x02u, 0x2bu, 0x25u, 0xd0u, 0x02u, 0xabu, 0x5cu, 0x78u, 0xb4u, 0x42u, 0x21u, 0xd0u, 0x9du, 0x78u,
0xb5u, 0x42u, 0x1eu, 0xd0u, 0x1bu, 0x78u, 0x38u, 0x00u, 0x01u, 0x93u, 0xffu, 0xf7u, 0x21u, 0xfcu, 0x2au, 0x00u,
0x33u, 0x00u, 0x07u, 0x00u, 0x31u, 0x00u, 0x20u, 0x00u, 0x01u, 0xf0u, 0x4au, 0xfau, 0x0cu, 0x00u, 0x05u, 0x00u,
0x33u, 0x00u, 0x01u, 0x9au, 0x31u, 0x00u, 0x38u, 0x00u, 0x01u, 0xf0u, 0x42u, 0xfau, 0xe6u, 0x07u, 0x6au, 0x08u,
0x32u, 0x43u, 0x63u, 0x08u, 0x80u, 0x18u, 0x59u, 0x41u, 0x2au, 0x00u, 0x23u, 0x00u, 0x01u, 0xf0u, 0x18u, 0xfau,
0x06u, 0x00u, 0x30u, 0x00u, 0x05u, 0xb0u, 0xf0u, 0xbdu, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u,
0x10u, 0xb5u, 0x04u, 0x1eu, 0x04u, 0xd1u, 0xffu, 0xf7u, 0x67u, 0xffu, 0x00u, 0x28u, 0x06u, 0xd0u, 0x08u, 0xe0u,
0x06u, 0x4bu, 0x1bu, 0x68u, 0x3fu, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u, 0x03u, 0xd2u, 0x20u, 0x00u, 0xffu, 0xf7u,
0xefu, 0xfbu, 0x10u, 0xbdu, 0xffu, 0xf7u, 0x9cu, 0xffu, 0xefu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0xe0u, 0x22u, 0x10u, 0xb5u, 0x01u, 0x24u, 0x09u, 0x4bu, 0x80u, 0x00u, 0x92u, 0x00u, 0xc0u, 0x18u, 0x83u, 0x58u,
0x80u, 0x58u, 0x9bu, 0x06u, 0x9bu, 0x0fu, 0x9cu, 0x40u, 0x0fu, 0x23u, 0x18u, 0x40u, 0xffu, 0xf7u, 0xd8u, 0xffu,
0x63u, 0x08u, 0x18u, 0x18u, 0x21u, 0x00u, 0x01u, 0xf0u, 0x57u, 0xf9u, 0x10u, 0xbdu, 0x00u, 0x00u, 0x26u, 0x40u,
0x10u, 0xb5u, 0x00u, 0x20u, 0xffu, 0xf7u, 0xe4u, 0xffu, 0x04u, 0x00u, 0xffu, 0xf7u, 0x99u, 0xf8u, 0x41u, 0x1cu,
0x48u, 0x08u, 0x00u, 0x19u, 0x01u, 0xf0u, 0x48u, 0xf9u, 0x10u, 0xbdu, 0x10u, 0xb5u, 0xffu, 0xf7u, 0xf0u, 0xffu,
0x04u, 0x00u, 0xfeu, 0xf7u, 0x6bu, 0xffu, 0x41u, 0x1cu, 0x48u, 0x08u, 0x00u, 0x19u, 0x01u, 0xf0u, 0x3cu, 0xf9u,
0x10u, 0xbdu, 0x00u, 0x00u, 0x14u, 0x4bu, 0x30u, 0xb5u, 0x1au, 0x68u, 0x07u, 0x24u, 0x13u, 0x00u, 0x2cu, 0x33u,
0x1bu, 0x78u, 0x1fu, 0x2bu, 0x15u, 0xd8u, 0x83u, 0x08u, 0x1du, 0x00u, 0xa5u, 0x43u, 0x2cu, 0x1eu, 0x0fu, 0xd1u,
0x03u, 0x34u, 0x20u, 0x40u, 0xa0u, 0x40u, 0x81u, 0x40u, 0x12u, 0x68u, 0x9bu, 0x00u, 0x20u, 0x32u, 0xd3u, 0x18u,
0x0au, 0x00u, 0xffu, 0x21u, 0x81u, 0x40u, 0x1cu, 0x68u, 0x62u, 0x40u, 0x11u, 0x40u, 0x61u, 0x40u, 0x19u, 0x60u,
0x30u, 0xbdu, 0x80u, 0x23u, 0x20u, 0x40u, 0x1bu, 0x06u, 0x18u, 0x43u, 0x80u, 0x23u, 0x9bu, 0x01u, 0x12u, 0x68u,
0xc9u, 0x18u, 0x89u, 0x00u, 0x88u, 0x50u, 0xf3u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x06u, 0x4bu, 0x9au, 0x68u,
0x03u, 0x00u, 0x06u, 0x48u, 0x10u, 0x33u, 0x9bu, 0x00u, 0x82u, 0x42u, 0x02u, 0xd1u, 0x98u, 0x58u, 0x99u, 0x50u,
0x70u, 0x47u, 0x03u, 0x4au, 0xd0u, 0x58u, 0xfbu, 0xe7u, 0x00u, 0xedu, 0x00u, 0xe0u, 0x00u, 0x00u, 0x02u, 0x08u,
0x00u, 0x04u, 0x00u, 0x10u, 0xf8u, 0xb5u, 0x06u, 0x00u, 0x0du, 0x00u, 0x00u, 0x28u, 0x3au, 0xd0u, 0x00u, 0x23u,
0xc0u, 0x5eu, 0x00u, 0x28u, 0x28u, 0xdbu, 0x71u, 0x88u, 0xffu, 0xf7u, 0xb4u, 0xffu, 0x00u, 0x24u, 0xffu, 0x22u,
0x03u, 0x27u, 0x94u, 0x46u, 0x00u, 0x23u, 0xf0u, 0x5eu, 0x71u, 0x68u, 0x83u, 0xb2u, 0x1fu, 0x40u, 0xffu, 0x00u,
0x66u, 0x46u, 0xbau, 0x40u, 0x89u, 0x01u, 0x31u, 0x40u, 0xd2u, 0x43u, 0xb9u, 0x40u, 0x00u, 0x28u, 0x15u, 0xdbu,
0x11u, 0x4eu, 0x83u, 0x08u, 0x9bu, 0x00u, 0x9bu, 0x19u, 0xc0u, 0x26u, 0xb6u, 0x00u, 0x9fu, 0x59u, 0x3au, 0x40u,
0x11u, 0x43u, 0x99u, 0x51u, 0x0du, 0x4bu, 0x9au, 0x68u, 0x0du, 0x4bu, 0x9au, 0x42u, 0x02u, 0xd1u, 0x29u, 0x00u,
0xffu, 0xf7u, 0xbcu, 0xffu, 0x20u, 0x00u, 0xf8u, 0xbdu, 0x0au, 0x4cu, 0xd8u, 0xe7u, 0x0fu, 0x26u, 0x33u, 0x40u,
0x08u, 0x3bu, 0x06u, 0x4eu, 0x9bu, 0x08u, 0x9bu, 0x00u, 0x9bu, 0x19u, 0xdeu, 0x69u, 0x32u, 0x40u, 0x11u, 0x43u,
0xd9u, 0x61u, 0xe7u, 0xe7u, 0x03u, 0x4cu, 0xedu, 0xe7u, 0x00u, 0xe1u, 0x00u, 0xe0u, 0x00u, 0xedu, 0x00u, 0xe0u,
0x00u, 0x00u, 0x02u, 0x08u, 0x01u, 0x00u, 0x56u, 0x00u, 0x70u, 0xb5u, 0x80u, 0x25u, 0x04u, 0x00u, 0x2du, 0x02u,
0xacu, 0x42u, 0x05u, 0xd8u, 0x06u, 0x4bu, 0x18u, 0x68u, 0x60u, 0x43u, 0xf9u, 0xf7u, 0xf5u, 0xfeu, 0x70u, 0xbdu,
0x04u, 0x4bu, 0x18u, 0x68u, 0xf9u, 0xf7u, 0xf0u, 0xfeu, 0x03u, 0x4bu, 0xe4u, 0x18u, 0xf0u, 0xe7u, 0xc0u, 0x46u,
0x04u, 0x01u, 0x02u, 0x08u, 0x00u, 0x01u, 0x02u, 0x08u, 0x00u, 0x80u, 0xffu, 0xffu, 0x10u, 0xb5u, 0x03u, 0x4bu,
0x1bu, 0x78u, 0x58u, 0x43u, 0xf9u, 0xf7u, 0xe0u, 0xfeu, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x08u, 0x01u, 0x02u, 0x08u,
0x80u, 0x22u, 0x05u, 0x4bu, 0x12u, 0x06u, 0x9au, 0x64u, 0x98u, 0x6cu, 0x04u, 0x4bu, 0xc0u, 0x43u, 0xc0u, 0x17u,
0x18u, 0x40u, 0x03u, 0x4bu, 0xc0u, 0x18u, 0x70u, 0x47u, 0x00u, 0x00u, 0x27u, 0x40u, 0xfdu, 0xffu, 0xb9u, 0xffu,
0x03u, 0x00u, 0x46u, 0x00u, 0x80u, 0x22u, 0x0cu, 0x4bu, 0x12u, 0x01u, 0x98u, 0x58u, 0x5au, 0x68u, 0xd2u, 0xb2u,
0x00u, 0x2au, 0x02u, 0xd0u, 0x80u, 0x22u, 0xd2u, 0x02u, 0x10u, 0x43u, 0x08u, 0x4au, 0x99u, 0x58u, 0x89u, 0xb2u,
0x00u, 0x29u, 0x02u, 0xd0u, 0x80u, 0x21u, 0x49u, 0x02u, 0x08u, 0x43u, 0x9bu, 0x58u, 0x1bu, 0x0cu, 0x02u, 0xd0u,
0x80u, 0x23u, 0x9bu, 0x02u, 0x18u, 0x43u, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u, 0x04u, 0x08u, 0x00u, 0x00u,
0xfeu, 0xe7u, 0x00u, 0x00u, 0x02u, 0x68u, 0x0au, 0x4bu, 0x10u, 0xb5u, 0x1au, 0x60u, 0x42u, 0x68u, 0x5au, 0x60u,
0x82u, 0x68u, 0x9au, 0x60u, 0xc2u, 0x68u, 0xdau, 0x60u, 0x02u, 0x69u, 0x1au, 0x61u, 0x42u, 0x69u, 0x5au, 0x61u,
0x82u, 0x69u, 0x9au, 0x61u, 0xc2u, 0x69u, 0xdau, 0x61u, 0xffu, 0xf7u, 0xeau, 0xffu, 0x10u, 0xbdu, 0xc0u, 0x46u,
0xe0u, 0x05u, 0x02u, 0x08u, 0xf0u, 0xb5u, 0x19u, 0x22u, 0x00u, 0x28u, 0x00u, 0xd1u, 0x4bu, 0x32u, 0x2au, 0x4bu,
0x8au, 0x42u, 0x92u, 0x41u, 0x1bu, 0x68u, 0x52u, 0x42u, 0x1cu, 0x00u, 0xacu, 0x34u, 0x24u, 0x88u, 0x1du, 0x68u,
0x67u, 0x19u, 0x03u, 0x25u, 0x3eu, 0x68u, 0xaeu, 0x43u, 0x16u, 0x43u, 0x3eu, 0x60u, 0x1eu, 0x68u, 0xa4u, 0x19u,
0x27u, 0x68u, 0x22u, 0x4eu, 0x37u, 0x40u, 0x27u, 0x60u, 0x1cu, 0x00u, 0xaeu, 0x34u, 0x24u, 0x88u, 0x1eu, 0x68u,
0xa7u, 0x19u, 0x3eu, 0x68u, 0xaeu, 0x43u, 0x32u, 0x43u, 0x3au, 0x60u, 0x1au, 0x68u, 0x1bu, 0x4eu, 0xa2u, 0x18u,
0x14u, 0x68u, 0x26u, 0x40u, 0x16u, 0x60u, 0x00u, 0x28u, 0x0eu, 0xd0u, 0x00u, 0x20u, 0x10u, 0x29u, 0x04u, 0xd9u,
0x21u, 0x30u, 0x88u, 0x42u, 0x80u, 0x41u, 0x40u, 0x42u, 0x01u, 0x30u, 0x0fu, 0x22u, 0x5bu, 0x68u, 0x19u, 0x68u,
0x91u, 0x43u, 0x08u, 0x43u, 0x18u, 0x60u, 0xf0u, 0xbdu, 0x1au, 0x00u, 0x55u, 0x32u, 0x12u, 0x78u, 0x8au, 0x42u,
0xf3u, 0xd2u, 0x1au, 0x00u, 0x56u, 0x32u, 0x12u, 0x78u, 0x01u, 0x20u, 0x8au, 0x42u, 0xedu, 0xd2u, 0x1au, 0x00u,
0x57u, 0x32u, 0x12u, 0x78u, 0x00u, 0x18u, 0x8au, 0x42u, 0xe7u, 0xd2u, 0x1au, 0x00u, 0x58u, 0x32u, 0x12u, 0x78u,
0x28u, 0x00u, 0x8au, 0x42u, 0xe1u, 0xd2u, 0x1au, 0x00u, 0x59u, 0x32u, 0x10u, 0x78u, 0x88u, 0x42u, 0x80u, 0x41u,
0x40u, 0x42u, 0x04u, 0x30u, 0xd9u, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xffu, 0xfcu, 0xffu, 0xffu,
0xb0u, 0x23u, 0x5bu, 0x05u, 0x5au, 0x78u, 0x21u, 0x20u, 0x00u, 0x2au, 0x01u, 0xd0u, 0x58u, 0x78u, 0xc0u, 0xb2u,
0x70u, 0x47u, 0xb0u, 0x23u, 0x5bu, 0x05u, 0x9au, 0x89u, 0x00u, 0x2au, 0x02u, 0xd0u, 0x98u, 0x89u, 0x80u, 0xb2u,
0x70u, 0x47u, 0x80u, 0x20u, 0x40u, 0x00u, 0xfbu, 0xe7u, 0x70u, 0xb5u, 0xffu, 0xf7u, 0xf2u, 0xffu, 0x80u, 0x23u,
0x19u, 0x4au, 0x5bu, 0x00u, 0x98u, 0x42u, 0x15u, 0xd1u, 0x11u, 0x68u, 0x0fu, 0x24u, 0x0bu, 0x00u, 0x02u, 0x22u,
0x9cu, 0x33u, 0x18u, 0x68u, 0x0bu, 0x68u, 0x18u, 0x18u, 0x03u, 0x68u, 0xa3u, 0x43u, 0x13u, 0x43u, 0x03u, 0x60u,
0x08u, 0x00u, 0xa0u, 0x30u, 0x0bu, 0x68u, 0x01u, 0x68u, 0x5bu, 0x18u, 0x19u, 0x68u, 0xa1u, 0x43u, 0x0au, 0x43u,
0x1au, 0x60u, 0x70u, 0xbdu, 0xb0u, 0x24u, 0x12u, 0x68u, 0x0cu, 0x4bu, 0x11u, 0x00u, 0x64u, 0x05u, 0xe3u, 0x58u,
0x0bu, 0x4du, 0x9cu, 0x31u, 0x2bu, 0x40u, 0xc0u, 0x25u, 0x10u, 0x68u, 0x09u, 0x68u, 0xadu, 0x00u, 0x41u, 0x18u,
0x08u, 0x68u, 0x28u, 0x40u, 0x03u, 0x43u, 0x0bu, 0x60u, 0x11u, 0x00u, 0xa0u, 0x31u, 0x13u, 0x68u, 0x0au, 0x68u,
0x9bu, 0x18u, 0x04u, 0x4au, 0xa2u, 0x58u, 0xe3u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x48u, 0x18u, 0x00u, 0x00u,
0xffu, 0xfcu, 0xffu, 0xffu, 0x44u, 0x18u, 0x00u, 0x00u, 0x70u, 0xb5u, 0xffu, 0xf7u, 0xb2u, 0xffu, 0x80u, 0x23u,
0x15u, 0x4au, 0x5bu, 0x00u, 0x98u, 0x42u, 0x0du, 0xd1u, 0x13u, 0x68u, 0x14u, 0x49u, 0x1au, 0x00u, 0x9cu, 0x32u,
0x12u, 0x68u, 0x1bu, 0x68u, 0x9bu, 0x18u, 0x1au, 0x68u, 0x11u, 0x40u, 0x80u, 0x22u, 0xd2u, 0x01u, 0x0au, 0x43u,
0x1au, 0x60u, 0x70u, 0xbdu, 0xb0u, 0x24u, 0x12u, 0x68u, 0x0du, 0x4bu, 0x11u, 0x00u, 0x64u, 0x05u, 0xe3u, 0x58u,
0x0cu, 0x4du, 0x9cu, 0x31u, 0x2bu, 0x40u, 0xc0u, 0x25u, 0x10u, 0x68u, 0x09u, 0x68u, 0xadu, 0x00u, 0x41u, 0x18u,
0x08u, 0x68u, 0x28u, 0x40u, 0x03u, 0x43u, 0x0bu, 0x60u, 0x11u, 0x00u, 0xa0u, 0x31u, 0x13u, 0x68u, 0x0au, 0x68u,
0x9bu, 0x18u, 0x05u, 0x4au, 0xa2u, 0x58u, 0xe3u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0xffu, 0x8fu, 0xffu, 0xffu,
0x50u, 0x18u, 0x00u, 0x00u, 0xffu, 0xfcu, 0xffu, 0xffu, 0x4cu, 0x18u, 0x00u, 0x00u, 0x10u, 0xb5u, 0xffu, 0xf7u,
0x78u, 0xffu, 0x80u, 0x23u, 0x12u, 0x4au, 0x5bu, 0x00u, 0x98u, 0x42u, 0x0du, 0xd1u, 0x13u, 0x68u, 0x11u, 0x49u,
0x1au, 0x00u, 0x9cu, 0x32u, 0x12u, 0x68u, 0x1bu, 0x68u, 0x9bu, 0x18u, 0x1au, 0x68u, 0x11u, 0x40u, 0xc0u, 0x22u,
0xd2u, 0x01u, 0x0au, 0x43u, 0x1au, 0x60u, 0x10u, 0xbdu, 0xb0u, 0x21u, 0x12u, 0x68u, 0x0au, 0x4bu, 0x49u, 0x05u,
0xcbu, 0x58u, 0x11u, 0x00u, 0x09u, 0x48u, 0x9cu, 0x31u, 0x03u, 0x40u, 0xc0u, 0x20u, 0x09u, 0x68u, 0x12u, 0x68u,
0x80u, 0x00u, 0x52u, 0x18u, 0x11u, 0x68u, 0x01u, 0x40u, 0x0bu, 0x43u, 0x13u, 0x60u, 0xebu, 0xe7u, 0xc0u, 0x46u,
0xf8u, 0x0au, 0x02u, 0x08u, 0xffu, 0x8fu, 0xffu, 0xffu, 0x1cu, 0x18u, 0x00u, 0x00u, 0xffu, 0xfcu, 0xffu, 0xffu,
0x70u, 0xb5u, 0xffu, 0xf7u, 0x46u, 0xffu, 0x80u, 0x23u, 0x1au, 0x4au, 0x5bu, 0x00u, 0x98u, 0x42u, 0x15u, 0xd1u,
0x11u, 0x68u, 0x0fu, 0x24u, 0x0bu, 0x00u, 0x03u, 0x22u, 0x9cu, 0x33u, 0x18u, 0x68u, 0x0bu, 0x68u, 0x18u, 0x18u,
0x03u, 0x68u, 0xa3u, 0x43u, 0x13u, 0x43u, 0x03u, 0x60u, 0x08u, 0x00u, 0xa0u, 0x30u, 0x0bu, 0x68u, 0x01u, 0x68u,
0x5bu, 0x18u, 0x19u, 0x68u, 0xa1u, 0x43u, 0x0au, 0x43u, 0x1au, 0x60u, 0x70u, 0xbdu, 0xb0u, 0x24u, 0x12u, 0x68u,
0x0du, 0x4bu, 0x11u, 0x00u, 0x64u, 0x05u, 0xe3u, 0x58u, 0x0cu, 0x4du, 0x9cu, 0x31u, 0x2bu, 0x40u, 0xc0u, 0x25u,
0x10u, 0x68u, 0x09u, 0x68u, 0xadu, 0x00u, 0x41u, 0x18u, 0x08u, 0x68u, 0x28u, 0x40u, 0x03u, 0x43u, 0x0bu, 0x60u,
0x11u, 0x00u, 0xa0u, 0x31u, 0x13u, 0x68u, 0x0au, 0x68u, 0x9bu, 0x18u, 0xc1u, 0x22u, 0x52u, 0x01u, 0xa2u, 0x58u,
0xe2u, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x24u, 0x18u, 0x00u, 0x00u, 0xffu, 0xfcu, 0xffu, 0xffu,
0xf8u, 0xb5u, 0x1eu, 0x4fu, 0xc0u, 0x25u, 0x3bu, 0x68u, 0x2du, 0x01u, 0x1au, 0x00u, 0x9cu, 0x32u, 0x1bu, 0x68u,
0x12u, 0x68u, 0x9bu, 0x18u, 0x1eu, 0x68u, 0xffu, 0xf7u, 0xfcu, 0xfeu, 0x34u, 0x00u, 0x80u, 0x23u, 0x2cu, 0x40u,
0x5bu, 0x00u, 0x98u, 0x42u, 0x0eu, 0xd1u, 0x00u, 0x20u, 0xfeu, 0xf7u, 0xd2u, 0xfcu, 0x04u, 0x00u, 0xffu, 0xf7u,
0xe7u, 0xfeu, 0x01u, 0x22u, 0x13u, 0x00u, 0x22u, 0x28u, 0x01u, 0xd8u, 0x63u, 0x42u, 0x63u, 0x41u, 0x13u, 0x40u,
0x18u, 0x00u, 0xf8u, 0xbdu, 0x3bu, 0x68u, 0x0eu, 0x4fu, 0x19u, 0x00u, 0x9cu, 0x31u, 0x1au, 0x68u, 0x08u, 0x68u,
0x12u, 0x18u, 0x10u, 0x68u, 0x38u, 0x40u, 0x10u, 0x60u, 0x1au, 0x68u, 0x08u, 0x68u, 0x12u, 0x18u, 0x28u, 0x00u,
0x17u, 0x68u, 0xb0u, 0x43u, 0x38u, 0x43u, 0x10u, 0x60u, 0x1bu, 0x68u, 0x0au, 0x68u, 0x9bu, 0x18u, 0x18u, 0x68u,
0x28u, 0x40u, 0x00u, 0x1bu, 0x43u, 0x1eu, 0x98u, 0x41u, 0xc0u, 0xb2u, 0xe2u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u,
0xffu, 0xf3u, 0xffu, 0xffu, 0x7fu, 0xb5u, 0x27u, 0x4bu, 0x86u, 0x00u, 0x0du, 0x00u, 0xf4u, 0x58u, 0x04u, 0x29u,
0x01u, 0xd0u, 0x01u, 0x29u, 0x27u, 0xd1u, 0x00u, 0x20u, 0x0fu, 0xe0u, 0xa3u, 0x68u, 0x2bu, 0x42u, 0x0bu, 0xd1u,
0xe3u, 0x68u, 0x29u, 0x00u, 0x1au, 0x68u, 0x5bu, 0x68u, 0x02u, 0x92u, 0x01u, 0x93u, 0x03u, 0x93u, 0x02u, 0xa8u,
0x23u, 0x68u, 0x98u, 0x47u, 0x1cu, 0x4bu, 0x1cu, 0x60u, 0x64u, 0x69u, 0x00u, 0x2cu, 0x0bu, 0xd0u, 0x1bu, 0x4bu,
0x98u, 0x42u, 0xeau, 0xd1u, 0x01u, 0x2du, 0xe8u, 0xd1u, 0x17u, 0x4bu, 0x18u, 0x48u, 0x1au, 0x68u, 0x18u, 0x4bu,
0x9au, 0x51u, 0x04u, 0xb0u, 0x70u, 0xbdu, 0x01u, 0x2du, 0xfbu, 0xd1u, 0x14u, 0x4bu, 0x98u, 0x42u, 0xf3u, 0xd0u,
0x13u, 0x4bu, 0x9cu, 0x51u, 0xf5u, 0xe7u, 0x02u, 0x29u, 0x06u, 0xd1u, 0x0fu, 0x4bu, 0x1bu, 0x68u, 0x18u, 0x1eu,
0xefu, 0xd0u, 0x1cu, 0x69u, 0x03u, 0xe0u, 0x1cu, 0x00u, 0x63u, 0x69u, 0x00u, 0x2bu, 0xfbu, 0xd1u, 0x00u, 0x20u,
0x00u, 0x2cu, 0xe6u, 0xd0u, 0xa3u, 0x68u, 0x2bu, 0x42u, 0x09u, 0xd1u, 0xe3u, 0x68u, 0x29u, 0x00u, 0x1au, 0x68u,
0x5bu, 0x68u, 0x02u, 0x92u, 0x01u, 0x93u, 0x03u, 0x93u, 0x02u, 0xa8u, 0x23u, 0x68u, 0x98u, 0x47u, 0x24u, 0x69u,
0xeeu, 0xe7u, 0xc0u, 0x46u, 0x98u, 0x07u, 0x02u, 0x08u, 0x94u, 0x07u, 0x02u, 0x08u, 0xffu, 0x00u, 0x42u, 0x00u,
0x80u, 0x07u, 0x02u, 0x08u, 0x70u, 0xb5u, 0x04u, 0x00u, 0xffu, 0xf7u, 0x62u, 0xfeu, 0x85u, 0xb2u, 0xffu, 0xf7u,
0x68u, 0xfeu, 0x06u, 0x00u, 0x00u, 0x20u, 0xfeu, 0xf7u, 0x43u, 0xfcu, 0x80u, 0x23u, 0x5bu, 0x00u, 0x00u, 0x28u,
0x11u, 0xd1u, 0x9eu, 0x42u, 0x11u, 0xd1u, 0x22u, 0x2du, 0x0fu, 0xd8u, 0x80u, 0x25u, 0x1eu, 0x4bu, 0x6du, 0x04u,
0x1bu, 0x68u, 0x24u, 0x06u, 0x59u, 0x68u, 0x1du, 0x4bu, 0x2cu, 0x40u, 0xcau, 0x58u, 0x1cu, 0x4du, 0x2au, 0x40u,
0x14u, 0x43u, 0xccu, 0x50u, 0x70u, 0xbdu, 0x9eu, 0x42u, 0x28u, 0xd0u, 0x17u, 0x4au, 0x12u, 0x68u, 0x15u, 0x6au,
0x9eu, 0x42u, 0x0eu, 0xd1u, 0x62u, 0x42u, 0x62u, 0x41u, 0xffu, 0x23u, 0x52u, 0x42u, 0x9au, 0x43u, 0x15u, 0x4bu,
0xd2u, 0x18u, 0x01u, 0x21u, 0x28u, 0x00u, 0xfbu, 0xf7u, 0xa1u, 0xfau, 0x00u, 0x28u, 0x08u, 0xd0u, 0x12u, 0x48u,
0xe8u, 0xe7u, 0x62u, 0x42u, 0x62u, 0x41u, 0x01u, 0x23u, 0x52u, 0x42u, 0x9au, 0x43u, 0x0fu, 0x4bu, 0xefu, 0xe7u,
0x09u, 0x4bu, 0x1bu, 0x68u, 0xbcu, 0x33u, 0x1bu, 0x68u, 0xebu, 0x18u, 0x1au, 0x68u, 0x00u, 0x2au, 0xfcu, 0xdbu,
0xebu, 0x68u, 0x00u, 0x20u, 0x1bu, 0x0eu, 0xa0u, 0x2bu, 0xe9u, 0xd1u, 0xd3u, 0xe7u, 0x22u, 0x2du, 0xe6u, 0xd9u,
0x01u, 0x4bu, 0x1bu, 0x68u, 0x1du, 0x6au, 0xd5u, 0xe7u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x18u, 0xf0u, 0x00u, 0x00u,
0xffu, 0xffu, 0xffu, 0xfeu, 0x01u, 0x01u, 0x00u, 0x30u, 0x04u, 0x00u, 0x42u, 0x00u, 0x03u, 0x00u, 0x00u, 0x0cu,
0x70u, 0xb5u, 0x02u, 0x00u, 0x05u, 0x00u, 0x00u, 0x23u, 0x69u, 0x21u, 0x07u, 0x20u, 0xfdu, 0xf7u, 0x4eu, 0xf9u,
0x04u, 0x00u, 0xffu, 0xf7u, 0xfdu, 0xfeu, 0x00u, 0x28u, 0x1au, 0xd0u, 0xf9u, 0xf7u, 0x36u, 0xfcu, 0x06u, 0x00u,
0x02u, 0x2du, 0x17u, 0xd1u, 0x01u, 0x20u, 0xffu, 0xf7u, 0x8du, 0xffu, 0x04u, 0x1eu, 0x0du, 0xd1u, 0xffu, 0xf7u,
0x03u, 0xfeu, 0x07u, 0x22u, 0x13u, 0x49u, 0x4bu, 0x69u, 0x93u, 0x43u, 0x2au, 0x40u, 0x13u, 0x43u, 0x4bu, 0x61u,
0x02u, 0x2du, 0x15u, 0xd1u, 0xffu, 0xf7u, 0x72u, 0xfeu, 0x00u, 0x24u, 0x30u, 0x00u, 0xf9u, 0xf7u, 0x21u, 0xfcu,
0x20u, 0x00u, 0x70u, 0xbdu, 0x07u, 0x22u, 0x0bu, 0x49u, 0x34u, 0x20u, 0x4bu, 0x69u, 0x93u, 0x43u, 0x1au, 0x00u,
0x03u, 0x23u, 0x13u, 0x43u, 0x4bu, 0x61u, 0xffu, 0xf7u, 0x21u, 0xfdu, 0xffu, 0xf7u, 0x25u, 0xfeu, 0xe0u, 0xe7u,
0x91u, 0x20u, 0xffu, 0xf7u, 0x1bu, 0xfdu, 0xffu, 0xf7u, 0x8bu, 0xfeu, 0x00u, 0x20u, 0xffu, 0xf7u, 0x62u, 0xffu,
0x04u, 0x00u, 0xe2u, 0xe7u, 0x00u, 0x00u, 0x26u, 0x40u, 0x1au, 0x4bu, 0x1bu, 0x68u, 0x19u, 0x00u, 0x88u, 0x31u,
0x1au, 0x68u, 0x09u, 0x68u, 0x51u, 0x18u, 0x09u, 0x68u, 0x01u, 0x62u, 0x19u, 0x00u, 0x8cu, 0x31u, 0x09u, 0x68u,
0x52u, 0x18u, 0x12u, 0x68u, 0x42u, 0x62u, 0x1au, 0x00u, 0x46u, 0x32u, 0x12u, 0x78u, 0x00u, 0x2au, 0x1fu, 0xd0u,
0x9au, 0x68u, 0xe0u, 0x32u, 0x12u, 0x68u, 0xd2u, 0x06u, 0x1au, 0xd5u, 0xf2u, 0x22u, 0xdbu, 0x68u, 0xd2u, 0x01u,
0x9au, 0x58u, 0x02u, 0x60u, 0xf0u, 0x22u, 0xd2u, 0x01u, 0x9au, 0x58u, 0x42u, 0x60u, 0x0au, 0x4au, 0x9au, 0x58u,
0x82u, 0x60u, 0x0au, 0x4au, 0x9au, 0x58u, 0xc2u, 0x60u, 0x09u, 0x4au, 0x9au, 0x58u, 0x02u, 0x61u, 0x09u, 0x4au,
0x9au, 0x58u, 0x42u, 0x61u, 0x08u, 0x4au, 0x9au, 0x58u, 0x82u, 0x61u, 0x08u, 0x4au, 0x9bu, 0x58u, 0xc3u, 0x61u,
0x70u, 0x47u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x04u, 0x78u, 0x00u, 0x00u, 0x08u, 0x78u, 0x00u, 0x00u,
0x0cu, 0x78u, 0x00u, 0x00u, 0x10u, 0x78u, 0x00u, 0x00u, 0x14u, 0x78u, 0x00u, 0x00u, 0x18u, 0x78u, 0x00u, 0x00u,
0x1au, 0x4bu, 0x1bu, 0x68u, 0x1au, 0x00u, 0x88u, 0x32u, 0x19u, 0x68u, 0x12u, 0x68u, 0x8au, 0x18u, 0x01u, 0x6au,
0x11u, 0x60u, 0x1au, 0x00u, 0x8cu, 0x32u, 0x19u, 0x68u, 0x12u, 0x68u, 0x8au, 0x18u, 0x41u, 0x6au, 0x11u, 0x60u,
0x1au, 0x00u, 0x46u, 0x32u, 0x12u, 0x78u, 0x00u, 0x2au, 0x1eu, 0xd0u, 0x9au, 0x68u, 0xe0u, 0x32u, 0x12u, 0x68u,
0xd2u, 0x06u, 0x19u, 0xd5u, 0xf0u, 0x22u, 0x41u, 0x68u, 0xdbu, 0x68u, 0xd2u, 0x01u, 0x99u, 0x50u, 0x81u, 0x68u,
0x0bu, 0x4au, 0x99u, 0x50u, 0xc1u, 0x68u, 0x0bu, 0x4au, 0x99u, 0x50u, 0x01u, 0x69u, 0x0au, 0x4au, 0x99u, 0x50u,
0x41u, 0x69u, 0x0au, 0x4au, 0x99u, 0x50u, 0x81u, 0x69u, 0x09u, 0x4au, 0x99u, 0x50u, 0xc1u, 0x69u, 0x09u, 0x4au,
0x99u, 0x50u, 0x01u, 0x68u, 0xe8u, 0x32u, 0x99u, 0x50u, 0x70u, 0x47u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x04u, 0x78u, 0x00u, 0x00u, 0x08u, 0x78u, 0x00u, 0x00u, 0x0cu, 0x78u, 0x00u, 0x00u, 0x10u, 0x78u, 0x00u, 0x00u,
0x14u, 0x78u, 0x00u, 0x00u, 0x18u, 0x78u, 0x00u, 0x00u, 0xf7u, 0xb5u, 0x07u, 0x00u, 0xffu, 0xf7u, 0x38u, 0xfdu,
0x66u, 0x4du, 0x06u, 0x00u, 0x6bu, 0x68u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x7du, 0xe0u, 0xf9u, 0xf7u, 0x6du, 0xfbu,
0x6bu, 0x68u, 0x00u, 0x90u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x89u, 0xe0u, 0x61u, 0x4cu, 0x22u, 0x68u, 0x13u, 0x00u,
0xbau, 0x33u, 0x19u, 0x88u, 0x07u, 0x23u, 0x4bu, 0x43u, 0x12u, 0x6au, 0x9bu, 0x18u, 0x1au, 0x68u, 0x00u, 0x2au,
0xfcu, 0xdau, 0xdbu, 0x68u, 0xdau, 0x00u, 0x21u, 0xd5u, 0x1bu, 0x0fu, 0x1bu, 0x07u, 0x59u, 0x48u, 0x01u, 0x93u,
0xffu, 0xf7u, 0x52u, 0xffu, 0x58u, 0x49u, 0x21u, 0x2eu, 0x00u, 0xd0u, 0x75u, 0xe0u, 0x22u, 0x68u, 0x90u, 0x20u,
0x13u, 0x00u, 0x88u, 0x33u, 0x1cu, 0x68u, 0x13u, 0x68u, 0x00u, 0x01u, 0x1cu, 0x19u, 0x23u, 0x68u, 0x0bu, 0x40u,
0x03u, 0x43u, 0x23u, 0x60u, 0x13u, 0x00u, 0x8cu, 0x33u, 0x12u, 0x68u, 0x1bu, 0x68u, 0xd3u, 0x18u, 0x1au, 0x68u,
0x11u, 0x40u, 0x08u, 0x43u, 0x18u, 0x60u, 0x4bu, 0x4bu, 0x01u, 0x9au, 0x13u, 0x43u, 0x80u, 0x22u, 0x48u, 0x4eu,
0x92u, 0x05u, 0x31u, 0x68u, 0x13u, 0x43u, 0x0au, 0x00u, 0xbau, 0x32u, 0x10u, 0x88u, 0x07u, 0x22u, 0x00u, 0x24u,
0x42u, 0x43u, 0x09u, 0x6au, 0x52u, 0x18u, 0xd3u, 0x60u, 0x54u, 0x60u, 0x53u, 0x68u, 0xffu, 0xf7u, 0xf1u, 0xfcu,
0x80u, 0x23u, 0x5bu, 0x00u, 0x98u, 0x42u, 0x5du, 0xd1u, 0x38u, 0x00u, 0x02u, 0xf0u, 0xbdu, 0xf8u, 0x32u, 0x68u,
0x13u, 0x00u, 0xbau, 0x33u, 0x19u, 0x88u, 0x07u, 0x23u, 0x4bu, 0x43u, 0x12u, 0x6au, 0x9bu, 0x18u, 0x1au, 0x68u,
0x00u, 0x2au, 0xfcu, 0xdau, 0xdfu, 0x68u, 0xfbu, 0x00u, 0x03u, 0xd5u, 0x38u, 0x01u, 0x00u, 0x09u, 0xffu, 0xf7u,
0x4fu, 0xffu, 0x36u, 0x4bu, 0x32u, 0x68u, 0x1fu, 0x40u, 0x13u, 0x00u, 0xbau, 0x33u, 0x19u, 0x88u, 0x07u, 0x23u,
0x4bu, 0x43u, 0x12u, 0x6au, 0x00u, 0x98u, 0x9bu, 0x18u, 0x00u, 0x22u, 0xdfu, 0x60u, 0x5au, 0x60u, 0xf9u, 0xf7u,
0x00u, 0xfbu, 0x00u, 0x2cu, 0x0fu, 0xd1u, 0x6bu, 0x68u, 0x00u, 0x2bu, 0x03u, 0xd0u, 0x08u, 0x21u, 0x01u, 0x20u,
0xffu, 0xf7u, 0xf8u, 0xfdu, 0x20u, 0x00u, 0xfeu, 0xbdu, 0x01u, 0x21u, 0x08u, 0x00u, 0xffu, 0xf7u, 0xf2u, 0xfdu,
0x04u, 0x1eu, 0x00u, 0xd1u, 0x7au, 0xe7u, 0x6bu, 0x68u, 0x00u, 0x2bu, 0x03u, 0xd0u, 0x02u, 0x21u, 0x01u, 0x20u,
0xffu, 0xf7u, 0xe8u, 0xfdu, 0x22u, 0x4bu, 0x9cu, 0x42u, 0xecu, 0xd0u, 0x22u, 0x4cu, 0xeau, 0xe7u, 0x04u, 0x21u,
0x01u, 0x20u, 0xffu, 0xf7u, 0xdfu, 0xfdu, 0x70u, 0xe7u, 0x20u, 0x68u, 0x80u, 0x22u, 0x03u, 0x00u, 0x88u, 0x33u,
0x1cu, 0x68u, 0x03u, 0x68u, 0x52u, 0x00u, 0x1cu, 0x19u, 0x23u, 0x68u, 0x0bu, 0x40u, 0x13u, 0x43u, 0x23u, 0x60u,
0x03u, 0x00u, 0x8cu, 0x33u, 0x00u, 0x68u, 0x1bu, 0x68u, 0xc3u, 0x18u, 0x18u, 0x68u, 0x01u, 0x40u, 0x0au, 0x43u,
0x1au, 0x60u, 0x88u, 0xe7u, 0x33u, 0x68u, 0x1au, 0x00u, 0xbcu, 0x32u, 0x19u, 0x6au, 0x12u, 0x68u, 0x52u, 0x18u,
0x11u, 0x68u, 0x00u, 0x29u, 0x10u, 0xdbu, 0xbau, 0x33u, 0x1bu, 0x88u, 0x9au, 0x18u, 0x13u, 0x68u, 0x00u, 0x2bu,
0x0au, 0xdbu, 0x04u, 0x23u, 0x0cu, 0x4au, 0x11u, 0x69u, 0x0bu, 0x43u, 0x13u, 0x61u, 0x01u, 0x2fu, 0x01u, 0xd0u,
0x30u, 0xbfu, 0x8cu, 0xe7u, 0x20u, 0xbfu, 0x8au, 0xe7u, 0x05u, 0x4cu, 0x88u, 0xe7u, 0x98u, 0x07u, 0x02u, 0x08u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x58u, 0x07u, 0x02u, 0x08u, 0xffu, 0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xdfu,
0x05u, 0x00u, 0x42u, 0x00u, 0xffu, 0x00u, 0x42u, 0x00u, 0x00u, 0xedu, 0x00u, 0xe0u, 0x10u, 0xb5u, 0x00u, 0x28u,
0x10u, 0xd1u, 0x07u, 0x29u, 0x2bu, 0xd8u, 0x17u, 0x4bu, 0x89u, 0x00u, 0x1cu, 0x68u, 0x23u, 0x00u, 0xb4u, 0x33u,
0x1bu, 0x88u, 0x24u, 0x68u, 0x1bu, 0x19u, 0x59u, 0x18u, 0x03u, 0x23u, 0x13u, 0x40u, 0x12u, 0x4au, 0x1au, 0x43u,
0x0au, 0x60u, 0x10u, 0xbdu, 0x01u, 0x28u, 0x0du, 0xd1u, 0x0eu, 0x4bu, 0x19u, 0x68u, 0x0bu, 0x00u, 0xb6u, 0x33u,
0x09u, 0x68u, 0x1bu, 0x88u, 0x5bu, 0x18u, 0x03u, 0x21u, 0x11u, 0x40u, 0x0bu, 0x4au, 0x0au, 0x43u, 0x1au, 0x60u,
0x00u, 0x20u, 0xeeu, 0xe7u, 0x02u, 0x28u, 0x0au, 0xd1u, 0x06u, 0x4bu, 0x19u, 0x68u, 0x0bu, 0x00u, 0xb8u, 0x33u,
0x09u, 0x68u, 0x1bu, 0x88u, 0x5bu, 0x18u, 0x03u, 0x21u, 0x0au, 0x40u, 0x03u, 0x49u, 0xeeu, 0xe7u, 0x03u, 0x48u,
0xdfu, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0xfau, 0x05u, 0x01u, 0x00u, 0x42u, 0x00u,
0x10u, 0xb5u, 0x00u, 0x28u, 0x11u, 0xd1u, 0x18u, 0x4bu, 0x1au, 0x68u, 0x13u, 0x00u, 0xb4u, 0x33u, 0x1cu, 0x88u,
0x03u, 0x23u, 0x0bu, 0x40u, 0x15u, 0x49u, 0x19u, 0x43u, 0x13u, 0x68u, 0xe3u, 0x18u, 0x1bu, 0x18u, 0x04u, 0x30u,
0x19u, 0x60u, 0x20u, 0x28u, 0xf8u, 0xd1u, 0x00u, 0x20u, 0x10u, 0xbdu, 0x01u, 0x28u, 0x0cu, 0xd1u, 0x0eu, 0x4bu,
0x1au, 0x68u, 0x13u, 0x00u, 0xb6u, 0x33u, 0x12u, 0x68u, 0x1bu, 0x88u, 0x9bu, 0x18u, 0x03u, 0x22u, 0x0au, 0x40u,
0x0au, 0x49u, 0x11u, 0x43u, 0x19u, 0x60u, 0xeeu, 0xe7u, 0x02u, 0x28u, 0x0au, 0xd1u, 0x06u, 0x4bu, 0x1au, 0x68u,
0x13u, 0x00u, 0xb8u, 0x33u, 0x12u, 0x68u, 0x1bu, 0x88u, 0x9bu, 0x18u, 0x03u, 0x22u, 0x11u, 0x40u, 0x03u, 0x4au,
0xefu, 0xe7u, 0x03u, 0x48u, 0xe0u, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0xfau, 0x05u,
0x01u, 0x00u, 0x42u, 0x00u, 0x02u, 0x4bu, 0x58u, 0x69u, 0x40u, 0x00u, 0xc0u, 0x0fu, 0x70u, 0x47u, 0xc0u, 0x46u,
0x00u, 0x00u, 0x26u, 0x40u, 0x10u, 0xb5u, 0x0du, 0x4bu, 0x1bu, 0x68u, 0x47u, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu,
0x12u, 0xd0u, 0xffu, 0xf7u, 0xefu, 0xffu, 0x0au, 0x4bu, 0x00u, 0x28u, 0x04u, 0xd1u, 0x80u, 0x22u, 0x59u, 0x69u,
0xd2u, 0x05u, 0x0au, 0x43u, 0x5au, 0x61u, 0x80u, 0x22u, 0x96u, 0x20u, 0x99u, 0x69u, 0x12u, 0x06u, 0x0au, 0x43u,
0x9au, 0x61u, 0x80u, 0x00u, 0xffu, 0xf7u, 0x12u, 0xfbu, 0x10u, 0xbdu, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0x00u, 0x20u, 0x06u, 0x4bu, 0x1bu, 0x68u, 0x47u, 0x33u, 0x1bu, 0x78u, 0x83u, 0x42u,
0x03u, 0xd0u, 0x04u, 0x4bu, 0x98u, 0x69u, 0x07u, 0x23u, 0x18u, 0x40u, 0xc0u, 0xb2u, 0x70u, 0x47u, 0xc0u, 0x46u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x70u, 0xb5u, 0x0du, 0x4bu, 0x04u, 0x00u, 0x1bu, 0x68u,
0x0du, 0x00u, 0x47u, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x11u, 0xd0u, 0xffu, 0xf7u, 0xe3u, 0xffu, 0xa0u, 0x42u,
0x0du, 0xd0u, 0x07u, 0x22u, 0x07u, 0x49u, 0x8bu, 0x69u, 0x93u, 0x43u, 0x22u, 0x40u, 0x13u, 0x43u, 0x8bu, 0x61u,
0x00u, 0x2du, 0x04u, 0xd0u, 0xa0u, 0x42u, 0x02u, 0xd2u, 0xc8u, 0x20u, 0xffu, 0xf7u, 0xdfu, 0xfau, 0x70u, 0xbdu,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x05u, 0x4bu, 0x1bu, 0x68u, 0x47u, 0x33u, 0x1bu, 0x78u,
0x00u, 0x2bu, 0x04u, 0xd0u, 0x03u, 0x4au, 0x93u, 0x69u, 0x5bu, 0x00u, 0x5bu, 0x08u, 0x93u, 0x61u, 0x70u, 0x47u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x10u, 0xb5u, 0x04u, 0x00u, 0xffu, 0xf7u, 0x92u, 0xffu,
0x0au, 0x4bu, 0x1bu, 0x68u, 0x47u, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu, 0x09u, 0xd0u, 0x00u, 0x28u, 0x07u, 0xd0u,
0x07u, 0x4bu, 0x00u, 0x2cu, 0x05u, 0xd0u, 0x80u, 0x22u, 0x99u, 0x69u, 0xd2u, 0x05u, 0x0au, 0x43u, 0x9au, 0x61u,
0x10u, 0xbdu, 0x9au, 0x69u, 0x03u, 0x49u, 0x0au, 0x40u, 0xf9u, 0xe7u, 0xc0u, 0x46u, 0xf8u, 0x0au, 0x02u, 0x08u,
0x00u, 0x00u, 0x26u, 0x40u, 0xffu, 0xffu, 0xffu, 0xbfu, 0x07u, 0x4au, 0x08u, 0x4bu, 0xd0u, 0x58u, 0xb0u, 0x22u,
0xe8u, 0x23u, 0x52u, 0x05u, 0xdbu, 0x00u, 0xd3u, 0x5cu, 0x1fu, 0x22u, 0x10u, 0x40u, 0xc0u, 0x1au, 0x43u, 0x1eu,
0x98u, 0x41u, 0xc0u, 0xb2u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x1cu, 0xffu, 0x00u, 0x00u,
0x01u, 0x20u, 0x02u, 0x4bu, 0x1bu, 0x68u, 0xdbu, 0x0du, 0x98u, 0x43u, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u,
0x00u, 0x23u, 0x10u, 0xb5u, 0x12u, 0x4cu, 0x1au, 0x00u, 0x6au, 0x21u, 0x07u, 0x20u, 0xfcu, 0xf7u, 0x86u, 0xfeu,
0x23u, 0x68u, 0x9bu, 0x06u, 0x17u, 0xd5u, 0xffu, 0xf7u, 0xebu, 0xffu, 0x22u, 0x68u, 0x00u, 0x28u, 0x13u, 0xd0u,
0x0cu, 0x4bu, 0x13u, 0x43u, 0x23u, 0x60u, 0xffu, 0xf7u, 0xcfu, 0xffu, 0x01u, 0x28u, 0x02u, 0xd1u, 0x50u, 0x22u,
0x09u, 0x4bu, 0xe2u, 0x50u, 0x01u, 0x20u, 0xffu, 0xf7u, 0x71u, 0xfau, 0x80u, 0x23u, 0x00u, 0x20u, 0x22u, 0x68u,
0xdbu, 0x05u, 0x13u, 0x43u, 0x23u, 0x60u, 0x10u, 0xbdu, 0x04u, 0x4bu, 0x13u, 0x43u, 0x23u, 0x60u, 0xf1u, 0xe7u,
0x00u, 0x00u, 0x26u, 0x40u, 0x00u, 0x00u, 0x04u, 0x17u, 0x30u, 0x7fu, 0x00u, 0x00u, 0x00u, 0x00u, 0x04u, 0x16u,
0x00u, 0x23u, 0x70u, 0xb5u, 0x1au, 0x00u, 0x6bu, 0x21u, 0x07u, 0x20u, 0xfcu, 0xf7u, 0x57u, 0xfeu, 0x05u, 0x00u,
0xffu, 0xf7u, 0xbeu, 0xffu, 0x17u, 0x4cu, 0x23u, 0x68u, 0x00u, 0x28u, 0x0du, 0xd0u, 0x16u, 0x4au, 0x13u, 0x40u,
0x23u, 0x60u, 0x08u, 0x20u, 0xffu, 0xf7u, 0x4au, 0xfau, 0x64u, 0x23u, 0x22u, 0x68u, 0x00u, 0x2au, 0x07u, 0xdbu,
0x00u, 0x2bu, 0x03u, 0xd1u, 0x28u, 0x00u, 0x70u, 0xbdu, 0x10u, 0x4au, 0xf0u, 0xe7u, 0x01u, 0x3bu, 0xf4u, 0xe7u,
0x00u, 0x2bu, 0xf7u, 0xd0u, 0x23u, 0x68u, 0x0eu, 0x4au, 0x01u, 0x20u, 0x13u, 0x40u, 0x23u, 0x60u, 0xffu, 0xf7u,
0x35u, 0xfau, 0xffu, 0xf7u, 0x9du, 0xffu, 0x00u, 0x28u, 0x01u, 0xd1u, 0x00u, 0x25u, 0xeau, 0xe7u, 0xffu, 0xf7u,
0x83u, 0xffu, 0x01u, 0x28u, 0xf9u, 0xd1u, 0xb0u, 0x22u, 0x06u, 0x4bu, 0x52u, 0x05u, 0xd2u, 0x58u, 0x06u, 0x4bu,
0xe2u, 0x50u, 0xf2u, 0xe7u, 0x00u, 0x00u, 0x26u, 0x40u, 0xffu, 0xffu, 0xfbu, 0xacu, 0xffu, 0xffu, 0xfbu, 0xadu,
0xffu, 0xffu, 0xffu, 0xfbu, 0x10u, 0x18u, 0x00u, 0x00u, 0x30u, 0x7fu, 0x00u, 0x00u, 0x10u, 0xb5u, 0xffu, 0xf7u,
0x7fu, 0xffu, 0x43u, 0x1eu, 0x98u, 0x41u, 0x80u, 0x23u, 0x40u, 0x42u, 0x5bu, 0x04u, 0x18u, 0x40u, 0x05u, 0x4bu,
0xc0u, 0x18u, 0x05u, 0x4bu, 0x1bu, 0x68u, 0x03u, 0x40u, 0x18u, 0x1au, 0x43u, 0x42u, 0x58u, 0x41u, 0xc0u, 0xb2u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x04u, 0x52u, 0x00u, 0x00u, 0x26u, 0x40u, 0xf7u, 0xb5u, 0x00u, 0x23u,
0x02u, 0x00u, 0x07u, 0x00u, 0x68u, 0x21u, 0x07u, 0x20u, 0xfcu, 0xf7u, 0xf8u, 0xfdu, 0x06u, 0x00u, 0xffu, 0xf7u,
0xa7u, 0xfbu, 0x00u, 0x28u, 0x23u, 0xd0u, 0xf9u, 0xf7u, 0xe0u, 0xf8u, 0xb0u, 0x24u, 0x01u, 0x90u, 0x22u, 0x4du,
0x22u, 0x4eu, 0x64u, 0x05u, 0x00u, 0x2fu, 0x1cu, 0xd1u, 0xe8u, 0x23u, 0xafu, 0x51u, 0xdbu, 0x00u, 0x01u, 0x20u,
0xe4u, 0x5cu, 0xffu, 0xf7u, 0x2fu, 0xfcu, 0xe4u, 0xb2u, 0x06u, 0x1eu, 0x0du, 0xd1u, 0xffu, 0xf7u, 0xa4u, 0xfau,
0x1fu, 0x21u, 0x1bu, 0x4au, 0x0cu, 0x40u, 0xabu, 0x58u, 0x8bu, 0x43u, 0x1cu, 0x43u, 0xacu, 0x50u, 0x00u, 0x2fu,
0x20u, 0xd1u, 0xffu, 0xf7u, 0x13u, 0xfbu, 0x3eu, 0x00u, 0x01u, 0x98u, 0xf9u, 0xf7u, 0xc2u, 0xf8u, 0x30u, 0x00u,
0xfeu, 0xbdu, 0xffu, 0xf7u, 0xb3u, 0xffu, 0x50u, 0x23u, 0x00u, 0x28u, 0x01u, 0xd1u, 0x11u, 0x4bu, 0xe3u, 0x58u,
0x1fu, 0x22u, 0xabu, 0x51u, 0x0eu, 0x49u, 0x10u, 0x4bu, 0x03u, 0x20u, 0xe4u, 0x5cu, 0x6bu, 0x58u, 0xe4u, 0xb2u,
0x93u, 0x43u, 0x1au, 0x00u, 0x0bu, 0x23u, 0x13u, 0x43u, 0x6bu, 0x50u, 0xffu, 0xf7u, 0xb7u, 0xf9u, 0xffu, 0xf7u,
0xbbu, 0xfau, 0xd5u, 0xe7u, 0x07u, 0x20u, 0xffu, 0xf7u, 0xb1u, 0xf9u, 0xffu, 0xf7u, 0x21u, 0xfbu, 0x00u, 0x20u,
0xffu, 0xf7u, 0xf8u, 0xfbu, 0x06u, 0x00u, 0xd7u, 0xe7u, 0x00u, 0x00u, 0x26u, 0x40u, 0x30u, 0x7fu, 0x00u, 0x00u,
0x1cu, 0xffu, 0x00u, 0x00u, 0x10u, 0x18u, 0x00u, 0x00u, 0x41u, 0x07u, 0x00u, 0x00u, 0xf8u, 0xb5u, 0x02u, 0x00u,
0x06u, 0x00u, 0x00u, 0x23u, 0x69u, 0x21u, 0x07u, 0x20u, 0xfcu, 0xf7u, 0x98u, 0xfdu, 0x04u, 0x00u, 0xffu, 0xf7u,
0xffu, 0xfeu, 0x00u, 0x28u, 0x58u, 0xd0u, 0xf9u, 0xf7u, 0x80u, 0xf8u, 0x07u, 0x00u, 0x02u, 0x2eu, 0x3cu, 0xd1u,
0xffu, 0xf7u, 0xe2u, 0xfeu, 0x00u, 0x28u, 0x2eu, 0xd1u, 0x1fu, 0x22u, 0x2du, 0x48u, 0x2du, 0x49u, 0x43u, 0x58u,
0x93u, 0x43u, 0x1au, 0x00u, 0x0bu, 0x23u, 0x13u, 0x43u, 0x43u, 0x50u, 0x09u, 0x20u, 0xffu, 0xf7u, 0x7eu, 0xf9u,
0xe0u, 0x23u, 0x27u, 0x4du, 0xdbu, 0x03u, 0x2au, 0x68u, 0xe1u, 0x20u, 0x13u, 0x43u, 0x07u, 0x22u, 0x2bu, 0x60u,
0x6bu, 0x69u, 0x16u, 0x40u, 0x93u, 0x43u, 0x1eu, 0x43u, 0x80u, 0x23u, 0x6eu, 0x61u, 0x6au, 0x69u, 0xdbu, 0x05u,
0x13u, 0x43u, 0x6bu, 0x61u, 0x80u, 0x23u, 0x6au, 0x69u, 0x1bu, 0x06u, 0x13u, 0x43u, 0x6bu, 0x61u, 0x80u, 0x00u,
0xffu, 0xf7u, 0x64u, 0xf9u, 0x80u, 0x23u, 0x00u, 0x24u, 0x2au, 0x68u, 0x1bu, 0x04u, 0x13u, 0x43u, 0x2bu, 0x60u,
0x19u, 0x4bu, 0xecu, 0x50u, 0x04u, 0xe0u, 0x00u, 0x20u, 0xffu, 0xf7u, 0x58u, 0xffu, 0x04u, 0x1eu, 0xcbu, 0xd0u,
0x38u, 0x00u, 0xf9u, 0xf7u, 0x46u, 0xf8u, 0x20u, 0x00u, 0xf8u, 0xbdu, 0x05u, 0x2eu, 0x11u, 0xd1u, 0xffu, 0xf7u,
0xa3u, 0xfeu, 0x01u, 0x28u, 0x07u, 0xd1u, 0x1fu, 0x22u, 0x0du, 0x48u, 0x0eu, 0x49u, 0x43u, 0x58u, 0x93u, 0x43u,
0x1au, 0x00u, 0x1bu, 0x23u, 0xbfu, 0xe7u, 0x01u, 0x20u, 0xffu, 0xf7u, 0x40u, 0xffu, 0x04u, 0x1eu, 0xf2u, 0xd0u,
0xe6u, 0xe7u, 0x00u, 0x2cu, 0xe4u, 0xd1u, 0xb8u, 0xe7u, 0x07u, 0x22u, 0x05u, 0x4bu, 0x04u, 0x00u, 0x5bu, 0x69u,
0x13u, 0x40u, 0x9eu, 0x42u, 0xdfu, 0xd0u, 0x30u, 0x00u, 0xffu, 0xf7u, 0xdau, 0xfbu, 0x04u, 0x00u, 0xdau, 0xe7u,
0x00u, 0x00u, 0x26u, 0x40u, 0x1cu, 0xffu, 0x00u, 0x00u, 0x30u, 0x7fu, 0x00u, 0x00u, 0x05u, 0x4au, 0x53u, 0x6cu,
0x1bu, 0x0au, 0xdbu, 0xb2u, 0x3au, 0x2bu, 0x03u, 0xd1u, 0x51u, 0x6cu, 0x03u, 0x4bu, 0x0bu, 0x43u, 0x53u, 0x64u,
0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x27u, 0x40u, 0x00u, 0x3au, 0x00u, 0x20u, 0x06u, 0x4au, 0x53u, 0x6cu,
0x1bu, 0x0au, 0xdbu, 0xb2u, 0x3au, 0x2bu, 0x06u, 0xd1u, 0x53u, 0x6cu, 0x04u, 0x49u, 0x19u, 0x40u, 0xe8u, 0x23u,
0x9bu, 0x01u, 0x0bu, 0x43u, 0x53u, 0x64u, 0x70u, 0x47u, 0x00u, 0x00u, 0x27u, 0x40u, 0xffu, 0xc5u, 0xffu, 0xdfu,
0x04u, 0x49u, 0x05u, 0x4au, 0x4bu, 0x6cu, 0x1au, 0x40u, 0xe8u, 0x23u, 0x9bu, 0x01u, 0x13u, 0x43u, 0x4bu, 0x64u,
0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x27u, 0x40u, 0xffu, 0x00u, 0xffu, 0xffu, 0xc0u, 0x22u, 0xc0u, 0x23u,
0x03u, 0x49u, 0x52u, 0x00u, 0x88u, 0x58u, 0x1bu, 0x06u, 0x03u, 0x43u, 0x8bu, 0x50u, 0x70u, 0x47u, 0xc0u, 0x46u,
0x00u, 0x00u, 0x26u, 0x40u, 0xc0u, 0x23u, 0x04u, 0x4au, 0x5bu, 0x00u, 0xd0u, 0x58u, 0x80u, 0x0fu, 0x43u, 0x1eu,
0x98u, 0x41u, 0xc0u, 0xb2u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0xc0u, 0x22u, 0x80u, 0x20u,
0x06u, 0x49u, 0x52u, 0x00u, 0x8bu, 0x58u, 0xc0u, 0x05u, 0x9bu, 0x00u, 0x9bu, 0x08u, 0x03u, 0x43u, 0x8bu, 0x50u,
0x80u, 0x23u, 0x88u, 0x58u, 0x1bu, 0x06u, 0x03u, 0x43u, 0x8bu, 0x50u, 0x70u, 0x47u, 0x00u, 0x00u, 0x26u, 0x40u,
0x10u, 0xb5u, 0x04u, 0x00u, 0xffu, 0xf7u, 0xdeu, 0xffu, 0x00u, 0x28u, 0x08u, 0xd1u, 0xc4u, 0x23u, 0x04u, 0x4au,
0x5bu, 0x00u, 0xd0u, 0x58u, 0xa4u, 0xb2u, 0x00u, 0x0cu, 0x00u, 0x04u, 0x20u, 0x43u, 0xd0u, 0x50u, 0x10u, 0xbdu,
0x00u, 0x00u, 0x26u, 0x40u, 0x10u, 0xb5u, 0x04u, 0x00u, 0xffu, 0xf7u, 0xccu, 0xffu, 0x00u, 0x28u, 0x0bu, 0xd1u,
0xc4u, 0x22u, 0xf0u, 0x20u, 0x05u, 0x49u, 0x52u, 0x00u, 0x00u, 0x03u, 0x24u, 0x04u, 0x8bu, 0x58u, 0x04u, 0x40u,
0x03u, 0x48u, 0x03u, 0x40u, 0x1cu, 0x43u, 0x8cu, 0x50u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u,
0xffu, 0xffu, 0xf0u, 0xffu, 0xe0u, 0x23u, 0x01u, 0x21u, 0x02u, 0x4au, 0xdbu, 0x00u, 0xd1u, 0x50u, 0xd3u, 0x58u,
0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x26u, 0x40u, 0x10u, 0xb5u, 0x11u, 0x48u, 0xfau, 0xf7u, 0xa2u, 0xfcu,
0xffu, 0xf7u, 0xb4u, 0xffu, 0xc0u, 0x22u, 0x01u, 0x20u, 0x0eu, 0x49u, 0x52u, 0x00u, 0x8bu, 0x58u, 0x83u, 0x43u,
0x8bu, 0x50u, 0x00u, 0xf0u, 0x7du, 0xf8u, 0x0cu, 0x4au, 0x80u, 0x21u, 0x03u, 0x20u, 0xfau, 0xf7u, 0xe8u, 0xfeu,
0x0au, 0x48u, 0xfau, 0xf7u, 0xc1u, 0xfdu, 0x0au, 0x4bu, 0x1bu, 0x68u, 0x51u, 0x33u, 0x1bu, 0x78u, 0x00u, 0x2bu,
0x02u, 0xd0u, 0x08u, 0x48u, 0xfau, 0xf7u, 0xf4u, 0xfdu, 0xfcu, 0xf7u, 0x92u, 0xfbu, 0x10u, 0xbdu, 0xc0u, 0x46u,
0x40u, 0x94u, 0x00u, 0x10u, 0x00u, 0x00u, 0x26u, 0x40u, 0x0cu, 0x00u, 0x00u, 0x08u, 0x6cu, 0x09u, 0x02u, 0x08u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x95u, 0x00u, 0x10u, 0xf0u, 0xb5u, 0x00u, 0x25u, 0x85u, 0xb0u, 0x03u, 0x95u,
0xffu, 0xf7u, 0xcau, 0xffu, 0x62u, 0xb6u, 0xfau, 0xf7u, 0x53u, 0xfcu, 0x80u, 0x20u, 0x02u, 0xaau, 0x03u, 0xa9u,
0x40u, 0x00u, 0xfau, 0xf7u, 0xe9u, 0xfau, 0x1eu, 0x4cu, 0x1eu, 0x4bu, 0x1fu, 0x4eu, 0x00u, 0x93u, 0x01u, 0x95u,
0x33u, 0x00u, 0x1eu, 0x4au, 0x21u, 0x00u, 0x03u, 0x98u, 0xf9u, 0xf7u, 0x9au, 0xfbu, 0x23u, 0x00u, 0x48u, 0x33u,
0x1bu, 0x78u, 0xabu, 0x42u, 0x28u, 0xd0u, 0x80u, 0x22u, 0xe3u, 0x6cu, 0xd2u, 0x00u, 0x9du, 0x18u, 0x18u, 0x4bu,
0x67u, 0x6bu, 0x1eu, 0x60u, 0xfcu, 0xf7u, 0xf6u, 0xfbu, 0x63u, 0x7eu, 0x01u, 0x2bu, 0x06u, 0xd1u, 0x63u, 0x7cu,
0x00u, 0x2bu, 0x03u, 0xd0u, 0x21u, 0x6au, 0xe0u, 0x69u, 0xf9u, 0xf7u, 0x04u, 0xfbu, 0x23u, 0x00u, 0x38u, 0x33u,
0x1eu, 0x78u, 0x00u, 0x2eu, 0x04u, 0xd0u, 0xe0u, 0x6bu, 0xfau, 0xf7u, 0xbeu, 0xfbu, 0xfau, 0xf7u, 0x30u, 0xfcu,
0x06u, 0x21u, 0x0eu, 0x20u, 0xfdu, 0xf7u, 0xa6u, 0xfeu, 0x28u, 0x00u, 0x32u, 0x00u, 0x39u, 0x00u, 0xfau, 0xf7u,
0x55u, 0xfbu, 0x00u, 0x20u, 0x05u, 0xb0u, 0xf0u, 0xbdu, 0x80u, 0x22u, 0xe3u, 0x69u, 0x52u, 0x02u, 0xd5u, 0xe7u,
0xacu, 0x07u, 0x02u, 0x08u, 0x94u, 0x0fu, 0x02u, 0x08u, 0x2cu, 0x09u, 0x02u, 0x08u, 0x18u, 0x10u, 0x02u, 0x08u,
0x3cu, 0x07u, 0x02u, 0x08u, 0x10u, 0xb5u, 0x00u, 0x20u, 0xfau, 0xf7u, 0x2au, 0xfeu, 0x10u, 0xbdu, 0x00u, 0x00u,
0x10u, 0xb5u, 0x00u, 0x20u, 0xfeu, 0xf7u, 0x34u, 0xffu, 0x04u, 0x1eu, 0x25u, 0xd0u, 0x13u, 0x4bu, 0x18u, 0x60u,
0xfdu, 0xf7u, 0xe6u, 0xffu, 0x41u, 0x1cu, 0x20u, 0x00u, 0x00u, 0xf0u, 0x96u, 0xf8u, 0x10u, 0x4bu, 0x04u, 0x00u,
0x18u, 0x60u, 0xfdu, 0xf7u, 0xbbu, 0xfeu, 0x41u, 0x1cu, 0x20u, 0x00u, 0x00u, 0xf0u, 0x8du, 0xf8u, 0x0du, 0x4bu,
0x44u, 0x1eu, 0x18u, 0x60u, 0x0cu, 0x49u, 0x20u, 0x00u, 0x00u, 0xf0u, 0x86u, 0xf8u, 0xfau, 0x21u, 0x0bu, 0x4bu,
0x01u, 0x30u, 0x18u, 0x70u, 0x89u, 0x00u, 0x20u, 0x00u, 0x00u, 0xf0u, 0x7eu, 0xf8u, 0x08u, 0x4bu, 0x01u, 0x30u,
0x18u, 0x60u, 0x08u, 0x4bu, 0xc0u, 0x03u, 0x18u, 0x60u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0xf8u, 0x00u, 0x02u, 0x08u,
0xfcu, 0x00u, 0x02u, 0x08u, 0xf4u, 0x00u, 0x02u, 0x08u, 0x40u, 0x42u, 0x0fu, 0x00u, 0x08u, 0x01u, 0x02u, 0x08u,
0x04u, 0x01u, 0x02u, 0x08u, 0x00u, 0x01u, 0x02u, 0x08u, 0x90u, 0x23u, 0x03u, 0x4au, 0x5bu, 0x01u, 0xd0u, 0x58u,
0x03u, 0x23u, 0x18u, 0x40u, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x00u, 0x20u, 0x40u, 0x10u, 0xb5u, 0x90u, 0x24u,
0xf8u, 0xf7u, 0xb3u, 0xfeu, 0x07u, 0x4bu, 0x64u, 0x01u, 0x1au, 0x59u, 0x07u, 0x49u, 0x11u, 0x40u, 0x07u, 0x4au,
0x0au, 0x43u, 0x1au, 0x51u, 0x10u, 0x22u, 0x59u, 0x68u, 0x11u, 0x42u, 0xfcu, 0xd0u, 0xf8u, 0xf7u, 0xa9u, 0xfeu,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x00u, 0x20u, 0x40u, 0xfcu, 0xffu, 0x00u, 0x00u, 0x01u, 0x00u, 0xfau, 0x05u,
0xf8u, 0xb5u, 0x90u, 0x25u, 0x0eu, 0x4cu, 0x6du, 0x01u, 0x07u, 0x00u, 0xf8u, 0xf7u, 0x96u, 0xfeu, 0x63u, 0x59u,
0x06u, 0x00u, 0xdbu, 0x43u, 0x9bu, 0x07u, 0x01u, 0xd1u, 0xffu, 0xf7u, 0xd8u, 0xffu, 0x80u, 0x23u, 0x9bu, 0x00u,
0xe7u, 0x50u, 0x63u, 0x59u, 0x07u, 0x4au, 0x1au, 0x40u, 0x07u, 0x4bu, 0x13u, 0x43u, 0x63u, 0x51u, 0x10u, 0x23u,
0x62u, 0x68u, 0x1au, 0x42u, 0xfcu, 0xd0u, 0x30u, 0x00u, 0xf8u, 0xf7u, 0x83u, 0xfeu, 0xf8u, 0xbdu, 0xc0u, 0x46u,
0x00u, 0x00u, 0x20u, 0x40u, 0xfcu, 0xffu, 0x00u, 0x00u, 0x03u, 0x00u, 0xfau, 0x05u, 0x02u, 0xb4u, 0x71u, 0x46u,
0x49u, 0x08u, 0x49u, 0x00u, 0x09u, 0x5cu, 0x49u, 0x00u, 0x8eu, 0x44u, 0x02u, 0xbcu, 0x70u, 0x47u, 0xc0u, 0x46u,
0x03u, 0xb4u, 0x71u, 0x46u, 0x49u, 0x08u, 0x40u, 0x00u, 0x49u, 0x00u, 0x09u, 0x5eu, 0x49u, 0x00u, 0x8eu, 0x44u,
0x03u, 0xbcu, 0x70u, 0x47u, 0x03u, 0xb4u, 0x71u, 0x46u, 0x49u, 0x08u, 0x40u, 0x00u, 0x49u, 0x00u, 0x09u, 0x5au,
0x49u, 0x00u, 0x8eu, 0x44u, 0x03u, 0xbcu, 0x70u, 0x47u, 0x00u, 0x22u, 0x43u, 0x08u, 0x8bu, 0x42u, 0x74u, 0xd3u,
0x03u, 0x09u, 0x8bu, 0x42u, 0x5fu, 0xd3u, 0x03u, 0x0au, 0x8bu, 0x42u, 0x44u, 0xd3u, 0x03u, 0x0bu, 0x8bu, 0x42u,
0x28u, 0xd3u, 0x03u, 0x0cu, 0x8bu, 0x42u, 0x0du, 0xd3u, 0xffu, 0x22u, 0x09u, 0x02u, 0x12u, 0xbau, 0x03u, 0x0cu,
0x8bu, 0x42u, 0x02u, 0xd3u, 0x12u, 0x12u, 0x09u, 0x02u, 0x65u, 0xd0u, 0x03u, 0x0bu, 0x8bu, 0x42u, 0x19u, 0xd3u,
0x00u, 0xe0u, 0x09u, 0x0au, 0xc3u, 0x0bu, 0x8bu, 0x42u, 0x01u, 0xd3u, 0xcbu, 0x03u, 0xc0u, 0x1au, 0x52u, 0x41u,
0x83u, 0x0bu, 0x8bu, 0x42u, 0x01u, 0xd3u, 0x8bu, 0x03u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x43u, 0x0bu, 0x8bu, 0x42u,
0x01u, 0xd3u, 0x4bu, 0x03u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x03u, 0x0bu, 0x8bu, 0x42u, 0x01u, 0xd3u, 0x0bu, 0x03u,
0xc0u, 0x1au, 0x52u, 0x41u, 0xc3u, 0x0au, 0x8bu, 0x42u, 0x01u, 0xd3u, 0xcbu, 0x02u, 0xc0u, 0x1au, 0x52u, 0x41u,
0x83u, 0x0au, 0x8bu, 0x42u, 0x01u, 0xd3u, 0x8bu, 0x02u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x43u, 0x0au, 0x8bu, 0x42u,
0x01u, 0xd3u, 0x4bu, 0x02u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x03u, 0x0au, 0x8bu, 0x42u, 0x01u, 0xd3u, 0x0bu, 0x02u,
0xc0u, 0x1au, 0x52u, 0x41u, 0xcdu, 0xd2u, 0xc3u, 0x09u, 0x8bu, 0x42u, 0x01u, 0xd3u, 0xcbu, 0x01u, 0xc0u, 0x1au,
0x52u, 0x41u, 0x83u, 0x09u, 0x8bu, 0x42u, 0x01u, 0xd3u, 0x8bu, 0x01u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x43u, 0x09u,
0x8bu, 0x42u, 0x01u, 0xd3u, 0x4bu, 0x01u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x03u, 0x09u, 0x8bu, 0x42u, 0x01u, 0xd3u,
0x0bu, 0x01u, 0xc0u, 0x1au, 0x52u, 0x41u, 0xc3u, 0x08u, 0x8bu, 0x42u, 0x01u, 0xd3u, 0xcbu, 0x00u, 0xc0u, 0x1au,
0x52u, 0x41u, 0x83u, 0x08u, 0x8bu, 0x42u, 0x01u, 0xd3u, 0x8bu, 0x00u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x43u, 0x08u,
0x8bu, 0x42u, 0x01u, 0xd3u, 0x4bu, 0x00u, 0xc0u, 0x1au, 0x52u, 0x41u, 0x41u, 0x1au, 0x00u, 0xd2u, 0x01u, 0x46u,
0x52u, 0x41u, 0x10u, 0x46u, 0x70u, 0x47u, 0xffu, 0xe7u, 0x01u, 0xb5u, 0x00u, 0x20u, 0x00u, 0xf0u, 0x06u, 0xf8u,
0x02u, 0xbdu, 0xc0u, 0x46u, 0x00u, 0x29u, 0xf7u, 0xd0u, 0x76u, 0xe7u, 0x70u, 0x47u, 0x70u, 0x47u, 0xc0u, 0x46u,
0x00u, 0x2bu, 0x11u, 0xd1u, 0x00u, 0x2au, 0x0fu, 0xd1u, 0x00u, 0x29u, 0x00u, 0xd1u, 0x00u, 0x28u, 0x02u, 0xd0u,
0x00u, 0x21u, 0xc9u, 0x43u, 0x08u, 0x1cu, 0x07u, 0xb4u, 0x02u, 0x48u, 0x02u, 0xa1u, 0x40u, 0x18u, 0x02u, 0x90u,
0x03u, 0xbdu, 0xc0u, 0x46u, 0xd9u, 0xffu, 0xffu, 0xffu, 0x03u, 0xb4u, 0x68u, 0x46u, 0x01u, 0xb5u, 0x02u, 0x98u,
0x00u, 0xf0u, 0x4eu, 0xf8u, 0x01u, 0x9bu, 0x9eu, 0x46u, 0x02u, 0xb0u, 0x0cu, 0xbcu, 0x70u, 0x47u, 0xc0u, 0x46u,
0xf0u, 0xb5u, 0xceu, 0x46u, 0x47u, 0x46u, 0x15u, 0x04u, 0x2du, 0x0cu, 0x2eu, 0x00u, 0x80u, 0xb5u, 0x07u, 0x04u,
0x14u, 0x0cu, 0x3fu, 0x0cu, 0x99u, 0x46u, 0x03u, 0x0cu, 0x7eu, 0x43u, 0x5du, 0x43u, 0x67u, 0x43u, 0x63u, 0x43u,
0x7fu, 0x19u, 0x34u, 0x0cu, 0xe4u, 0x19u, 0x9cu, 0x46u, 0xa5u, 0x42u, 0x03u, 0xd9u, 0x80u, 0x23u, 0x5bu, 0x02u,
0x98u, 0x46u, 0xc4u, 0x44u, 0x4bu, 0x46u, 0x43u, 0x43u, 0x51u, 0x43u, 0x25u, 0x0cu, 0x36u, 0x04u, 0x65u, 0x44u,
0x36u, 0x0cu, 0x24u, 0x04u, 0xa4u, 0x19u, 0x5bu, 0x19u, 0x59u, 0x18u, 0x20u, 0x00u, 0x0cu, 0xbcu, 0x90u, 0x46u,
0x99u, 0x46u, 0xf0u, 0xbdu, 0x70u, 0xb5u, 0x00u, 0x22u, 0x0cu, 0x4bu, 0x04u, 0x00u, 0x0du, 0x00u, 0x00u, 0xf0u,
0xc7u, 0xffu, 0x00u, 0x28u, 0x04u, 0xd1u, 0x20u, 0x00u, 0x29u, 0x00u, 0x00u, 0xf0u, 0x1du, 0xffu, 0x70u, 0xbdu,
0x06u, 0x4bu, 0x00u, 0x22u, 0x20u, 0x00u, 0x29u, 0x00u, 0x00u, 0xf0u, 0xceu, 0xfbu, 0x00u, 0xf0u, 0x14u, 0xffu,
0x80u, 0x23u, 0x1bu, 0x06u, 0x9cu, 0x46u, 0x60u, 0x44u, 0xf1u, 0xe7u, 0xc0u, 0x46u, 0x00u, 0x00u, 0xe0u, 0x41u,
0xf0u, 0xb5u, 0x4fu, 0x46u, 0x46u, 0x46u, 0xd6u, 0x46u, 0xc0u, 0xb5u, 0x04u, 0x00u, 0x82u, 0xb0u, 0x0du, 0x00u,
0x91u, 0x46u, 0x98u, 0x46u, 0x8bu, 0x42u, 0x2fu, 0xd8u, 0x2cu, 0xd0u, 0x41u, 0x46u, 0x48u, 0x46u, 0x00u, 0xf0u,
0xc7u, 0xffu, 0x29u, 0x00u, 0x06u, 0x00u, 0x20u, 0x00u, 0x00u, 0xf0u, 0xc2u, 0xffu, 0x33u, 0x1au, 0x9cu, 0x46u,
0x20u, 0x3bu, 0x9au, 0x46u, 0x00u, 0xd5u, 0x76u, 0xe0u, 0x4bu, 0x46u, 0x52u, 0x46u, 0x93u, 0x40u, 0x1fu, 0x00u,
0x4bu, 0x46u, 0x62u, 0x46u, 0x93u, 0x40u, 0x1eu, 0x00u, 0xafu, 0x42u, 0x28u, 0xd8u, 0x25u, 0xd0u, 0x53u, 0x46u,
0xa4u, 0x1bu, 0xbdu, 0x41u, 0x00u, 0x2bu, 0x00u, 0xdau, 0x7bu, 0xe0u, 0x00u, 0x22u, 0x00u, 0x23u, 0x00u, 0x92u,
0x01u, 0x93u, 0x01u, 0x23u, 0x52u, 0x46u, 0x93u, 0x40u, 0x01u, 0x93u, 0x01u, 0x23u, 0x62u, 0x46u, 0x93u, 0x40u,
0x00u, 0x93u, 0x18u, 0xe0u, 0x82u, 0x42u, 0xd0u, 0xd9u, 0x00u, 0x22u, 0x00u, 0x23u, 0x00u, 0x92u, 0x01u, 0x93u,
0x0au, 0x9bu, 0x00u, 0x2bu, 0x01u, 0xd0u, 0x1cu, 0x60u, 0x5du, 0x60u, 0x00u, 0x98u, 0x01u, 0x99u, 0x02u, 0xb0u,
0x1cu, 0xbcu, 0x90u, 0x46u, 0x99u, 0x46u, 0xa2u, 0x46u, 0xf0u, 0xbdu, 0xa3u, 0x42u, 0xd7u, 0xd9u, 0x00u, 0x22u,
0x00u, 0x23u, 0x00u, 0x92u, 0x01u, 0x93u, 0x63u, 0x46u, 0x00u, 0x2bu, 0xe9u, 0xd0u, 0xfbu, 0x07u, 0x98u, 0x46u,
0x41u, 0x46u, 0x72u, 0x08u, 0x0au, 0x43u, 0x7bu, 0x08u, 0x66u, 0x46u, 0x0eu, 0xe0u, 0xabu, 0x42u, 0x01u, 0xd1u,
0xa2u, 0x42u, 0x0cu, 0xd8u, 0xa4u, 0x1au, 0x9du, 0x41u, 0x01u, 0x20u, 0x24u, 0x19u, 0x6du, 0x41u, 0x00u, 0x21u,
0x01u, 0x3eu, 0x24u, 0x18u, 0x4du, 0x41u, 0x00u, 0x2eu, 0x06u, 0xd0u, 0xabu, 0x42u, 0xeeu, 0xd9u, 0x01u, 0x3eu,
0x24u, 0x19u, 0x6du, 0x41u, 0x00u, 0x2eu, 0xf8u, 0xd1u, 0x00u, 0x98u, 0x01u, 0x99u, 0x53u, 0x46u, 0x00u, 0x19u,
0x69u, 0x41u, 0x00u, 0x2bu, 0x23u, 0xdbu, 0x2bu, 0x00u, 0x52u, 0x46u, 0xd3u, 0x40u, 0x2au, 0x00u, 0x64u, 0x46u,
0xe2u, 0x40u, 0x1cu, 0x00u, 0x53u, 0x46u, 0x15u, 0x00u, 0x00u, 0x2bu, 0x2du, 0xdbu, 0x26u, 0x00u, 0x57u, 0x46u,
0xbeu, 0x40u, 0x33u, 0x00u, 0x26u, 0x00u, 0x67u, 0x46u, 0xbeu, 0x40u, 0x32u, 0x00u, 0x80u, 0x1au, 0x99u, 0x41u,
0x00u, 0x90u, 0x01u, 0x91u, 0xacu, 0xe7u, 0x62u, 0x46u, 0x20u, 0x23u, 0x9bu, 0x1au, 0x4au, 0x46u, 0xdau, 0x40u,
0x61u, 0x46u, 0x13u, 0x00u, 0x42u, 0x46u, 0x8au, 0x40u, 0x17u, 0x00u, 0x1fu, 0x43u, 0x80u, 0xe7u, 0x62u, 0x46u,
0x20u, 0x23u, 0x9bu, 0x1au, 0x2au, 0x00u, 0x66u, 0x46u, 0x9au, 0x40u, 0x23u, 0x00u, 0xf3u, 0x40u, 0x13u, 0x43u,
0xd4u, 0xe7u, 0x62u, 0x46u, 0x20u, 0x23u, 0x00u, 0x21u, 0x9bu, 0x1au, 0x00u, 0x22u, 0x00u, 0x91u, 0x01u, 0x92u,
0x01u, 0x22u, 0xdau, 0x40u, 0x01u, 0x92u, 0x80u, 0xe7u, 0x20u, 0x23u, 0x62u, 0x46u, 0x26u, 0x00u, 0x9bu, 0x1au,
0xdeu, 0x40u, 0x2fu, 0x00u, 0xb0u, 0x46u, 0x66u, 0x46u, 0xb7u, 0x40u, 0x46u, 0x46u, 0x3bu, 0x00u, 0x33u, 0x43u,
0xc8u, 0xe7u, 0xc0u, 0x46u, 0xf0u, 0xb5u, 0x57u, 0x46u, 0xdeu, 0x46u, 0x4eu, 0x46u, 0x45u, 0x46u, 0xe0u, 0xb5u,
0x83u, 0x46u, 0x07u, 0x00u, 0x0eu, 0x03u, 0x48u, 0x00u, 0x85u, 0xb0u, 0x92u, 0x46u, 0x1cu, 0x00u, 0x36u, 0x0bu,
0x40u, 0x0du, 0xcdu, 0x0fu, 0x00u, 0x28u, 0x00u, 0xd1u, 0x9du, 0xe0u, 0x95u, 0x4bu, 0x98u, 0x42u, 0x39u, 0xd0u,
0x80u, 0x23u, 0xf6u, 0x00u, 0x1bu, 0x04u, 0x1eu, 0x43u, 0x92u, 0x4au, 0x7bu, 0x0fu, 0x33u, 0x43u, 0x99u, 0x46u,
0x94u, 0x46u, 0x03u, 0x00u, 0x63u, 0x44u, 0x00u, 0x93u, 0x00u, 0x23u, 0x00u, 0x26u, 0xffu, 0x00u, 0x02u, 0x93u,
0x23u, 0x03u, 0x1bu, 0x0bu, 0x98u, 0x46u, 0x63u, 0x00u, 0xe4u, 0x0fu, 0x52u, 0x46u, 0x5bu, 0x0du, 0x01u, 0x94u,
0x00u, 0xd1u, 0xb3u, 0xe0u, 0x86u, 0x49u, 0x8bu, 0x42u, 0x00u, 0xd1u, 0x9eu, 0xe0u, 0x42u, 0x46u, 0xd1u, 0x00u,
0x80u, 0x22u, 0x12u, 0x04u, 0x0au, 0x43u, 0x51u, 0x46u, 0x49u, 0x0fu, 0x11u, 0x43u, 0x8bu, 0x46u, 0x81u, 0x49u,
0x52u, 0x46u, 0x8cu, 0x46u, 0x00u, 0x99u, 0x63u, 0x44u, 0xcbu, 0x1au, 0x00u, 0x21u, 0xd2u, 0x00u, 0x00u, 0x93u,
0x2bu, 0x00u, 0x63u, 0x40u, 0x9au, 0x46u, 0x0fu, 0x2eu, 0x00u, 0xd9u, 0x05u, 0xe1u, 0x7au, 0x4bu, 0xb6u, 0x00u,
0x9bu, 0x59u, 0x9fu, 0x46u, 0x5bu, 0x46u, 0x33u, 0x43u, 0x99u, 0x46u, 0x00u, 0xd0u, 0xb8u, 0xe0u, 0x02u, 0x23u,
0x08u, 0x26u, 0x00u, 0x27u, 0x00u, 0x90u, 0x02u, 0x93u, 0xcau, 0xe7u, 0xcbu, 0x46u, 0x3au, 0x00u, 0x02u, 0x99u,
0x01u, 0x95u, 0x01u, 0x9bu, 0x9au, 0x46u, 0x02u, 0x29u, 0x27u, 0xd0u, 0x03u, 0x29u, 0x00u, 0xd1u, 0x80u, 0xe2u,
0x01u, 0x29u, 0x44u, 0xd0u, 0x6du, 0x49u, 0x00u, 0x9bu, 0x8cu, 0x46u, 0x63u, 0x44u, 0x1cu, 0x00u, 0x00u, 0x2cu,
0x38u, 0xddu, 0x53u, 0x07u, 0x00u, 0xd0u, 0x13u, 0xe2u, 0xd2u, 0x08u, 0x5bu, 0x46u, 0xdbu, 0x01u, 0x09u, 0xd5u,
0x59u, 0x46u, 0x67u, 0x4bu, 0x19u, 0x40u, 0x8bu, 0x46u, 0x80u, 0x21u, 0xc9u, 0x00u, 0x8cu, 0x46u, 0x00u, 0x9bu,
0x63u, 0x44u, 0x1cu, 0x00u, 0x63u, 0x4bu, 0x9cu, 0x42u, 0x07u, 0xdcu, 0x5bu, 0x46u, 0x64u, 0x05u, 0x5fu, 0x07u,
0x5bu, 0x02u, 0x17u, 0x43u, 0x1bu, 0x0bu, 0x62u, 0x0du, 0x02u, 0xe0u, 0x00u, 0x23u, 0x00u, 0x27u, 0x58u, 0x4au,
0x00u, 0x21u, 0x1bu, 0x03u, 0x1cu, 0x0bu, 0x0bu, 0x0du, 0x1bu, 0x05u, 0x23u, 0x43u, 0x14u, 0x05u, 0x5au, 0x4au,
0x38u, 0x00u, 0x13u, 0x40u, 0x1cu, 0x43u, 0x53u, 0x46u, 0x64u, 0x00u, 0xdbu, 0x07u, 0x64u, 0x08u, 0x1cu, 0x43u,
0x21u, 0x00u, 0x05u, 0xb0u, 0x3cu, 0xbcu, 0x90u, 0x46u, 0x99u, 0x46u, 0xa2u, 0x46u, 0xabu, 0x46u, 0xf0u, 0xbdu,
0x01u, 0x22u, 0x52u, 0x42u, 0x01u, 0x23u, 0x1bu, 0x1bu, 0x38u, 0x2bu, 0x00u, 0xdcu, 0xadu, 0xe1u, 0x00u, 0x22u,
0x00u, 0x23u, 0x00u, 0x27u, 0xdcu, 0xe7u, 0x5bu, 0x46u, 0x33u, 0x43u, 0x99u, 0x46u, 0x5eu, 0xd0u, 0x00u, 0x2eu,
0x00u, 0xd1u, 0x8au, 0xe1u, 0x30u, 0x00u, 0x00u, 0xf0u, 0x3du, 0xfeu, 0x03u, 0x00u, 0x0bu, 0x3bu, 0x1cu, 0x2bu,
0x00u, 0xddu, 0x7bu, 0xe1u, 0x1du, 0x22u, 0xd3u, 0x1au, 0x5au, 0x46u, 0x01u, 0x00u, 0xdau, 0x40u, 0x08u, 0x39u,
0x8eu, 0x40u, 0x13u, 0x00u, 0x5fu, 0x46u, 0x33u, 0x43u, 0x99u, 0x46u, 0x8fu, 0x40u, 0x3fu, 0x4bu, 0x00u, 0x26u,
0x1bu, 0x1au, 0x00u, 0x93u, 0x00u, 0x23u, 0x02u, 0x93u, 0x52u, 0xe7u, 0x41u, 0x46u, 0x53u, 0x46u, 0x0bu, 0x43u,
0x3bu, 0x49u, 0x9bu, 0x46u, 0x8cu, 0x46u, 0x00u, 0x9bu, 0x63u, 0x44u, 0x00u, 0x93u, 0x5bu, 0x46u, 0x00u, 0x2bu,
0x3bu, 0xd1u, 0x02u, 0x23u, 0x00u, 0x22u, 0x1eu, 0x43u, 0x02u, 0x21u, 0x61u, 0xe7u, 0x43u, 0x46u, 0x13u, 0x43u,
0x9bu, 0x46u, 0x37u, 0xd0u, 0x43u, 0x46u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x62u, 0xe1u, 0x40u, 0x46u, 0x00u, 0xf0u,
0x09u, 0xfeu, 0x03u, 0x00u, 0x0bu, 0x3bu, 0x1cu, 0x2bu, 0x00u, 0xddu, 0x53u, 0xe1u, 0x02u, 0x00u, 0x41u, 0x46u,
0x08u, 0x3au, 0x91u, 0x40u, 0x88u, 0x46u, 0x1du, 0x21u, 0xcbu, 0x1au, 0x51u, 0x46u, 0xd9u, 0x40u, 0x0bu, 0x00u,
0x41u, 0x46u, 0x0bu, 0x43u, 0x9bu, 0x46u, 0x53u, 0x46u, 0x93u, 0x40u, 0x1au, 0x00u, 0x00u, 0x9bu, 0x25u, 0x49u,
0x9cu, 0x46u, 0x60u, 0x44u, 0x03u, 0x00u, 0x8cu, 0x46u, 0x63u, 0x44u, 0x00u, 0x93u, 0x00u, 0x21u, 0x37u, 0xe7u,
0x03u, 0x23u, 0xb1u, 0x46u, 0x00u, 0x90u, 0x0cu, 0x26u, 0x02u, 0x93u, 0x11u, 0xe7u, 0x00u, 0x23u, 0x00u, 0x93u,
0x01u, 0x33u, 0x04u, 0x26u, 0x00u, 0x27u, 0x02u, 0x93u, 0x0au, 0xe7u, 0x03u, 0x23u, 0xc3u, 0x46u, 0x1eu, 0x43u,
0x03u, 0x21u, 0x25u, 0xe7u, 0x01u, 0x33u, 0x1eu, 0x43u, 0x00u, 0x22u, 0x01u, 0x21u, 0x20u, 0xe7u, 0x00u, 0x23u,
0x9au, 0x46u, 0x80u, 0x23u, 0x00u, 0x27u, 0x1bu, 0x03u, 0x09u, 0x4au, 0x61u, 0xe7u, 0x80u, 0x23u, 0x49u, 0x46u,
0x1bu, 0x03u, 0x19u, 0x42u, 0x00u, 0xd1u, 0xe2u, 0xe0u, 0x59u, 0x46u, 0x19u, 0x42u, 0x00u, 0xd0u, 0xdeu, 0xe0u,
0x0bu, 0x43u, 0x1bu, 0x03u, 0x17u, 0x00u, 0x1bu, 0x0bu, 0xa2u, 0x46u, 0x01u, 0x4au, 0x50u, 0xe7u, 0xc0u, 0x46u,
0xffu, 0x07u, 0x00u, 0x00u, 0x01u, 0xfcu, 0xffu, 0xffu, 0x34u, 0x95u, 0x00u, 0x10u, 0xffu, 0x03u, 0x00u, 0x00u,
0xffu, 0xffu, 0xffu, 0xfeu, 0xfeu, 0x07u, 0x00u, 0x00u, 0xffu, 0xffu, 0x0fu, 0x80u, 0x0du, 0xfcu, 0xffu, 0xffu,
0x01u, 0xf8u, 0xffu, 0xffu, 0xf3u, 0x03u, 0x00u, 0x00u, 0xd9u, 0x45u, 0x00u, 0xd9u, 0xcbu, 0xe0u, 0x00u, 0xd1u,
0xc6u, 0xe0u, 0x3cu, 0x00u, 0x48u, 0x46u, 0x00u, 0x27u, 0x00u, 0x9bu, 0x01u, 0x3bu, 0x00u, 0x93u, 0x5bu, 0x46u,
0x16u, 0x0eu, 0x1bu, 0x02u, 0x1eu, 0x43u, 0x13u, 0x02u, 0x98u, 0x46u, 0x33u, 0x04u, 0x1bu, 0x0cu, 0x99u, 0x46u,
0x31u, 0x0cu, 0x01u, 0x91u, 0xffu, 0xf7u, 0x66u, 0xfdu, 0x4au, 0x46u, 0x42u, 0x43u, 0x0bu, 0x04u, 0x21u, 0x0cu,
0x05u, 0x00u, 0x19u, 0x43u, 0x8au, 0x42u, 0x07u, 0xd9u, 0x89u, 0x19u, 0x01u, 0x3du, 0x8eu, 0x42u, 0x03u, 0xd8u,
0x8au, 0x42u, 0x01u, 0xd9u, 0x85u, 0x1eu, 0x89u, 0x19u, 0x88u, 0x1au, 0x01u, 0x99u, 0xffu, 0xf7u, 0x52u, 0xfdu,
0x09u, 0x04u, 0x8cu, 0x46u, 0x4au, 0x46u, 0x21u, 0x04u, 0x64u, 0x46u, 0x42u, 0x43u, 0x09u, 0x0cu, 0x03u, 0x00u,
0x21u, 0x43u, 0x8au, 0x42u, 0x04u, 0xd9u, 0x89u, 0x19u, 0x01u, 0x3bu, 0x8eu, 0x42u, 0x00u, 0xd8u, 0xf1u, 0xe0u,
0x2du, 0x04u, 0x1du, 0x43u, 0xabu, 0x46u, 0x43u, 0x46u, 0x89u, 0x1au, 0x42u, 0x46u, 0x28u, 0x0cu, 0x12u, 0x04u,
0x1du, 0x0cu, 0x5bu, 0x46u, 0x14u, 0x0cu, 0x22u, 0x00u, 0x1bu, 0x04u, 0x1bu, 0x0cu, 0x5au, 0x43u, 0x03u, 0x94u,
0x6bu, 0x43u, 0x44u, 0x43u, 0x02u, 0x95u, 0x68u, 0x43u, 0x1bu, 0x19u, 0x15u, 0x0cu, 0xebu, 0x18u, 0x9cu, 0x42u,
0x03u, 0xd9u, 0x80u, 0x24u, 0x64u, 0x02u, 0xa4u, 0x46u, 0x60u, 0x44u, 0x1cu, 0x0cu, 0x15u, 0x04u, 0x1bu, 0x04u,
0x2du, 0x0cu, 0x20u, 0x18u, 0x5du, 0x19u, 0x81u, 0x42u, 0x77u, 0xd3u, 0x73u, 0xd0u, 0x0cu, 0x1au, 0xa2u, 0x4au,
0x7du, 0x1bu, 0xafu, 0x42u, 0xbfu, 0x41u, 0x94u, 0x46u, 0x00u, 0x9bu, 0x7fu, 0x42u, 0x63u, 0x44u, 0xe0u, 0x1bu,
0x1cu, 0x00u, 0x86u, 0x42u, 0x00u, 0xd1u, 0xdbu, 0xe0u, 0x01u, 0x99u, 0xffu, 0xf7u, 0x0bu, 0xfdu, 0x4au, 0x46u,
0x42u, 0x43u, 0x0bu, 0x04u, 0x29u, 0x0cu, 0x07u, 0x00u, 0x19u, 0x43u, 0x8au, 0x42u, 0x07u, 0xd9u, 0x89u, 0x19u,
0x01u, 0x3fu, 0x8eu, 0x42u, 0x03u, 0xd8u, 0x8au, 0x42u, 0x01u, 0xd9u, 0x87u, 0x1eu, 0x89u, 0x19u, 0x88u, 0x1au,
0x01u, 0x99u, 0xffu, 0xf7u, 0xf7u, 0xfcu, 0x09u, 0x04u, 0x4au, 0x46u, 0x89u, 0x46u, 0x29u, 0x04u, 0x4du, 0x46u,
0x42u, 0x43u, 0x09u, 0x0cu, 0x03u, 0x00u, 0x29u, 0x43u, 0x8au, 0x42u, 0x07u, 0xd9u, 0x89u, 0x19u, 0x01u, 0x3bu,
0x8eu, 0x42u, 0x03u, 0xd8u, 0x8au, 0x42u, 0x01u, 0xd9u, 0x83u, 0x1eu, 0x89u, 0x19u, 0x3fu, 0x04u, 0x89u, 0x1au,
0x3au, 0x00u, 0x03u, 0x9fu, 0x1au, 0x43u, 0x38u, 0x00u, 0x13u, 0x04u, 0x1bu, 0x0cu, 0x58u, 0x43u, 0x81u, 0x46u,
0x02u, 0x98u, 0x15u, 0x0cu, 0x6fu, 0x43u, 0x43u, 0x43u, 0x45u, 0x43u, 0x48u, 0x46u, 0x00u, 0x0cu, 0x84u, 0x46u,
0xdbu, 0x19u, 0x63u, 0x44u, 0x9fu, 0x42u, 0x03u, 0xd9u, 0x80u, 0x20u, 0x40u, 0x02u, 0x84u, 0x46u, 0x65u, 0x44u,
0x48u, 0x46u, 0x1fu, 0x0cu, 0x00u, 0x04u, 0x1bu, 0x04u, 0x00u, 0x0cu, 0x7du, 0x19u, 0x18u, 0x18u, 0xa9u, 0x42u,
0x00u, 0xd2u, 0x84u, 0xe0u, 0x00u, 0xd1u, 0x7fu, 0xe0u, 0x01u, 0x23u, 0x1au, 0x43u, 0x57u, 0xe6u, 0x80u, 0x23u,
0x4au, 0x46u, 0x1bu, 0x03u, 0x13u, 0x43u, 0x1bu, 0x03u, 0x1bu, 0x0bu, 0xaau, 0x46u, 0x6fu, 0x4au, 0x6fu, 0xe6u,
0xbau, 0x42u, 0x00u, 0xd9u, 0x35u, 0xe7u, 0x4bu, 0x46u, 0xdcu, 0x07u, 0x58u, 0x08u, 0x7bu, 0x08u, 0x1cu, 0x43u,
0xffu, 0x07u, 0x34u, 0xe7u, 0x00u, 0x24u, 0xafu, 0x42u, 0x89u, 0xd2u, 0x47u, 0x44u, 0x47u, 0x45u, 0xa4u, 0x41u,
0x5bu, 0x46u, 0x64u, 0x42u, 0xa4u, 0x19u, 0x64u, 0x18u, 0x01u, 0x3bu, 0xa6u, 0x42u, 0x1eu, 0xd2u, 0xa0u, 0x42u,
0x6du, 0xd8u, 0x00u, 0xd1u, 0xb6u, 0xe0u, 0x24u, 0x1au, 0x9bu, 0x46u, 0x78u, 0xe7u, 0x03u, 0x00u, 0x5au, 0x46u,
0x28u, 0x3bu, 0x9au, 0x40u, 0x00u, 0x27u, 0x91u, 0x46u, 0x88u, 0xe6u, 0x58u, 0x46u, 0x00u, 0xf0u, 0xb2u, 0xfcu,
0x20u, 0x30u, 0x72u, 0xe6u, 0x03u, 0x00u, 0x52u, 0x46u, 0x28u, 0x3bu, 0x9au, 0x40u, 0x93u, 0x46u, 0x00u, 0x22u,
0xb4u, 0xe6u, 0x50u, 0x46u, 0x00u, 0xf0u, 0xa6u, 0xfcu, 0x20u, 0x30u, 0x9au, 0xe6u, 0xa6u, 0x42u, 0xe2u, 0xd1u,
0xb8u, 0x45u, 0xdcu, 0xd9u, 0x34u, 0x1au, 0x9bu, 0x46u, 0x59u, 0xe7u, 0x1fu, 0x2bu, 0x65u, 0xdcu, 0x50u, 0x4cu,
0x00u, 0x99u, 0xa4u, 0x46u, 0x5cu, 0x46u, 0x61u, 0x44u, 0x08u, 0x00u, 0x8cu, 0x40u, 0x11u, 0x00u, 0x82u, 0x40u,
0xd9u, 0x40u, 0x50u, 0x1eu, 0x82u, 0x41u, 0x0cu, 0x43u, 0x14u, 0x43u, 0x5au, 0x46u, 0xdau, 0x40u, 0x13u, 0x00u,
0x62u, 0x07u, 0x09u, 0xd0u, 0x0fu, 0x22u, 0x22u, 0x40u, 0x04u, 0x2au, 0x05u, 0xd0u, 0x22u, 0x00u, 0x14u, 0x1du,
0x94u, 0x42u, 0x89u, 0x41u, 0x49u, 0x42u, 0x5bu, 0x18u, 0x1au, 0x02u, 0x62u, 0xd5u, 0x01u, 0x22u, 0x00u, 0x23u,
0x00u, 0x27u, 0x0du, 0xe6u, 0x8au, 0x42u, 0x00u, 0xd8u, 0x0au, 0xe7u, 0x83u, 0x1eu, 0x89u, 0x19u, 0x07u, 0xe7u,
0x0fu, 0x23u, 0x13u, 0x40u, 0x04u, 0x2bu, 0x00u, 0xd1u, 0xe6u, 0xe5u, 0x17u, 0x1du, 0x97u, 0x42u, 0x92u, 0x41u,
0x53u, 0x42u, 0x9bu, 0x44u, 0xfau, 0x08u, 0xe0u, 0xe5u, 0x00u, 0x28u, 0x00u, 0xd1u, 0xd7u, 0xe5u, 0x71u, 0x18u,
0x53u, 0x1eu, 0xb1u, 0x42u, 0x27u, 0xd3u, 0xa9u, 0x42u, 0x15u, 0xd3u, 0x58u, 0xd0u, 0x1au, 0x00u, 0x73u, 0xe7u,
0x00u, 0x2bu, 0x00u, 0xdcu, 0x04u, 0xe6u, 0x01u, 0x23u, 0x00u, 0x22u, 0x9bu, 0x44u, 0xcdu, 0xe5u, 0x02u, 0x23u,
0x47u, 0x44u, 0x47u, 0x45u, 0x89u, 0x41u, 0x5bu, 0x42u, 0x9cu, 0x46u, 0x49u, 0x42u, 0x89u, 0x19u, 0x0cu, 0x19u,
0xe3u, 0x44u, 0x24u, 0x1au, 0x03u, 0xe7u, 0x43u, 0x46u, 0x5fu, 0x00u, 0x47u, 0x45u, 0x9bu, 0x41u, 0xb8u, 0x46u,
0x5bu, 0x42u, 0x9eu, 0x19u, 0x02u, 0x3au, 0x89u, 0x19u, 0xa9u, 0x42u, 0x00u, 0xd0u, 0x54u, 0xe7u, 0x40u, 0x45u,
0x00u, 0xd0u, 0x51u, 0xe7u, 0xabu, 0xe5u, 0x1au, 0x00u, 0xf6u, 0xe7u, 0x1fu, 0x21u, 0x5fu, 0x46u, 0x49u, 0x42u,
0x0cu, 0x1bu, 0xe7u, 0x40u, 0x20u, 0x2bu, 0x07u, 0xd0u, 0x1au, 0x49u, 0x00u, 0x9bu, 0x8cu, 0x46u, 0x63u, 0x44u,
0x18u, 0x00u, 0x5bu, 0x46u, 0x83u, 0x40u, 0x1au, 0x43u, 0x50u, 0x1eu, 0x82u, 0x41u, 0x3au, 0x43u, 0x07u, 0x27u,
0x00u, 0x23u, 0x17u, 0x40u, 0x09u, 0xd0u, 0x0fu, 0x21u, 0x00u, 0x23u, 0x11u, 0x40u, 0x14u, 0x00u, 0x04u, 0x29u,
0x95u, 0xd1u, 0x22u, 0x00u, 0x5fu, 0x07u, 0x5bu, 0x02u, 0x1bu, 0x0bu, 0xd2u, 0x08u, 0x17u, 0x43u, 0x00u, 0x22u,
0xa6u, 0xe5u, 0x80u, 0x23u, 0x59u, 0x46u, 0x1bu, 0x03u, 0x0bu, 0x43u, 0x1bu, 0x03u, 0x17u, 0x00u, 0x1bu, 0x0bu,
0x06u, 0x4au, 0x9du, 0xe5u, 0xbdu, 0x42u, 0xb2u, 0xd8u, 0x9bu, 0x46u, 0x00u, 0x24u, 0xbfu, 0xe6u, 0x80u, 0x45u,
0xb9u, 0xd3u, 0x1au, 0x00u, 0xc3u, 0xe7u, 0xc0u, 0x46u, 0xffu, 0x03u, 0x00u, 0x00u, 0xffu, 0x07u, 0x00u, 0x00u,
0x1eu, 0x04u, 0x00u, 0x00u, 0x3eu, 0x04u, 0x00u, 0x00u, 0xf8u, 0xb5u, 0x57u, 0x46u, 0x4eu, 0x46u, 0x45u, 0x46u,
0xdeu, 0x46u, 0x0cu, 0x00u, 0x09u, 0x03u, 0xe0u, 0xb5u, 0x49u, 0x0au, 0x46u, 0x0fu, 0x5fu, 0x00u, 0x31u, 0x43u,
0x1eu, 0x03u, 0xdbu, 0x0fu, 0x76u, 0x0au, 0x9bu, 0x46u, 0x53u, 0x0fu, 0x33u, 0x43u, 0xc8u, 0x4eu, 0x65u, 0x00u,
0xc0u, 0x00u, 0xe4u, 0x0fu, 0xd2u, 0x00u, 0x6du, 0x0du, 0xa2u, 0x46u, 0x81u, 0x46u, 0x7fu, 0x0du, 0x9cu, 0x46u,
0x90u, 0x46u, 0xb7u, 0x42u, 0x00u, 0xd1u, 0xb9u, 0xe0u, 0x5bu, 0x46u, 0x01u, 0x26u, 0x73u, 0x40u, 0x9bu, 0x46u,
0xeeu, 0x1bu, 0xa3u, 0x45u, 0x00u, 0xd1u, 0x83u, 0xe0u, 0x00u, 0x2eu, 0x63u, 0xddu, 0x00u, 0x2fu, 0x00u, 0xd0u,
0xb1u, 0xe0u, 0x63u, 0x46u, 0x13u, 0x43u, 0x00u, 0xd1u, 0x23u, 0xe1u, 0x73u, 0x1eu, 0x00u, 0x2bu, 0x00u, 0xd0u,
0xbau, 0xe1u, 0x86u, 0x1au, 0x63u, 0x46u, 0xb0u, 0x42u, 0x80u, 0x41u, 0x01u, 0x25u, 0xc9u, 0x1au, 0x40u, 0x42u,
0x09u, 0x1au, 0x0bu, 0x02u, 0x00u, 0xd4u, 0x47u, 0xe1u, 0x49u, 0x02u, 0x4bu, 0x0au, 0x98u, 0x46u, 0x43u, 0x46u,
0x00u, 0x2bu, 0x00u, 0xd1u, 0x89u, 0xe1u, 0x40u, 0x46u, 0x00u, 0xf0u, 0xacu, 0xfbu, 0x03u, 0x00u, 0x08u, 0x3bu,
0x1fu, 0x2bu, 0x00u, 0xddu, 0x7cu, 0xe1u, 0x20u, 0x22u, 0x30u, 0x00u, 0xd2u, 0x1au, 0x41u, 0x46u, 0xd0u, 0x40u,
0x99u, 0x40u, 0x02u, 0x00u, 0x9eu, 0x40u, 0x0au, 0x43u, 0x9du, 0x42u, 0x00u, 0xddu, 0x6au, 0xe1u, 0x5du, 0x1bu,
0x6bu, 0x1cu, 0x1fu, 0x2bu, 0x00u, 0xddu, 0x94u, 0xe1u, 0x20u, 0x21u, 0x10u, 0x00u, 0x35u, 0x00u, 0xc9u, 0x1au,
0x8eu, 0x40u, 0xdau, 0x40u, 0x88u, 0x40u, 0xddu, 0x40u, 0x71u, 0x1eu, 0x8eu, 0x41u, 0x11u, 0x00u, 0x07u, 0x22u,
0x28u, 0x43u, 0x00u, 0x25u, 0x06u, 0x43u, 0x32u, 0x40u, 0x00u, 0x2au, 0x09u, 0xd0u, 0x0fu, 0x23u, 0x33u, 0x40u,
0x04u, 0x2bu, 0x05u, 0xd0u, 0x33u, 0x1du, 0xb3u, 0x42u, 0xb6u, 0x41u, 0x76u, 0x42u, 0x89u, 0x19u, 0x1eu, 0x00u,
0x0bu, 0x02u, 0x00u, 0xd4u, 0x3du, 0xe2u, 0x6au, 0x1cu, 0x91u, 0x4bu, 0x55u, 0x05u, 0x6du, 0x0du, 0x9au, 0x42u,
0x00u, 0xd1u, 0x19u, 0xe1u, 0x8fu, 0x4au, 0xf6u, 0x08u, 0x0au, 0x40u, 0x57u, 0x07u, 0x52u, 0x02u, 0x37u, 0x43u,
0x12u, 0x0bu, 0x9bu, 0xe0u, 0x00u, 0x2eu, 0x00u, 0xd0u, 0xc5u, 0xe0u, 0x6eu, 0x1cu, 0x76u, 0x05u, 0x76u, 0x0du,
0x01u, 0x2eu, 0x00u, 0xdcu, 0x48u, 0xe1u, 0x67u, 0x46u, 0x86u, 0x1au, 0xcbu, 0x1bu, 0xb0u, 0x42u, 0xbfu, 0x41u,
0x7fu, 0x42u, 0xb8u, 0x46u, 0x1fu, 0x00u, 0x43u, 0x46u, 0xffu, 0x1au, 0x3bu, 0x00u, 0xb8u, 0x46u, 0x1bu, 0x02u,
0x00u, 0xd5u, 0x5fu, 0xe1u, 0x37u, 0x43u, 0x9au, 0xd1u, 0x00u, 0x22u, 0x00u, 0x24u, 0x00u, 0x25u, 0x79u, 0xe0u,
0x00u, 0x2eu, 0x00u, 0xdcu, 0xfau, 0xe0u, 0x00u, 0x2fu, 0x00u, 0xd1u, 0x8du, 0xe0u, 0x78u, 0x4bu, 0x9du, 0x42u,
0x67u, 0xd0u, 0x80u, 0x23u, 0x67u, 0x46u, 0x1bu, 0x04u, 0x1fu, 0x43u, 0xbcu, 0x46u, 0x38u, 0x2eu, 0x00u, 0xdcu,
0x52u, 0xe1u, 0x63u, 0x46u, 0x13u, 0x43u, 0x5au, 0x1eu, 0x93u, 0x41u, 0x1eu, 0x18u, 0x86u, 0x42u, 0x80u, 0x41u,
0x40u, 0x42u, 0x09u, 0x18u, 0x0bu, 0x02u, 0x00u, 0xd4u, 0xbeu, 0xe0u, 0x6du, 0x4bu, 0x01u, 0x35u, 0x9du, 0x42u,
0x00u, 0xd1u, 0xd2u, 0xe0u, 0x6bu, 0x4au, 0x73u, 0x08u, 0x0au, 0x40u, 0x01u, 0x21u, 0x0eu, 0x40u, 0x1eu, 0x43u,
0x51u, 0x08u, 0xd3u, 0x07u, 0x07u, 0x22u, 0x1eu, 0x43u, 0x32u, 0x40u, 0x95u, 0xe7u, 0x1eu, 0x00u, 0x16u, 0x43u,
0x00u, 0xd0u, 0x45u, 0xe7u, 0x40u, 0xe7u, 0x62u, 0x4bu, 0x9du, 0x42u, 0x3au, 0xd0u, 0x80u, 0x23u, 0x67u, 0x46u,
0x1bu, 0x04u, 0x1fu, 0x43u, 0xbcu, 0x46u, 0x38u, 0x2eu, 0x00u, 0xddu, 0xebu, 0xe0u, 0x1fu, 0x2eu, 0x00u, 0xdcu,
0x3au, 0xe1u, 0x33u, 0x00u, 0x67u, 0x46u, 0x20u, 0x3bu, 0xdfu, 0x40u, 0x3bu, 0x00u, 0x20u, 0x2eu, 0x05u, 0xd0u,
0x40u, 0x27u, 0xbfu, 0x1bu, 0x66u, 0x46u, 0xbeu, 0x40u, 0x32u, 0x43u, 0x90u, 0x46u, 0x46u, 0x46u, 0x72u, 0x1eu,
0x96u, 0x41u, 0x33u, 0x43u, 0xdau, 0xe0u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x14u, 0xe2u, 0x63u, 0x46u, 0x13u, 0x43u,
0x00u, 0xd1u, 0x68u, 0xe1u, 0x80u, 0x23u, 0x4eu, 0x07u, 0xc0u, 0x08u, 0xc9u, 0x08u, 0x1bu, 0x03u, 0x06u, 0x43u,
0x19u, 0x42u, 0x08u, 0xd0u, 0x60u, 0x46u, 0xc0u, 0x08u, 0x18u, 0x42u, 0x04u, 0xd1u, 0x63u, 0x46u, 0x01u, 0x00u,
0xd2u, 0x08u, 0x5eu, 0x07u, 0x16u, 0x43u, 0xf3u, 0x00u, 0x99u, 0x46u, 0xc9u, 0x00u, 0x72u, 0x0fu, 0x44u, 0x4du,
0x11u, 0x43u, 0x4bu, 0x46u, 0xdeu, 0x08u, 0x42u, 0x4bu, 0x4fu, 0x07u, 0x37u, 0x43u, 0xcau, 0x08u, 0x9du, 0x42u,
0x00u, 0xd1u, 0x6eu, 0xe0u, 0x12u, 0x03u, 0x6du, 0x05u, 0x12u, 0x0bu, 0x6du, 0x0du, 0x00u, 0x21u, 0x12u, 0x03u,
0x13u, 0x0bu, 0x0au, 0x0du, 0x12u, 0x05u, 0x1au, 0x43u, 0x3bu, 0x4bu, 0x2du, 0x05u, 0x13u, 0x40u, 0x2bu, 0x43u,
0x5bu, 0x00u, 0xe4u, 0x07u, 0x5bu, 0x08u, 0x23u, 0x43u, 0x38u, 0x00u, 0x19u, 0x00u, 0x3cu, 0xbcu, 0x90u, 0x46u,
0x99u, 0x46u, 0xa2u, 0x46u, 0xabu, 0x46u, 0xf8u, 0xbdu, 0x63u, 0x46u, 0x13u, 0x43u, 0x11u, 0xd0u, 0x73u, 0x1eu,
0x00u, 0x2bu, 0x00u, 0xd0u, 0x07u, 0xe1u, 0x86u, 0x18u, 0x86u, 0x42u, 0x80u, 0x41u, 0x61u, 0x44u, 0x40u, 0x42u,
0x09u, 0x18u, 0x01u, 0x25u, 0x0bu, 0x02u, 0x37u, 0xd5u, 0x02u, 0x25u, 0x7bu, 0xe7u, 0x3eu, 0x00u, 0x61u, 0x46u,
0x91u, 0x46u, 0x35u, 0x00u, 0xc5u, 0xe7u, 0x5cu, 0x46u, 0x00u, 0x2du, 0x00u, 0xd0u, 0xe1u, 0xe0u, 0x0bu, 0x00u,
0x03u, 0x43u, 0xf3u, 0xd0u, 0x73u, 0x1cu, 0x00u, 0xd1u, 0xacu, 0xe1u, 0x21u, 0x4bu, 0x9fu, 0x42u, 0x00u, 0xd1u,
0x3au, 0xe1u, 0xf3u, 0x43u, 0x38u, 0x2bu, 0x00u, 0xddu, 0x6fu, 0xe1u, 0x1fu, 0x2bu, 0x00u, 0xddu, 0x8cu, 0xe1u,
0x20u, 0x25u, 0x0eu, 0x00u, 0xedu, 0x1au, 0xaeu, 0x40u, 0xb0u, 0x46u, 0x06u, 0x00u, 0xaau, 0x46u, 0xdeu, 0x40u,
0x45u, 0x46u, 0x35u, 0x43u, 0x2eu, 0x00u, 0x55u, 0x46u, 0xd9u, 0x40u, 0xa8u, 0x40u, 0x63u, 0x46u, 0x45u, 0x1eu,
0xa8u, 0x41u, 0x5bu, 0x1au, 0x9cu, 0x46u, 0x30u, 0x43u, 0x16u, 0x1au, 0xb2u, 0x42u, 0x92u, 0x41u, 0x63u, 0x46u,
0x52u, 0x42u, 0x99u, 0x1au, 0x3du, 0x00u, 0xb4u, 0xe6u, 0x07u, 0x22u, 0x32u, 0x40u, 0x00u, 0x2au, 0x00u, 0xd0u,
0xe4u, 0xe6u, 0x0bu, 0x4bu, 0xf6u, 0x08u, 0x4fu, 0x07u, 0x37u, 0x43u, 0xcau, 0x08u, 0x9du, 0x42u, 0x00u, 0xd0u,
0x90u, 0xe7u, 0x3bu, 0x00u, 0x13u, 0x43u, 0x00u, 0xd1u, 0xa6u, 0xe1u, 0x80u, 0x23u, 0x1bu, 0x03u, 0x1au, 0x43u,
0x12u, 0x03u, 0x12u, 0x0bu, 0x02u, 0x4du, 0x89u, 0xe7u, 0x15u, 0x00u, 0x00u, 0x22u, 0x00u, 0x27u, 0x85u, 0xe7u,
0xffu, 0x07u, 0x00u, 0x00u, 0xffu, 0xffu, 0x7fu, 0xffu, 0xffu, 0xffu, 0x0fu, 0x80u, 0x00u, 0x2eu, 0x00u, 0xd0u,
0xc7u, 0xe0u, 0x6bu, 0x1cu, 0x5eu, 0x05u, 0x76u, 0x0du, 0x01u, 0x2eu, 0x00u, 0xdcu, 0xf0u, 0xe0u, 0xc8u, 0x4du,
0xabu, 0x42u, 0x00u, 0xd1u, 0xb9u, 0xe0u, 0x85u, 0x18u, 0x0au, 0x00u, 0x85u, 0x42u, 0x89u, 0x41u, 0x62u, 0x44u,
0x49u, 0x42u, 0x51u, 0x18u, 0x07u, 0x22u, 0xceu, 0x07u, 0x6du, 0x08u, 0x2eu, 0x43u, 0x49u, 0x08u, 0x32u, 0x40u,
0x1du, 0x00u, 0xa9u, 0xe6u, 0xbfu, 0x49u, 0xedu, 0x1au, 0x11u, 0x40u, 0x07u, 0x22u, 0x32u, 0x40u, 0xa3u, 0xe6u,
0x32u, 0x00u, 0x28u, 0x38u, 0x82u, 0x40u, 0x00u, 0x26u, 0x86u, 0xe6u, 0x30u, 0x00u, 0x00u, 0xf0u, 0x22u, 0xfau,
0x20u, 0x30u, 0x73u, 0xe6u, 0x63u, 0x46u, 0x13u, 0x43u, 0x5au, 0x1eu, 0x93u, 0x41u, 0xc6u, 0x1au, 0xb0u, 0x42u,
0x80u, 0x41u, 0x40u, 0x42u, 0x09u, 0x1au, 0x5cu, 0xe6u, 0x0eu, 0x00u, 0x67u, 0x46u, 0x06u, 0x43u, 0x17u, 0x43u,
0x00u, 0x2du, 0x5eu, 0xd1u, 0x00u, 0x2eu, 0x00u, 0xd0u, 0xf3u, 0xe0u, 0x00u, 0x2fu, 0x00u, 0xd1u, 0x1eu, 0xe1u,
0x5cu, 0x46u, 0x61u, 0x46u, 0x91u, 0x46u, 0x2cu, 0xe7u, 0xa9u, 0x4fu, 0xbeu, 0x42u, 0x7bu, 0xd0u, 0x1eu, 0x00u,
0xf1u, 0xe6u, 0x10u, 0x00u, 0x1fu, 0x3du, 0xe8u, 0x40u, 0x20u, 0x2bu, 0x03u, 0xd0u, 0x40u, 0x21u, 0xcbu, 0x1au,
0x9au, 0x40u, 0x16u, 0x43u, 0x73u, 0x1eu, 0x9eu, 0x41u, 0x07u, 0x22u, 0x06u, 0x43u, 0x32u, 0x40u, 0x00u, 0x21u,
0x00u, 0x25u, 0x83u, 0xe7u, 0x16u, 0x1au, 0x63u, 0x46u, 0xb2u, 0x42u, 0x80u, 0x41u, 0x59u, 0x1au, 0x40u, 0x42u,
0x0bu, 0x1au, 0x98u, 0x46u, 0x5cu, 0x46u, 0x32u, 0xe6u, 0x1fu, 0x2eu, 0x00u, 0xddu, 0xabu, 0xe0u, 0x20u, 0x27u,
0xbbu, 0x1bu, 0x9au, 0x46u, 0x63u, 0x46u, 0x57u, 0x46u, 0xbbu, 0x40u, 0x99u, 0x46u, 0x13u, 0x00u, 0x4fu, 0x46u,
0xf3u, 0x40u, 0x1fu, 0x43u, 0x3bu, 0x00u, 0x57u, 0x46u, 0xbau, 0x40u, 0x57u, 0x1eu, 0xbau, 0x41u, 0x13u, 0x43u,
0x62u, 0x46u, 0xf2u, 0x40u, 0x89u, 0x18u, 0x98u, 0xe6u, 0x20u, 0x27u, 0xbbu, 0x1bu, 0x9au, 0x46u, 0x63u, 0x46u,
0x57u, 0x46u, 0xbbu, 0x40u, 0x99u, 0x46u, 0x13u, 0x00u, 0x4fu, 0x46u, 0xf3u, 0x40u, 0x1fu, 0x43u, 0x3bu, 0x00u,
0x57u, 0x46u, 0xbau, 0x40u, 0x57u, 0x1eu, 0xbau, 0x41u, 0x13u, 0x43u, 0x62u, 0x46u, 0xf2u, 0x40u, 0x89u, 0x1au,
0x9cu, 0xe7u, 0x83u, 0x4bu, 0x9fu, 0x42u, 0x5fu, 0xd0u, 0x80u, 0x25u, 0x2du, 0x04u, 0x73u, 0x42u, 0x29u, 0x43u,
0x20u, 0xe7u, 0x00u, 0x2eu, 0x0cu, 0xd1u, 0x00u, 0x2fu, 0x00u, 0xd1u, 0xd0u, 0xe0u, 0x5cu, 0x46u, 0x61u, 0x46u,
0x91u, 0x46u, 0x7bu, 0x4du, 0xcdu, 0xe6u, 0x7au, 0x4fu, 0xbeu, 0x42u, 0x1cu, 0xd0u, 0x1eu, 0x00u, 0x65u, 0xe6u,
0x00u, 0x2fu, 0x18u, 0xd0u, 0xc0u, 0x08u, 0x4eu, 0x07u, 0x06u, 0x43u, 0x80u, 0x20u, 0xc9u, 0x08u, 0x00u, 0x03u,
0x01u, 0x42u, 0x08u, 0xd0u, 0x63u, 0x46u, 0xdcu, 0x08u, 0x04u, 0x42u, 0x04u, 0xd1u, 0x21u, 0x00u, 0xdau, 0x46u,
0xd2u, 0x08u, 0x5eu, 0x07u, 0x16u, 0x43u, 0xf3u, 0x00u, 0x99u, 0x46u, 0x01u, 0x24u, 0x53u, 0x46u, 0xc9u, 0x00u,
0x72u, 0x0fu, 0x11u, 0x43u, 0x1cu, 0x40u, 0x6au, 0x4du, 0xabu, 0xe6u, 0x1du, 0x00u, 0x00u, 0x22u, 0x00u, 0x27u,
0xb4u, 0xe6u, 0x00u, 0x2du, 0x59u, 0xd1u, 0x0bu, 0x00u, 0x03u, 0x43u, 0x00u, 0xd1u, 0xd6u, 0xe6u, 0x73u, 0x1cu,
0x00u, 0xd1u, 0xb2u, 0xe0u, 0x62u, 0x4bu, 0x9fu, 0x42u, 0x1eu, 0xd0u, 0xf3u, 0x43u, 0x38u, 0x2bu, 0x6fu, 0xdcu,
0x1fu, 0x2bu, 0x00u, 0xddu, 0x97u, 0xe0u, 0x20u, 0x25u, 0x0eu, 0x00u, 0xedu, 0x1au, 0xaeu, 0x40u, 0xb0u, 0x46u,
0x06u, 0x00u, 0xaau, 0x46u, 0xdeu, 0x40u, 0x45u, 0x46u, 0x35u, 0x43u, 0x2eu, 0x00u, 0x55u, 0x46u, 0xa8u, 0x40u,
0xd9u, 0x40u, 0x45u, 0x1eu, 0xa8u, 0x41u, 0x8cu, 0x44u, 0x06u, 0x43u, 0xb6u, 0x18u, 0x96u, 0x42u, 0x92u, 0x41u,
0x51u, 0x42u, 0x61u, 0x44u, 0x3du, 0x00u, 0x25u, 0xe6u, 0x3du, 0x00u, 0x61u, 0x46u, 0x91u, 0x46u, 0x78u, 0xe6u,
0x0bu, 0x00u, 0x03u, 0x43u, 0x00u, 0x2du, 0x00u, 0xd0u, 0x55u, 0xe6u, 0x00u, 0x2bu, 0xf5u, 0xd0u, 0x63u, 0x46u,
0x13u, 0x43u, 0x00u, 0xd1u, 0x6du, 0xe6u, 0x86u, 0x18u, 0x86u, 0x42u, 0x80u, 0x41u, 0x61u, 0x44u, 0x40u, 0x42u,
0x09u, 0x18u, 0x00u, 0x22u, 0x0bu, 0x02u, 0x00u, 0xd4u, 0xd0u, 0xe6u, 0x46u, 0x4bu, 0x01u, 0x35u, 0x19u, 0x40u,
0xb2u, 0xe5u, 0xb1u, 0x46u, 0x5du, 0xe6u, 0x33u, 0x00u, 0x67u, 0x46u, 0x20u, 0x3bu, 0xdfu, 0x40u, 0x3bu, 0x00u,
0x20u, 0x2eu, 0x05u, 0xd0u, 0x40u, 0x27u, 0xbfu, 0x1bu, 0x66u, 0x46u, 0xbeu, 0x40u, 0x32u, 0x43u, 0x90u, 0x46u,
0x46u, 0x46u, 0x72u, 0x1eu, 0x96u, 0x41u, 0x33u, 0x43u, 0xefu, 0xe5u, 0x39u, 0x4bu, 0x9fu, 0x42u, 0xcbu, 0xd0u,
0x80u, 0x25u, 0x2du, 0x04u, 0x73u, 0x42u, 0x29u, 0x43u, 0xa8u, 0xe7u, 0x08u, 0x43u, 0x41u, 0x1eu, 0x88u, 0x41u,
0xa2u, 0xe6u, 0x00u, 0x2fu, 0x00u, 0xd1u, 0x3cu, 0xe6u, 0x63u, 0x46u, 0x86u, 0x1au, 0xcfu, 0x1au, 0xb0u, 0x42u,
0x9bu, 0x41u, 0x5bu, 0x42u, 0xfbu, 0x1au, 0x98u, 0x46u, 0x1bu, 0x02u, 0x4eu, 0xd5u, 0x16u, 0x1au, 0x63u, 0x46u,
0xb2u, 0x42u, 0x92u, 0x41u, 0x59u, 0x1au, 0x52u, 0x42u, 0x89u, 0x1au, 0x5cu, 0x46u, 0x00u, 0x22u, 0x7bu, 0xe5u,
0x01u, 0x43u, 0x0eu, 0x00u, 0x71u, 0x1eu, 0x8eu, 0x41u, 0x9fu, 0xe7u, 0x1du, 0x00u, 0x0eu, 0x00u, 0x20u, 0x3du,
0xeeu, 0x40u, 0xb0u, 0x46u, 0x20u, 0x2bu, 0x04u, 0xd0u, 0x40u, 0x25u, 0xebu, 0x1au, 0x99u, 0x40u, 0x08u, 0x43u,
0x81u, 0x46u, 0x48u, 0x46u, 0x43u, 0x46u, 0x41u, 0x1eu, 0x88u, 0x41u, 0x18u, 0x43u, 0x74u, 0xe6u, 0x00u, 0x22u,
0x00u, 0x24u, 0x17u, 0xe6u, 0x16u, 0x1au, 0x63u, 0x46u, 0xb2u, 0x42u, 0x92u, 0x41u, 0x59u, 0x1au, 0x52u, 0x42u,
0x89u, 0x1au, 0x3du, 0x00u, 0x25u, 0xe5u, 0x61u, 0x46u, 0x91u, 0x46u, 0x15u, 0x4du, 0x01u, 0xe6u, 0x80u, 0x22u,
0x00u, 0x24u, 0x12u, 0x03u, 0x79u, 0xe6u, 0x1du, 0x00u, 0x0eu, 0x00u, 0x20u, 0x3du, 0xeeu, 0x40u, 0xb0u, 0x46u,
0x20u, 0x2bu, 0x04u, 0xd0u, 0x40u, 0x25u, 0xebu, 0x1au, 0x99u, 0x40u, 0x08u, 0x43u, 0x81u, 0x46u, 0x4eu, 0x46u,
0x43u, 0x46u, 0x71u, 0x1eu, 0x8eu, 0x41u, 0x1eu, 0x43u, 0x67u, 0xe7u, 0x86u, 0x18u, 0x96u, 0x42u, 0x9bu, 0x41u,
0x61u, 0x44u, 0x5bu, 0x42u, 0xc9u, 0x18u, 0x3du, 0x00u, 0x8cu, 0xe5u, 0x47u, 0x46u, 0x37u, 0x43u, 0xceu, 0xd0u,
0x07u, 0x22u, 0x41u, 0x46u, 0x32u, 0x40u, 0x49u, 0xe6u, 0x00u, 0x27u, 0x3au, 0x00u, 0xe6u, 0xe5u, 0xc0u, 0x46u,
0xffu, 0x07u, 0x00u, 0x00u, 0xffu, 0xffu, 0x7fu, 0xffu, 0x30u, 0xb5u, 0x14u, 0x4du, 0x0au, 0x03u, 0x4bu, 0x00u,
0x12u, 0x0bu, 0x5bu, 0x0du, 0xc9u, 0x0fu, 0x00u, 0x24u, 0xabu, 0x42u, 0x11u, 0xddu, 0x10u, 0x4cu, 0xa3u, 0x42u,
0x10u, 0xdcu, 0x80u, 0x24u, 0x64u, 0x03u, 0x22u, 0x43u, 0x0eu, 0x4cu, 0xe4u, 0x1au, 0x1fu, 0x2cu, 0x0cu, 0xddu,
0x0du, 0x48u, 0xc3u, 0x1au, 0xdau, 0x40u, 0x13u, 0x00u, 0x5cu, 0x42u, 0x00u, 0x29u, 0x00u, 0xd1u, 0x1cu, 0x00u,
0x20u, 0x00u, 0x30u, 0xbdu, 0x09u, 0x4bu, 0xccu, 0x18u, 0xfau, 0xe7u, 0x09u, 0x4du, 0xe0u, 0x40u, 0xacu, 0x46u,
0x63u, 0x44u, 0x9au, 0x40u, 0x13u, 0x00u, 0x03u, 0x43u, 0xeeu, 0xe7u, 0xc0u, 0x46u, 0xfeu, 0x03u, 0x00u, 0x00u,
0x1du, 0x04u, 0x00u, 0x00u, 0x33u, 0x04u, 0x00u, 0x00u, 0x13u, 0x04u, 0x00u, 0x00u, 0xffu, 0xffu, 0xffu, 0x7fu,
0xedu, 0xfbu, 0xffu, 0xffu, 0x70u, 0xb5u, 0x00u, 0x28u, 0x2du, 0xd0u, 0xc3u, 0x17u, 0xc5u, 0x18u, 0x5du, 0x40u,
0xc4u, 0x0fu, 0x28u, 0x00u, 0x00u, 0xf0u, 0x6eu, 0xf8u, 0x15u, 0x4bu, 0x1bu, 0x1au, 0x5bu, 0x05u, 0x5bu, 0x0du,
0x0au, 0x28u, 0x15u, 0xddu, 0x0bu, 0x38u, 0x85u, 0x40u, 0x00u, 0x22u, 0x2du, 0x03u, 0x2du, 0x0bu, 0x00u, 0x21u,
0x10u, 0x00u, 0x2du, 0x03u, 0x0au, 0x0du, 0x2du, 0x0bu, 0x12u, 0x05u, 0x2au, 0x43u, 0x0du, 0x4du, 0x1bu, 0x05u,
0x2au, 0x40u, 0x13u, 0x43u, 0x5bu, 0x00u, 0xe4u, 0x07u, 0x5bu, 0x08u, 0x23u, 0x43u, 0x19u, 0x00u, 0x70u, 0xbdu,
0x02u, 0x00u, 0x29u, 0x00u, 0x15u, 0x32u, 0x91u, 0x40u, 0x0au, 0x00u, 0x0bu, 0x21u, 0x08u, 0x1au, 0xc5u, 0x40u,
0x2du, 0x03u, 0x2du, 0x0bu, 0xe3u, 0xe7u, 0x00u, 0x24u, 0x00u, 0x23u, 0x00u, 0x25u, 0x00u, 0x22u, 0xdeu, 0xe7u,
0x1eu, 0x04u, 0x00u, 0x00u, 0xffu, 0xffu, 0x0fu, 0x80u, 0x84u, 0x46u, 0x10u, 0x1cu, 0x62u, 0x46u, 0x8cu, 0x46u,
0x19u, 0x1cu, 0x63u, 0x46u, 0x00u, 0xe0u, 0xc0u, 0x46u, 0x1fu, 0xb5u, 0x00u, 0xf0u, 0xfdu, 0xf8u, 0x00u, 0x28u,
0x01u, 0xd4u, 0x00u, 0x21u, 0xc8u, 0x42u, 0x1fu, 0xbdu, 0x10u, 0xb5u, 0x00u, 0xf0u, 0x55u, 0xf8u, 0x40u, 0x42u,
0x01u, 0x30u, 0x10u, 0xbdu, 0x10u, 0xb5u, 0x00u, 0xf0u, 0xefu, 0xf8u, 0x00u, 0x28u, 0x01u, 0xdbu, 0x00u, 0x20u,
0x10u, 0xbdu, 0x01u, 0x20u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x10u, 0xb5u, 0x00u, 0xf0u, 0xe5u, 0xf8u, 0x00u, 0x28u,
0x01u, 0xddu, 0x00u, 0x20u, 0x10u, 0xbdu, 0x01u, 0x20u, 0x10u, 0xbdu, 0xc0u, 0x46u, 0x10u, 0xb5u, 0x00u, 0xf0u,
0x77u, 0xf8u, 0x00u, 0x28u, 0x01u, 0xdcu, 0x00u, 0x20u, 0x10u, 0xbdu, 0x01u, 0x20u, 0x10u, 0xbdu, 0xc0u, 0x46u,
0x10u, 0xb5u, 0x00u, 0xf0u, 0x6du, 0xf8u, 0x00u, 0x28u, 0x01u, 0xdau, 0x00u, 0x20u, 0x10u, 0xbdu, 0x01u, 0x20u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x1cu, 0x21u, 0x01u, 0x23u, 0x1bu, 0x04u, 0x98u, 0x42u, 0x01u, 0xd3u, 0x00u, 0x0cu,
0x10u, 0x39u, 0x1bu, 0x0au, 0x98u, 0x42u, 0x01u, 0xd3u, 0x00u, 0x0au, 0x08u, 0x39u, 0x1bu, 0x09u, 0x98u, 0x42u,
0x01u, 0xd3u, 0x00u, 0x09u, 0x04u, 0x39u, 0x02u, 0xa2u, 0x10u, 0x5cu, 0x40u, 0x18u, 0x70u, 0x47u, 0xc0u, 0x46u,
0x04u, 0x03u, 0x02u, 0x02u, 0x01u, 0x01u, 0x01u, 0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x10u, 0xb5u, 0x00u, 0x29u, 0x03u, 0xd1u, 0xffu, 0xf7u, 0xddu, 0xffu, 0x20u, 0x30u, 0x02u, 0xe0u, 0x08u, 0x1cu,
0xffu, 0xf7u, 0xd8u, 0xffu, 0x10u, 0xbdu, 0xc0u, 0x46u, 0xf0u, 0xb5u, 0x4fu, 0x46u, 0x46u, 0x46u, 0xd6u, 0x46u,
0x84u, 0x46u, 0xc0u, 0xb5u, 0x80u, 0x46u, 0x19u, 0x4eu, 0x18u, 0x03u, 0x0fu, 0x03u, 0x4du, 0x00u, 0x00u, 0x0bu,
0x5cu, 0x00u, 0x82u, 0x46u, 0x3fu, 0x0bu, 0x6du, 0x0du, 0xc9u, 0x0fu, 0x91u, 0x46u, 0x64u, 0x0du, 0xdbu, 0x0fu,
0x01u, 0x20u, 0xb5u, 0x42u, 0x0au, 0xd0u, 0xb4u, 0x42u, 0x03u, 0xd0u, 0xa5u, 0x42u, 0x01u, 0xd1u, 0x57u, 0x45u,
0x0cu, 0xd0u, 0x1cu, 0xbcu, 0x90u, 0x46u, 0x99u, 0x46u, 0xa2u, 0x46u, 0xf0u, 0xbdu, 0x66u, 0x46u, 0x3eu, 0x43u,
0xf7u, 0xd1u, 0xacu, 0x42u, 0xf5u, 0xd1u, 0x54u, 0x46u, 0x14u, 0x43u, 0xf2u, 0xd1u, 0x01u, 0x20u, 0xc8u, 0x45u,
0xefu, 0xd1u, 0x99u, 0x42u, 0x07u, 0xd0u, 0x00u, 0x2du, 0xebu, 0xd1u, 0x63u, 0x46u, 0x1fu, 0x43u, 0x38u, 0x00u,
0x47u, 0x1eu, 0xb8u, 0x41u, 0xe5u, 0xe7u, 0x00u, 0x20u, 0xe3u, 0xe7u, 0xc0u, 0x46u, 0xffu, 0x07u, 0x00u, 0x00u,
0xf0u, 0xb5u, 0x4fu, 0x46u, 0x46u, 0x46u, 0xd6u, 0x46u, 0x4du, 0x00u, 0xc0u, 0xb5u, 0x0eu, 0x03u, 0xc9u, 0x0fu,
0x8au, 0x46u, 0x2cu, 0x49u, 0x1fu, 0x03u, 0x5cu, 0x00u, 0x80u, 0x46u, 0x36u, 0x0bu, 0x6du, 0x0du, 0x91u, 0x46u,
0x3fu, 0x0bu, 0x64u, 0x0du, 0xdbu, 0x0fu, 0x8du, 0x42u, 0x1eu, 0xd0u, 0x8cu, 0x42u, 0x16u, 0xd0u, 0x00u, 0x2du,
0x1eu, 0xd1u, 0x30u, 0x43u, 0x84u, 0x46u, 0x00u, 0x2cu, 0x01u, 0xd1u, 0x3au, 0x43u, 0x23u, 0xd0u, 0x62u, 0x46u,
0x00u, 0x2au, 0x1au, 0xd0u, 0x9au, 0x45u, 0x29u, 0xd0u, 0x51u, 0x46u, 0x02u, 0x20u, 0x01u, 0x39u, 0x08u, 0x40u,
0x01u, 0x38u, 0x1cu, 0xbcu, 0x90u, 0x46u, 0x99u, 0x46u, 0xa2u, 0x46u, 0xf0u, 0xbdu, 0x39u, 0x00u, 0x11u, 0x43u,
0xe5u, 0xd0u, 0x02u, 0x20u, 0x40u, 0x42u, 0xf4u, 0xe7u, 0x30u, 0x43u, 0xfau, 0xd1u, 0xacu, 0x42u, 0x0fu, 0xd0u,
0x00u, 0x2cu, 0x0fu, 0xd1u, 0x3au, 0x43u, 0xe7u, 0xd0u, 0x0cu, 0xe0u, 0x01u, 0x22u, 0x01u, 0x3bu, 0x93u, 0x43u,
0x18u, 0x00u, 0x01u, 0x30u, 0xe5u, 0xe7u, 0x63u, 0x46u, 0x00u, 0x20u, 0x00u, 0x2bu, 0xe1u, 0xd0u, 0xdbu, 0xe7u,
0x3au, 0x43u, 0xe6u, 0xd1u, 0x9au, 0x45u, 0xd7u, 0xd1u, 0xa5u, 0x42u, 0xd5u, 0xdcu, 0xa5u, 0x42u, 0x05u, 0xdbu,
0xbeu, 0x42u, 0xd1u, 0xd8u, 0x08u, 0xd0u, 0x00u, 0x20u, 0xbeu, 0x42u, 0xd2u, 0xd2u, 0x50u, 0x46u, 0x01u, 0x23u,
0x01u, 0x38u, 0x98u, 0x43u, 0x01u, 0x30u, 0xccu, 0xe7u, 0xc8u, 0x45u, 0xc5u, 0xd8u, 0x00u, 0x20u, 0xc8u, 0x45u,
0xf4u, 0xd3u, 0xc6u, 0xe7u, 0xffu, 0x07u, 0x00u, 0x00u, 0xf0u, 0xb5u, 0x4fu, 0x46u, 0x46u, 0x46u, 0xd6u, 0x46u,
0x4du, 0x00u, 0xc0u, 0xb5u, 0x0eu, 0x03u, 0xc9u, 0x0fu, 0x8au, 0x46u, 0x2eu, 0x49u, 0x1fu, 0x03u, 0x5cu, 0x00u,
0x80u, 0x46u, 0x36u, 0x0bu, 0x6du, 0x0du, 0x91u, 0x46u, 0x3fu, 0x0bu, 0x64u, 0x0du, 0xdbu, 0x0fu, 0x8du, 0x42u,
0x18u, 0xd0u, 0x8cu, 0x42u, 0x11u, 0xd0u, 0x00u, 0x2du, 0x18u, 0xd1u, 0x30u, 0x43u, 0x84u, 0x46u, 0x00u, 0x2cu,
0x1eu, 0xd1u, 0x3au, 0x43u, 0x1cu, 0xd1u, 0x63u, 0x46u, 0x00u, 0x20u, 0x00u, 0x2bu, 0x30u, 0xd0u, 0x51u, 0x46u,
0x02u, 0x20u, 0x01u, 0x39u, 0x08u, 0x40u, 0x01u, 0x38u, 0x2au, 0xe0u, 0x39u, 0x00u, 0x11u, 0x43u, 0xeau, 0xd0u,
0x02u, 0x20u, 0x25u, 0xe0u, 0x30u, 0x43u, 0xfbu, 0xd1u, 0xacu, 0x42u, 0x26u, 0xd0u, 0x00u, 0x2cu, 0x26u, 0xd1u,
0x3au, 0x43u, 0x24u, 0xd1u, 0x51u, 0x46u, 0x02u, 0x20u, 0x01u, 0x39u, 0x08u, 0x40u, 0x01u, 0x38u, 0x17u, 0xe0u,
0x62u, 0x46u, 0x00u, 0x2au, 0x0fu, 0xd0u, 0x9au, 0x45u, 0xe1u, 0xd1u, 0xa5u, 0x42u, 0x05u, 0xdbu, 0xbeu, 0x42u,
0xddu, 0xd8u, 0x19u, 0xd0u, 0x00u, 0x20u, 0xbeu, 0x42u, 0x0au, 0xd2u, 0x50u, 0x46u, 0x01u, 0x23u, 0x01u, 0x38u,
0x98u, 0x43u, 0x01u, 0x30u, 0x04u, 0xe0u, 0x01u, 0x22u, 0x01u, 0x3bu, 0x93u, 0x43u, 0x18u, 0x00u, 0x01u, 0x30u,
0x1cu, 0xbcu, 0x90u, 0x46u, 0x99u, 0x46u, 0xa2u, 0x46u, 0xf0u, 0xbdu, 0x3au, 0x43u, 0xd0u, 0xd1u, 0x9au, 0x45u,
0xc5u, 0xd1u, 0xa5u, 0x42u, 0xc3u, 0xdcu, 0xe0u, 0xe7u, 0xc8u, 0x45u, 0xc0u, 0xd8u, 0x00u, 0x20u, 0xc8u, 0x45u,
0xe3u, 0xd3u, 0xedu, 0xe7u, 0xffu, 0x07u, 0x00u, 0x00u, 0xecu, 0x30u, 0x00u, 0x68u, 0x70u, 0x47u, 0x00u, 0x00u,
0x10u, 0xb5u, 0x03u, 0x4bu, 0x01u, 0x00u, 0x18u, 0x68u, 0x00u, 0xf0u, 0x7cu, 0xf8u, 0x10u, 0xbdu, 0xc0u, 0x46u,
0x0cu, 0x01u, 0x02u, 0x08u, 0x10u, 0xb5u, 0x03u, 0x4bu, 0x01u, 0x00u, 0x18u, 0x68u, 0x00u, 0xf0u, 0x28u, 0xf8u,
0x10u, 0xbdu, 0xc0u, 0x46u, 0x0cu, 0x01u, 0x02u, 0x08u, 0x82u, 0xb0u, 0x00u, 0x29u, 0x00u, 0xd1u, 0x01u, 0xa9u,
0x10u, 0x1eu, 0x06u, 0xd0u, 0x00u, 0x2bu, 0x06u, 0xd0u, 0x13u, 0x78u, 0x0bu, 0x60u, 0x10u, 0x78u, 0x43u, 0x1eu,
0x98u, 0x41u, 0x02u, 0xb0u, 0x70u, 0x47u, 0x02u, 0x20u, 0x40u, 0x42u, 0xfau, 0xe7u, 0x00u, 0x23u, 0x10u, 0xb5u,
0x9au, 0x42u, 0x00u, 0xd1u, 0x10u, 0xbdu, 0xccu, 0x5cu, 0xc4u, 0x54u, 0x01u, 0x33u, 0xf8u, 0xe7u, 0x03u, 0x00u,
0x12u, 0x18u, 0x93u, 0x42u, 0x00u, 0xd1u, 0x70u, 0x47u, 0x19u, 0x70u, 0x01u, 0x33u, 0xf9u, 0xe7u, 0x00u, 0x00u,
0x70u, 0xb5u, 0x05u, 0x00u, 0x00u, 0x29u, 0x10u, 0xd0u, 0x0cu, 0x1fu, 0x23u, 0x68u, 0x00u, 0x2bu, 0x00u, 0xdau,
0xe4u, 0x18u, 0x28u, 0x00u, 0x00u, 0xf0u, 0xacu, 0xf9u, 0x1du, 0x4au, 0x13u, 0x68u, 0x00u, 0x2bu, 0x05u, 0xd1u,
0x63u, 0x60u, 0x14u, 0x60u, 0x28u, 0x00u, 0x00u, 0xf0u, 0xa4u, 0xf9u, 0x70u, 0xbdu, 0xa3u, 0x42u, 0x09u, 0xd9u,
0x21u, 0x68u, 0x60u, 0x18u, 0x83u, 0x42u, 0xf3u, 0xd1u, 0x18u, 0x68u, 0x5bu, 0x68u, 0x41u, 0x18u, 0x21u, 0x60u,
0xeeu, 0xe7u, 0x13u, 0x00u, 0x5au, 0x68u, 0x00u, 0x2au, 0x01u, 0xd0u, 0xa2u, 0x42u, 0xf9u, 0xd9u, 0x19u, 0x68u,
0x58u, 0x18u, 0xa0u, 0x42u, 0x0bu, 0xd1u, 0x20u, 0x68u, 0x09u, 0x18u, 0x58u, 0x18u, 0x19u, 0x60u, 0x82u, 0x42u,
0xe0u, 0xd1u, 0x10u, 0x68u, 0x52u, 0x68u, 0x41u, 0x18u, 0x19u, 0x60u, 0x5au, 0x60u, 0xdau, 0xe7u, 0xa0u, 0x42u,
0x02u, 0xd9u, 0x0cu, 0x23u, 0x2bu, 0x60u, 0xd5u, 0xe7u, 0x21u, 0x68u, 0x60u, 0x18u, 0x82u, 0x42u, 0x03u, 0xd1u,
0x10u, 0x68u, 0x52u, 0x68u, 0x41u, 0x18u, 0x21u, 0x60u, 0x62u, 0x60u, 0x5cu, 0x60u, 0xcau, 0xe7u, 0xc0u, 0x46u,
0xecu, 0x0au, 0x02u, 0x08u, 0x03u, 0x23u, 0x70u, 0xb5u, 0xcdu, 0x1cu, 0x9du, 0x43u, 0x08u, 0x35u, 0x06u, 0x00u,
0x0cu, 0x2du, 0x1eu, 0xd2u, 0x0cu, 0x25u, 0xa9u, 0x42u, 0x1du, 0xd8u, 0x30u, 0x00u, 0x00u, 0xf0u, 0x60u, 0xf9u,
0x25u, 0x4au, 0x14u, 0x68u, 0x21u, 0x00u, 0x00u, 0x29u, 0x19u, 0xd1u, 0x24u, 0x4cu, 0x23u, 0x68u, 0x00u, 0x2bu,
0x03u, 0xd1u, 0x30u, 0x00u, 0x00u, 0xf0u, 0x44u, 0xf8u, 0x20u, 0x60u, 0x29u, 0x00u, 0x30u, 0x00u, 0x00u, 0xf0u,
0x3fu, 0xf8u, 0x43u, 0x1cu, 0x2bu, 0xd1u, 0x0cu, 0x23u, 0x30u, 0x00u, 0x33u, 0x60u, 0x00u, 0xf0u, 0x49u, 0xf9u,
0x03u, 0xe0u, 0x00u, 0x2du, 0xdfu, 0xdau, 0x0cu, 0x23u, 0x33u, 0x60u, 0x00u, 0x20u, 0x70u, 0xbdu, 0x0bu, 0x68u,
0x5bu, 0x1bu, 0x19u, 0xd4u, 0x0bu, 0x2bu, 0x03u, 0xd9u, 0x0bu, 0x60u, 0xccu, 0x18u, 0x25u, 0x60u, 0x03u, 0xe0u,
0x4bu, 0x68u, 0x8cu, 0x42u, 0x0du, 0xd1u, 0x13u, 0x60u, 0x30u, 0x00u, 0x00u, 0xf0u, 0x32u, 0xf9u, 0x20u, 0x00u,
0x07u, 0x22u, 0x0bu, 0x30u, 0x23u, 0x1du, 0x90u, 0x43u, 0xc3u, 0x1au, 0xe7u, 0xd0u, 0x5au, 0x42u, 0xe2u, 0x50u,
0xe4u, 0xe7u, 0x63u, 0x60u, 0x0cu, 0x00u, 0xefu, 0xe7u, 0x0cu, 0x00u, 0x49u, 0x68u, 0xc3u, 0xe7u, 0x03u, 0x23u,
0xc4u, 0x1cu, 0x9cu, 0x43u, 0xa0u, 0x42u, 0xe1u, 0xd0u, 0x21u, 0x1au, 0x30u, 0x00u, 0x00u, 0xf0u, 0x08u, 0xf8u,
0x43u, 0x1cu, 0xdbu, 0xd1u, 0xc7u, 0xe7u, 0xc0u, 0x46u, 0xecu, 0x0au, 0x02u, 0x08u, 0xf0u, 0x0au, 0x02u, 0x08u,
0x00u, 0x23u, 0x70u, 0xb5u, 0x06u, 0x4cu, 0x05u, 0x00u, 0x08u, 0x00u, 0x23u, 0x60u, 0x00u, 0xf0u, 0x0au, 0xf9u,
0x43u, 0x1cu, 0x03u, 0xd1u, 0x23u, 0x68u, 0x00u, 0x2bu, 0x00u, 0xd0u, 0x2bu, 0x60u, 0x70u, 0xbdu, 0xc0u, 0x46u,
0x20u, 0x10u, 0x02u, 0x08u, 0xc9u, 0xb2u, 0x03u, 0x78u, 0x00u, 0x2bu, 0x04u, 0xd0u, 0x8bu, 0x42u, 0x00u, 0xd1u,
0x70u, 0x47u, 0x01u, 0x30u, 0xf7u, 0xe7u, 0x4bu, 0x42u, 0x59u, 0x41u, 0x49u, 0x42u, 0x08u, 0x40u, 0xf7u, 0xe7u,
0x02u, 0x78u, 0x0bu, 0x78u, 0x00u, 0x2au, 0x03u, 0xd0u, 0x01u, 0x30u, 0x01u, 0x31u, 0x9au, 0x42u, 0xf7u, 0xd0u,
0xd0u, 0x1au, 0x70u, 0x47u, 0x03u, 0x00u, 0x0au, 0x78u, 0x01u, 0x31u, 0x1au, 0x70u, 0x01u, 0x33u, 0x00u, 0x2au,
0xf9u, 0xd1u, 0x70u, 0x47u, 0x00u, 0x23u, 0x30u, 0xb5u, 0x9au, 0x42u, 0x0au, 0xd0u, 0x01u, 0x3au, 0xc4u, 0x5cu,
0xcdu, 0x5cu, 0xacu, 0x42u, 0x04u, 0xd1u, 0x93u, 0x42u, 0x02u, 0xd0u, 0x01u, 0x33u, 0x00u, 0x2cu, 0xf6u, 0xd1u,
0x63u, 0x1bu, 0x18u, 0x00u, 0x30u, 0xbdu, 0x00u, 0x00u, 0xf0u, 0xb5u, 0x1fu, 0x00u, 0x0eu, 0x00u, 0x8du, 0xb0u,
0x0bu, 0x90u, 0x02u, 0x91u, 0x03u, 0x92u, 0x12u, 0x98u, 0x34u, 0x78u, 0xffu, 0xf7u, 0xcdu, 0xfeu, 0x08u, 0x22u,
0x00u, 0x19u, 0x43u, 0x78u, 0x75u, 0x1cu, 0x13u, 0x40u, 0x53u, 0xd1u, 0x2du, 0x2cu, 0x53u, 0xd1u, 0x74u, 0x78u,
0xb5u, 0x1cu, 0x01u, 0x33u, 0x01u, 0x93u, 0x00u, 0x2fu, 0x00u, 0xd1u, 0x8au, 0xe0u, 0x10u, 0x2fu, 0x0au, 0xd1u,
0x30u, 0x2cu, 0x08u, 0xd1u, 0x20u, 0x22u, 0x2bu, 0x78u, 0x93u, 0x43u, 0x58u, 0x2bu, 0x00u, 0xd0u, 0x7au, 0xe0u,
0x10u, 0x27u, 0x6cu, 0x78u, 0x02u, 0x35u, 0x01u, 0x9bu, 0x00u, 0x2bu, 0x41u, 0xd1u, 0x01u, 0x3bu, 0x04u, 0x93u,
0x3eu, 0x4bu, 0x05u, 0x93u, 0x3au, 0x00u, 0xfbu, 0x17u, 0x04u, 0x98u, 0x05u, 0x99u, 0x08u, 0x93u, 0xfeu, 0xf7u,
0x4fu, 0xfdu, 0x00u, 0x23u, 0x09u, 0x90u, 0x0eu, 0x00u, 0x00u, 0x20u, 0x00u, 0x21u, 0x0au, 0x92u, 0x22u, 0x00u,
0x30u, 0x3au, 0x09u, 0x2au, 0x31u, 0xd8u, 0x14u, 0x00u, 0xa7u, 0x42u, 0x3du, 0xddu, 0x5au, 0x1cu, 0x1du, 0xd0u,
0xb1u, 0x42u, 0x36u, 0xd8u, 0x02u, 0xd1u, 0x09u, 0x9bu, 0x98u, 0x42u, 0x32u, 0xd8u, 0x09u, 0x9bu, 0x83u, 0x42u,
0x06u, 0xd1u, 0x8eu, 0x42u, 0x04u, 0xd1u, 0x01u, 0x23u, 0x0au, 0x9au, 0x5bu, 0x42u, 0xa2u, 0x42u, 0x0du, 0xdbu,
0x0bu, 0x00u, 0x02u, 0x00u, 0x08u, 0x99u, 0x38u, 0x00u, 0xfeu, 0xf7u, 0x4au, 0xfdu, 0xe3u, 0x17u, 0x06u, 0x94u,
0x07u, 0x93u, 0x06u, 0x9bu, 0x07u, 0x9cu, 0xc0u, 0x18u, 0x61u, 0x41u, 0x01u, 0x23u, 0x2cu, 0x78u, 0x01u, 0x35u,
0xd5u, 0xe7u, 0x2eu, 0x00u, 0x9fu, 0xe7u, 0x2bu, 0x2cu, 0xacu, 0xd1u, 0xb5u, 0x1cu, 0x74u, 0x78u, 0xa9u, 0xe7u,
0x00u, 0x23u, 0x04u, 0x93u, 0x80u, 0x23u, 0x1bu, 0x06u, 0xbbu, 0xe7u, 0x22u, 0x00u, 0x41u, 0x3au, 0x19u, 0x2au,
0x01u, 0xd8u, 0x37u, 0x3cu, 0xc8u, 0xe7u, 0x22u, 0x00u, 0x61u, 0x3au, 0x19u, 0x2au, 0x04u, 0xd8u, 0x57u, 0x3cu,
0xc2u, 0xe7u, 0x01u, 0x23u, 0x5bu, 0x42u, 0xe1u, 0xe7u, 0x5au, 0x1cu, 0x09u, 0xd1u, 0x0bu, 0x9au, 0x23u, 0x33u,
0x13u, 0x60u, 0x03u, 0x9bu, 0x04u, 0x98u, 0x05u, 0x99u, 0x00u, 0x2bu, 0x0eu, 0xd1u, 0x0du, 0xb0u, 0xf0u, 0xbdu,
0x01u, 0x9au, 0x00u, 0x2au, 0x04u, 0xd0u, 0x06u, 0x00u, 0x0fu, 0x00u, 0x00u, 0x21u, 0x70u, 0x42u, 0xb9u, 0x41u,
0x03u, 0x9au, 0x00u, 0x2au, 0xf2u, 0xd0u, 0x00u, 0x2bu, 0x01u, 0xd0u, 0x6bu, 0x1eu, 0x02u, 0x93u, 0x03u, 0x9bu,
0x02u, 0x9au, 0x1au, 0x60u, 0xeau, 0xe7u, 0x30u, 0x24u, 0x00u, 0x2fu, 0x00u, 0xd0u, 0x83u, 0xe7u, 0x08u, 0x27u,
0x81u, 0xe7u, 0x30u, 0x2cu, 0x00u, 0xd1u, 0x75u, 0xe7u, 0x0au, 0x27u, 0x7cu, 0xe7u, 0xffu, 0xffu, 0xffu, 0x7fu,
0x37u, 0xb5u, 0x13u, 0x00u, 0x06u, 0x4au, 0x05u, 0x00u, 0x10u, 0x68u, 0x04u, 0x6au, 0x00u, 0x2cu, 0x00u, 0xd1u,
0x04u, 0x4cu, 0x0au, 0x00u, 0x00u, 0x94u, 0x29u, 0x00u, 0xffu, 0xf7u, 0x46u, 0xffu, 0x03u, 0xb0u, 0x30u, 0xbdu,
0x0cu, 0x01u, 0x02u, 0x08u, 0x70u, 0x01u, 0x02u, 0x08u, 0x0bu, 0x1eu, 0x04u, 0xd0u, 0xffu, 0x2au, 0x04u, 0xd9u,
0x8au, 0x23u, 0x03u, 0x60u, 0x8bu, 0x3bu, 0x18u, 0x00u, 0x70u, 0x47u, 0x0au, 0x70u, 0x01u, 0x23u, 0xfau, 0xe7u,
0x70u, 0x47u, 0x70u, 0x47u, 0x04u, 0x4au, 0x13u, 0x68u, 0x00u, 0x2bu, 0x00u, 0xd1u, 0x03u, 0x4bu, 0x18u, 0x18u,
0x10u, 0x60u, 0x18u, 0x00u, 0x70u, 0x47u, 0xc0u, 0x46u, 0xf4u, 0x0au, 0x02u, 0x08u, 0x28u, 0x10u, 0x02u, 0x08u,
0xf8u, 0xb5u, 0xc0u, 0x46u, 0xf8u, 0xbcu, 0x08u, 0xbcu, 0x9eu, 0x46u, 0x70u, 0x47u, 0xf8u, 0xb5u, 0xc0u, 0x46u,
0xf8u, 0xbcu, 0x08u, 0xbcu, 0x9eu, 0x46u, 0x70u, 0x47u, 0x01u, 0xb4u, 0x02u, 0x48u, 0x84u, 0x46u, 0x01u, 0xbcu,
0x60u, 0x47u, 0x00u, 0xbfu, 0x7du, 0x03u, 0x02u, 0x08u, 0x01u, 0xb4u, 0x02u, 0x48u, 0x84u, 0x46u, 0x01u, 0xbcu,
0x60u, 0x47u, 0x00u, 0xbfu, 0xa9u, 0x04u, 0x02u, 0x08u, 0x01u, 0xb4u, 0x02u, 0x48u, 0x84u, 0x46u, 0x01u, 0xbcu,
0x60u, 0x47u, 0x00u, 0xbfu, 0xe5u, 0x02u, 0x02u, 0x08u, 0x41u, 0x42u, 0x43u, 0x44u, 0x45u, 0x46u, 0x47u, 0x48u,
0x49u, 0x4au, 0x4bu, 0x4cu, 0x4du, 0x4eu, 0x4fu, 0x50u, 0x51u, 0x52u, 0x53u, 0x54u, 0x55u, 0x56u, 0x57u, 0x58u,
0x59u, 0x5au, 0x61u, 0x62u, 0x63u, 0x64u, 0x65u, 0x66u, 0x67u, 0x68u, 0x69u, 0x6au, 0x6bu, 0x6cu, 0x6du, 0x6eu,
0x6fu, 0x70u, 0x71u, 0x72u, 0x73u, 0x74u, 0x75u, 0x76u, 0x77u, 0x78u, 0x79u, 0x7au, 0x30u, 0x31u, 0x32u, 0x33u,
0x34u, 0x35u, 0x36u, 0x37u, 0x38u, 0x39u, 0x00u, 0x6eu, 0x75u, 0x6cu, 0x6cu, 0x00u, 0x66u, 0x61u, 0x6cu, 0x73u,
0x65u, 0x00u, 0x74u, 0x72u, 0x75u, 0x65u, 0x00u, 0x72u, 0x65u, 0x73u, 0x6fu, 0x75u, 0x72u, 0x63u, 0x65u, 0x73u,
0x00u, 0x61u, 0x64u, 0x64u, 0x72u, 0x65u, 0x73u, 0x73u, 0x00u, 0x73u, 0x69u, 0x7au, 0x65u, 0x00u, 0x53u, 0x43u,
0x52u, 0x41u, 0x54u, 0x43u, 0x48u, 0x00u, 0x6cu, 0x61u, 0x75u, 0x6eu, 0x63u, 0x68u, 0x00u, 0x61u, 0x63u, 0x71u,
0x5fu, 0x77u, 0x69u, 0x6eu, 0x00u, 0x77u, 0x64u, 0x74u, 0x5fu, 0x65u, 0x6eu, 0x61u, 0x62u, 0x6cu, 0x65u, 0x00u,
0x77u, 0x64u, 0x74u, 0x5fu, 0x74u, 0x69u, 0x6du, 0x65u, 0x6fu, 0x75u, 0x74u, 0x00u, 0x75u, 0x70u, 0x67u, 0x72u,
0x61u, 0x64u, 0x65u, 0x5fu, 0x6du, 0x6fu, 0x64u, 0x65u, 0x00u, 0x73u, 0x77u, 0x61u, 0x70u, 0x00u, 0x6du, 0x75u,
0x6cu, 0x74u, 0x69u, 0x5fu, 0x69u, 0x6du, 0x61u, 0x67u, 0x65u, 0x00u, 0x6du, 0x6fu, 0x6eu, 0x6fu, 0x74u, 0x6fu,
0x6eu, 0x69u, 0x63u, 0x00u, 0x42u, 0x4fu, 0x4fu, 0x54u, 0x00u, 0x55u, 0x50u, 0x47u, 0x52u, 0x41u, 0x44u, 0x45u,
0x00u, 0x65u, 0x6eu, 0x63u, 0x72u, 0x79u, 0x70u, 0x74u, 0x00u, 0x65u, 0x6eu, 0x63u, 0x72u, 0x79u, 0x70u, 0x74u,
0x5fu, 0x6bu, 0x65u, 0x79u, 0x5fu, 0x69u, 0x64u, 0x00u, 0x62u, 0x6fu, 0x6fu, 0x74u, 0x5fu, 0x61u, 0x75u, 0x74u,
0x68u, 0x00u, 0x73u, 0x6du, 0x69u, 0x66u, 0x5fu, 0x69u, 0x64u, 0x00u, 0x73u, 0x65u, 0x74u, 0x5fu, 0x69u, 0x6du,
0x67u, 0x5fu, 0x6fu, 0x6bu, 0x00u, 0x53u, 0x54u, 0x41u, 0x54u, 0x55u, 0x53u, 0x5fu, 0x50u, 0x41u, 0x52u, 0x54u,
0x49u, 0x54u, 0x49u, 0x4fu, 0x4eu, 0x00u, 0x6du, 0x34u, 0x00u, 0x70u, 0x65u, 0x72u, 0x6du, 0x69u, 0x73u, 0x73u,
0x69u, 0x6fu, 0x6eu, 0x00u, 0x63u, 0x6fu, 0x6eu, 0x74u, 0x72u, 0x6fu, 0x6cu, 0x00u, 0x6bu, 0x65u, 0x79u, 0x00u,
0x65u, 0x78u, 0x74u, 0x43u, 0x6cu, 0x6bu, 0x45u, 0x6eu, 0x61u, 0x62u, 0x6cu, 0x65u, 0x00u, 0x65u, 0x78u, 0x74u,
0x43u, 0x6cu, 0x6bu, 0x46u, 0x72u, 0x65u, 0x71u, 0x48u, 0x7au, 0x00u, 0x65u, 0x78u, 0x74u, 0x43u, 0x6cu, 0x6bu,
0x50u, 0x6fu, 0x72u, 0x74u, 0x00u, 0x65u, 0x78u, 0x74u, 0x43u, 0x6cu, 0x6bu, 0x50u, 0x69u, 0x6eu, 0x4eu, 0x75u,
0x6du, 0x00u, 0x65u, 0x63u, 0x6fu, 0x45u, 0x6eu, 0x61u, 0x62u, 0x6cu, 0x65u, 0x00u, 0x65u, 0x63u, 0x6fu, 0x46u,
0x72u, 0x65u, 0x71u, 0x48u, 0x7au, 0x00u, 0x65u, 0x63u, 0x6fu, 0x4cu, 0x6fu, 0x61u, 0x64u, 0x00u, 0x65u, 0x63u,
0x6fu, 0x45u, 0x73u, 0x72u, 0x00u, 0x65u, 0x63u, 0x6fu, 0x44u, 0x72u, 0x69u, 0x76u, 0x65u, 0x4cu, 0x65u, 0x76u,
0x65u, 0x6cu, 0x00u, 0x65u, 0x63u, 0x6fu, 0x49u, 0x6eu, 0x50u, 0x6fu, 0x72u, 0x74u, 0x00u, 0x65u, 0x63u, 0x6fu,
0x4fu, 0x75u, 0x74u, 0x50u, 0x6fu, 0x72u, 0x74u, 0x00u, 0x65u, 0x63u, 0x6fu, 0x49u, 0x6eu, 0x50u, 0x69u, 0x6eu,
0x4eu, 0x75u, 0x6du, 0x00u, 0x65u, 0x63u, 0x6fu, 0x4fu, 0x75u, 0x74u, 0x50u, 0x69u, 0x6eu, 0x4eu, 0x75u, 0x6du,
0x00u, 0x77u, 0x63u, 0x6fu, 0x45u, 0x6eu, 0x61u, 0x62u, 0x6cu, 0x65u, 0x00u, 0x62u, 0x79u, 0x70u, 0x61u, 0x73u,
0x73u, 0x45u, 0x6eu, 0x61u, 0x62u, 0x6cu, 0x65u, 0x00u, 0x77u, 0x63u, 0x6fu, 0x49u, 0x6eu, 0x50u, 0x6fu, 0x72u,
0x74u, 0x00u, 0x77u, 0x63u, 0x6fu, 0x4fu, 0x75u, 0x74u, 0x50u, 0x6fu, 0x72u, 0x74u, 0x00u, 0x77u, 0x63u, 0x6fu,
0x49u, 0x6eu, 0x50u, 0x69u, 0x6eu, 0x4eu, 0x75u, 0x6du, 0x00u, 0x77u, 0x63u, 0x6fu, 0x4fu, 0x75u, 0x74u, 0x50u,
0x69u, 0x6eu, 0x4eu, 0x75u, 0x6du, 0x00u, 0x65u, 0x78u, 0x74u, 0x63u, 0x6cu, 0x6bu, 0x00u, 0x70u, 0x72u, 0x65u,
0x73u, 0x65u, 0x6eu, 0x74u, 0x00u, 0x66u, 0x69u, 0x72u, 0x6du, 0x77u, 0x61u, 0x72u, 0x65u, 0x00u, 0x63u, 0x65u,
0x72u, 0x74u, 0x69u, 0x66u, 0x69u, 0x63u, 0x61u, 0x74u, 0x65u, 0x00u, 0x6fu, 0x70u, 0x65u, 0x6eu, 0x00u, 0x64u,
0x69u, 0x73u, 0x61u, 0x62u, 0x6cu, 0x65u, 0x64u, 0x00u, 0x65u, 0x6eu, 0x61u, 0x62u, 0x6cu, 0x65u, 0x64u, 0x00u,
0x61u, 0x6cu, 0x6cu, 0x6fu, 0x77u, 0x65u, 0x64u, 0x00u, 0x64u, 0x65u, 0x62u, 0x75u, 0x67u, 0x00u, 0x62u, 0x6fu,
0x6fu, 0x74u, 0x5fu, 0x75u, 0x70u, 0x67u, 0x72u, 0x61u, 0x64u, 0x65u, 0x00u, 0x73u, 0x72u, 0x61u, 0x6du, 0x70u,
0x77u, 0x72u, 0x6du, 0x6fu, 0x64u, 0x65u, 0x00u, 0x6du, 0x61u, 0x63u, 0x72u, 0x6fu, 0x4eu, 0x75u, 0x6du, 0x00u,
0x74u, 0x79u, 0x70u, 0x65u, 0x00u, 0x61u, 0x72u, 0x72u, 0x61u, 0x79u, 0x00u, 0x69u, 0x74u, 0x65u, 0x6du, 0x73u,
0x00u, 0x6eu, 0x75u, 0x6du, 0x62u, 0x65u, 0x72u, 0x00u, 0x69u, 0x6eu, 0x74u, 0x65u, 0x67u, 0x65u, 0x72u, 0x00u,
0x62u, 0x6fu, 0x6fu, 0x6cu, 0x65u, 0x61u, 0x6eu, 0x00u, 0x73u, 0x74u, 0x72u, 0x69u, 0x6eu, 0x67u, 0x00u, 0x6du,
0x61u, 0x78u, 0x69u, 0x6du, 0x75u, 0x6du, 0x00u, 0x6du, 0x69u, 0x6eu, 0x69u, 0x6du, 0x75u, 0x6du, 0x00u, 0x73u,
0x72u, 0x61u, 0x6du, 0x30u, 0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x50u, 0x43u, 0x31u, 0x5fu, 0x53u,
0x50u, 0x4du, 0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x50u, 0x43u, 0x32u, 0x00u, 0x46u, 0x4cu, 0x41u,
0x53u, 0x48u, 0x5fu, 0x50u, 0x43u, 0x33u, 0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x50u, 0x43u, 0x34u,
0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x4du, 0x41u, 0x49u, 0x4eu, 0x5fu, 0x43u, 0x4fu, 0x44u, 0x45u,
0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x4du, 0x41u, 0x49u, 0x4eu, 0x5fu, 0x58u, 0x4fu, 0x00u, 0x46u,
0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x4du, 0x41u, 0x49u, 0x4eu, 0x5fu, 0x44u, 0x41u, 0x54u, 0x41u, 0x00u, 0x46u,
0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x53u, 0x55u, 0x50u, 0x45u, 0x52u, 0x56u, 0x49u, 0x53u, 0x4fu, 0x52u, 0x59u,
0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x57u, 0x4fu, 0x52u, 0x4bu, 0x5fu, 0x53u, 0x45u, 0x43u, 0x55u,
0x52u, 0x45u, 0x00u, 0x46u, 0x4cu, 0x41u, 0x53u, 0x48u, 0x5fu, 0x57u, 0x4fu, 0x52u, 0x4bu, 0x00u, 0x53u, 0x52u,
0x41u, 0x4du, 0x5fu, 0x50u, 0x43u, 0x30u, 0x5fu, 0x50u, 0x52u, 0x49u, 0x56u, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du,
0x5fu, 0x50u, 0x43u, 0x30u, 0x5fu, 0x50u, 0x55u, 0x42u, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du, 0x5fu, 0x53u, 0x50u,
0x4du, 0x5fu, 0x50u, 0x52u, 0x49u, 0x56u, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du, 0x5fu, 0x53u, 0x50u, 0x4du, 0x5fu,
0x50u, 0x55u, 0x42u, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du, 0x5fu, 0x50u, 0x43u, 0x31u, 0x5fu, 0x50u, 0x52u, 0x49u,
0x56u, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du, 0x5fu, 0x50u, 0x43u, 0x32u, 0x5fu, 0x50u, 0x52u, 0x49u, 0x56u, 0x00u,
0x53u, 0x52u, 0x41u, 0x4du, 0x5fu, 0x50u, 0x43u, 0x33u, 0x5fu, 0x50u, 0x52u, 0x49u, 0x56u, 0x00u, 0x53u, 0x52u,
0x41u, 0x4du, 0x5fu, 0x50u, 0x43u, 0x34u, 0x5fu, 0x50u, 0x52u, 0x49u, 0x56u, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du,
0x5fu, 0x4du, 0x41u, 0x49u, 0x4eu, 0x00u, 0x53u, 0x52u, 0x41u, 0x4du, 0x5fu, 0x44u, 0x41u, 0x50u, 0x00u, 0x53u,
0x4du, 0x49u, 0x46u, 0x5fu, 0x43u, 0x4fu, 0x44u, 0x45u, 0x00u, 0x53u, 0x4du, 0x49u, 0x46u, 0x5fu, 0x58u, 0x4fu,
0x00u, 0x53u, 0x4du, 0x49u, 0x46u, 0x5fu, 0x44u, 0x41u, 0x54u, 0x41u, 0x00u, 0x00u, 0xa1u, 0x0fu, 0xb9u, 0x0bu,
0xd1u, 0x07u, 0xdcu, 0x05u, 0xe9u, 0x03u, 0xeeu, 0x02u, 0xf5u, 0x01u, 0x77u, 0x01u, 0xfbu, 0x00u, 0xbcu, 0x00u,
0x7eu, 0x00u, 0x5eu, 0x00u, 0x3fu, 0x00u, 0x2fu, 0x00u, 0x20u, 0x00u, 0x18u, 0x00u, 0x10u, 0x00u, 0x0cu, 0x00u,
0x08u, 0x00u, 0x06u, 0x00u, 0x04u, 0x00u, 0x03u, 0x00u, 0x02u, 0x00u, 0x02u, 0x00u, 0x01u, 0x00u, 0x01u, 0x00u,
0x00u, 0x00u, 0x20u, 0x40u, 0x00u, 0x00u, 0x24u, 0x40u, 0x00u, 0x00u, 0x00u, 0x40u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x23u, 0x40u, 0x00u, 0x00u, 0x30u, 0x40u, 0x00u, 0x00u, 0x31u, 0x40u, 0x00u, 0x00u, 0x9fu, 0x40u,
0x00u, 0x00u, 0x22u, 0x40u, 0x00u, 0x00u, 0x10u, 0x40u, 0x00u, 0x00u, 0x9du, 0x40u, 0x20u, 0x20u, 0x20u, 0x20u,
0x20u, 0x13u, 0x10u, 0x10u, 0x10u, 0x1du, 0x20u, 0x80u, 0x17u, 0x00u, 0x75u, 0x00u, 0xffu, 0x03u, 0x05u, 0x01u,
0x05u, 0x00u, 0x1cu, 0x03u, 0x10u, 0x00u, 0x00u, 0x00u, 0x3fu, 0xc0u, 0x00u, 0x00u, 0x00u, 0x04u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x19u, 0x32u, 0x4bu, 0x64u, 0x7du, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x80u,
0x40u, 0x00u, 0x08u, 0x0bu, 0x10u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xffu, 0x01u, 0x20u, 0x02u, 0x00u, 0x1fu,
0x00u, 0x80u, 0x00u, 0x04u, 0xffu, 0x08u, 0x10u, 0x18u, 0x00u, 0x10u, 0x00u, 0x14u, 0x00u, 0x18u, 0x00u, 0x1cu,
0x40u, 0x44u, 0x48u, 0x4cu, 0x50u, 0x00u, 0x00u, 0x00u, 0x08u, 0x10u, 0x00u, 0x00u, 0x08u, 0x00u, 0x00u, 0x00u,
0x04u, 0x00u, 0x00u, 0x00u, 0x04u, 0x10u, 0x00u, 0x00u, 0x00u, 0x12u, 0x00u, 0x00u, 0x04u, 0x21u, 0x00u, 0x00u,
0x00u, 0x21u, 0x00u, 0x00u, 0x00u, 0x16u, 0x00u, 0x00u, 0x40u, 0x11u, 0x40u, 0x02u, 0xc4u, 0x13u, 0x00u, 0x13u,
0x80u, 0x13u, 0xa0u, 0x13u, 0x40u, 0x13u, 0x88u, 0x13u, 0xa8u, 0x13u, 0x20u, 0x00u, 0x1cu, 0x00u, 0x00u, 0x00u,
0x03u, 0x00u, 0x00u, 0x00u, 0x01u, 0x00u, 0x00u, 0x00u, 0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x05u, 0x03u, 0x60u, 0x00u, 0x04u, 0x00u, 0x00u, 0x00u, 0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x01u, 0x00u, 0x00u, 0x00u, 0x06u, 0x04u, 0x60u, 0x00u, 0x08u, 0x00u, 0x00u, 0x00u, 0xccu, 0x0au, 0x02u, 0x08u,
0xd5u, 0x76u, 0x00u, 0x10u, 0x38u, 0x7eu, 0x00u, 0x10u, 0xaau, 0x7cu, 0x00u, 0x10u, 0xeeu, 0x7cu, 0x00u, 0x10u,
0x52u, 0x7cu, 0x00u, 0x10u, 0xeeu, 0x7cu, 0x00u, 0x10u, 0xdeu, 0x7du, 0x00u, 0x10u, 0xeeu, 0x7cu, 0x00u, 0x10u,
0x52u, 0x7cu, 0x00u, 0x10u, 0xaau, 0x7cu, 0x00u, 0x10u, 0xaau, 0x7cu, 0x00u, 0x10u, 0xdeu, 0x7du, 0x00u, 0x10u,
0x52u, 0x7cu, 0x00u, 0x10u, 0x4au, 0x7cu, 0x00u, 0x10u, 0x4au, 0x7cu, 0x00u, 0x10u, 0x4au, 0x7cu, 0x00u, 0x10u,
0xecu, 0x7du, 0x00u, 0x10u, 0x43u, 0x00u, 0x50u, 0x4fu, 0x53u, 0x49u, 0x58u, 0x00u, 0x2eu, 0x00u, 0x00u, 0x20u,
0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x28u, 0x28u, 0x28u, 0x28u, 0x28u, 0x20u, 0x20u, 0x20u,
0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x20u, 0x88u,
0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x04u,
0x04u, 0x04u, 0x04u, 0x04u, 0x04u, 0x04u, 0x04u, 0x04u, 0x04u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u,
0x41u, 0x41u, 0x41u, 0x41u, 0x41u, 0x41u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u,
0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x01u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u, 0x10u,
0x42u, 0x42u, 0x42u, 0x42u, 0x42u, 0x42u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u,
0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x02u, 0x10u, 0x10u, 0x10u, 0x10u, 0x20u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x8cu, 0xe3u, 0xffu, 0x7fu, 0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x04u, 0x00u, 0x10u,
0x00u, 0x00u, 0x02u, 0x08u, 0x80u, 0x00u, 0x00u, 0x00u, 0xacu, 0x96u, 0x00u, 0x10u, 0x80u, 0x00u, 0x02u, 0x08u,
0x60u, 0x05u, 0x00u, 0x00u, 0x00u, 0x06u, 0x02u, 0x08u, 0x24u, 0x0au, 0x00u, 0x00u, 0x05u, 0x8cu, 0x00u, 0x10u,
0xf1u, 0x8bu, 0x00u, 0x10u, 0xe5u, 0x92u, 0x00u, 0x10u, 0xf3u, 0x92u, 0x00u, 0x10u, 0xfdu, 0x92u, 0x00u, 0x10u,
0x07u, 0x93u, 0x00u, 0x10u, 0x11u, 0x93u, 0x00u, 0x10u, 0x21u, 0x93u, 0x00u, 0x10u, 0x2fu, 0x93u, 0x00u, 0x10u,
0x3fu, 0x93u, 0x00u, 0x10u, 0x51u, 0x93u, 0x00u, 0x10u, 0x63u, 0x93u, 0x00u, 0x10u, 0x6eu, 0x93u, 0x00u, 0x10u,
0x7cu, 0x93u, 0x00u, 0x10u, 0x89u, 0x93u, 0x00u, 0x10u, 0x97u, 0x93u, 0x00u, 0x10u, 0xa4u, 0x93u, 0x00u, 0x10u,
0xb2u, 0x93u, 0x00u, 0x10u, 0xc0u, 0x93u, 0x00u, 0x10u, 0xceu, 0x93u, 0x00u, 0x10u, 0xdcu, 0x93u, 0x00u, 0x10u,
0xe6u, 0x93u, 0x00u, 0x10u, 0xefu, 0x93u, 0x00u, 0x10u, 0xf9u, 0x93u, 0x00u, 0x10u, 0x01u, 0x94u, 0x00u, 0x10u,
0xf4u, 0x90u, 0x00u, 0x10u, 0xf9u, 0x90u, 0x00u, 0x10u, 0x35u, 0x91u, 0x00u, 0x10u, 0x9eu, 0x90u, 0x00u, 0x10u,
0x00u, 0x09u, 0x3du, 0x00u, 0x00u, 0x12u, 0x7au, 0x00u, 0x00u, 0x09u, 0x3du, 0x00u, 0x00u, 0x00u, 0xd0u, 0x07u,
0xa0u, 0x0fu, 0x00u, 0x00u, 0x04u, 0x00u, 0x00u, 0x00u, 0x10u, 0x01u, 0x02u, 0x08u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x43u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xb9u, 0x8fu, 0x00u, 0x10u,
0x19u, 0x8cu, 0x00u, 0x10u, 0x00u, 0x00u, 0x00u, 0x00u, 0x7eu, 0x95u, 0x00u, 0x10u, 0x7cu, 0x95u, 0x00u, 0x10u,
0x7du, 0x95u, 0x00u, 0x10u, 0x7du, 0x95u, 0x00u, 0x10u, 0x7du, 0x95u, 0x00u, 0x10u, 0x7du, 0x95u, 0x00u, 0x10u,
0x7du, 0x95u, 0x00u, 0x10u, 0x7du, 0x95u, 0x00u, 0x10u, 0x7du, 0x95u, 0x00u, 0x10u, 0x7du, 0x95u, 0x00u, 0x10u,
0x7du, 0x95u, 0x00u, 0x10u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu,
0xffu, 0xffu, 0x00u, 0x00u, 0x01u, 0x00u, 0x41u, 0x53u, 0x43u, 0x49u, 0x49u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x41u, 0x53u, 0x43u, 0x49u, 0x49u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xa9u, 0x04u, 0x00u, 0x10u, 0x81u, 0x04u, 0x00u, 0x10u,
0x02u, 0x4au, 0x13u, 0x68u, 0x00u, 0x2bu, 0xfcu, 0xdbu, 0x70u, 0x47u, 0xc0u, 0x46u, 0x00u, 0x01u, 0x26u, 0x40u,
0x10u, 0xb5u, 0x43u, 0x78u, 0xffu, 0x2bu, 0x0bu, 0xd1u, 0x03u, 0x20u, 0x00u, 0xf0u, 0x67u, 0xf9u, 0xc3u, 0x68u,
0x5au, 0x68u, 0x01u, 0x23u, 0x11u, 0x68u, 0x19u, 0x43u, 0x11u, 0x60u, 0x11u, 0x68u, 0x19u, 0x42u, 0xfcu, 0xd1u,
0x10u, 0xbdu, 0x80u, 0xb2u, 0x30u, 0xb5u, 0xc0u, 0x00u, 0x20u, 0xd0u, 0x11u, 0x4bu, 0x07u, 0x22u, 0x1cu, 0x68u,
0x23u, 0x00u, 0xbau, 0x33u, 0x1bu, 0x88u, 0x5au, 0x43u, 0x23u, 0x6au, 0xd3u, 0x18u, 0x19u, 0x68u, 0x00u, 0x29u,
0xfcu, 0xdau, 0x3eu, 0x21u, 0x0bu, 0x4bu, 0x06u, 0x25u, 0x19u, 0x60u, 0x0bu, 0x4bu, 0x0bu, 0x49u, 0x19u, 0x60u,
0xa3u, 0x21u, 0x0bu, 0x4bu, 0xc9u, 0x00u, 0x5du, 0x50u, 0x0au, 0x49u, 0x58u, 0x50u, 0x58u, 0x58u, 0x20u, 0x6au,
0x12u, 0x18u, 0x00u, 0x20u, 0x50u, 0x60u, 0x5au, 0x58u, 0x00u, 0x2au, 0xfcu, 0xdau, 0x30u, 0xbdu, 0xc0u, 0x46u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x04u, 0x01u, 0x26u, 0x40u, 0x08u, 0x01u, 0x26u, 0x40u, 0x1eu, 0x1fu, 0x00u, 0x00u,
0x00u, 0x00u, 0x26u, 0x40u, 0x1cu, 0x05u, 0x00u, 0x00u, 0xf7u, 0xb5u, 0x00u, 0x90u, 0x00u, 0x20u, 0x01u, 0x91u,
0x00u, 0xf0u, 0x24u, 0xf9u, 0x3eu, 0x4du, 0x06u, 0x00u, 0x2bu, 0x68u, 0x1au, 0x00u, 0x50u, 0x33u, 0xbcu, 0x32u,
0x14u, 0x68u, 0x1bu, 0x78u, 0x04u, 0x19u, 0x00u, 0x2bu, 0x5au, 0xd0u, 0x00u, 0xf0u, 0xf7u, 0xf8u, 0x07u, 0x00u,
0x03u, 0x28u, 0x1bu, 0xd0u, 0x00u, 0xf0u, 0xc2u, 0xf8u, 0x36u, 0x4au, 0x37u, 0x4bu, 0x05u, 0x00u, 0xd3u, 0x58u,
0x00u, 0x2bu, 0x3eu, 0xdau, 0x35u, 0x4au, 0x01u, 0x21u, 0x30u, 0x00u, 0x00u, 0xf0u, 0xf7u, 0xf8u, 0x00u, 0x28u,
0x37u, 0xd1u, 0x01u, 0x98u, 0xffu, 0xf7u, 0xa5u, 0xffu, 0x00u, 0x9bu, 0x00u, 0x2bu, 0x3eu, 0xd0u, 0x23u, 0x68u,
0x00u, 0x2bu, 0xfcu, 0xdbu, 0x00u, 0xf0u, 0xd2u, 0xf8u, 0x04u, 0x00u, 0x2bu, 0xe0u, 0x06u, 0x20u, 0x00u, 0xf0u,
0xf5u, 0xf8u, 0x2bu, 0x68u, 0xbcu, 0x33u, 0x1bu, 0x68u, 0xc0u, 0x18u, 0x03u, 0x68u, 0x00u, 0x2bu, 0x02u, 0xdau,
0x27u, 0x4cu, 0x20u, 0x00u, 0xfeu, 0xbdu, 0x00u, 0x20u, 0x00u, 0xf0u, 0xa0u, 0xf8u, 0x25u, 0x4bu, 0x98u, 0x42u,
0xf6u, 0xd0u, 0x00u, 0x23u, 0x24u, 0x4au, 0x19u, 0x00u, 0x12u, 0x68u, 0x01u, 0x20u, 0x00u, 0xf0u, 0xc6u, 0xf8u,
0x00u, 0x25u, 0xa8u, 0x42u, 0xecu, 0xd1u, 0x00u, 0x20u, 0x00u, 0xf0u, 0x90u, 0xf8u, 0x1du, 0x4au, 0x1fu, 0x4bu,
0x90u, 0x42u, 0x03u, 0xd0u, 0x9du, 0x42u, 0xe3u, 0xd0u, 0x01u, 0x35u, 0xf4u, 0xe7u, 0x9du, 0x42u, 0xb9u, 0xd1u,
0xdeu, 0xe7u, 0x17u, 0x4cu, 0x03u, 0x2fu, 0x05u, 0xd1u, 0x01u, 0x21u, 0x00u, 0x20u, 0x00u, 0xf0u, 0xbeu, 0xf8u,
0x00u, 0x28u, 0xf9u, 0xd1u, 0x28u, 0x00u, 0x00u, 0xf0u, 0x89u, 0xf8u, 0xd2u, 0xe7u, 0x14u, 0x4cu, 0xf1u, 0xe7u,
0x00u, 0xf0u, 0x6cu, 0xf8u, 0x0du, 0x4au, 0x05u, 0x00u, 0x01u, 0x21u, 0x30u, 0x00u, 0x00u, 0xf0u, 0xa6u, 0xf8u,
0x00u, 0x28u, 0x09u, 0xd1u, 0x00u, 0x9bu, 0x00u, 0x2bu, 0x08u, 0xd0u, 0x23u, 0x68u, 0x00u, 0x2bu, 0xfcu, 0xdbu,
0x00u, 0xf0u, 0x84u, 0xf8u, 0x04u, 0x00u, 0xe5u, 0xe7u, 0x05u, 0x4cu, 0xe3u, 0xe7u, 0x08u, 0x4cu, 0xe1u, 0xe7u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0x00u, 0x26u, 0x40u, 0x1cu, 0x05u, 0x00u, 0x00u, 0x28u, 0x06u, 0x02u, 0x08u,
0x05u, 0x00u, 0x52u, 0x00u, 0x01u, 0x01u, 0x88u, 0x00u, 0x38u, 0x06u, 0x02u, 0x08u, 0xf0u, 0x49u, 0x02u, 0x00u,
0x01u, 0x00u, 0x50u, 0x00u, 0x1au, 0x4bu, 0xf7u, 0xb5u, 0x1bu, 0x68u, 0x1au, 0x4au, 0x5cu, 0x68u, 0x04u, 0x23u,
0x11u, 0x69u, 0x0bu, 0x43u, 0x13u, 0x61u, 0x01u, 0x28u, 0x28u, 0xd0u, 0x30u, 0xbfu, 0x23u, 0x00u, 0xfcu, 0x33u,
0x5bu, 0x6fu, 0x00u, 0x2bu, 0x21u, 0xd1u, 0x00u, 0xf0u, 0x51u, 0xf8u, 0xa3u, 0x20u, 0x12u, 0x4bu, 0x13u, 0x49u,
0x13u, 0x4au, 0xc0u, 0x00u, 0x0fu, 0x68u, 0x1eu, 0x58u, 0x15u, 0x68u, 0x01u, 0x95u, 0x11u, 0x4du, 0x0du, 0x60u,
0x06u, 0x25u, 0x1du, 0x50u, 0x3eu, 0x20u, 0x10u, 0x60u, 0x0fu, 0x48u, 0x3eu, 0x35u, 0x1du, 0x50u, 0x1du, 0x58u,
0x00u, 0x2du, 0xfcu, 0xdau, 0x01u, 0x20u, 0xfcu, 0x34u, 0x60u, 0x67u, 0x0fu, 0x60u, 0xa3u, 0x21u, 0xc9u, 0x00u,
0x5eu, 0x50u, 0x01u, 0x9bu, 0x13u, 0x60u, 0x00u, 0xf0u, 0x21u, 0xf8u, 0xf7u, 0xbdu, 0x20u, 0xbfu, 0xd5u, 0xe7u,
0xf8u, 0x0au, 0x02u, 0x08u, 0x00u, 0xedu, 0x00u, 0xe0u, 0x00u, 0x00u, 0x26u, 0x40u, 0x08u, 0x01u, 0x26u, 0x40u,
0x04u, 0x01u, 0x26u, 0x40u, 0x1eu, 0x1fu, 0x00u, 0x00u, 0x1cu, 0x05u, 0x00u, 0x00u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0xdbu, 0x04u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0x7du, 0x24u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0xf3u, 0x53u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0xe3u, 0x04u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0xf1u, 0x53u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0xe5u, 0x1fu, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0x59u, 0x77u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0x4du, 0x22u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0x3du, 0x21u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0x09u, 0x24u, 0x00u, 0x10u, 0x01u, 0xb4u, 0x02u, 0x48u,
0x84u, 0x46u, 0x01u, 0xbcu, 0x60u, 0x47u, 0x00u, 0xbfu, 0x21u, 0x1fu, 0x00u, 0x10u,
};
#endif /* defined(CY_DEVICE_PSOC6A512K) */
|
7c3d472ed23aa0fecd0636f62f03850c4b7495c4
|
154cf7c3c956dbb270c2113ec63cfd4695185e95
|
/ed25519/amd64-64-24k/sc25519_window4.c
|
683a1d4b856106c5076e0c650faea9fd18e06526
|
[
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-public-domain-disclaimer"
] |
permissive
|
cathugger/mkp224o
|
4826846a252cc555a1bd2ddc4fa14336f0db8016
|
42e4d3a5fcea3a7d5072e9b354265e2ced18367b
|
refs/heads/master
| 2023-08-24T23:55:39.736945
| 2023-08-06T18:22:54
| 2023-08-06T18:22:54
| 104,667,971
| 1,000
| 153
|
CC0-1.0
| 2023-08-06T18:22:55
| 2017-09-24T18:49:18
|
C
|
UTF-8
|
C
| false
| false
| 532
|
c
|
sc25519_window4.c
|
#include "sc25519.h"
void sc25519_window4(signed char r[64], const sc25519 *s)
{
char carry;
int i;
for(i=0;i<16;i++)
r[i] = (s->v[0] >> (4*i)) & 15;
for(i=0;i<16;i++)
r[i+16] = (s->v[1] >> (4*i)) & 15;
for(i=0;i<16;i++)
r[i+32] = (s->v[2] >> (4*i)) & 15;
for(i=0;i<16;i++)
r[i+48] = (s->v[3] >> (4*i)) & 15;
/* Making it signed */
carry = 0;
for(i=0;i<63;i++)
{
r[i] += carry;
r[i+1] += r[i] >> 4;
r[i] &= 15;
carry = r[i] >> 3;
r[i] -= carry << 4;
}
r[63] += carry;
}
|
bbc3d6cddb52dc4cc8cf77571c8730c6afbf7a3a
|
d169de4c5c6b281984df35536430dcc931a957a9
|
/source/shell/sys/linux/include/sys/select.h
|
b726a1fda64196b4e96fc4d53cf675962cde59d0
|
[
"LGPL-2.1-only",
"Apache-2.0"
] |
permissive
|
vsfteam/vsf
|
2ba968ba2ef53b036668019c6c6746149a63c38a
|
522a52ff2ee4ed149b52789a5bd366f80c08c458
|
refs/heads/master
| 2023-08-27T07:32:08.339123
| 2023-08-26T17:46:07
| 2023-08-26T17:46:07
| 181,911,464
| 273
| 83
|
Apache-2.0
| 2023-08-29T03:08:36
| 2019-04-17T14:43:42
|
C
|
UTF-8
|
C
| false
| false
| 3,509
|
h
|
select.h
|
#ifndef __VSF_LINUX_SYS_SELECT_H__
#define __VSF_LINUX_SYS_SELECT_H__
#include "shell/sys/linux/vsf_linux_cfg.h"
#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
# include "../sys/time.h"
# include "../signal.h"
#else
# include <sys/time.h>
# include <signal.h>
#endif
// for bitmap
#include "utilities/vsf_utilities.h"
#ifdef __cplusplus
extern "C" {
#endif
#if VSF_LINUX_CFG_WRAPPER == ENABLED
# define select VSF_LINUX_WRAPPER(select)
#elif defined(__WIN__) && !defined(__VSF_APPLET__)
# define select VSF_LINUX_WRAPPER(select)
# define pselect VSF_LINUX_WRAPPER(pselect)
#endif
// syscalls
#define __NR_select select
#ifndef FD_SETSIZE
# define FD_SETSIZE 1024
#endif
#define FD_ZERO(set) vsf_bitmap_reset(*(set), FD_SETSIZE)
#define FD_SET(fd, set) vsf_bitmap_set(*(set), (fd))
#define FD_CLR(fd, set) vsf_bitmap_clear(*(set), (fd))
#define FD_ISSET(fd, set) vsf_bitmap_get(*(set), (fd))
__vsf_declare_bitmap_ex(fd_set, FD_SETSIZE)
#if VSF_LINUX_APPLET_USE_SYS_SELECT == ENABLED
typedef struct vsf_linux_sys_select_vplt_t {
vsf_vplt_info_t info;
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(select);
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pselect);
} vsf_linux_sys_select_vplt_t;
# ifndef __VSF_APPLET__
extern __VSF_VPLT_DECORATOR__ vsf_linux_sys_select_vplt_t vsf_linux_sys_select_vplt;
# endif
#endif
#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_SELECT_LIB__))\
&& VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_SELECT == ENABLED
#ifndef VSF_LINUX_APPLET_SYS_SELECT_VPLT
# if VSF_LINUX_USE_APPLET == ENABLED
# define VSF_LINUX_APPLET_SYS_SELECT_VPLT \
((vsf_linux_sys_select_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_select_vplt))
# else
# define VSF_LINUX_APPLET_SYS_SELECT_VPLT \
((vsf_linux_sys_select_vplt_t *)vsf_vplt((void *)0))
# endif
#endif
#define VSF_LINUX_APPLET_SYS_SELECT_ENTRY(__NAME) \
VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_SELECT_VPLT, __NAME)
#define VSF_LINUX_APPLET_SYS_SELECT_IMP(...) \
VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_SELECT_VPLT, __VA_ARGS__)
VSF_LINUX_APPLET_SYS_SELECT_IMP(select, int, int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) {
VSF_APPLET_VPLT_ENTRY_FUNC_TRACE();
return VSF_LINUX_APPLET_SYS_SELECT_ENTRY(select)(nfds, readfds, writefds, exceptfds, timeout);
}
VSF_LINUX_APPLET_SYS_SELECT_IMP(pselect, int, int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout_ts, const sigset_t *sigmask) {
VSF_APPLET_VPLT_ENTRY_FUNC_TRACE();
return VSF_LINUX_APPLET_SYS_SELECT_ENTRY(pselect)(nfds, readfds, writefds, exceptfds, timeout_ts, sigmask);
}
#else // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_SYS_SELECT
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *timeout);
int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
const struct timespec *timeout_ts, const sigset_t *sigmask);
#endif // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_SYS_SELECT
#ifdef __cplusplus
}
#endif
#endif
|
21dcc3c0ef3e9f85f5fbc05af6ac4277d5ece384
|
847ebadf2b0e7c01ad33ce92b42528a1a5c4846c
|
/lib/netdev-linux-private.h
|
0ecf0f748f981cbb11574d1b716a505e554af680
|
[
"Apache-2.0",
"BSD-3-Clause",
"ISC",
"SISSL",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] |
permissive
|
openvswitch/ovs
|
6f782527cf5fde4ccfd25e68d359b91ff41acf8a
|
bc79a7bf033fa4cda8ccfc5481db3cfccd72650c
|
refs/heads/master
| 2023-09-04T06:31:47.899017
| 2023-08-03T16:19:12
| 2023-09-01T20:15:05
| 18,383,364
| 3,366
| 2,259
|
Apache-2.0
| 2023-08-17T13:17:13
| 2014-04-02T22:15:28
|
C
|
UTF-8
|
C
| false
| false
| 4,955
|
h
|
netdev-linux-private.h
|
/*
* Copyright (c) 2019 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NETDEV_LINUX_PRIVATE_H
#define NETDEV_LINUX_PRIVATE_H 1
#include <linux/filter.h>
#include <linux/gen_stats.h>
#include <linux/if_ether.h>
#include <linux/if_tun.h>
#include <linux/types.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <stdint.h>
#include <stdbool.h>
#include "dp-packet.h"
#include "netdev-afxdp.h"
#include "netdev-afxdp-pool.h"
#include "netdev-provider.h"
#include "netdev-vport.h"
#include "openvswitch/thread.h"
#include "ovs-atomic.h"
#include "timer.h"
struct netdev;
/* The maximum packet length is 16 bits */
#define LINUX_RXQ_TSO_MAX_LEN 65535
struct netdev_rxq_linux {
struct netdev_rxq up;
bool is_tap;
int fd;
struct dp_packet *aux_bufs[NETDEV_MAX_BURST]; /* Preallocated TSO
packets. */
};
int netdev_linux_construct(struct netdev *);
void netdev_linux_run(const struct netdev_class *);
int get_stats_via_netlink(const struct netdev *netdev_,
struct netdev_stats *stats);
struct netdev_linux {
struct netdev up;
/* Protects all members below. */
struct ovs_mutex mutex;
unsigned int cache_valid;
bool miimon; /* Link status of last poll. */
long long int miimon_interval; /* Miimon Poll rate. Disabled if <= 0. */
struct timer miimon_timer;
int netnsid; /* Network namespace ID. */
/* The following are figured out "on demand" only. They are only valid
* when the corresponding VALID_* bit in 'cache_valid' is set. */
int ifindex;
struct eth_addr etheraddr;
int mtu;
unsigned int ifi_flags;
long long int carrier_resets;
uint32_t kbits_rate; /* Policing data - kbps */
uint32_t kbits_burst;
uint32_t kpkts_rate; /* Policing data - kpps */
uint32_t kpkts_burst;
int vport_stats_error; /* Cached error code from vport_get_stats().
0 or an errno value. */
int netdev_mtu_error; /* Cached error code from SIOCGIFMTU
* or SIOCSIFMTU.
*/
int ether_addr_error; /* Cached error code from set/get etheraddr. */
int netdev_policing_error; /* Cached error code from set policing. */
int get_features_error; /* Cached error code from ETHTOOL_GSET. */
int get_ifindex_error; /* Cached error code from SIOCGIFINDEX. */
enum netdev_features current; /* Cached from ETHTOOL_GSET. */
enum netdev_features advertised; /* Cached from ETHTOOL_GSET. */
enum netdev_features supported; /* Cached from ETHTOOL_GSET. */
uint32_t current_speed; /* Cached from ETHTOOL_GSET. */
struct ethtool_drvinfo drvinfo; /* Cached from ETHTOOL_GDRVINFO. */
struct tc *tc;
/* For devices of class netdev_tap_class only. */
int tap_fd;
bool present; /* If the device is present in the namespace */
uint64_t tx_dropped; /* tap device can drop if the iface is down */
uint64_t rx_dropped; /* Packets dropped while recv from kernel. */
/* LAG information. */
bool is_lag_master; /* True if the netdev is a LAG master. */
int numa_id; /* NUMA node id. */
#ifdef HAVE_AF_XDP
/* AF_XDP information. */
struct xsk_socket_info **xsks;
int requested_n_rxq;
enum afxdp_mode xdp_mode; /* Configured AF_XDP mode. */
enum afxdp_mode requested_xdp_mode; /* Requested AF_XDP mode. */
enum afxdp_mode xdp_mode_in_use; /* Effective AF_XDP mode. */
bool use_need_wakeup;
bool requested_need_wakeup;
struct netdev_afxdp_tx_lock *tx_locks; /* Array of locks for TX queues. */
#endif
};
static bool
is_netdev_linux_class(const struct netdev_class *netdev_class)
{
return netdev_class->run == netdev_linux_run;
}
static struct netdev_linux *
netdev_linux_cast(const struct netdev *netdev)
{
ovs_assert(is_netdev_linux_class(netdev_get_class(netdev)));
return CONTAINER_OF(netdev, struct netdev_linux, up);
}
static struct netdev_rxq_linux *
netdev_rxq_linux_cast(const struct netdev_rxq *rx)
{
ovs_assert(is_netdev_linux_class(netdev_get_class(rx->netdev)));
return CONTAINER_OF(rx, struct netdev_rxq_linux, up);
}
#endif /* netdev-linux-private.h */
|
ae677f2269e3731901f692340961f442e34f91c5
|
5ab69c8644a936a3d9dec1669a86c7369c911bf8
|
/arch/platform/openmote/dev/sht21.c
|
9852dbf896d40aeaee545cf936dd2cee9e1f3214
|
[
"BSD-3-Clause"
] |
permissive
|
contiki-ng/contiki-ng
|
393d36f68b98f5ee3544ea32502cf662ffb2fe9f
|
31fcaadf7a0dc8ceea07f438cd69db73174879e6
|
refs/heads/develop
| 2023-09-01T20:10:30.000765
| 2023-09-01T14:37:12
| 2023-09-01T14:37:12
| 91,191,972
| 1,242
| 788
|
BSD-3-Clause
| 2023-09-14T19:08:35
| 2017-05-13T17:37:59
|
C
|
UTF-8
|
C
| false
| false
| 9,250
|
c
|
sht21.c
|
/*
* Copyright (c) 2014, OpenMote Technologies, S.L.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup openmote-sht21-sensor
* @{
*
* \file
* Driver for the SHT21 temperature and relative humidity sensor
*
* \author
* Pere Tuset <peretuset@openmote.com>
*/
/*---------------------------------------------------------------------------*/
#include "dev/i2c.h"
#include "dev/sht21.h"
#include "lib/sensors.h"
/*---------------------------------------------------------------------------*/
#define DEBUG 0
#if DEBUG
#define PRINTF(...) printf(__VA_ARGS__)
#else
#define PRINTF(...)
#endif
/*---------------------------------------------------------------------------*/
/**
* \name SHT21 address
* @{
*/
#define SHT21_ADDRESS (0x40)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name SHT21 register addresses and values
* @{
*/
#define SHT21_USER_REG_READ (0xE7)
#define SHT21_USER_REG_WRITE (0xE6)
#define SHT21_USER_REG_RESERVED_BITS (0x38)
#define SHT21_TEMPERATURE_HM_CMD (0xE3)
#define SHT21_HUMIDITY_HM_CMD (0xE5)
#define SHT21_TEMPERATURE_NHM_CMD (0xF3)
#define SHT21_HUMIDITY_NHM_CMD (0xF5)
#define SHT21_RESET_CMD (0xFE)
#define SHT21_STATUS_MASK (0xFC)
#define SHT21_RESOLUTION_12b_14b ((0 << 7) | (0 << 0))
#define SHT21_RESOLUTION_8b_12b ((0 << 7) | (1 << 0))
#define SHT21_RESOLUTION_10b_13b ((1 << 7) | (0 << 0))
#define SHT21_RESOLUTION_11b_11b ((1 << 7) | (1 << 0))
#define SHT21_BATTERY_ABOVE_2V25 (0 << 6)
#define SHT21_BATTERY_BELOW_2V25 (1 << 6)
#define SHT21_ONCHIP_HEATER_ENABLE (1 << 2)
#define SHT21_ONCHIP_HEATER_DISABLE (0 << 2)
#define SHT21_OTP_RELOAD_ENABLE (0 << 1)
#define SHT21_OTP_RELOAD_DISABLE (1 << 1)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name SHT21 configuration values
* @{
*/
#define SHT21_DEFAULT_CONFIG (SHT21_RESOLUTION_12b_14b | \
SHT21_ONCHIP_HEATER_DISABLE | \
SHT21_BATTERY_ABOVE_2V25 | \
SHT21_OTP_RELOAD_DISABLE)
#define SHT21_USER_CONFIG (SHT21_RESOLUTION_12b_14b | \
SHT21_ONCHIP_HEATER_DISABLE | \
SHT21_BATTERY_ABOVE_2V25 | \
SHT21_OTP_RELOAD_DISABLE)
/** @} */
/*---------------------------------------------------------------------------*/
static uint8_t enabled;
/*---------------------------------------------------------------------------*/
static void
sht21_init(void)
{
uint8_t config[2];
/* Setup the configuration vector, the first position holds address */
/* and the second position holds the actual configuration */
config[0] = SHT21_USER_REG_WRITE;
config[1] = 0;
/* Read the current configuration according to the datasheet (pag. 9, fig. 18) */
i2c_single_send(SHT21_ADDRESS, SHT21_USER_REG_READ);
i2c_single_receive(SHT21_ADDRESS, &config[1]);
/* Clean all the configuration bits except those reserved */
config[1] &= SHT21_USER_REG_RESERVED_BITS;
/* Set the configuration bits without changing those reserved */
config[1] |= SHT21_USER_CONFIG;
i2c_burst_send(SHT21_ADDRESS, config, sizeof(config));
}
/*---------------------------------------------------------------------------*/
static void
sht21_reset(void)
{
/* Send a soft-reset command according to the datasheet (pag. 9, fig. 17) */
i2c_single_send(SHT21_ADDRESS, SHT21_RESET_CMD);
}
/*---------------------------------------------------------------------------*/
static uint8_t
sht21_is_present(void)
{
uint8_t status;
uint8_t is_present;
/* Read the current configuration according to the datasheet (pag. 9, fig. 18) */
i2c_single_send(SHT21_ADDRESS, SHT21_USER_REG_READ);
status = i2c_single_receive(SHT21_ADDRESS, &is_present);
if(status != I2C_MASTER_ERR_NONE) {
return 0;
}
/* Clear the reserved bits according to the datasheet (pag. 9, tab. 8) */
is_present &= ~SHT21_USER_REG_RESERVED_BITS;
return (is_present == SHT21_USER_CONFIG) || (is_present == SHT21_DEFAULT_CONFIG);
}
/*---------------------------------------------------------------------------*/
static uint32_t
sht21_read_temperature(void)
{
uint8_t sht21_temperature[2];
uint16_t temperature;
/* Read the current temperature according to the datasheet (pag. 8, fig. 15) */
i2c_single_send(SHT21_ADDRESS, SHT21_TEMPERATURE_HM_CMD);
i2c_burst_receive(SHT21_ADDRESS, sht21_temperature, sizeof(sht21_temperature));
temperature = (sht21_temperature[0] << 8) | ((sht21_temperature[1] & SHT21_STATUS_MASK));
return temperature;
}
/*---------------------------------------------------------------------------*/
static int16_t
sht21_convert_temperature(uint32_t temperature)
{
int16_t result;
temperature *= 17572;
temperature = temperature >> 16;
result = (int16_t)temperature - 4685;
return result;
}
/*---------------------------------------------------------------------------*/
static uint32_t
sht21_read_humidity(void)
{
uint8_t sht21_humidity[2];
uint16_t humidity;
/* Read the current humidity according to the datasheet (pag. 8, fig. 15) */
i2c_single_send(SHT21_ADDRESS, SHT21_HUMIDITY_HM_CMD);
i2c_burst_receive(SHT21_ADDRESS, sht21_humidity, sizeof(sht21_humidity));
humidity = (sht21_humidity[0] << 8) | ((sht21_humidity[1] & SHT21_STATUS_MASK));
return humidity;
}
/*---------------------------------------------------------------------------*/
static int16_t
sht21_convert_humidity(uint32_t humidity)
{
int16_t result;
humidity *= 12500;
humidity = humidity >> 16;
result = (int16_t)humidity - 600;
result = (result > 10000) ? 10000 : result;
return result;
}
/*---------------------------------------------------------------------------*/
static int
status(int type)
{
switch(type) {
case SENSORS_ACTIVE:
case SENSORS_READY:
return enabled;
}
return 0;
}
/*---------------------------------------------------------------------------*/
static int
value(int type)
{
uint32_t value;
if(!enabled) {
PRINTF("SHT21: sensor not started\n");
return SHT21_ERROR;
}
if(type == SHT21_READ_RAW_TEMP) {
return sht21_read_temperature();
} else if(type == SHT21_READ_RAW_RHUM) {
return sht21_read_humidity();
} else if(type == SHT21_READ_TEMP) {
value = sht21_read_temperature();
return sht21_convert_temperature(value);
} else if(type == SHT21_READ_RHUM) {
value = sht21_read_humidity();
return sht21_convert_humidity(value);
} else {
PRINTF("SHT21: invalid value requested\n");
return SHT21_ERROR;
}
}
/*---------------------------------------------------------------------------*/
static int
configure(int type, int value)
{
if(type == SHT21_ACTIVATE) {
if(!sht21_is_present()) {
PRINTF("SHT21: is not present\n");
return SHT21_ERROR;
} else {
sht21_init();
enabled = 1;
return SHT21_SUCCESS;
}
}
if(type == SHT21_RESET && enabled) {
sht21_reset();
return SHT21_SUCCESS;
} else {
PRINTF("SHT21: is not enabled\n");
return SHT21_ERROR;
}
return SHT21_ERROR;
}
/*---------------------------------------------------------------------------*/
SENSORS_SENSOR(sht21, SHT21_SENSOR, value, configure, status);
/*---------------------------------------------------------------------------*/
/** @} */
|
c2028ed4422a800fcf796a91edca1aa403d7fa47
|
7d7900e1c25b729fc8c208673a449c0520ba466e
|
/lib/kernel/sleef/libm/sleef_builtin.c
|
3d5bb0b5ad00cc4811741430b06dfb30bf67c915
|
[
"BSL-1.0",
"MIT",
"BSD-2-Clause"
] |
permissive
|
pocl/pocl
|
384091e15c8f6abf29fd2c6deace34a7de5a6ac6
|
5a99e12d0bb78427ad948ac368589135507f1b59
|
refs/heads/main
| 2023-09-02T14:16:21.381680
| 2023-08-21T12:13:47
| 2023-08-21T12:13:47
| 12,292,999
| 775
| 250
|
MIT
| 2023-09-14T06:50:34
| 2013-08-22T09:26:12
|
C
|
UTF-8
|
C
| false
| false
| 12,755
|
c
|
sleef_builtin.c
|
/* OpenCL built-in library: SLEEF C fallback using libm / compiler builtins
Copyright (c) 2017 Michal Babej / Tampere University of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#define _GNU_SOURCE
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdint.h>
#include "sleef.h"
#include "sleef_cl.h"
#include "rename.h"
//##################################################################
static int64_t
doubleToRawLongBits (double d)
{
union
{
double f;
int64_t i;
} tmp;
tmp.f = d;
return tmp.i;
}
static double
longBitsToDouble (int64_t i)
{
union
{
double f;
int64_t i;
} tmp;
tmp.i = i;
return tmp.f;
}
static double
fabsk (double x)
{
return longBitsToDouble (0x7fffffffffffffffLL & doubleToRawLongBits (x));
}
static double
mulsign (double x, double y)
{
return longBitsToDouble (doubleToRawLongBits (x)
^ (doubleToRawLongBits (y) & (1LL << 63)));
}
//##################################################################
#define INFINITYf ((float)INFINITY)
#define NANf ((float)NAN)
static int32_t
floatToRawIntBits (float d)
{
union
{
float f;
int32_t i;
} tmp;
tmp.f = d;
return tmp.i;
}
static float
intBitsToFloat (int32_t i)
{
union
{
float f;
int32_t i;
} tmp;
tmp.i = i;
return tmp.f;
}
static float
fabsfk (float x)
{
return intBitsToFloat (0x7fffffffL & floatToRawIntBits (x));
}
static float
mulsignf (float x, float y)
{
return intBitsToFloat (floatToRawIntBits (x)
^ (floatToRawIntBits (y) & (1 << 31)));
}
//##################################################################
double
xsin (double x)
{
return __builtin_sin (x);
}
double
xcos (double x)
{
return __builtin_cos (x);
}
double
xtan (double x)
{
return __builtin_tan (x);
}
double
xasin (double x)
{
return __builtin_asin (x);
}
double
xacos (double x)
{
return __builtin_acos (x);
}
double
xatan (double x)
{
return __builtin_atan (x);
}
double
xatan2 (double x, double y)
{
return __builtin_atan2 (x, y);
}
double
xlog (double x)
{
return __builtin_log (x);
}
double
xcbrt (double x)
{
return __builtin_cbrt (x);
}
double
xsin_u1 (double x)
{
return __builtin_sin (x);
}
double
xcos_u1 (double x)
{
return __builtin_cos (x);
}
double
xtan_u1 (double x)
{
return __builtin_tan (x);
}
double
xasin_u1 (double x)
{
return __builtin_asin (x);
}
double
xacos_u1 (double x)
{
return __builtin_acos (x);
}
double
xatan_u1 (double x)
{
return __builtin_atan (x);
}
double
xatan2_u1 (double x, double y)
{
return __builtin_atan2 (x, y);
}
double
xlog_u1 (double x)
{
return __builtin_log (x);
}
double
xcbrt_u1 (double x)
{
return __builtin_cbrt (x);
}
double
xexp (double x)
{
return __builtin_exp (x);
}
double
xpow (double x, double y)
{
return __builtin_pow (x, y);
}
double
xpown (double x, int y)
{
return __builtin_pow (x, (double)y);
}
double
xpowr (double x, double y)
{
if (x < 0.0)
return NAN;
if (isnan(y))
return y;
double res = __builtin_pow (x, y);
return res;
}
double
xsinh (double x)
{
return __builtin_sinh (x);
}
double
xcosh (double x)
{
return __builtin_cosh (x);
}
double
xtanh (double x)
{
return __builtin_tanh (x);
}
double
xasinh (double x)
{
return __builtin_asinh (x);
}
double
xacosh (double x)
{
return __builtin_acosh (x);
}
double
xatanh (double x)
{
return __builtin_atanh (x);
}
double
xexp2 (double x)
{
return __builtin_exp2 (x);
}
double
xexp10 (double x)
{
return exp10 (x);
}
double
xexpm1 (double x)
{
return __builtin_expm1 (x);
}
double
xlog10 (double x)
{
return __builtin_log10 (x);
}
double
xlog1p (double x)
{
return __builtin_log1p (x);
}
double
xsinpi_u05 (double x)
{
return __builtin_sin (x * (double)M_PI);
}
double
xcospi_u05 (double x)
{
return __builtin_cos (x * (double)M_PI);
}
Sleef_double2
xsincos (double x)
{
Sleef_double2 tmp;
sincos (x, &tmp.x, &tmp.y);
return tmp;
}
Sleef_double2
xsincos_u1 (double x)
{
return xsincos (x);
}
double
xldexp (double x, int k)
{
return __builtin_ldexp (x, k);
}
int
xilogb (double x)
{
return __builtin_ilogb (x);
}
double
xfma (double x, double y, double z)
{
return __builtin_fma (x, y, z);
}
double
xsqrt_u05 (double x)
{
return __builtin_sqrt (x);
}
double
xsqrt_u35 (double x)
{
return __builtin_sqrt (x);
}
double
xhypot_u05 (double x, double y)
{
return __builtin_hypot (x, y);
}
double
xhypot_u35 (double x, double y)
{
return __builtin_hypot (x, y);
}
double
xfabs (double x)
{
return __builtin_fabs (x);
}
double
xcopysign (double x, double y)
{
return __builtin_copysign (x, y);
}
double
xfmax (double x, double y)
{
return __builtin_fmax (x, y);
}
double
xfmin (double x, double y)
{
return __builtin_fmin (x, y);
}
double
xfdim (double x, double y)
{
return __builtin_fdim (x, y);
}
double
xtrunc (double x)
{
return __builtin_trunc (x);
}
double
xfloor (double x)
{
return __builtin_floor (x);
}
double
xceil (double x)
{
return __builtin_ceil (x);
}
double
xround (double x)
{
return __builtin_round (x);
}
double
xrint (double x)
{
return __builtin_rint (x);
}
double
xnextafter (double x, double y)
{
return __builtin_nextafter (x, y);
}
double
xfrfrexp (double x)
{
union
{
double f;
uint64_t u;
} cx;
if (__builtin_isnan (x))
return x;
if (fabsk (x) < DBL_MIN)
x *= (1ULL << 63);
cx.f = x;
cx.u &= ~0x7ff0000000000000ULL;
cx.u |= 0x3fe0000000000000ULL;
if (__builtin_isinf (x))
cx.f = mulsign (INFINITY, x);
if (x == 0)
cx.f = x;
return cx.f;
}
int
xexpfrexp (double x)
{
union
{
double f;
uint64_t u;
} cx;
int ret = 0;
if (fabsk (x) < DBL_MIN)
{
x *= (1ULL << 63);
ret = -63;
}
cx.f = x;
ret += (int32_t) (((cx.u >> 52) & 0x7ff)) - 0x3fe;
if (x == 0 || __builtin_isnan (x) || __builtin_isinf (x))
ret = 0;
return ret;
}
double
xfmod (double x, double y)
{
return __builtin_fmod (x, y);
}
Sleef_double2
xmodf (double x)
{
Sleef_double2 res;
double tmp;
res.x = __builtin_modf (x, &tmp);
res.y = tmp;
return res;
}
double
xlgamma_u1 (double x)
{
return __builtin_lgamma (x);
}
Sleef_double2
xlgamma_r_u1 (double x)
{
Sleef_double2 ret;
int sign;
ret.x = lgamma_r (x, &sign);
ret.y = (sign > 0 ? 1.0 : -1.0);
return ret;
}
double
xtgamma_u1 (double x)
{
return __builtin_tgamma (x);
}
double
xerf_u1 (double x)
{
return __builtin_erf (x);
}
double
xerfc_u15 (double x)
{
return __builtin_erfc (x);
}
// *********************************************************************
// *********************************************************************
// *********************************************************************
// *********************************************************************
float
xsinf (float x)
{
return __builtin_sinf (x);
}
float
xcosf (float x)
{
return __builtin_cosf (x);
}
float
xtanf (float x)
{
return __builtin_tanf (x);
}
float
xasinf (float x)
{
return __builtin_asinf (x);
}
float
xacosf (float x)
{
return __builtin_acosf (x);
}
float
xatanf (float x)
{
return __builtin_atanf (x);
}
float
xatan2f (float x, float y)
{
return __builtin_atan2f (x, y);
}
float
xlogf (float x)
{
return __builtin_logf (x);
}
float
xcbrtf (float x)
{
return __builtin_cbrtf (x);
}
float
xsinf_u1 (float x)
{
return __builtin_sinf (x);
}
float
xcosf_u1 (float x)
{
return __builtin_cosf (x);
}
float
xtanf_u1 (float x)
{
return __builtin_tanf (x);
}
float
xasinf_u1 (float x)
{
return __builtin_asinf (x);
}
float
xacosf_u1 (float x)
{
return __builtin_acosf (x);
}
float
xatanf_u1 (float x)
{
return __builtin_atanf (x);
}
float
xatan2f_u1 (float x, float y)
{
return __builtin_atan2f (x, y);
}
float
xlogf_u1 (float x)
{
return __builtin_logf (x);
}
float
xcbrtf_u1 (float x)
{
return __builtin_cbrtf (x);
}
float
xexpf (float x)
{
return __builtin_expf (x);
}
float
xpowf (float x, float y)
{
return (float) __builtin_pow ((double)x, (double)y);
}
float
xpownf (float x, int y)
{
return (float) __builtin_pow ((double)x, (double)y);
}
float
xpowrf (float x, float y)
{
if (x < 0.0f)
return NAN;
float res = (float) __builtin_pow ((double)x, (double)y);
return res;
}
float
xsinhf (float x)
{
return __builtin_sinhf (x);
}
float
xcoshf (float x)
{
return __builtin_coshf (x);
}
float
xtanhf (float x)
{
return __builtin_tanhf (x);
}
float
xasinhf (float x)
{
return __builtin_asinhf (x);
}
float
xacoshf (float x)
{
return __builtin_acoshf (x);
}
float
xatanhf (float x)
{
return __builtin_atanhf (x);
}
float
xexp2f (float x)
{
return __builtin_exp2f (x);
}
float
xexp10f (float x)
{
return exp10f (x);
}
float
xexpm1f (float x)
{
return __builtin_expm1f (x);
}
float
xlog10f (float x)
{
return __builtin_log10f (x);
}
float
xlog1pf (float x)
{
return __builtin_log1pf (x);
}
float
xsinpif_u05 (float x)
{
return __builtin_sinf (x * (float)M_PI);
}
float
xcospif_u05 (float x)
{
return __builtin_cosf (x * (float)M_PI);
}
Sleef_float2
xsincosf (float x)
{
Sleef_float2 tmp;
sincosf (x, &tmp.x, &tmp.y);
return tmp;
}
Sleef_float2
xsincosf_u1 (float x)
{
return xsincosf (x);
}
float
xsqrtf_u05 (float x)
{
return __builtin_sqrtf (x);
}
float
xsqrtf_u35 (float x)
{
return __builtin_sqrtf (x);
}
float
xhypotf_u05 (float x, float y)
{
return __builtin_hypotf (x, y);
}
float
xhypotf_u35 (float x, float y)
{
return __builtin_hypotf (x, y);
}
float
xldexpf (float x, int k)
{
return __builtin_ldexpf (x, k);
}
int
xilogbf (float x)
{
return __builtin_ilogbf (x);
}
float
xfmaf (float x, float y, float z)
{
return __builtin_fmaf (x, y, z);
}
float
xfabsf (float x)
{
return __builtin_fabsf (x);
}
float
xcopysignf (float x, float y)
{
return __builtin_copysignf (x, y);
}
float
xfmaxf (float x, float y)
{
return __builtin_fmaxf (x, y);
}
float
xfminf (float x, float y)
{
return __builtin_fminf (x, y);
}
float
xfdimf (float x, float y)
{
return __builtin_fdimf (x, y);
}
float
xtruncf (float x)
{
return __builtin_truncf (x);
}
float
xfloorf (float x)
{
return __builtin_floorf (x);
}
float
xceilf (float x)
{
return __builtin_ceilf (x);
}
float
xroundf (float x)
{
return __builtin_roundf (x);
}
float
xrintf (float x)
{
return __builtin_rintf (x);
}
float
xnextafterf (float x, float y)
{
return __builtin_nextafterf (x, y);
}
float
xfrfrexpf (float x)
{
union
{
float f;
int32_t u;
} cx;
if (__builtin_isnan (x))
return x;
if (fabsfk (x) < FLT_MIN)
x *= (1 << 30);
cx.f = x;
cx.u &= ~0x7f800000U;
cx.u |= 0x3f000000U;
if (__builtin_isinf (x))
cx.f = mulsignf (INFINITYf, x);
if (x == 0)
cx.f = x;
return cx.f;
}
int
xexpfrexpf (float x)
{
union
{
float f;
uint32_t u;
} cx;
int ret = 0;
if (fabsfk (x) < FLT_MIN)
{
x *= (1 << 30);
ret = -30;
}
cx.f = x;
ret += (int32_t) (((cx.u >> 23) & 0xff)) - 0x7e;
if (x == 0 || __builtin_isnan (x) || __builtin_isinf (x))
ret = 0;
return ret;
}
float
xfmodf (float x, float y)
{
return __builtin_fmodf (x, y);
}
Sleef_float2
xmodff (float x)
{
Sleef_float2 res;
float tmp;
res.x = __builtin_modff (x, &tmp);
res.y = tmp;
return res;
}
float
xlgammaf_u1 (float x)
{
return __builtin_lgammaf (x);
}
Sleef_float2
xlgamma_rf_u1 (float x)
{
Sleef_float2 ret;
int sign;
ret.x = lgammaf_r (x, &sign);
ret.y = (sign > 0 ? 1.0f : -1.0f);
return ret;
}
float
xtgammaf_u1 (float x)
{
return __builtin_tgammaf (x);
}
float
xerff_u1 (float x)
{
return __builtin_erff (x);
}
float
xerfcf_u15 (float x)
{
return __builtin_erfcf (x);
}
|
1131561281ca7b2caecb0a9032ee7575a616201e
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/third_party/ffmpeg/libavformat/img2enc.c
|
9b8ec06cea118fd59c2d02fc7a65491963b83fae
|
[
"BSD-3-Clause",
"LGPL-2.1-or-later",
"BSD-2-Clause",
"LGPL-2.1-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-3.0-or-later",
"LGPL-3.0-or-later",
"IJG",
"LicenseRef-scancode-other-permissive",
"MIT",
"GPL-2.0-or-later",
"Apache-2.0",
"GPL-3.0-only"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
C
| false
| false
| 10,996
|
c
|
img2enc.c
|
/*
* Image format
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
* Copyright (c) 2004 Michael Niedermayer
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config_components.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time_internal.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "img2.h"
#include "mux.h"
typedef struct VideoMuxData {
const AVClass *class; /**< Class for private options. */
int start_img_number;
int img_number;
int split_planes; /**< use independent file for each Y, U, V plane */
char tmp[4][1024];
char target[4][1024];
int update;
int use_strftime;
int frame_pts;
const char *muxer;
int use_rename;
AVDictionary *protocol_opts;
} VideoMuxData;
static int write_header(AVFormatContext *s)
{
VideoMuxData *img = s->priv_data;
AVStream *st = s->streams[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(st->codecpar->format);
if (st->codecpar->codec_id == AV_CODEC_ID_GIF) {
img->muxer = "gif";
} else if (st->codecpar->codec_id == AV_CODEC_ID_FITS) {
img->muxer = "fits";
} else if (st->codecpar->codec_id == AV_CODEC_ID_AV1) {
img->muxer = "avif";
} else if (st->codecpar->codec_id == AV_CODEC_ID_RAWVIDEO) {
const char *str = strrchr(s->url, '.');
img->split_planes = str
&& !av_strcasecmp(str + 1, "y")
&& s->nb_streams == 1
&& desc
&&(desc->flags & AV_PIX_FMT_FLAG_PLANAR)
&& desc->nb_components >= 3;
}
img->img_number = img->start_img_number;
return 0;
}
static int write_muxed_file(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
{
VideoMuxData *img = s->priv_data;
AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar;
AVStream *st;
AVPacket *const pkt2 = ffformatcontext(s)->pkt;
AVFormatContext *fmt = NULL;
int ret;
/* URL is not used directly as we are overriding the IO context later. */
ret = avformat_alloc_output_context2(&fmt, NULL, img->muxer, s->url);
if (ret < 0)
return ret;
st = avformat_new_stream(fmt, NULL);
if (!st) {
ret = AVERROR(ENOMEM);
goto out;
}
st->id = pkt->stream_index;
fmt->pb = pb;
ret = av_packet_ref(pkt2, pkt);
if (ret < 0)
goto out;
pkt2->stream_index = 0;
if ((ret = avcodec_parameters_copy(st->codecpar, par)) < 0 ||
(ret = avformat_write_header(fmt, NULL)) < 0 ||
(ret = av_interleaved_write_frame(fmt, pkt2)) < 0 ||
(ret = av_write_trailer(fmt))) {}
av_packet_unref(pkt2);
out:
avformat_free_context(fmt);
return ret;
}
static int write_packet_pipe(AVFormatContext *s, AVPacket *pkt)
{
VideoMuxData *img = s->priv_data;
if (img->muxer) {
int ret = write_muxed_file(s, s->pb, pkt);
if (ret < 0)
return ret;
} else {
avio_write(s->pb, pkt->data, pkt->size);
}
img->img_number++;
return 0;
}
static int write_and_close(AVFormatContext *s, AVIOContext **pb, const unsigned char *buf, int size)
{
avio_write(*pb, buf, size);
avio_flush(*pb);
return ff_format_io_close(s, pb);
}
static int write_packet(AVFormatContext *s, AVPacket *pkt)
{
VideoMuxData *img = s->priv_data;
AVIOContext *pb[4] = {0};
char filename[1024];
AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(par->format);
int ret, i;
int nb_renames = 0;
AVDictionary *options = NULL;
if (img->update) {
av_strlcpy(filename, s->url, sizeof(filename));
} else if (img->use_strftime) {
time_t now0;
struct tm *tm, tmpbuf;
time(&now0);
tm = localtime_r(&now0, &tmpbuf);
if (!strftime(filename, sizeof(filename), s->url, tm)) {
av_log(s, AV_LOG_ERROR, "Could not get frame filename with strftime\n");
return AVERROR(EINVAL);
}
} else if (img->frame_pts) {
if (av_get_frame_filename2(filename, sizeof(filename), s->url, pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
av_log(s, AV_LOG_ERROR, "Cannot write filename by pts of the frames.");
return AVERROR(EINVAL);
}
} else if (av_get_frame_filename2(filename, sizeof(filename), s->url,
img->img_number,
AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
if (img->img_number == img->start_img_number) {
av_log(s, AV_LOG_WARNING, "The specified filename '%s' does not contain an image sequence pattern or a pattern is invalid.\n", s->url);
av_log(s, AV_LOG_WARNING,
"Use a pattern such as %%03d for an image sequence or "
"use the -update option (with -frames:v 1 if needed) to write a single image.\n");
av_strlcpy(filename, s->url, sizeof(filename));
} else {
av_log(s, AV_LOG_ERROR, "Cannot write more than one file with the same name. Are you missing the -update option or a sequence pattern?\n");
return AVERROR(EINVAL);
}
}
for (i = 0; i < 4; i++) {
av_dict_copy(&options, img->protocol_opts, 0);
snprintf(img->tmp[i], sizeof(img->tmp[i]), "%s.tmp", filename);
av_strlcpy(img->target[i], filename, sizeof(img->target[i]));
if (s->io_open(s, &pb[i], img->use_rename ? img->tmp[i] : filename, AVIO_FLAG_WRITE, &options) < 0) {
av_log(s, AV_LOG_ERROR, "Could not open file : %s\n", img->use_rename ? img->tmp[i] : filename);
ret = AVERROR(EIO);
goto fail;
}
if (options) {
av_log(s, AV_LOG_ERROR, "Could not recognize some protocol options\n");
ret = AVERROR(EINVAL);
goto fail;
}
if (!img->split_planes || i+1 >= desc->nb_components)
break;
filename[strlen(filename) - 1] = "UVAx"[i];
}
if (img->use_rename)
nb_renames = i + 1;
if (img->split_planes) {
int ysize = par->width * par->height;
int usize = AV_CEIL_RSHIFT(par->width, desc->log2_chroma_w) * AV_CEIL_RSHIFT(par->height, desc->log2_chroma_h);
if (desc->comp[0].depth >= 9) {
ysize *= 2;
usize *= 2;
}
if ((ret = write_and_close(s, &pb[0], pkt->data , ysize)) < 0 ||
(ret = write_and_close(s, &pb[1], pkt->data + ysize , usize)) < 0 ||
(ret = write_and_close(s, &pb[2], pkt->data + ysize + usize, usize)) < 0)
goto fail;
if (desc->nb_components > 3)
ret = write_and_close(s, &pb[3], pkt->data + ysize + 2*usize, ysize);
} else if (img->muxer) {
if ((ret = write_muxed_file(s, pb[0], pkt)) < 0)
goto fail;
ret = ff_format_io_close(s, &pb[0]);
} else {
ret = write_and_close(s, &pb[0], pkt->data, pkt->size);
}
if (ret < 0)
goto fail;
for (i = 0; i < nb_renames; i++) {
int ret = ff_rename(img->tmp[i], img->target[i], s);
if (ret < 0)
return ret;
}
img->img_number++;
return 0;
fail:
av_dict_free(&options);
for (i = 0; i < FF_ARRAY_ELEMS(pb); i++)
if (pb[i])
ff_format_io_close(s, &pb[i]);
return ret;
}
static int query_codec(enum AVCodecID id, int std_compliance)
{
int i;
for (i = 0; ff_img_tags[i].id != AV_CODEC_ID_NONE; i++)
if (ff_img_tags[i].id == id)
return 1;
// Anything really can be stored in img2
return std_compliance < FF_COMPLIANCE_NORMAL;
}
#define OFFSET(x) offsetof(VideoMuxData, x)
#define ENC AV_OPT_FLAG_ENCODING_PARAM
static const AVOption muxoptions[] = {
{ "update", "continuously overwrite one file", OFFSET(update), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "start_number", "set first number in the sequence", OFFSET(start_img_number), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, ENC },
{ "strftime", "use strftime for filename", OFFSET(use_strftime), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "frame_pts", "use current frame pts for filename", OFFSET(frame_pts), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "atomic_writing", "write files atomically (using temporary files and renames)", OFFSET(use_rename), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
{ "protocol_opts", "specify protocol options for the opened files", OFFSET(protocol_opts), AV_OPT_TYPE_DICT, {0}, 0, 0, ENC },
{ NULL },
};
#if CONFIG_IMAGE2_MUXER
static const AVClass img2mux_class = {
.class_name = "image2 muxer",
.item_name = av_default_item_name,
.option = muxoptions,
.version = LIBAVUTIL_VERSION_INT,
};
const FFOutputFormat ff_image2_muxer = {
.p.name = "image2",
.p.long_name = NULL_IF_CONFIG_SMALL("image2 sequence"),
.p.extensions = "bmp,dpx,exr,jls,jpeg,jpg,jxl,ljpg,pam,pbm,pcx,pfm,pgm,pgmyuv,phm,"
"png,ppm,sgi,tga,tif,tiff,jp2,j2c,j2k,xwd,sun,ras,rs,im1,im8,"
"im24,sunras,vbn,xbm,xface,pix,y,avif,qoi,hdr,wbmp",
.priv_data_size = sizeof(VideoMuxData),
.p.video_codec = AV_CODEC_ID_MJPEG,
.write_header = write_header,
.write_packet = write_packet,
.query_codec = query_codec,
.p.flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE,
.p.priv_class = &img2mux_class,
};
#endif
#if CONFIG_IMAGE2PIPE_MUXER
const FFOutputFormat ff_image2pipe_muxer = {
.p.name = "image2pipe",
.p.long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"),
.priv_data_size = sizeof(VideoMuxData),
.p.video_codec = AV_CODEC_ID_MJPEG,
.write_header = write_header,
.write_packet = write_packet_pipe,
.query_codec = query_codec,
.p.flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS
};
#endif
|
7fa7d36c72fe2374022061f2d5944c247ff1002a
|
52c8ed39b32ccc7c0673278c1adea3638797c9ff
|
/src/arch/arm32/mach-rv1106/include/rv1106-gpio.h
|
7e8ca2764cbf9d1dc7030a772005f1983a5bc8ad
|
[
"MIT"
] |
permissive
|
xboot/xboot
|
0cab7b440b612aa0a4c366025598a53a7ec3adf1
|
6d6b93947b7fcb8c3924fedb0715c23877eedd5e
|
refs/heads/master
| 2023-08-20T05:56:25.149388
| 2023-07-12T07:38:29
| 2023-07-12T07:38:29
| 471,539
| 765
| 296
|
MIT
| 2023-05-25T09:39:01
| 2010-01-14T08:25:12
|
C
|
UTF-8
|
C
| false
| false
| 2,435
|
h
|
rv1106-gpio.h
|
#ifndef __RV1106_GPIO_H__
#define __RV1106_GPIO_H__
#ifdef __cplusplus
extern "C" {
#endif
#define RV1106_GPIO0_A0 (0)
#define RV1106_GPIO0_A1 (1)
#define RV1106_GPIO0_A2 (2)
#define RV1106_GPIO0_A3 (3)
#define RV1106_GPIO0_A4 (4)
#define RV1106_GPIO0_A5 (5)
#define RV1106_GPIO0_A6 (6)
#define RV1106_GPIO1_A0 (32)
#define RV1106_GPIO1_A1 (33)
#define RV1106_GPIO1_A2 (34)
#define RV1106_GPIO1_A3 (35)
#define RV1106_GPIO1_A4 (36)
#define RV1106_GPIO1_B0 (40)
#define RV1106_GPIO1_B1 (41)
#define RV1106_GPIO1_B2 (42)
#define RV1106_GPIO1_B3 (43)
#define RV1106_GPIO1_C0 (48)
#define RV1106_GPIO1_C1 (49)
#define RV1106_GPIO1_C2 (50)
#define RV1106_GPIO1_C3 (51)
#define RV1106_GPIO1_C4 (52)
#define RV1106_GPIO1_C5 (53)
#define RV1106_GPIO1_C6 (54)
#define RV1106_GPIO1_C7 (55)
#define RV1106_GPIO1_D0 (56)
#define RV1106_GPIO1_D1 (57)
#define RV1106_GPIO1_D2 (58)
#define RV1106_GPIO1_D3 (59)
#define RV1106_GPIO2_A0 (64)
#define RV1106_GPIO2_A1 (65)
#define RV1106_GPIO2_A2 (66)
#define RV1106_GPIO2_A3 (67)
#define RV1106_GPIO2_A4 (68)
#define RV1106_GPIO2_A5 (69)
#define RV1106_GPIO2_A6 (70)
#define RV1106_GPIO2_A7 (71)
#define RV1106_GPIO2_B0 (72)
#define RV1106_GPIO2_B1 (73)
#define RV1106_GPIO3_A1 (97)
#define RV1106_GPIO3_A2 (98)
#define RV1106_GPIO3_A3 (99)
#define RV1106_GPIO3_A4 (100)
#define RV1106_GPIO3_A5 (101)
#define RV1106_GPIO3_A6 (102)
#define RV1106_GPIO3_A7 (103)
#define RV1106_GPIO3_B0 (104)
#define RV1106_GPIO3_B1 (105)
#define RV1106_GPIO3_B2 (106)
#define RV1106_GPIO3_B3 (107)
#define RV1106_GPIO3_B4 (108)
#define RV1106_GPIO3_B5 (109)
#define RV1106_GPIO3_B6 (110)
#define RV1106_GPIO3_B7 (111)
#define RV1106_GPIO3_C0 (112)
#define RV1106_GPIO3_C1 (113)
#define RV1106_GPIO3_C2 (114)
#define RV1106_GPIO3_C3 (115)
#define RV1106_GPIO3_C4 (116)
#define RV1106_GPIO3_C5 (117)
#define RV1106_GPIO3_C6 (118)
#define RV1106_GPIO3_C7 (119)
#define RV1106_GPIO3_D0 (120)
#define RV1106_GPIO3_D1 (121)
#define RV1106_GPIO3_D2 (122)
#define RV1106_GPIO3_D3 (123)
#define RV1106_GPIO4_A0 (128)
#define RV1106_GPIO4_A1 (129)
#define RV1106_GPIO4_A2 (130)
#define RV1106_GPIO4_A3 (131)
#define RV1106_GPIO4_A4 (132)
#define RV1106_GPIO4_A5 (133)
#define RV1106_GPIO4_A6 (134)
#define RV1106_GPIO4_A7 (135)
#define RV1106_GPIO4_B0 (136)
#define RV1106_GPIO4_B1 (137)
#ifdef __cplusplus
}
#endif
#endif /* __RV1106_GPIO_H__ */
|
53822d1c80fa8149e195fcc3efa7ef712ab2d462
|
7eaf54a78c9e2117247cb2ab6d3a0c20719ba700
|
/SOFTWARE/A64-TERES/linux-a64/drivers/media/platform/sunxi-vfe/isp_cfg/isp_cfg.c
|
248d179275f210f6d78952d4d040c22ef6084db5
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"Linux-syscall-note",
"GPL-2.0-only",
"GPL-1.0-or-later"
] |
permissive
|
OLIMEX/DIY-LAPTOP
|
ae82f4ee79c641d9aee444db9a75f3f6709afa92
|
a3fafd1309135650bab27f5eafc0c32bc3ca74ee
|
refs/heads/rel3
| 2023-08-04T01:54:19.483792
| 2023-04-03T07:18:12
| 2023-04-03T07:18:12
| 80,094,055
| 507
| 92
|
Apache-2.0
| 2023-04-03T07:05:59
| 2017-01-26T07:25:50
|
C
|
UTF-8
|
C
| false
| false
| 1,116
|
c
|
isp_cfg.c
|
/*
***************************************************************************************
*
* isp_cfg.c
*
* Hawkview ISP - isp_cfg.c module
*
* Copyright (c) 2015 by Allwinnertech Co., Ltd. http://www.allwinnertech.com
*
* Version Author Date Description
*
* 3.0 Yang Feng 2015/01/18 ISP Tuning Tools Support
*
****************************************************************************************
*/
#include <linux/kernel.h>
#include <linux/string.h>
#include "isp_cfg.h"
#include "SENSOR_H/ov2710_mipi_isp_cfg.h"
#define ISP_CFG_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
struct isp_cfg_item isp_cfg_array[] =
{
{ "ov2710_mipi", &ov2710_mipi_isp_cfg, },
};
int get_isp_cfg(char *isp_cfg_name, struct isp_cfg_item *isp_cfg_info)
{
int i;
for(i = 0; i < ISP_CFG_ARRAY_SIZE(isp_cfg_array); i++)
{
if(strcmp(isp_cfg_name,isp_cfg_array[i].isp_cfg_name) == 0)
{
*isp_cfg_info = isp_cfg_array[i];
return 0;
}
}
printk("[VFE_WARN]NOT found this item: %s, you can add this ISP Config in the isp_cfg_array!\n", isp_cfg_name);
return -1;
}
|
3cdf5d8c45caac057d838e4bcf23b25a07dfcc51
|
5eff7a36d9a9917dce9111f0c3074375fe6f7656
|
/lib/mesa/src/mesa/state_tracker/st_gen_mipmap.c
|
be8107afec931461f204069d249c40a7ee8ece33
|
[] |
no_license
|
openbsd/xenocara
|
cb392d02ebba06f6ff7d826fd8a89aa3b8401779
|
a012b5de33ea0b977095d77316a521195b26cc6b
|
refs/heads/master
| 2023-08-25T12:16:58.862008
| 2023-08-12T16:16:25
| 2023-08-12T16:16:25
| 66,967,384
| 177
| 66
| null | 2023-07-22T18:12:37
| 2016-08-30T18:36:01
|
C
|
UTF-8
|
C
| false
| false
| 5,151
|
c
|
st_gen_mipmap.c
|
/**************************************************************************
*
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
#include "main/errors.h"
#include "main/mipmap.h"
#include "main/teximage.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "util/u_inlines.h"
#include "util/format/u_format.h"
#include "util/u_gen_mipmap.h"
#include "st_debug.h"
#include "st_context.h"
#include "st_texture.h"
#include "st_util.h"
#include "st_gen_mipmap.h"
#include "st_cb_bitmap.h"
#include "st_cb_texture.h"
void
st_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
struct st_context *st = st_context(ctx);
struct pipe_resource *pt = st_get_texobj_resource(texObj);
uint baseLevel = texObj->Attrib.BaseLevel;
enum pipe_format format;
uint lastLevel, first_layer, last_layer;
if (!pt)
return;
if (texObj->Immutable)
baseLevel += texObj->Attrib.MinLevel;
/* not sure if this ultimately actually should work,
but we're not supporting multisampled textures yet. */
assert(pt->nr_samples < 2);
/* find expected last mipmap level to generate*/
lastLevel = _mesa_compute_num_levels(ctx, texObj, target) - 1;
if (texObj->Immutable)
lastLevel += texObj->Attrib.MinLevel;
if (lastLevel == 0)
return;
st_flush_bitmap_cache(st);
st_invalidate_readpix_cache(st);
/* The texture isn't in a "complete" state yet so set the expected
* lastLevel here, since it won't get done in st_finalize_texture().
*/
texObj->lastLevel = lastLevel;
if (!texObj->Immutable) {
const GLboolean genSave = texObj->Attrib.GenerateMipmap;
/* Temporarily set GenerateMipmap to true so that allocate_full_mipmap()
* makes the right decision about full mipmap allocation.
*/
texObj->Attrib.GenerateMipmap = GL_TRUE;
_mesa_prepare_mipmap_levels(ctx, texObj, baseLevel, lastLevel);
texObj->Attrib.GenerateMipmap = genSave;
/* At this point, memory for all the texture levels has been
* allocated. However, the base level image may be in one resource
* while the subsequent/smaller levels may be in another resource.
* Finalizing the texture will copy the base images from the former
* resource to the latter.
*
* After this, we'll have all mipmap levels in one resource.
*/
st_finalize_texture(ctx, st->pipe, texObj, 0);
}
pt = texObj->pt;
if (!pt) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "mipmap generation");
return;
}
assert(pt->last_level >= lastLevel);
if (pt->target == PIPE_TEXTURE_CUBE) {
first_layer = last_layer = _mesa_tex_target_to_face(target);
}
else {
first_layer = 0;
last_layer = util_max_layer(pt, baseLevel);
}
if (texObj->surface_based)
format = texObj->surface_format;
else
format = pt->format;
if (texObj->Sampler.Attrib.sRGBDecode == GL_SKIP_DECODE_EXT)
format = util_format_linear(format);
/* For fallback formats, we need to update both the compressed and
* uncompressed images.
*/
if (st_compressed_format_fallback(st, _mesa_base_tex_image(texObj)->TexFormat)) {
_mesa_generate_mipmap(ctx, target, texObj);
return;
}
/* First see if the driver supports hardware mipmap generation,
* if not then generate the mipmap by rendering/texturing.
* If that fails, use the software fallback.
*/
if (!st->screen->get_param(st->screen,
PIPE_CAP_GENERATE_MIPMAP) ||
!st->pipe->generate_mipmap(st->pipe, pt, format, baseLevel,
lastLevel, first_layer, last_layer)) {
if (!util_gen_mipmap(st->pipe, pt, format, baseLevel, lastLevel,
first_layer, last_layer, PIPE_TEX_FILTER_LINEAR)) {
_mesa_generate_mipmap(ctx, target, texObj);
}
}
}
|
886f473ae476a3609d1b21bb81e60b361d624c04
|
ae3e9369882d46a2a009c41a58449c3da9cb3ae1
|
/src/include/shared/vio_event_channel.h
|
5c93253cba31a14a1a6c89cf61012035c173900c
|
[
"MIT"
] |
permissive
|
lsds/sgx-lkl
|
efc1f9bc0b9621ff1d301abf0b5bbbcc7c80ef96
|
b6e838e0034de86b48470b6a6bf87d2e262e65c9
|
refs/heads/oe_port
| 2023-06-04T04:44:34.776274
| 2021-04-12T17:33:53
| 2021-04-12T17:33:53
| 113,332,442
| 267
| 109
|
MIT
| 2022-12-29T04:35:40
| 2017-12-06T15:22:02
|
C
|
UTF-8
|
C
| false
| false
| 454
|
h
|
vio_event_channel.h
|
#ifndef _VIO_EVENT_CHANNEL_H
#define _VIO_EVENT_CHANNEL_H
#include "shared/oe_compat.h"
#define NSEC_PER_SECOND 1000000000UL
typedef uint64_t evt_t;
typedef struct enc_evt_channel
{
evt_t enclave_evt_channel;
evt_t* host_evt_channel;
uint32_t* qidx_p;
} enc_evt_channel_t;
typedef struct enc_dev_config
{
uint8_t dev_id;
enc_evt_channel_t* enc_evt_chn;
evt_t evt_processed;
} enc_dev_config_t;
#endif //_VIO_EVENT_CHANNEL_H
|
f5adce56d64bd75be44a242f952ae6ed392b3045
|
5e4913b3d7b6dfd9f35d9e5f24486bb6b6145125
|
/src/plugins/tracer/tracer.h
|
033c2f0072acca69903105309d823430acbc0333
|
[
"BSD-3-Clause"
] |
permissive
|
ElektraInitiative/libelektra
|
ff5d5cfc4bf91d704f58405b14ea694aad3a2edd
|
dbbe4ae4f669c322a8f95f59112d3f5fc370bbd9
|
refs/heads/master
| 2023-08-05T14:54:48.081359
| 2023-08-04T12:40:00
| 2023-08-04T12:40:00
| 21,063,580
| 215
| 170
|
BSD-3-Clause
| 2023-09-07T13:34:30
| 2014-06-21T08:01:04
|
C
|
UTF-8
|
C
| false
| false
| 590
|
h
|
tracer.h
|
/**
* @file
*
* @brief
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#include <kdbplugin.h>
#include <stdio.h>
int elektraTracerOpen (Plugin * handle, Key * errorKey);
int elektraTracerClose (Plugin * handle, Key * errorKey);
int elektraTracerGet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraTracerSet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraTracerCommit (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraTracerError (Plugin * handle, KeySet * returned, Key * parentKey);
Plugin * ELEKTRA_PLUGIN_EXPORT;
|
4fabf011a42bf2e605b347a4663d4c7185a3ae12
|
0ef552f79d517d119fc835551f4c2b0c4222ddd5
|
/Pods/Headers/Public/Braintree/BTDataCollector.h
|
1b1dda70aac47457ca38055af913c668716870df
|
[] |
no_license
|
airbnb/BuckSample
|
e72e9275f6b540682ec255244516140cdeab2a34
|
9fcec515985c9a98a89c0e7c2b662c6b963bd5c3
|
refs/heads/master
| 2023-04-06T13:28:22.357672
| 2022-06-08T02:54:22
| 2022-06-08T02:54:22
| 95,724,876
| 512
| 69
| null | 2023-03-18T11:28:15
| 2017-06-29T01:07:24
|
Objective-C
|
UTF-8
|
C
| false
| false
| 66
|
h
|
BTDataCollector.h
|
../../../Braintree/BraintreeDataCollector/Public/BTDataCollector.h
|
aee3a76c084894bbe6ffe4858c88dd9f02c15b3d
|
c72be999abf8848a7d09264ba9ee7bae30f4524a
|
/xme/examples/queues/src/queues/adv/receiver/src/receiveFunction.c
|
3e441ef5afc3ace1c34146fe5f5430f97f2692ea
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
ipa-rmb/autopnp
|
8399be67c1a3de61e01619dc8677c52728ffd836
|
f25517a093c772a1481bcff3e9da055d4c627954
|
refs/heads/indigo_dev
| 2022-05-05T01:57:05.858437
| 2022-04-29T07:31:42
| 2022-04-29T07:31:42
| 3,398,225
| 144
| 101
| null | 2019-07-08T06:11:13
| 2012-02-09T15:30:28
|
C
|
UTF-8
|
C
| false
| false
| 5,151
|
c
|
receiveFunction.c
|
/*
* Copyright (c) 2011-2014, fortiss GmbH.
* Licensed under the Apache License, Version 2.0.
*
* Use, modification and distribution are subject to the terms specified
* in the accompanying license file LICENSE.txt located at the root directory
* of this software distribution. A copy is available at
* http://chromosome.fortiss.org/.
*
* This file is part of CHROMOSOME.
*
* $Id: receiveFunction.c 7805 2014-03-13 09:54:35Z geisinger $
*/
/**
* \file
* Source file for function receive in component receiver.
*
* \author
* This file has been generated by the CHROMOSOME Modeling Tool (XMT)
* (fortiss GmbH).
*/
/******************************************************************************/
/*** Includes ***/
/******************************************************************************/
#include "queues/adv/receiver/include/receiveFunction.h"
#include "queues/adv/receiver/include/receiveFunctionWrapper.h"
#include "queues/adv/receiver/include/receiverComponent.h"
#include "queues/adv/receiver/include/receiverComponentWrapper.h"
#include "queues/adv/receiver/include/receiverManifest.h"
#include "xme/core/logUtils.h"
#include "xme/hal/include/mem.h"
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_C_INCLUDES) ENABLED START
#include "queues/topic/dictionary.h"
// PROTECTED REGION END
/******************************************************************************/
/*** Definitions ***/
/******************************************************************************/
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_C_DEFINITIONS) ENABLED START
// PROTECTED REGION END
/******************************************************************************/
/*** Variables ***/
/******************************************************************************/
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_C_VARIABLES) ENABLED START
// PROTECTED REGION END
/******************************************************************************/
/*** Prototypes ***/
/******************************************************************************/
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_C_PROTOTYPES) ENABLED START
// PROTECTED REGION END
/******************************************************************************/
/*** Implementation ***/
/******************************************************************************/
xme_status_t
queues_adv_receiver_receiveFunction_init
(
queues_adv_receiver_receiverComponent_config_t* const componentConfig
)
{
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_INITIALIZE_C) ENABLED START
// Nothing to do
XME_UNUSED_PARAMETER(componentConfig);
return XME_STATUS_SUCCESS;
// PROTECTED REGION END
}
void
queues_adv_receiver_receiveFunction_step
(
queues_adv_receiver_receiverComponent_config_t* const componentConfig
)
{
xme_status_t status[1];
queues_topic_data_t portInData; // Optional port.
(void)xme_hal_mem_set(&portInData, 0u, sizeof(queues_topic_data_t));
status[0] = queues_adv_receiver_receiverComponentWrapper_readPortIn(&portInData);
{
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_STEP_C) ENABLED START
uint8_t senderID;
XME_UNUSED_PARAMETER(componentConfig);
XME_UNUSED_PARAMETER(status);
if (XME_STATUS_SUCCESS == status[0])
{
queues_adv_receiver_receiverComponentWrapper_readInputPortAttribute
(
QUEUES_ADV_RECEIVER_RECEIVERCOMPONENTWRAPPER_PORT_IN,
(xme_core_attribute_key_t)QUEUES_ATTRIBUTE_SENDER,
&senderID,
sizeof(senderID)
);
XME_LOG(XME_LOG_NOTE, "[receiver] received value: %u, senderID: %hhu\n", portInData.value, senderID);
}
else if (XME_STATUS_NO_SUCH_VALUE == status[0])
{
XME_LOG(XME_LOG_NOTE, "[receiver] No value received\n");
}
else
{
XME_LOG(XME_LOG_NOTE, "[receiver] Error reading from input port. Status: %d\n", status[0]);
}
// PROTECTED REGION END
}
{
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_STEP_2_C) ENABLED START
// Nothing to do here
// PROTECTED REGION END
}
}
void
queues_adv_receiver_receiveFunction_fini
(
queues_adv_receiver_receiverComponent_config_t* const componentConfig
)
{
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_TERMINATE_C) ENABLED START
// Nothing to do here
XME_UNUSED_PARAMETER(componentConfig);
// PROTECTED REGION END
}
// PROTECTED REGION ID(QUEUES_ADV_RECEIVER_RECEIVEFUNCTION_IMPLEMENTATION_C) ENABLED START
// PROTECTED REGION END
|
c42a716277bab95d0801396c61ca6d7fbacde203
|
7e1cd9b94c0c8c443f993362dc185dfc35ceb963
|
/interface/mmal/components/sdl_audio_render.c
|
43c2ff2a162e39607176390f98040066a2c04129
|
[
"BSD-3-Clause"
] |
permissive
|
raspberrypi/userland
|
92e557234bb6d7f701066543e0efc36dfb54a52c
|
cc1ca18fb0689b01cc2ca2aa4b400dcee624a213
|
refs/heads/master
| 2023-08-20T15:41:23.695645
| 2023-04-19T10:38:04
| 2023-04-20T13:36:13
| 6,367,886
| 1,608
| 928
|
BSD-3-Clause
| 2023-09-13T09:54:26
| 2012-10-24T09:58:46
|
C
|
UTF-8
|
C
| false
| false
| 9,007
|
c
|
sdl_audio_render.c
|
/*
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "mmal.h"
#include "mmal_logging.h"
#include "core/mmal_component_private.h"
#include "core/mmal_port_private.h"
#include <SDL/SDL.h>
#define FRAME_LENGTH 2048
/* Buffering requirements */
#define INPUT_MIN_BUFFER_NUM 4
#define INPUT_RECOMMENDED_BUFFER_NUM 8
/****************************/
typedef struct MMAL_COMPONENT_MODULE_T
{
MMAL_STATUS_T status;
MMAL_QUEUE_T *queue;
MMAL_BOOL_T audio_opened;
} MMAL_COMPONENT_MODULE_T;
/** Destroy a previously created component */
static MMAL_STATUS_T sdl_component_destroy(MMAL_COMPONENT_T *component)
{
MMAL_COMPONENT_MODULE_T *module = component->priv->module;
if (module->audio_opened)
SDL_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
if(component->input_num) mmal_ports_free(component->input, 1);
if(module->queue) mmal_queue_destroy(module->queue);
vcos_free(module);
return MMAL_SUCCESS;
}
static void sdl_callback( void *ctx, uint8_t *stream, int size )
{
MMAL_PORT_T *port = (MMAL_PORT_T *)ctx;
MMAL_COMPONENT_T *component = port->component;
MMAL_COMPONENT_MODULE_T *module = component->priv->module;
MMAL_BUFFER_HEADER_T *buffer;
unsigned int i, bytes;
while (size > 0)
{
buffer = mmal_queue_get(module->queue);
if (!buffer)
{
LOG_ERROR("audio underrun");
return;
}
if (port->format->encoding == MMAL_ENCODING_PCM_SIGNED &&
port->format->es->audio.bits_per_sample == 16)
{
bytes = buffer->length;
if (bytes > (unsigned int)size) bytes = size;
memcpy(stream, buffer->data + buffer->offset, bytes);
buffer->offset += bytes;
buffer->length -= bytes;
stream += bytes;
size -= bytes;
}
else if (port->format->es->audio.bits_per_sample == 32)
{
bytes = buffer->length;
if (bytes > 2 * (unsigned int)size) bytes = 2 * size;
vcos_assert(!(bytes&0x3));
if (port->format->encoding == MMAL_ENCODING_PCM_FLOAT)
{
float *in = (float *)(buffer->data + buffer->offset);
int16_t *out = (int16_t *)stream;
for (i = 0; i < bytes / 4; i++)
{
if (*in >= 1.0) *out = 32767;
else if (*in < -1.0) *out = -32768;
else *out = *in * 32768.0;
in++; out++;
}
}
else if (port->format->encoding == MMAL_ENCODING_PCM_SIGNED)
{
int32_t *in = (int32_t *)(buffer->data + buffer->offset);
int16_t *out = (int16_t *)stream;
for (i = 0; i < bytes / 4; i++)
*out++ = (*in++) >> 16;
}
buffer->offset += bytes;
buffer->length -= bytes;
stream += bytes / 2;
size -= bytes / 2;
}
if (buffer->length)
{
/* We still have some data left for next time */
mmal_queue_put_back(module->queue, buffer);
continue;
}
/* Handle the EOS */
if (buffer->flags & MMAL_BUFFER_HEADER_FLAG_EOS)
mmal_event_eos_send(port);
buffer->offset = 0;
mmal_port_buffer_header_callback(port, buffer);
}
}
/** Set format on a port */
static MMAL_STATUS_T sdl_port_set_format(MMAL_PORT_T *port)
{
MMAL_COMPONENT_T *component = port->component;
MMAL_COMPONENT_MODULE_T *module = component->priv->module;
SDL_AudioSpec desired, obtained;
if (port->format->encoding != MMAL_ENCODING_PCM_SIGNED &&
port->format->encoding != MMAL_ENCODING_PCM_FLOAT &&
port->format->es->audio.bits_per_sample != 16 &&
port->format->es->audio.bits_per_sample != 32)
{
LOG_ERROR("port does not support '%4.4s' at %ibps",
(char *)&port->format->encoding, port->format->es->audio.bits_per_sample);
return MMAL_EINVAL;
}
if (module->audio_opened)
SDL_CloseAudio();
module->audio_opened = MMAL_FALSE;
desired.freq = port->format->es->audio.sample_rate;
desired.format = AUDIO_S16SYS;
desired.channels = port->format->es->audio.channels;
desired.callback = sdl_callback;
desired.userdata = port;
desired.samples = FRAME_LENGTH;
/* Open the sound device. */
if (SDL_OpenAudio( &desired, &obtained ) < 0)
return MMAL_ENOSYS;
module->audio_opened = MMAL_TRUE;
/* Now have a look at what we got. */
if (obtained.format != AUDIO_S16SYS)
return MMAL_ENOSYS;
port->format->es->audio.sample_rate = obtained.freq;
port->format->es->audio.channels = obtained.channels;
port->buffer_size_min = obtained.samples * port->format->es->audio.channels * 2;
return MMAL_SUCCESS;
}
/** Enable processing on a port */
static MMAL_STATUS_T sdl_port_enable(MMAL_PORT_T *port, MMAL_PORT_BH_CB_T cb)
{
MMAL_PARAM_UNUSED(port);
MMAL_PARAM_UNUSED(cb);
SDL_PauseAudio( 0 );
return MMAL_SUCCESS;
}
/** Disable processing on a port */
static MMAL_STATUS_T sdl_port_disable(MMAL_PORT_T *port)
{
MMAL_COMPONENT_T *component = port->component;
MMAL_COMPONENT_MODULE_T *module = component->priv->module;
MMAL_BUFFER_HEADER_T *buffer;
SDL_PauseAudio( 1 );
while((buffer = mmal_queue_get(module->queue)))
mmal_port_buffer_header_callback(port, buffer);
return MMAL_SUCCESS;
}
static MMAL_STATUS_T sdl_port_send(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
{
MMAL_COMPONENT_T *component = port->component;
MMAL_COMPONENT_MODULE_T *module = component->priv->module;
/* Handle event buffers */
if (buffer->cmd)
{
LOG_ERROR("discarding event %i on port %p", (int)buffer->cmd, port);
buffer->length = 0;
mmal_port_buffer_header_callback(port, buffer);
return MMAL_SUCCESS;
}
if (module->status != MMAL_SUCCESS)
return module->status;
mmal_queue_put(module->queue, buffer);
return MMAL_SUCCESS;
}
/** Create an instance of a component */
static MMAL_STATUS_T mmal_component_create_sdl(const char *name, MMAL_COMPONENT_T *component)
{
MMAL_COMPONENT_MODULE_T *module;
/* Check we're the requested component */
if(strcmp(name, "sdl." MMAL_AUDIO_RENDER))
return MMAL_ENOENT;
if( SDL_WasInit(SDL_INIT_AUDIO) )
return MMAL_ENXIO;
/* Allocate our module context */
component->priv->module = module = vcos_calloc(1, sizeof(*module), "mmal module");
if(!module)
return MMAL_ENOMEM;
if(SDL_Init(SDL_INIT_AUDIO|SDL_INIT_NOPARACHUTE) < 0)
return MMAL_ENXIO;
/* Allocate the ports for this component */
component->input = mmal_ports_alloc(component, 1, MMAL_PORT_TYPE_INPUT, 0);
if(!component->input)
goto error;
component->input_num = 1;
module->queue = mmal_queue_create();
if(!module->queue)
goto error;
component->input[0]->priv->pf_set_format = sdl_port_set_format;
component->input[0]->priv->pf_enable = sdl_port_enable;
component->input[0]->priv->pf_disable = sdl_port_disable;
component->input[0]->priv->pf_send = sdl_port_send;
component->input[0]->buffer_num_min = INPUT_MIN_BUFFER_NUM;
component->input[0]->buffer_num_recommended = INPUT_RECOMMENDED_BUFFER_NUM;
component->priv->pf_destroy = sdl_component_destroy;
return MMAL_SUCCESS;
error:
sdl_component_destroy(component);
return MMAL_ENOMEM;
}
MMAL_CONSTRUCTOR(mmal_register_component_sdl_audio);
void mmal_register_component_sdl_audio(void)
{
mmal_component_supplier_register("sdl", mmal_component_create_sdl);
}
|
9768f4f91cac4fff32ee3095b4b8427469795a0b
|
376e1818d427b5e4d32fa6dd6c7b71e9fd88afdb
|
/editors/xemacs/patches/patch-src_unexfreebsd.c
|
cb85ffd1832dc3dbe8f54ab4cd57413d071e3280
|
[] |
no_license
|
NetBSD/pkgsrc
|
a0732c023519650ef821ab89c23ab6ab59e25bdb
|
d042034ec4896cc5b47ed6f2e5b8802d9bc5c556
|
refs/heads/trunk
| 2023-09-01T07:40:12.138283
| 2023-09-01T05:25:19
| 2023-09-01T05:25:19
| 88,439,572
| 321
| 138
| null | 2023-07-12T22:34:14
| 2017-04-16T20:04:15
| null |
UTF-8
|
C
| false
| false
| 517
|
c
|
patch-src_unexfreebsd.c
|
$NetBSD: patch-src_unexfreebsd.c,v 1.2 2016/04/13 13:52:27 hauke Exp $
Build on NetBSD/arm*
--- src/unexfreebsd.c.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/unexfreebsd.c
@@ -289,7 +289,7 @@ copy_relocation_site (struct relocation_
/* We can get relocation sites in the bss region, for objects whose
contents are copied from a shared library. We don't need or want
to restore these at present. */
-#ifndef sparc
+#if !defined(sparc) && !defined(__arm__)
if (ri->r_copy)
return;
#else
|
26135a0fe00de11d8058f9076fcca2c99daa750a
|
4e366db41b2bb755c5a1d8fa8149bf619ac7c970
|
/components/library/openssl/common/engines/pkcs11/e_pk11_err.c
|
586fd0d67af7355495e21ef45b91fe630f524ad4
|
[] |
no_license
|
OpenIndiana/oi-userland
|
0af05f09a04dc95d814fce1d56ff1d74f07fd042
|
a40cd6c757239bcf4e1f0d5943a65d9b57fbc3f7
|
refs/heads/oi/hipster
| 2023-09-04T04:41:58.585774
| 2023-09-03T18:00:28
| 2023-09-03T18:00:28
| 10,007,731
| 220
| 334
| null | 2023-09-14T21:48:26
| 2013-05-12T01:29:19
|
C
|
UTF-8
|
C
| false
| false
| 13,650
|
c
|
e_pk11_err.c
|
/*
* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
*/
/* crypto/engine/e_pk11_err.c */
/*
* This product includes software developed by the OpenSSL Project for
* use in the OpenSSL Toolkit (http://www.openssl.org/).
*
* This project also referenced hw_pkcs11-0.9.7b.patch written by
* Afchine Madjlessi.
*/
/*
* ====================================================================
* Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* licensing@OpenSSL.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#include <stdio.h>
#include <openssl/err.h>
#include "e_pk11_err.h"
/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR
static ERR_STRING_DATA pk11_str_functs[]=
{
{ ERR_PACK(0, PK11_F_INIT, 0), "PK11_INIT"},
{ ERR_PACK(0, PK11_F_FINISH, 0), "PK11_FINISH"},
{ ERR_PACK(0, PK11_F_DESTROY, 0), "PK11_DESTROY"},
{ ERR_PACK(0, PK11_F_CTRL, 0), "PK11_CTRL"},
{ ERR_PACK(0, PK11_F_RSA_INIT, 0), "PK11_RSA_INIT"},
{ ERR_PACK(0, PK11_F_RSA_FINISH, 0), "PK11_RSA_FINISH"},
{ ERR_PACK(0, PK11_F_GET_PUB_RSA_KEY, 0), "PK11_GET_PUB_RSA_KEY"},
{ ERR_PACK(0, PK11_F_GET_PRIV_RSA_KEY, 0), "PK11_GET_PRIV_RSA_KEY"},
{ ERR_PACK(0, PK11_F_RSA_GEN_KEY, 0), "PK11_RSA_GEN_KEY"},
{ ERR_PACK(0, PK11_F_RSA_PUB_ENC, 0), "PK11_RSA_PUB_ENC"},
{ ERR_PACK(0, PK11_F_RSA_PRIV_ENC, 0), "PK11_RSA_PRIV_ENC"},
{ ERR_PACK(0, PK11_F_RSA_PUB_DEC, 0), "PK11_RSA_PUB_DEC"},
{ ERR_PACK(0, PK11_F_RSA_PRIV_DEC, 0), "PK11_RSA_PRIV_DEC"},
{ ERR_PACK(0, PK11_F_RSA_SIGN, 0), "PK11_RSA_SIGN"},
{ ERR_PACK(0, PK11_F_RSA_VERIFY, 0), "PK11_RSA_VERIFY"},
{ ERR_PACK(0, PK11_F_RAND_ADD, 0), "PK11_RAND_ADD"},
{ ERR_PACK(0, PK11_F_RAND_BYTES, 0), "PK11_RAND_BYTES"},
{ ERR_PACK(0, PK11_F_GET_SESSION, 0), "PK11_GET_SESSION"},
{ ERR_PACK(0, PK11_F_FREE_SESSION, 0), "PK11_FREE_SESSION"},
{ ERR_PACK(0, PK11_F_LOAD_PUBKEY, 0), "PK11_LOAD_PUBKEY"},
{ ERR_PACK(0, PK11_F_LOAD_PRIVKEY, 0), "PK11_LOAD_PRIV_KEY"},
{ ERR_PACK(0, PK11_F_RSA_PUB_ENC_LOW, 0), "PK11_RSA_PUB_ENC_LOW"},
{ ERR_PACK(0, PK11_F_RSA_PRIV_ENC_LOW, 0), "PK11_RSA_PRIV_ENC_LOW"},
{ ERR_PACK(0, PK11_F_RSA_PUB_DEC_LOW, 0), "PK11_RSA_PUB_DEC_LOW"},
{ ERR_PACK(0, PK11_F_RSA_PRIV_DEC_LOW, 0), "PK11_RSA_PRIV_DEC_LOW"},
{ ERR_PACK(0, PK11_F_DSA_SIGN, 0), "PK11_DSA_SIGN"},
{ ERR_PACK(0, PK11_F_DSA_VERIFY, 0), "PK11_DSA_VERIFY"},
{ ERR_PACK(0, PK11_F_DSA_INIT, 0), "PK11_DSA_INIT"},
{ ERR_PACK(0, PK11_F_DSA_FINISH, 0), "PK11_DSA_FINISH"},
{ ERR_PACK(0, PK11_F_GET_PUB_DSA_KEY, 0), "PK11_GET_PUB_DSA_KEY"},
{ ERR_PACK(0, PK11_F_GET_PRIV_DSA_KEY, 0), "PK11_GET_PRIV_DSA_KEY"},
{ ERR_PACK(0, PK11_F_DH_INIT, 0), "PK11_DH_INIT"},
{ ERR_PACK(0, PK11_F_DH_FINISH, 0), "PK11_DH_FINISH"},
{ ERR_PACK(0, PK11_F_MOD_EXP_DH, 0), "PK11_MOD_EXP_DH"},
{ ERR_PACK(0, PK11_F_GET_DH_KEY, 0), "PK11_GET_DH_KEY"},
{ ERR_PACK(0, PK11_F_FREE_ALL_SESSIONS, 0), "PK11_FREE_ALL_SESSIONS"},
{ ERR_PACK(0, PK11_F_SETUP_SESSION, 0), "PK11_SETUP_SESSION"},
{ ERR_PACK(0, PK11_F_DESTROY_OBJECT, 0), "PK11_DESTROY_OBJECT"},
{ ERR_PACK(0, PK11_F_CIPHER_INIT, 0), "PK11_CIPHER_INIT"},
{ ERR_PACK(0, PK11_F_CIPHER_DO_CIPHER, 0), "PK11_CIPHER_DO_CIPHER"},
{ ERR_PACK(0, PK11_F_GET_CIPHER_KEY, 0), "PK11_GET_CIPHER_KEY"},
{ ERR_PACK(0, PK11_F_DIGEST_INIT, 0), "PK11_DIGEST_INIT"},
{ ERR_PACK(0, PK11_F_DIGEST_UPDATE, 0), "PK11_DIGEST_UPDATE"},
{ ERR_PACK(0, PK11_F_DIGEST_FINAL, 0), "PK11_DIGEST_FINAL"},
{ ERR_PACK(0, PK11_F_CHOOSE_SLOT, 0), "PK11_CHOOSE_SLOT"},
{ ERR_PACK(0, PK11_F_CIPHER_FINAL, 0), "PK11_CIPHER_FINAL"},
{ ERR_PACK(0, PK11_F_LIBRARY_INIT, 0), "PK11_LIBRARY_INIT"},
{ ERR_PACK(0, PK11_F_LOAD, 0), "ENGINE_LOAD_PK11"},
{ ERR_PACK(0, PK11_F_DH_GEN_KEY, 0), "PK11_DH_GEN_KEY"},
{ ERR_PACK(0, PK11_F_DH_COMP_KEY, 0), "PK11_DH_COMP_KEY"},
{ ERR_PACK(0, PK11_F_DIGEST_COPY, 0), "PK11_DIGEST_COPY"},
{ ERR_PACK(0, PK11_F_CIPHER_CLEANUP, 0), "PK11_CIPHER_CLEANUP"},
{ ERR_PACK(0, PK11_F_ACTIVE_ADD, 0), "PK11_ACTIVE_ADD"},
{ ERR_PACK(0, PK11_F_ACTIVE_DELETE, 0), "PK11_ACTIVE_DELETE"},
{ ERR_PACK(0, PK11_F_CHECK_HW_MECHANISMS, 0), "PK11_CHECK_HW_MECHANISMS"},
{ ERR_PACK(0, PK11_F_INIT_SYMMETRIC, 0), "PK11_INIT_SYMMETRIC"},
{ ERR_PACK(0, PK11_F_ADD_AES_CTR_NIDS, 0), "PK11_ADD_AES_CTR_NIDS"},
{ ERR_PACK(0, PK11_F_INIT_ALL_LOCKS, 0), "PK11_INIT_ALL_LOCKS"},
{ ERR_PACK(0, PK11_F_RETURN_SESSION, 0), "PK11_RETURN_SESSION"},
{ ERR_PACK(0, PK11_F_GET_PIN, 0), "PK11_GET_PIN"},
{ ERR_PACK(0, PK11_F_FIND_ONE_OBJECT, 0), "PK11_FIND_ONE_OBJECT"},
{ ERR_PACK(0, PK11_F_CHECK_TOKEN_ATTRS, 0), "PK11_CHECK_TOKEN_ATTRS"},
{ ERR_PACK(0, PK11_F_CACHE_PIN, 0), "PK11_CACHE_PIN"},
{ ERR_PACK(0, PK11_F_MLOCK_PIN_IN_MEMORY, 0), "PK11_MLOCK_PIN_IN_MEMORY"},
{ ERR_PACK(0, PK11_F_TOKEN_LOGIN, 0), "PK11_TOKEN_LOGIN"},
{ ERR_PACK(0, PK11_F_TOKEN_RELOGIN, 0), "PK11_TOKEN_RELOGIN"},
{ ERR_PACK(0, PK11_F_RUN_ASKPASS, 0), "PK11_F_RUN_ASKPASS"},
{ 0, NULL}
};
static ERR_STRING_DATA pk11_str_reasons[]=
{
{ PK11_R_ALREADY_LOADED, "PKCS#11 DSO already loaded"},
{ PK11_R_DSO_FAILURE, "unable to load PKCS#11 DSO"},
{ PK11_R_NOT_LOADED, "PKCS#11 DSO not loaded"},
{ PK11_R_PASSED_NULL_PARAMETER, "null parameter passed"},
{ PK11_R_COMMAND_NOT_IMPLEMENTED, "command not implemented"},
{ PK11_R_INITIALIZE, "C_Initialize failed"},
{ PK11_R_FINALIZE, "C_Finalize failed"},
{ PK11_R_GETINFO, "C_GetInfo faile"},
{ PK11_R_GETSLOTLIST, "C_GetSlotList failed"},
{ PK11_R_NO_MODULUS_OR_NO_EXPONENT, "no modulus or no exponent"},
{ PK11_R_ATTRIBUT_SENSITIVE_OR_INVALID, "attr sensitive or invalid"},
{ PK11_R_GETATTRIBUTVALUE, "C_GetAttributeValue failed"},
{ PK11_R_NO_MODULUS, "no modulus"},
{ PK11_R_NO_EXPONENT, "no exponent"},
{ PK11_R_FINDOBJECTSINIT, "C_FindObjectsInit failed"},
{ PK11_R_FINDOBJECTS, "C_FindObjects failed"},
{ PK11_R_FINDOBJECTSFINAL, "C_FindObjectsFinal failed"},
{ PK11_R_CREATEOBJECT, "C_CreateObject failed"},
{ PK11_R_DESTROYOBJECT, "C_DestroyObject failed"},
{ PK11_R_OPENSESSION, "C_OpenSession failed"},
{ PK11_R_CLOSESESSION, "C_CloseSession failed"},
{ PK11_R_ENCRYPTINIT, "C_EncryptInit failed"},
{ PK11_R_ENCRYPT, "C_Encrypt failed"},
{ PK11_R_SIGNINIT, "C_SignInit failed"},
{ PK11_R_SIGN, "C_Sign failed"},
{ PK11_R_DECRYPTINIT, "C_DecryptInit failed"},
{ PK11_R_DECRYPT, "C_Decrypt failed"},
{ PK11_R_VERIFYINIT, "C_VerifyRecover failed"},
{ PK11_R_VERIFY, "C_Verify failed"},
{ PK11_R_VERIFYRECOVERINIT, "C_VerifyRecoverInit failed"},
{ PK11_R_VERIFYRECOVER, "C_VerifyRecover failed"},
{ PK11_R_GEN_KEY, "C_GenerateKeyPair failed"},
{ PK11_R_SEEDRANDOM, "C_SeedRandom failed"},
{ PK11_R_GENERATERANDOM, "C_GenerateRandom failed"},
{ PK11_R_INVALID_MESSAGE_LENGTH, "invalid message length"},
{ PK11_R_UNKNOWN_ALGORITHM_TYPE, "unknown algorithm type"},
{ PK11_R_UNKNOWN_ASN1_OBJECT_ID, "unknown asn1 onject id"},
{ PK11_R_UNKNOWN_PADDING_TYPE, "unknown padding type"},
{ PK11_R_PADDING_CHECK_FAILED, "padding check failed"},
{ PK11_R_DIGEST_TOO_BIG, "digest too big"},
{ PK11_R_MALLOC_FAILURE, "malloc failure"},
{ PK11_R_CTRL_COMMAND_NOT_IMPLEMENTED, "ctl command not implemented"},
{ PK11_R_DATA_GREATER_THAN_MOD_LEN, "data is bigger than mod"},
{ PK11_R_DATA_TOO_LARGE_FOR_MODULUS, "data is too larger for mod"},
{ PK11_R_MISSING_KEY_COMPONENT, "a dsa component is missing"},
{ PK11_R_INVALID_SIGNATURE_LENGTH, "invalid signature length"},
{ PK11_R_INVALID_DSA_SIGNATURE_R, "missing r in dsa verify"},
{ PK11_R_INVALID_DSA_SIGNATURE_S, "missing s in dsa verify"},
{ PK11_R_INCONSISTENT_KEY, "inconsistent key type"},
{ PK11_R_ENCRYPTUPDATE, "C_EncryptUpdate failed"},
{ PK11_R_DECRYPTUPDATE, "C_DecryptUpdate failed"},
{ PK11_R_DIGESTINIT, "C_DigestInit failed"},
{ PK11_R_DIGESTUPDATE, "C_DigestUpdate failed"},
{ PK11_R_DIGESTFINAL, "C_DigestFinal failed"},
{ PK11_R_ENCRYPTFINAL, "C_EncryptFinal failed"},
{ PK11_R_DECRYPTFINAL, "C_DecryptFinal failed"},
{ PK11_R_NO_PRNG_SUPPORT, "Slot does not support PRNG"},
{ PK11_R_GETTOKENINFO, "C_GetTokenInfo failed"},
{ PK11_R_DERIVEKEY, "C_DeriveKey failed"},
{ PK11_R_GET_OPERATION_STATE, "C_GetOperationState failed"},
{ PK11_R_SET_OPERATION_STATE, "C_SetOperationState failed"},
{ PK11_R_INVALID_HANDLE, "invalid PKCS#11 object handle"},
{ PK11_R_KEY_OR_IV_LEN_PROBLEM, "IV or key length incorrect"},
{ PK11_R_INVALID_OPERATION_TYPE, "invalid operation type"},
{ PK11_R_ADD_NID_FAILED, "failed to add NID" },
{ PK11_R_ATFORK_FAILED, "atfork failed" },
{ PK11_R_TOKEN_LOGIN_FAILED, "C_Login failed on token" },
{ PK11_R_MORE_THAN_ONE_OBJECT_FOUND, "more than one object found" },
{ PK11_R_INVALID_PKCS11_URI, "pkcs11 URI provided is invalid" },
{ PK11_R_COULD_NOT_READ_PIN, "could not read PIN from terminal" },
{ PK11_R_PIN_NOT_READ_FROM_COMMAND, "PIN not read from external command" },
{ PK11_R_COULD_NOT_OPEN_COMMAND, "could not popen dialog command" },
{ PK11_R_PIPE_FAILED, "pipe failed" },
{ PK11_R_BAD_PASSPHRASE_SPEC, "bad passphrasedialog specification" },
{ PK11_R_TOKEN_NOT_INITIALIZED, "token not initialized" },
{ PK11_R_TOKEN_PIN_NOT_SET, "token PIN required but not set" },
{ PK11_R_TOKEN_PIN_NOT_PROVIDED, "token PIN required but not provided" },
{ PK11_R_MISSING_OBJECT_LABEL, "missing mandatory 'object' keyword" },
{ PK11_R_TOKEN_ATTRS_DO_NOT_MATCH, "token attrs provided do not match" },
{ PK11_R_PRIV_KEY_NOT_FOUND, "private key not found in keystore" },
{ PK11_R_NO_OBJECT_FOUND, "specified object not found" },
{ PK11_R_PIN_CACHING_POLICY_INVALID, "PIN set but caching policy invalid" },
{ PK11_R_SYSCONF_FAILED, "sysconf failed" },
{ PK11_R_MMAP_FAILED, "mmap failed" },
{ PK11_R_PRIV_PROC_LOCK_MEMORY_MISSING, "PROC_LOCK_MEMORY privilege missing" },
{ PK11_R_MLOCK_FAILED, "mlock failed" },
{ PK11_R_FORK_FAILED, "fork failed" },
{ 0, NULL}
};
#endif /* OPENSSL_NO_ERR */
static int pk11_lib_error_code = 0;
static int pk11_error_init = 1;
#ifdef PK11_ENGINE_LIB_NAME
static ERR_STRING_DATA pk11_engine_lib_name[] =
{
{0, PK11_ENGINE_LIB_NAME},
{0, NULL}
};
#endif
static void
ERR_load_pk11_strings(void)
{
if (pk11_lib_error_code == 0) {
pk11_lib_error_code = ERR_get_next_error_library();
}
if (pk11_error_init) {
pk11_error_init = 0;
#ifndef OPENSSL_NO_ERR
ERR_load_strings(pk11_lib_error_code, pk11_str_functs);
ERR_load_strings(pk11_lib_error_code, pk11_str_reasons);
#endif
#ifdef PK11_ENGINE_LIB_NAME
pk11_engine_lib_name->error =
ERR_PACK(pk11_lib_error_code, 0, 0);
ERR_load_strings(0, pk11_engine_lib_name);
#endif
}
}
static void
ERR_unload_pk11_strings(void)
{
if (pk11_error_init == 0) {
#ifndef OPENSSL_NO_ERR
ERR_unload_strings(pk11_lib_error_code, pk11_str_functs);
ERR_unload_strings(pk11_lib_error_code, pk11_str_reasons);
#endif
#ifdef PK11_ENGINE_LIB_NAME
ERR_unload_strings(0, pk11_engine_lib_name);
#endif
pk11_error_init = 1;
}
}
void
ERR_pk11_error(int function, int reason, char *file, int line)
{
if (pk11_lib_error_code == 0) {
pk11_lib_error_code = ERR_get_next_error_library();
}
ERR_PUT_error(pk11_lib_error_code, function, reason, file, line);
}
void
PK11err_add_data(int function, int reason, CK_RV rv)
{
char tmp_buf[20];
PK11err(function, reason);
(void) snprintf(tmp_buf, sizeof (tmp_buf), "%lx", rv);
ERR_add_error_data(2, "PK11 CK_RV=0X", tmp_buf);
}
|
323732a33851e38953eac262fd2706732f330cd2
|
f9e7d65cb784c01a0200145ba8d289afe41d4a56
|
/common/btle_ll.c
|
b2a15ce36eeecbd2d21a28d6f593c5d615db45fd
|
[
"BSD-3-Clause"
] |
permissive
|
FrameworkComputer/EmbeddedController
|
ad7086769e87d0a4179eae96a7c9ff5e383ff54e
|
f6d6b927eed71550d3475411cfc3e59abe5cef2a
|
refs/heads/hx20-hx30
| 2023-08-08T20:45:10.621169
| 2023-05-26T07:03:59
| 2023-05-26T07:03:59
| 447,021,040
| 846
| 48
|
BSD-3-Clause
| 2023-05-26T07:04:59
| 2022-01-12T00:11:14
|
C
|
UTF-8
|
C
| false
| false
| 22,860
|
c
|
btle_ll.c
|
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "bluetooth_le_ll.h"
#include "bluetooth_le.h"
#include "btle_hci_int.h"
#include "util.h"
#include "console.h"
#include "radio.h"
#include "radio_test.h"
#include "task.h"
#include "timer.h"
#ifdef CONFIG_BLUETOOTH_LL_DEBUG
#define CPUTS(outstr) cputs(CC_BLUETOOTH_LL, outstr)
#define CPRINTS(format, args...) cprints(CC_BLUETOOTH_LL, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_BLUETOOTH_LL, format, ## args)
#else /* CONFIG_BLUETOOTH_LL_DEBUG */
#define CPUTS(outstr)
#define CPRINTS(format, args...)
#define CPRINTF(format, args...)
#endif /* CONFIG_BLUETOOTH_LL_DEBUG */
/* Link Layer */
enum ll_state_t ll_state = UNINITIALIZED;
static struct hciLeSetAdvParams ll_adv_params;
static struct hciLeSetScanParams ll_scan_params;
static int ll_adv_interval_us;
static int ll_adv_timeout_us;
static struct ble_pdu ll_adv_pdu;
static struct ble_pdu ll_scan_rsp_pdu;
static struct ble_pdu tx_packet_1;
static struct ble_pdu *packet_tb_sent;
static struct ble_connection_params conn_params;
static int connection_initialized;
static struct remapping_table remap_table;
static uint64_t receive_time, last_receive_time;
static uint8_t num_consecutive_failures;
static uint32_t tx_end, tx_rsp_end, time_of_connect_req;
struct ble_pdu ll_rcv_packet;
static uint32_t ll_conn_events;
static uint32_t errors_recovered;
int ll_power;
uint8_t is_first_data_packet;
static uint64_t ll_random_address = 0xC5BADBADBAD1; /* Uninitialized */
static uint64_t ll_public_address = 0xC5BADBADBADF; /* Uninitialized */
static uint8_t ll_channel_map[5] = {0xff, 0xff, 0xff, 0xff, 0x1f};
static uint8_t ll_filter_duplicates;
int ll_pseudo_rand(int max_plus_one)
{
static uint32_t lfsr = 0x55555;
int lsb = lfsr & 1;
lfsr = lfsr >> 1;
if (lsb)
lfsr ^= 0x80020003; /* Bits 32, 22, 2, 1 */
return lfsr % max_plus_one;
}
uint8_t ll_set_tx_power(uint8_t *params)
{
/* Add checking */
ll_power = params[0];
return HCI_SUCCESS;
}
uint8_t ll_read_tx_power(void)
{
return ll_power;
}
/* LE Information */
uint8_t ll_read_buffer_size(uint8_t *return_params)
{
return_params[0] = LL_MAX_DATA_PACKET_LENGTH & 0xff;
return_params[1] = (LL_MAX_DATA_PACKET_LENGTH >> 8) & 0xff;
return_params[2] = LL_MAX_DATA_PACKETS;
return HCI_SUCCESS;
}
uint8_t ll_read_local_supported_features(uint8_t *return_params)
{
uint64_t supported_features = LL_SUPPORTED_FEATURES;
memcpy(return_params, &supported_features, sizeof(supported_features));
return HCI_SUCCESS;
}
uint8_t ll_read_supported_states(uint8_t *return_params)
{
uint64_t supported_states = LL_SUPPORTED_STATES;
memcpy(return_params, &supported_states, sizeof(supported_states));
return HCI_SUCCESS;
}
uint8_t ll_set_host_channel_classification(uint8_t *params)
{
memcpy(ll_channel_map, params, sizeof(ll_channel_map));
return HCI_SUCCESS;
}
/* Advertising */
uint8_t ll_set_scan_response_data(uint8_t *params)
{
if (params[0] > BLE_MAX_ADV_PAYLOAD_OCTETS)
return HCI_ERR_Invalid_HCI_Command_Parameters;
if (ll_state == ADVERTISING)
return HCI_ERR_Controller_Busy;
memcpy(&ll_scan_rsp_pdu.payload[BLUETOOTH_ADDR_OCTETS], ¶ms[1],
params[0]);
ll_scan_rsp_pdu.header.adv.length = params[0] + BLUETOOTH_ADDR_OCTETS;
return HCI_SUCCESS;
}
uint8_t ll_set_adv_data(uint8_t *params)
{
if (params[0] > BLE_MAX_ADV_PAYLOAD_OCTETS)
return HCI_ERR_Invalid_HCI_Command_Parameters;
if (ll_state == ADVERTISING)
return HCI_ERR_Controller_Busy;
/* Skip the address */
memcpy(&ll_adv_pdu.payload[BLUETOOTH_ADDR_OCTETS], ¶ms[1],
params[0]);
ll_adv_pdu.header.adv.length = params[0] + BLUETOOTH_ADDR_OCTETS;
return HCI_SUCCESS;
}
uint8_t ll_reset(void)
{
ll_state = UNINITIALIZED;
radio_disable();
ble_radio_clear_allow_list();
return HCI_SUCCESS;
}
static uint8_t ll_state_change_request(enum ll_state_t next_state)
{
/* Initialize the radio if it hasn't been initialized */
if (ll_state == UNINITIALIZED) {
if (ble_radio_init(BLE_ADV_ACCESS_ADDRESS, BLE_ADV_CRCINIT)
!= EC_SUCCESS)
return HCI_ERR_Hardware_Failure;
ll_state = STANDBY;
}
/* Only change states when the link layer is in STANDBY */
if (next_state != STANDBY && ll_state != STANDBY)
return HCI_ERR_Controller_Busy;
ll_state = next_state;
return HCI_SUCCESS;
}
uint8_t ll_set_advertising_enable(uint8_t *params)
{
uint8_t rv;
if (params[0]) {
rv = ll_state_change_request(ADVERTISING);
if (rv == HCI_SUCCESS)
task_wake(TASK_ID_BLE_LL);
} else {
rv = ll_state_change_request(STANDBY);
}
return rv;
}
uint8_t ll_set_scan_enable(uint8_t *params)
{
uint8_t rv;
if (params[0]) {
ll_filter_duplicates = params[1];
rv = ll_state_change_request(SCANNING);
if (rv == HCI_SUCCESS)
task_wake(TASK_ID_BLE_LL);
} else {
rv = ll_state_change_request(STANDBY);
}
return HCI_SUCCESS;
}
void set_empty_data_packet(struct ble_pdu *pdu)
{
/* LLID == 1 means incomplete or empty data packet */
pdu->header.data.llid = 1;
pdu->header.data.nesn = 1;
pdu->header.data.sn = 0;
pdu->header.data.md = 0;
pdu->header.data.length = 0;
pdu->header_type_adv = 0;
}
/* Connection state */
/**
* This function serves to take data from a CONNECT_REQ packet and copy it
* into a struct, conn_params, which defines the parameter of the connection.
* It also fills a remapping table, another essential element of the link
* layer connection.
*/
uint8_t initialize_connection(void)
{
int cur_offset = 0, i = 0;
uint8_t final_octet = 0;
uint8_t remap_arr[5];
uint8_t *payload_start = (uint8_t *)(ll_rcv_packet.payload);
num_consecutive_failures = 0;
/* Copy data into the appropriate portions of memory */
memcpy((uint8_t *)&(conn_params.init_a),
payload_start, CONNECT_REQ_INITA_LEN);
cur_offset += CONNECT_REQ_INITA_LEN;
memcpy((uint8_t *)&(conn_params.adv_a),
payload_start+cur_offset, CONNECT_REQ_ADVA_LEN);
cur_offset += CONNECT_REQ_ADVA_LEN;
memcpy(&(conn_params.access_addr),
payload_start+cur_offset, CONNECT_REQ_ACCESS_ADDR_LEN);
cur_offset += CONNECT_REQ_ACCESS_ADDR_LEN;
conn_params.crc_init_val = 0;
memcpy(&(conn_params.crc_init_val),
payload_start+cur_offset, CONNECT_REQ_CRC_INIT_VAL_LEN);
cur_offset += CONNECT_REQ_CRC_INIT_VAL_LEN;
memcpy(&(conn_params.win_size),
payload_start+cur_offset, CONNECT_REQ_WIN_SIZE_LEN);
cur_offset += CONNECT_REQ_WIN_SIZE_LEN;
memcpy(&(conn_params.win_offset),
payload_start+cur_offset, CONNECT_REQ_WIN_OFFSET_LEN);
cur_offset += CONNECT_REQ_WIN_OFFSET_LEN;
memcpy(&(conn_params.interval),
payload_start+cur_offset, CONNECT_REQ_INTERVAL_LEN);
cur_offset += CONNECT_REQ_INTERVAL_LEN;
memcpy(&(conn_params.latency),
payload_start+cur_offset, CONNECT_REQ_LATENCY_LEN);
cur_offset += CONNECT_REQ_LATENCY_LEN;
memcpy(&(conn_params.timeout),
payload_start+cur_offset, CONNECT_REQ_TIMEOUT_LEN);
cur_offset += CONNECT_REQ_TIMEOUT_LEN;
conn_params.channel_map = 0;
memcpy(&(conn_params.channel_map),
payload_start+cur_offset, CONNECT_REQ_CHANNEL_MAP_LEN);
cur_offset += CONNECT_REQ_CHANNEL_MAP_LEN;
memcpy(&final_octet, payload_start+cur_offset,
CONNECT_REQ_HOP_INCREMENT_AND_SCA_LEN);
/* last 5 bits of final_octet: */
conn_params.hop_increment = final_octet & 0x1f;
/* first 3 bits of final_octet: */
conn_params.sleep_clock_accuracy = (final_octet & 0xe0) >> 5;
/* Set up channel mapping table */
for (i = 0; i < 5; ++i)
remap_arr[i] = *(((uint8_t *)&(conn_params.channel_map))+i);
fill_remapping_table(&remap_table, remap_arr,
conn_params.hop_increment);
/* Calculate transmission window parameters */
conn_params.transmitWindowSize = conn_params.win_size * 1250;
conn_params.transmitWindowOffset = conn_params.win_offset * 1250;
conn_params.connInterval = conn_params.interval * 1250;
/* The following two lines convert ms -> microseconds */
conn_params.connSlaveLatency = 1000 * conn_params.latency;
conn_params.connSupervisionTimeout = 10000 * conn_params.timeout;
/* All these times are in microseconds! */
/* Check for common transmission errors */
if (conn_params.hop_increment < 5 || conn_params.hop_increment > 16) {
for (i = 0; i < 5; ++i)
CPRINTF("ERROR!! ILLEGAL HOP_INCREMENT!!\n");
return HCI_ERR_Invalid_LMP_Parameters;
}
is_first_data_packet = 1;
return HCI_SUCCESS;
}
/* Allow List */
uint8_t ll_clear_allow_list(void)
{
if (ble_radio_clear_allow_list() == EC_SUCCESS)
return HCI_SUCCESS;
else
return HCI_ERR_Hardware_Failure;
}
uint8_t ll_read_allow_list_size(uint8_t *return_params)
{
if (ble_radio_read_allow_list_size(return_params) == EC_SUCCESS)
return HCI_SUCCESS;
else
return HCI_ERR_Hardware_Failure;
}
uint8_t ll_add_device_to_allow_list(uint8_t *params)
{
if (ble_radio_add_device_to_allow_list(¶ms[1], params[0]) ==
EC_SUCCESS)
return HCI_SUCCESS;
else
return HCI_ERR_Host_Rejected_Due_To_Limited_Resources;
}
uint8_t ll_remove_device_from_allow_list(uint8_t *params)
{
if (ble_radio_remove_device_from_allow_list(¶ms[1], params[0]) ==
EC_SUCCESS)
return HCI_SUCCESS;
else
return HCI_ERR_Hardware_Failure;
}
/* Connections */
uint8_t ll_read_remote_used_features(uint8_t *params)
{
uint16_t handle = params[0] | (((uint16_t)params[1]) << 8);
CPRINTS("Read remote used features for handle %d", handle);
/* Check handle */
return HCI_SUCCESS;
}
/* RF PHY Testing */
static int ll_test_packets;
uint8_t ll_receiver_test(uint8_t *params)
{
int rv;
ll_test_packets = 0;
/* See if the link layer is busy */
rv = ll_state_change_request(TEST_RX);
if (rv)
return rv;
rv = ble_test_rx_init(params[0]);
if (rv)
return rv;
CPRINTS("Start Rx test");
task_wake(TASK_ID_BLE_LL);
return HCI_SUCCESS;
}
uint8_t ll_transmitter_test(uint8_t *params)
{
int rv;
ll_test_packets = 0;
/* See if the link layer is busy */
rv = ll_state_change_request(TEST_TX);
if (rv)
return rv;
rv = ble_test_tx_init(params[0], params[1], params[2]);
if (rv)
return rv;
CPRINTS("Start Tx test");
task_wake(TASK_ID_BLE_LL);
return HCI_SUCCESS;
}
uint8_t ll_test_end(uint8_t *return_params)
{
CPRINTS("End (%d packets)", ll_test_packets);
ble_test_stop();
if (ll_state == TEST_RX) {
return_params[0] = ll_test_packets & 0xff;
return_params[1] = (ll_test_packets >> 8);
ll_test_packets = 0;
} else {
return_params[0] = 0;
return_params[1] = 0;
ll_test_packets = 0;
}
return ll_reset();
}
uint8_t ll_set_random_address(uint8_t *params)
{
/* No checking. The host should know the rules. */
memcpy(&ll_random_address, params,
sizeof(struct hciLeSetRandomAddress));
return HCI_SUCCESS;
}
uint8_t ll_set_scan_params(uint8_t *params)
{
if (ll_state == SCANNING)
return HCI_ERR_Controller_Busy;
memcpy(&ll_scan_params, params, sizeof(struct hciLeSetScanParams));
return HCI_SUCCESS;
}
uint8_t ll_set_advertising_params(uint8_t *params)
{
if (ll_state == ADVERTISING)
return HCI_ERR_Controller_Busy;
memcpy(&ll_adv_params, params, sizeof(struct hciLeSetAdvParams));
switch (ll_adv_params.advType) {
case BLE_ADV_HEADER_PDU_TYPE_ADV_NONCONN_IND:
case BLE_ADV_HEADER_PDU_TYPE_ADV_SCAN_IND:
if (ll_adv_params.advIntervalMin <
(100000 / LL_ADV_INTERVAL_UNIT_US)) /* 100ms */
return HCI_ERR_Invalid_HCI_Command_Parameters;
/* Fall through */
case BLE_ADV_HEADER_PDU_TYPE_ADV_IND:
if (ll_adv_params.advIntervalMin > ll_adv_params.advIntervalMax)
return HCI_ERR_Invalid_HCI_Command_Parameters;
if (ll_adv_params.advIntervalMin <
(20000 / LL_ADV_INTERVAL_UNIT_US) || /* 20ms */
ll_adv_params.advIntervalMax >
(10240000 / LL_ADV_INTERVAL_UNIT_US)) /* 10.24s */
return HCI_ERR_Invalid_HCI_Command_Parameters;
ll_adv_interval_us = (((ll_adv_params.advIntervalMin +
ll_adv_params.advIntervalMax) / 2) *
LL_ADV_INTERVAL_UNIT_US);
/* Don't time out */
ll_adv_timeout_us = -1;
break;
case BLE_ADV_HEADER_PDU_TYPE_ADV_DIRECT_IND:
ll_adv_interval_us = LL_ADV_DIRECT_INTERVAL_US;
ll_adv_timeout_us = LL_ADV_DIRECT_TIMEOUT_US;
break;
default:
return HCI_ERR_Invalid_HCI_Command_Parameters;
}
/* Initialize the ADV PDU */
ll_adv_pdu.header_type_adv = 1;
ll_adv_pdu.header.adv.type = ll_adv_params.advType;
ll_adv_pdu.header.adv.txaddr = ll_adv_params.useRandomAddress;
if (ll_adv_params.useRandomAddress)
memcpy(ll_adv_pdu.payload, &ll_random_address,
BLUETOOTH_ADDR_OCTETS);
else
memcpy(ll_adv_pdu.payload, &ll_public_address,
BLUETOOTH_ADDR_OCTETS);
if (ll_adv_params.advType == BLE_ADV_HEADER_PDU_TYPE_ADV_DIRECT_IND) {
ll_adv_pdu.header.adv.rxaddr =
ll_adv_params.directRandomAddress;
memcpy(&ll_adv_pdu.payload[BLUETOOTH_ADDR_OCTETS],
ll_adv_params.directAddr,
sizeof(ll_adv_params.directAddr));
ll_adv_pdu.header.adv.length = 12;
} else {
ll_adv_pdu.header.adv.rxaddr = 0;
}
/* All other types get data from SetAdvertisingData */
/* Initialize the Scan Rsp PDU */
ll_scan_rsp_pdu.header_type_adv = 1;
ll_scan_rsp_pdu.header.adv.type = BLE_ADV_HEADER_PDU_TYPE_SCAN_RSP;
ll_scan_rsp_pdu.header.adv.txaddr = ll_adv_params.useRandomAddress;
if (ll_adv_params.useRandomAddress)
memcpy(ll_scan_rsp_pdu.payload, &ll_random_address,
BLUETOOTH_ADDR_OCTETS);
else
memcpy(ll_scan_rsp_pdu.payload, &ll_public_address,
BLUETOOTH_ADDR_OCTETS);
ll_scan_rsp_pdu.header.adv.rxaddr = 0;
return HCI_SUCCESS;
}
static uint32_t tx_end, rsp_end, tx_rsp_end;
struct ble_pdu ll_rcv_packet;
/**
* Advertises packet that has already been generated on given channel.
*
* This function also processes any incoming scan requests.
*
* @param chan The channel on which to advertise.
* @returns EC_SUCCESS on packet reception, otherwise error.
*/
int ble_ll_adv(int chan)
{
int rv;
ble_radio_init(BLE_ADV_ACCESS_ADDRESS, BLE_ADV_CRCINIT);
/* Change channel */
NRF51_RADIO_FREQUENCY = NRF51_RADIO_FREQUENCY_VAL(chan2freq(chan));
NRF51_RADIO_DATAWHITEIV = chan;
ble_tx(&ll_adv_pdu);
while (!RADIO_DONE)
;
tx_end = get_time().le.lo;
if (ll_adv_pdu.header.adv.type ==
BLE_ADV_HEADER_PDU_TYPE_ADV_NONCONN_IND)
return EC_SUCCESS;
rv = ble_rx(&ll_rcv_packet, 16000, 1);
if (rv != EC_SUCCESS)
return rv;
while (!RADIO_DONE)
;
tx_rsp_end = get_time().le.lo;
/* Check for valid responses */
switch (ll_rcv_packet.header.adv.type) {
case BLE_ADV_HEADER_PDU_TYPE_SCAN_REQ:
/* Scan requests are only allowed for ADV_IND and SCAN_IND */
if ((ll_adv_pdu.header.adv.type !=
BLE_ADV_HEADER_PDU_TYPE_ADV_IND &&
ll_adv_pdu.header.adv.type !=
BLE_ADV_HEADER_PDU_TYPE_ADV_SCAN_IND) ||
/* The advertising address needs to match */
(memcmp(&ll_rcv_packet.payload[BLUETOOTH_ADDR_OCTETS],
&ll_adv_pdu.payload[0], BLUETOOTH_ADDR_OCTETS))) {
/* Don't send the scan response */
radio_disable();
return rv;
}
break;
case BLE_ADV_HEADER_PDU_TYPE_CONNECT_REQ:
/* Don't send a scan response */
radio_disable();
/* Connecting is only allowed for ADV_IND and ADV_DIRECT_IND */
if (ll_adv_pdu.header.adv.type !=
BLE_ADV_HEADER_PDU_TYPE_ADV_IND &&
ll_adv_pdu.header.adv.type !=
BLE_ADV_HEADER_PDU_TYPE_ADV_DIRECT_IND)
return rv;
/* The advertising address needs to match */
if (memcmp(&ll_rcv_packet.payload[BLUETOOTH_ADDR_OCTETS],
&ll_adv_pdu.payload[0], BLUETOOTH_ADDR_OCTETS))
return rv;
/* The InitAddr address needs to match for ADV_DIRECT_IND */
if (ll_adv_pdu.header.adv.type ==
BLE_ADV_HEADER_PDU_TYPE_ADV_DIRECT_IND &&
memcmp(&ll_adv_pdu.payload[BLUETOOTH_ADDR_OCTETS],
&ll_rcv_packet.payload[0], BLUETOOTH_ADDR_OCTETS))
return rv;
/* Mark time that connect was received */
time_of_connect_req = NRF51_TIMER_CC(0, 1);
/*
* Enter connection state upon receiving
* a connect request packet
*/
ll_state = CONNECTION;
return rv;
break;
default: /* Unhandled response packet */
radio_disable();
return rv;
break;
}
CPRINTF("ADV %u Response %u %u\n", tx_end, rsp_end, tx_rsp_end);
return rv;
}
int ble_ll_adv_event(void)
{
int chan_idx;
int rv = EC_SUCCESS;
for (chan_idx = 0; chan_idx < 3; chan_idx++) {
if (ll_adv_params.advChannelMap & BIT(chan_idx)) {
rv = ble_ll_adv(chan_idx + 37);
if (rv != EC_SUCCESS)
return rv;
}
}
return rv;
}
void print_connection_state(void)
{
CPRINTF("vvvvvvvvvvvvvvvvvvvCONNECTION STATEvvvvvvvvvvvvvvvvvvv\n");
CPRINTF("Number of connections events processed: %d\n", ll_conn_events);
CPRINTF("Recovered from %d bad receives.\n", errors_recovered);
CPRINTF("Access addr(hex): %x\n", conn_params.access_addr);
CPRINTF("win_size(hex): %x\n", conn_params.win_size);
CPRINTF("win_offset(hex): %x\n", conn_params.win_offset);
CPRINTF("interval(hex): %x\n", conn_params.interval);
CPRINTF("latency(hex): %x\n", conn_params.latency);
CPRINTF("timeout(hex): %x\n", conn_params.timeout);
CPRINTF("channel_map(hex): %llx\n", conn_params.channel_map);
CPRINTF("hop(hex): %x\n", conn_params.hop_increment);
CPRINTF("SCA(hex): %x\n", conn_params.sleep_clock_accuracy);
CPRINTF("transmitWindowOffset: %d\n", conn_params.transmitWindowOffset);
CPRINTF("connInterval: %d\n", conn_params.connInterval);
CPRINTF("transmitWindowSize: %d\n", conn_params.transmitWindowSize);
CPRINTF("^^^^^^^^^^^^^^^^^^^CONNECTION STATE^^^^^^^^^^^^^^^^^^^\n");
}
int connected_communicate(void)
{
int rv;
long sleep_time;
int offset = 0;
uint64_t listen_time;
uint8_t comm_channel = get_next_data_channel(&remap_table);
if (num_consecutive_failures > 0) {
ble_radio_init(conn_params.access_addr,
conn_params.crc_init_val);
NRF51_RADIO_FREQUENCY =
NRF51_RADIO_FREQUENCY_VAL(chan2freq(comm_channel));
NRF51_RADIO_DATAWHITEIV = comm_channel;
listen_time = last_receive_time + conn_params.connInterval
- get_time().val + conn_params.transmitWindowSize;
/*
* This listens for 1.25 times the expected amount
* of time. This is a margin of error. This line is
* only called when a connection has failed (a missed
* packet). The slave and the master could have
* missed this packet due to a disagreement on when
* the packet should have arrived. We listen for
* slightly longer than expected in the case that
* there was a timing disagreement.
*/
rv = ble_rx(&ll_rcv_packet,
listen_time + (listen_time >> 2), 0);
} else {
if (!is_first_data_packet) {
sleep_time = receive_time +
conn_params.connInterval - get_time().val;
/*
* The time slept is 31/32 (96.875%) of the calculated
* required sleep time because the code to receive
* packets requires time to set up.
*/
usleep(sleep_time - (sleep_time >> 5));
} else {
last_receive_time = time_of_connect_req;
sleep_time = TRANSMIT_WINDOW_OFFSET_CONSTANT +
conn_params.transmitWindowOffset +
time_of_connect_req - get_time().val;
if (sleep_time >= 0) {
/*
* Radio is on for longer than needed for first
* packet to make sure that it is received.
*/
usleep(sleep_time - (sleep_time >> 2));
} else {
return EC_ERROR_TIMEOUT;
}
}
ble_radio_init(conn_params.access_addr,
conn_params.crc_init_val);
NRF51_RADIO_FREQUENCY =
NRF51_RADIO_FREQUENCY_VAL(chan2freq(comm_channel));
NRF51_RADIO_DATAWHITEIV = comm_channel;
/*
* Timing the transmit window is very hard to do when the code
* executing has actual effect on the timing. To combat this,
* the radio starts a little early, and terminates when the
* window normally should. The variable 'offset' represents
* how early the window opens in microseconds.
*/
if (!is_first_data_packet)
offset = last_receive_time + conn_params.connInterval
- get_time().val;
else
offset = 0;
rv = ble_rx(&ll_rcv_packet,
offset + conn_params.transmitWindowSize,
0);
}
/*
* The radio shortcuts have been set up so that transmission
* occurs automatically after receiving. The radio just needs
* to know where to find the packet to be sent.
*/
NRF51_RADIO_PACKETPTR = (uint32_t)packet_tb_sent;
receive_time = NRF51_TIMER_CC(0, 1);
if (rv != EC_SUCCESS)
receive_time = last_receive_time + conn_params.connInterval;
while (!RADIO_DONE)
;
last_receive_time = receive_time;
is_first_data_packet = 0;
return rv;
}
static uint32_t ll_adv_events;
static timestamp_t deadline;
static uint32_t start, end;
void bluetooth_ll_task(void)
{
uint64_t last_rx_time = 0;
CPRINTS("LL task init");
while (1) {
switch (ll_state) {
case ADVERTISING:
if (deadline.val == 0) {
CPRINTS("ADV @%pP", &ll_adv_pdu);
deadline.val = get_time().val +
(uint32_t)ll_adv_timeout_us;
ll_adv_events = 0;
}
ble_ll_adv_event();
ll_adv_events++;
if (ll_state == CONNECTION) {
receive_time = 0;
break;
}
/* sleep for 0-10ms */
usleep(ll_adv_interval_us + ll_pseudo_rand(10000));
if (get_time().val > deadline.val) {
ll_state = STANDBY;
break;
}
break;
case STANDBY:
deadline.val = 0;
CPRINTS("Standby %d events", ll_adv_events);
ll_adv_events = 0;
ll_conn_events = 0;
task_wait_event(-1);
connection_initialized = 0;
errors_recovered = 0;
break;
case TEST_RX:
if (ble_test_rx() == HCI_SUCCESS)
ll_test_packets++;
/* Packets come every 625us, sleep to save power */
usleep(300);
break;
case TEST_TX:
start = get_time().le.lo;
ble_test_tx();
ll_test_packets++;
end = get_time().le.lo;
usleep(625 - 82 - (end-start)); /* 625us */
break;
case UNINITIALIZED:
ble_radio_init(BLE_ADV_ACCESS_ADDRESS, BLE_ADV_CRCINIT);
ll_adv_events = 0;
task_wait_event(-1);
connection_initialized = 0;
packet_tb_sent = &tx_packet_1;
set_empty_data_packet(&tx_packet_1);
break;
case CONNECTION:
if (!connection_initialized) {
if (initialize_connection() != HCI_SUCCESS) {
ll_state = STANDBY;
break;
}
connection_initialized = 1;
last_rx_time = NRF51_TIMER_CC(0, 1);
}
if (connected_communicate() == EC_SUCCESS) {
if (num_consecutive_failures > 0)
++errors_recovered;
num_consecutive_failures = 0;
last_rx_time = get_time().val;
} else {
num_consecutive_failures++;
if ((get_time().val - last_rx_time) >
conn_params.connSupervisionTimeout) {
ll_state = STANDBY;
CPRINTF("EXITING CONNECTION STATE "
"DUE TO TIMEOUT.\n");
}
}
++ll_conn_events;
if (ll_state == STANDBY) {
CPRINTF("Exiting connection state/Entering "
"Standby state after %d connections "
"events\n", ll_conn_events);
print_connection_state();
}
break;
default:
CPRINTS("Unhandled State ll_state = %d", ll_state);
ll_state = UNINITIALIZED;
task_wait_event(-1);
}
}
}
|
fcc6978eaadc86b423d42f01241f30656adbd8ff
|
010279e2ba272d09e9d2c4e903722e5faba2cf7a
|
/contrib/restricted/libffi/testsuite/libffi.closures/cls_ulonglong.c
|
62f2cae63a9b48d9a2c46c148ed5864f23b5ea1c
|
[
"Apache-2.0",
"GPL-2.0-only",
"MIT"
] |
permissive
|
catboost/catboost
|
854c1a1f439a96f1ae6b48e16644be20aa04dba2
|
f5042e35b945aded77b23470ead62d7eacefde92
|
refs/heads/master
| 2023-09-01T12:14:14.174108
| 2023-09-01T10:01:01
| 2023-09-01T10:22:12
| 97,556,265
| 8,012
| 1,425
|
Apache-2.0
| 2023-09-11T03:32:32
| 2017-07-18T05:29:04
|
Python
|
UTF-8
|
C
| false
| false
| 1,497
|
c
|
cls_ulonglong.c
|
/* Area: closure_call
Purpose: Check return value long long.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
#include "ffitest.h"
static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
*(unsigned long long *)resp= 0xfffffffffffffffLL ^ *(unsigned long long *)args[0];
printf("%" PRIuLL ": %" PRIuLL "\n",*(unsigned long long *)args[0],
*(unsigned long long *)(resp));
}
typedef unsigned long long (*cls_ret_ulonglong)(unsigned long long);
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
ffi_type * cl_arg_types[2];
unsigned long long res;
cl_arg_types[0] = &ffi_type_uint64;
cl_arg_types[1] = NULL;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
&ffi_type_uint64, cl_arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_ret_ulonglong_fn, NULL, code) == FFI_OK);
res = (*((cls_ret_ulonglong)code))(214LL);
/* { dg-output "214: 1152921504606846761" } */
printf("res: %" PRIdLL "\n", res);
/* { dg-output "\nres: 1152921504606846761" } */
res = (*((cls_ret_ulonglong)code))(9223372035854775808LL);
/* { dg-output "\n9223372035854775808: 8070450533247928831" } */
printf("res: %" PRIdLL "\n", res);
/* { dg-output "\nres: 8070450533247928831" } */
exit(0);
}
|
d70ce9e9fbc13b2f3238a55306f07a66e9cb9474
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/third_party/liblouis/src/tests/attributeNames.c
|
94a8022468a1da97d08860972f8919b0133d0663
|
[
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LGPL-2.1-only",
"GPL-3.0-or-later",
"LGPL-2.1-or-later",
"BSD-3-Clause",
"LGPL-3.0-or-later",
"LGPL-3.0-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
C
| false
| false
| 930
|
c
|
attributeNames.c
|
/* liblouis Braille Translation and Back-Translation Library
Copyright (C) 2020 Swiss Library for the Blind, Visually Impaired and Print Disabled
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty. */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "internal.h"
int
main (int argc, char **argv)
{
const char* table;
// the following table contains an invalid attribute name and should not compile
table = "tests/tables/attribute/attributeName_invalid.utb";
if (lou_getTable(table)) {
fprintf(stderr, "%s should be invalid\n", table);
return 1;
}
table = "tests/tables/attribute/attributeName_valid.utb";
if (!lou_getTable(table)) {
fprintf(stderr, "%s should be valid\n", table);
return 1;
}
lou_free();
return 0;
}
|
8ae39b8724f2d49ce01673d7d8eb8aae24d5e897
|
e65a4dbfbfb0e54e59787ba7741efee12f7687f3
|
/devel/electron23/files/patch-chrome_common_chrome__switches.h
|
bd2f464144b586838a3633c6ece1c590534599dc
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] |
permissive
|
freebsd/freebsd-ports
|
86f2e89d43913412c4f6b2be3e255bc0945eac12
|
605a2983f245ac63f5420e023e7dce56898ad801
|
refs/heads/main
| 2023-08-30T21:46:28.720924
| 2023-08-30T19:33:44
| 2023-08-30T19:33:44
| 1,803,961
| 916
| 918
|
NOASSERTION
| 2023-09-08T04:06:26
| 2011-05-26T11:15:35
| null |
UTF-8
|
C
| false
| false
| 685
|
h
|
patch-chrome_common_chrome__switches.h
|
--- chrome/common/chrome_switches.h.orig 2023-02-01 18:43:13 UTC
+++ chrome/common/chrome_switches.h
@@ -265,12 +265,12 @@ extern const char kAllowNaClSocketAPI[];
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA)
+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
extern const char kEnableNewAppMenuIcon[];
extern const char kGuest[];
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
extern const char kListApps[];
extern const char kProfileBaseName[];
#endif
|
2207795e23c7bce9efcc53804501c79c2d840a55
|
1bb631c77f3ad487bab8add958214ca3fa07a636
|
/sesman/libsesman/sesman_clip_restrict.c
|
7f0fa3ce719d79f4c285b85eebbf5a0a1258d3df
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
neutrinolabs/xrdp
|
210b4d4c22f10e17464ad4e9646aff649916a2d5
|
a111a0fdfe2421ef600e40708b5f0168594cfb23
|
refs/heads/devel
| 2023-08-31T05:49:06.191559
| 2023-08-24T01:14:48
| 2023-08-24T01:14:48
| 1,660,127
| 4,864
| 2,575
|
Apache-2.0
| 2023-09-09T21:18:54
| 2011-04-25T14:31:17
|
C
|
UTF-8
|
C
| false
| false
| 2,218
|
c
|
sesman_clip_restrict.c
|
/**
* xrdp: A Remote Desktop Protocol server.
*
* Copyright (C) Jay Sorg 2004-2013
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
* @file sesman_clip_restrict.c
* @brief Routine for parsing clip restrict strings
*
*/
#if defined(HAVE_CONFIG_H)
#include <config_ac.h>
#endif
#include <stdio.h>
#include "arch.h"
#include "sesman_clip_restrict.h"
#include "string_calls.h"
/*
Map clipboard strings into bitmask values.
*/
static const struct bitmask_string clip_restrict_map[] =
{
{ CLIP_RESTRICT_TEXT, "text"},
{ CLIP_RESTRICT_FILE, "file"},
{ CLIP_RESTRICT_IMAGE, "image"},
{ CLIP_RESTRICT_ALL, "all"},
{ CLIP_RESTRICT_NONE, "none"},
/* Compatibility values */
{ CLIP_RESTRICT_ALL, "true"},
{ CLIP_RESTRICT_ALL, "yes"},
{ CLIP_RESTRICT_NONE, "false"},
BITMASK_STRING_END_OF_LIST
};
/******************************************************************************/
int
sesman_clip_restrict_string_to_bitmask(
const char *inputstr,
char *unrecognised,
unsigned int unrecognised_len)
{
return g_str_to_bitmask(inputstr, clip_restrict_map, ",",
unrecognised, unrecognised_len);
}
/******************************************************************************/
int
sesman_clip_restrict_mask_to_string(
int mask,
char output[],
unsigned int output_len)
{
int rv;
if (mask == CLIP_RESTRICT_NONE)
{
rv = snprintf(output, output_len, "none");
}
else if (mask == CLIP_RESTRICT_ALL)
{
rv = snprintf(output, output_len, "all");
}
else
{
rv = g_bitmask_to_str(mask, clip_restrict_map, ',', output, output_len);
}
return rv;
}
|
af805ffa4aa24147a6790c902583e94c84687845
|
8838eb997879add5759b6dfb23f9a646464e53ca
|
/src/cmds/profiler/tbprof.c
|
47c50615c7dffa1f067786315ec3c0e90337e5a1
|
[
"BSD-2-Clause"
] |
permissive
|
embox/embox
|
d6aacec876978522f01cdc4b8de37a668c6f4c80
|
98e3c06e33f3fdac10a29c069c20775568e0a6d1
|
refs/heads/master
| 2023-09-04T03:02:20.165042
| 2023-09-02T14:55:31
| 2023-09-02T14:55:31
| 33,078,138
| 1,087
| 325
|
BSD-2-Clause
| 2023-09-14T16:58:34
| 2015-03-29T15:27:48
|
C
|
UTF-8
|
C
| false
| false
| 2,252
|
c
|
tbprof.c
|
/**
* @file
* @brief
*
* @author Denis Deryugin
* @date 04.03.2014
*/
#include <framework/cmd/api.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <profiler/tracing/trace.h>
static int run_count = 1;
void initialize_hashtable() {
trace_block_hashtable_init();
}
void print_data_to_file(FILE *out) {
}
void run_cmd(const struct cmd *cmd, int argc, char *argv[], FILE *out) {
/* This function is for launching program that is beging tested with monitoring
* of all function calls and exits.
* Args: *cmd - pointer to the command that will be launched
* argc - the number of arguments passed to pragram
* argv - array of arguments
* out - output file to write profiling info
*/
int res = 0, run = 0;
clock_t begin, end;
set_profiling_mode(DISABLED);
initialize_hashtable();
printf("Initialization...\n");
/*trace_block_hashtable_init();*/
printf("Executing command\n");
begin = clock();
for (run = 0; run < run_count; run++) {
printf ("TBPROF RUN #%d\n", run);
set_profiling_mode(CYG_PROFILING);
res = cmd_exec(cmd, argc, argv);
set_profiling_mode(DISABLED);
}
end = clock();
printf("Program exited with code %d. Time: %0.3lfs. Profiling finished.\n",
res, 1. * (end - begin) / CLOCKS_PER_SEC);
argc++;
cmd = NULL;
print_data_to_file(out);
}
int main(int argc, char *argv[]) {
/* parse params */
const struct cmd *c_cmd;
int c_argc = argc, opt, argnum = 1;
FILE *out = NULL;
while (-1 != (opt = getopt(argc, argv, "chn:ed"))) {
argnum++;
switch (opt) {
case 'c':
/* execute command */
c_cmd = cmd_lookup(argv[argnum]);
run_cmd(c_cmd, c_argc - argnum, argv + argnum, out);
return 0;
break;
case 'n':
sscanf(optarg, "%d", &run_count);
argnum++;
break;
case 'e':
initialize_hashtable();
set_profiling_mode(CYG_PROFILING);
printf("cyg_profiling enabled.\n");
return 0;
break;
case 'd':
set_profiling_mode(DISABLED);
printf("cyg_profiling disabled.\n");
return 0;
break;
case 'h':
printf("Example: tbprof [-n count] -c [cmd]\nUse man tbprof for more info.\n");
return 0;
break;
}
}
printf("Wrong arguments. tbprof -h for usage.\n");
return 0;
}
|
4d9e3b0565b9dae3260f943c7decbcb37b62d19b
|
cfb9808611fc50f09dca006e25ef32f988cc146c
|
/ext/posix/fnmatch.c
|
d4491409140673cfd6b6fe753c68c26a27306716
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
luaposix/luaposix
|
6d719704b458ad3291c41eed17572da4a0470dc7
|
f12f957224d12257c882f43fde5cc442bdf44002
|
refs/heads/master
| 2023-08-30T23:31:03.556885
| 2023-08-25T05:16:21
| 2023-08-28T17:40:39
| 1,523,340
| 421
| 108
|
MIT
| 2023-08-28T17:40:40
| 2011-03-24T23:02:16
|
C
|
UTF-8
|
C
| false
| false
| 2,273
|
c
|
fnmatch.c
|
/*
* POSIX library for Lua 5.1, 5.2, 5.3 & 5.4.
* Copyright (C) 2013-2023 Gary V. Vaughan
* Copyright (C) 2010-2013 Reuben Thomas <rrt@sc3d.org>
* Copyright (C) 2008-2010 Natanael Copa <natanael.copa@gmail.com>
* Clean up and bug fixes by Leo Razoumov <slonik.az@gmail.com> 2006-10-11
* Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> 07 Apr 2006 23:17:49
* Based on original by Claudio Terra for Lua 3.x.
* With contributions by Roberto Ierusalimschy.
* With documentation from Steve Donovan 2012
*/
/***
Filename matching.
Functions and constants for matching known filenames against shell-style
pattern strings.
@see posix.glob
@module posix.fnmatch
*/
#include <fnmatch.h>
#include "_helpers.c"
/***
Match a filename against a shell pattern.
@function fnmatch
@string pat shell pattern
@string name filename
@int[opt=0] flags optional
@treturn[1] int `0`, if successful
@treturn[2] int `FNM_NOMATCH`
@treturn[3] int some other non-zero integer if fnmatch itself failed
@see fnmatch(3)
*/
static int
Pfnmatch(lua_State *L)
{
const char *pattern = luaL_checkstring(L, 1);
const char *string = luaL_checkstring(L, 2);
int flags = optint(L, 3, 0);
int res;
checknargs(L, 3);
return pushintegerresult(fnmatch(pattern, string, flags));
}
static const luaL_Reg posix_fnmatch_fns[] =
{
LPOSIX_FUNC( Pfnmatch ),
{NULL, NULL}
};
/***
Constants.
@section constants
*/
/***
Fnmatch constants.
Any constants not available in the underlying system will be `nil` valued.
@table posix.fnmatch
@int FNM_PATHNAME slashes in pathname must be matched by slash in pattern
@int FNM_NOESCAPE disable backslash escaping
@int FNM_NOMATCH match failed
@int FNM_PERIOD periods in pathname must be matched by period in pattern
@usage
-- Print fnmatch constants supported on this host.
for name, value in pairs (require "posix.fnmatch") do
if type (value) == "number" then
print (name, value)
end
end
*/
LUALIB_API int
luaopen_posix_fnmatch(lua_State *L)
{
luaL_newlib(L, posix_fnmatch_fns);
lua_pushstring(L, LPOSIX_VERSION_STRING("fnmatch"));
lua_setfield(L, -2, "version");
/* from fnmatch.h */
LPOSIX_CONST( FNM_PATHNAME );
LPOSIX_CONST( FNM_NOESCAPE );
LPOSIX_CONST( FNM_NOMATCH );
LPOSIX_CONST( FNM_PERIOD );
return 1;
}
|
a8fc94758ff8e4e8c84f0ef169b40d546fbc68df
|
e814383d36a10839104efaa4df277996ab220fa3
|
/ompi/mca/sharedfp/sm/sharedfp_sm_request_position.c
|
82370736ff363b12f02c187441442671a8a8a362
|
[
"mpich2",
"BSD-3-Clause-Open-MPI"
] |
permissive
|
open-mpi/ompi
|
a1d7483ae1d83dd8fd8ae3ee95e832e0a0ee04e3
|
1edfdb025c4450f694600083ad871cf06c8d45cd
|
refs/heads/main
| 2023-09-01T01:30:02.040705
| 2023-08-29T17:32:18
| 2023-08-29T17:32:18
| 24,107,001
| 2,008
| 973
|
NOASSERTION
| 2023-09-14T20:59:26
| 2014-09-16T16:08:30
|
C
|
UTF-8
|
C
| false
| false
| 3,071
|
c
|
sharedfp_sm_request_position.c
|
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2013-2015 University of Houston. All rights reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "sharedfp_sm.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/sharedfp/base/base.h"
/*use a semaphore to lock the shared memory*/
#include <semaphore.h>
int mca_sharedfp_sm_request_position(ompio_file_t *fh,
int bytes_requested,
OMPI_MPI_OFFSET_TYPE *offset)
{
int ret = OMPI_SUCCESS;
OMPI_MPI_OFFSET_TYPE position = 0;
OMPI_MPI_OFFSET_TYPE old_offset;
struct mca_sharedfp_sm_data * sm_data = NULL;
struct mca_sharedfp_sm_offset * sm_offset_ptr = NULL;
struct mca_sharedfp_base_data_t *sh = NULL;
sh = fh->f_sharedfp_data;
sm_data = sh->selected_module_data;
*offset = 0;
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"Acquiring lock, rank=%d...",fh->f_rank);
}
sm_offset_ptr = sm_data->sm_offset_ptr;
/* Acquire an exclusive lock */
sem_wait(sm_data->mutex);
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"Succeeded! Acquired sm lock.for rank=%d\n",fh->f_rank);
}
old_offset=sm_offset_ptr->offset;
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"Read last_offset=%lld!\n",old_offset);
}
position = old_offset + bytes_requested;
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"old_offset=%lld, bytes_requested=%d, new offset=%lld!\n",old_offset,bytes_requested,position);
}
sm_offset_ptr->offset=position;
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"Releasing sm lock...rank=%d",fh->f_rank);
}
sem_post(sm_data->mutex);
if ( mca_sharedfp_sm_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
"Released lock! released lock.for rank=%d\n",fh->f_rank);
}
*offset = old_offset;
return ret;
}
|
3ea800c082659c73dc605fcbf2723e8a6a18fd37
|
69db0de8c61c7cba691193edd3f087fdb54351c2
|
/include/berry_pouch.h
|
f478ff19478ae54800302fc885cfdee1d07e085f
|
[] |
no_license
|
pret/pokefirered
|
5363c332321c7650d4c85be6aa2e8baf3acda162
|
f8741615bfa0123e38680f30103f217c269ec96a
|
refs/heads/master
| 2023-08-31T15:22:19.498797
| 2023-08-31T15:15:29
| 2023-08-31T15:15:29
| 115,841,713
| 847
| 709
| null | 2023-09-12T22:48:38
| 2017-12-31T04:07:51
|
C
|
UTF-8
|
C
| false
| false
| 729
|
h
|
berry_pouch.h
|
#ifndef GUARD_BERRY_POUCH_H
#define GUARD_BERRY_POUCH_H
#include "task.h"
enum BerryPouchType
{
BERRYPOUCH_FROMFIELD,
BERRYPOUCH_FROMPARTYGIVE,
BERRYPOUCH_FROMMARTSELL,
BERRYPOUCH_FROMPOKEMONSTORAGEPC,
BERRYPOUCH_FROMBATTLE,
BERRYPOUCH_FROMBERRYCRUSH,
BERRYPOUCH_NA
};
void BerryPouch_StartFadeToExitCallback(u8 taskId);
void BerryPouch_SetExitCallback(void (*exitCallback)(void));
void InitBerryPouch(u8 type, void (*savedCallback)(void), u8 allowSelect);
void DisplayItemMessageInBerryPouch(u8 taskId, u8 fontId, const u8 * str, TaskFunc followUpFunc);
void Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu(u8 taskId);
void BerryPouch_CursorResetToTop(void);
#endif //GUARD_BERRY_POUCH_H
|
f124635dcd084d0908c95661b65ca17938d7921d
|
9de0cec678bc4a3bec2b4adabef9f39ff5b4afac
|
/PWGLF/SPECTRA/PiKaPr/TestAOD/HighLevelQA/FindOutliers.C
|
0edf7acc7188e36ff075346d3203383f86de903e
|
[] |
permissive
|
alisw/AliPhysics
|
91bf1bd01ab2af656a25ff10b25e618a63667d3e
|
5df28b2b415e78e81273b0d9bf5c1b99feda3348
|
refs/heads/master
| 2023-08-31T20:41:44.927176
| 2023-08-31T14:51:12
| 2023-08-31T14:51:12
| 61,661,378
| 129
| 1,150
|
BSD-3-Clause
| 2023-09-14T18:48:45
| 2016-06-21T19:31:29
|
C++
|
UTF-8
|
C
| false
| false
| 56,351
|
c
|
FindOutliers.C
|
//////////////////////////////////////////////////////////////////////////////////////
// FindOutliers.C (called by AODQAChecks.C) //
// //
// Written by John Groh //
//////////////////////////////////////////////////////////////////////////////////////
#include <fstream>
using namespace std;
void FindOutliers(Int_t runs[],
const Int_t nRuns,
Bool_t useMC,
Int_t icut,
const Float_t nSigmaCut,
TFile*& fout,
TH1F*& TPCnsigMeanTrendPion,
TH1F*& TPCnsigMeanTrendKaon,
TH1F*& TPCnsigMeanTrendProton,
TH1F*& TPCnsigSigmaTrendPion,
TH1F*& TPCnsigSigmaTrendKaon,
TH1F*& TPCnsigSigmaTrendProton,
TH1F*& TOFnsigMeanTrendPion,
TH1F*& TOFnsigMeanTrendKaon,
TH1F*& TOFnsigMeanTrendProton,
TH1F*& TOFnsigSigmaTrendPion,
TH1F*& TOFnsigSigmaTrendKaon,
TH1F*& TOFnsigSigmaTrendProton,
TH1F*& IntegRawYieldAll,
TH1F*& EfficiencyPiPlus,
TH1F*& EfficiencyKPlus,
TH1F*& EfficiencyProton,
TH1F*& EfficiencyPiMinus,
TH1F*& EfficiencyKMinus,
TH1F*& EfficiencyAntiproton,
TH1F*& MatchEffPos,
TH1F*& MatchEffNeg)
{
Printf("\n\n\n--- Inside function FindOutliers() ---\n\n\n");
// output to a text file
char name[100];
if (useMC) sprintf(name, "results/output_MC_icut=%i_nSigmaCut=%.1f.txt",icut,nSigmaCut);
else sprintf(name, "results/output_DATA_icut=%i_nSigmaCut=%.1f.txt",icut,nSigmaCut);
ofstream outFile(name);
outFile << name << endl;
outFile << "Info about outlers with useMC = " << useMC << ", icut = " << icut << ", and nSigmaCut = " << nSigmaCut << endl;
// this array stores whether each run is good or not
// each run is assumed to be good unless its flag is set otherwise
Bool_t isRunGood[nRuns];
for (Int_t irun=0; irun<nRuns; irun++)
isRunGood[irun] = true;
// for drawing lines at 0, -3, and 3
TF1 * fLine1 = new TF1("fLine1","0",0,nRuns);
TF1 * fLine2 = new TF1("fLine2","-3",0,nRuns);
TF1 * fLine3 = new TF1("fLine3","3",0,nRuns);
fLine1->SetLineColor(7);
fLine2->SetLineColor(kBlack);
fLine3->SetLineColor(kBlack);
fLine1->SetLineStyle(7);
fLine2->SetLineStyle(7);
fLine3->SetLineStyle(7);
fLine1->SetLineWidth(1);
fLine2->SetLineWidth(1);
fLine3->SetLineWidth(1);
//-----------------------------------------
// nsigma projection fit means and sigmas -
//-----------------------------------------
// because the error bars are really small for data and larger for MC, the normal method doesn't work for data
if (useMC)
{
// fit horizontal lines to the histograms and use the value of the y-intercept as the mean
TF1 * fitFuncTPCnsigMeanPion = new TF1("fitFuncTPCnsigMeanPion","[0]");
TF1 * fitFuncTPCnsigMeanKaon = new TF1("fitFuncTPCnsigMeanKaon","[0]");
TF1 * fitFuncTPCnsigMeanProton = new TF1("fitFuncTPCnsigMeanProton","[0]");
TF1 * fitFuncTPCnsigSigmaPion = new TF1("fitFuncTPCnsigSigmaPion","[0]");
TF1 * fitFuncTPCnsigSigmaKaon = new TF1("fitFuncTPCnsigSigmaKaon","[0]");
TF1 * fitFuncTPCnsigSigmaProton = new TF1("fitFuncTPCnsigSigmaProton","[0]");
TF1 * fitFuncTOFnsigMeanPion = new TF1("fitFuncTOFnsigMeanPion","[0]");
TF1 * fitFuncTOFnsigMeanKaon = new TF1("fitFuncTOFnsigMeanKaon","[0]");
TF1 * fitFuncTOFnsigMeanProton = new TF1("fitFuncTOFnsigMeanProton","[0]");
TF1 * fitFuncTOFnsigSigmaPion = new TF1("fitFuncTOFnsigSigmaPion","[0]");
TF1 * fitFuncTOFnsigSigmaKaon = new TF1("fitFuncTOFnsigSigmaKaon","[0]");
TF1 * fitFuncTOFnsigSigmaProton = new TF1("fitFuncTOFnsigSigmaProton","[0]");
TPCnsigMeanTrendPion->Fit(fitFuncTPCnsigMeanPion,"QN");
TPCnsigMeanTrendKaon->Fit(fitFuncTPCnsigMeanKaon,"QN");
TPCnsigMeanTrendProton->Fit(fitFuncTPCnsigMeanProton,"QN");
TPCnsigSigmaTrendPion->Fit(fitFuncTPCnsigSigmaPion,"QN");
TPCnsigSigmaTrendKaon->Fit(fitFuncTPCnsigSigmaKaon,"QN");
TPCnsigSigmaTrendProton->Fit(fitFuncTPCnsigSigmaProton,"QN");
TOFnsigMeanTrendPion->Fit(fitFuncTOFnsigMeanPion,"QN");
TOFnsigMeanTrendKaon->Fit(fitFuncTOFnsigMeanKaon,"QN");
TOFnsigMeanTrendProton->Fit(fitFuncTOFnsigMeanProton,"QN");
TOFnsigSigmaTrendPion->Fit(fitFuncTOFnsigSigmaPion,"QN");
TOFnsigSigmaTrendKaon->Fit(fitFuncTOFnsigSigmaKaon,"QN");
TOFnsigSigmaTrendProton->Fit(fitFuncTOFnsigSigmaProton,"QN");
Float_t meanTPCnsigMeanPion = fitFuncTPCnsigMeanPion->GetParameter(0);
Float_t meanTPCnsigMeanKaon = fitFuncTPCnsigMeanKaon->GetParameter(0);
Float_t meanTPCnsigMeanProton = fitFuncTPCnsigMeanProton->GetParameter(0);
Float_t meanTPCnsigSigmaPion = fitFuncTPCnsigSigmaPion->GetParameter(0);
Float_t meanTPCnsigSigmaKaon = fitFuncTPCnsigSigmaKaon->GetParameter(0);
Float_t meanTPCnsigSigmaProton = fitFuncTPCnsigSigmaProton->GetParameter(0);
Float_t meanTOFnsigMeanPion = fitFuncTOFnsigMeanPion->GetParameter(0);
Float_t meanTOFnsigMeanKaon = fitFuncTOFnsigMeanKaon->GetParameter(0);
Float_t meanTOFnsigMeanProton = fitFuncTOFnsigMeanProton->GetParameter(0);
Float_t meanTOFnsigSigmaPion = fitFuncTOFnsigSigmaPion->GetParameter(0);
Float_t meanTOFnsigSigmaKaon = fitFuncTOFnsigSigmaKaon->GetParameter(0);
Float_t meanTOFnsigSigmaProton = fitFuncTOFnsigSigmaProton->GetParameter(0);
// report outliers distributed more than nSigmaCut sigma away from the median
// also fill histograms to plot the deviation in number of sigmas as a function of the run number
TH1F * hDevTPCnsigMeanPion = new TH1F("hDevTPCnsigMeanPion","",nRuns,0,nRuns);
TH1F * hDevTPCnsigMeanKaon = new TH1F("hDevTPCnsigMeanKaon","",nRuns,0,nRuns);
TH1F * hDevTPCnsigMeanProton = new TH1F("hDevTPCnsigMeanProton","",nRuns,0,nRuns);
TH1F * hDevTPCnsigSigmaPion = new TH1F("hDevTPCnsigSigmaPion","",nRuns,0,nRuns);
TH1F * hDevTPCnsigSigmaKaon = new TH1F("hDevTPCnsigSigmaKaon","",nRuns,0,nRuns);
TH1F * hDevTPCnsigSigmaProton = new TH1F("hDevTPCnsigSigmaProton","",nRuns,0,nRuns);
TH1F * hDevTOFnsigMeanPion = new TH1F("hDevTOFnsigMeanPion","",nRuns,0,nRuns);
TH1F * hDevTOFnsigMeanKaon = new TH1F("hDevTOFnsigMeanKaon","",nRuns,0,nRuns);
TH1F * hDevTOFnsigMeanProton = new TH1F("hDevTOFnsigMeanProton","",nRuns,0,nRuns);
TH1F * hDevTOFnsigSigmaPion = new TH1F("hDevTOFnsigSigmaPion","",nRuns,0,nRuns);
TH1F * hDevTOFnsigSigmaKaon = new TH1F("hDevTOFnsigSigmaKaon","",nRuns,0,nRuns);
TH1F * hDevTOFnsigSigmaProton = new TH1F("hDevTOFnsigSigmaProton","",nRuns,0,nRuns);
cout << "\n\n\n!!! RUNS FOR WHICH AN NSIGMA FIT PARAMETER IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
outFile << "\n\n\n!!! RUNS FOR WHICH AN NSIGMA FIT PARAMETER IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
Int_t nBadNSig = 0;
for (Int_t irun=0; irun<nRuns; irun++)
{
Float_t devTPCnsigMeanPion = (TPCnsigMeanTrendPion->GetBinContent(irun+1) - meanTPCnsigMeanPion) / TPCnsigMeanTrendPion->GetBinError(irun+1);
Float_t devTPCnsigMeanKaon = (TPCnsigMeanTrendKaon->GetBinContent(irun+1) - meanTPCnsigMeanKaon) / TPCnsigMeanTrendKaon->GetBinError(irun+1);
Float_t devTPCnsigMeanProton = (TPCnsigMeanTrendProton->GetBinContent(irun+1) - meanTPCnsigMeanProton) / TPCnsigMeanTrendProton->GetBinError(irun+1);
Float_t devTPCnsigSigmaPion = (TPCnsigSigmaTrendPion->GetBinContent(irun+1) - meanTPCnsigSigmaPion) / TPCnsigSigmaTrendPion->GetBinError(irun+1);
Float_t devTPCnsigSigmaKaon = (TPCnsigSigmaTrendKaon->GetBinContent(irun+1) - meanTPCnsigSigmaKaon) / TPCnsigSigmaTrendKaon->GetBinError(irun+1);
Float_t devTPCnsigSigmaProton = (TPCnsigSigmaTrendProton->GetBinContent(irun+1) - meanTPCnsigSigmaProton) / TPCnsigSigmaTrendProton->GetBinError(irun+1);
Float_t devTOFnsigMeanPion = (TOFnsigMeanTrendPion->GetBinContent(irun+1) - meanTOFnsigMeanPion) / TOFnsigMeanTrendPion->GetBinError(irun+1);
Float_t devTOFnsigMeanKaon = (TOFnsigMeanTrendKaon->GetBinContent(irun+1) - meanTOFnsigMeanKaon) / TOFnsigMeanTrendKaon->GetBinError(irun+1);
Float_t devTOFnsigMeanProton = (TOFnsigMeanTrendProton->GetBinContent(irun+1) - meanTOFnsigMeanProton) / TOFnsigMeanTrendProton->GetBinError(irun+1);
Float_t devTOFnsigSigmaPion = (TOFnsigSigmaTrendPion->GetBinContent(irun+1) - meanTOFnsigSigmaPion) / TOFnsigSigmaTrendPion->GetBinError(irun+1);
Float_t devTOFnsigSigmaKaon = (TOFnsigSigmaTrendKaon->GetBinContent(irun+1) - meanTOFnsigSigmaKaon) / TOFnsigSigmaTrendKaon->GetBinError(irun+1);
Float_t devTOFnsigSigmaProton = (TOFnsigSigmaTrendProton->GetBinContent(irun+1) - meanTOFnsigSigmaProton) / TOFnsigSigmaTrendProton->GetBinError(irun+1);
hDevTPCnsigMeanPion->SetBinContent(irun+1,devTPCnsigMeanPion);
hDevTPCnsigMeanKaon->SetBinContent(irun+1,devTPCnsigMeanKaon);
hDevTPCnsigMeanProton->SetBinContent(irun+1,devTPCnsigMeanProton);
hDevTPCnsigSigmaPion->SetBinContent(irun+1,devTPCnsigSigmaPion);
hDevTPCnsigSigmaKaon->SetBinContent(irun+1,devTPCnsigSigmaKaon);
hDevTPCnsigSigmaProton->SetBinContent(irun+1,devTPCnsigSigmaProton);
hDevTOFnsigMeanPion->SetBinContent(irun+1,devTOFnsigMeanPion);
hDevTOFnsigMeanKaon->SetBinContent(irun+1,devTOFnsigMeanKaon);
hDevTOFnsigMeanProton->SetBinContent(irun+1,devTOFnsigMeanProton);
hDevTOFnsigSigmaPion->SetBinContent(irun+1,devTOFnsigSigmaPion);
hDevTOFnsigSigmaKaon->SetBinContent(irun+1,devTOFnsigSigmaKaon);
hDevTOFnsigSigmaProton->SetBinContent(irun+1,devTOFnsigSigmaProton);
if (TMath::Abs(devTPCnsigMeanPion) > nSigmaCut || TMath::Abs(devTPCnsigMeanKaon) > nSigmaCut || TMath::Abs(devTPCnsigMeanProton) > nSigmaCut ||
TMath::Abs(devTPCnsigSigmaPion) > nSigmaCut || TMath::Abs(devTPCnsigSigmaKaon) > nSigmaCut || TMath::Abs(devTPCnsigSigmaProton) > nSigmaCut ||
TMath::Abs(devTOFnsigMeanPion) > nSigmaCut || TMath::Abs(devTOFnsigMeanKaon) > nSigmaCut || TMath::Abs(devTOFnsigMeanProton) > nSigmaCut ||
TMath::Abs(devTOFnsigSigmaPion) > nSigmaCut || TMath::Abs(devTOFnsigSigmaKaon) > nSigmaCut || TMath::Abs(devTOFnsigSigmaProton) > nSigmaCut)
{
cout << runs[irun];
outFile << runs[irun] << endl;
if (TMath::Abs(devTPCnsigMeanPion) > nSigmaCut)
{
cout << " - TPC Pion Mean";
outFile << " - TPC Pion Mean";
}
if (TMath::Abs(devTPCnsigMeanKaon) > nSigmaCut)
{
cout << " - TPC Kaon Mean";
outFile << " - TPC Kaon Mean";
}
if (TMath::Abs(devTPCnsigMeanProton) > nSigmaCut)
{
cout << " - TPC Proton Mean";
outFile << " - TPC Proton Mean";
}
if (TMath::Abs(devTPCnsigSigmaPion) > nSigmaCut)
{
cout << " - TPC Pion Sigma";
outFile << " - TPC Pion Sigma";
}
if (TMath::Abs(devTPCnsigSigmaKaon) > nSigmaCut)
{
cout << " - TPC Kaon Sigma";
outFile << " - TPC Kaon Sigma";
}
if (TMath::Abs(devTPCnsigSigmaProton) > nSigmaCut)
{
cout << " - TPC Proton Sigma";
outFile << " - TPC Proton Sigma";
}
if (TMath::Abs(devTOFnsigMeanPion) > nSigmaCut)
{
cout << " - TOF Pion Mean";
outFile << " - TOF Pion Mean";
}
if (TMath::Abs(devTOFnsigMeanKaon) > nSigmaCut)
{
cout << " - TOF Kaon Mean";
outFile << " - TOF Kaon Mean";
}
if (TMath::Abs(devTOFnsigMeanProton) > nSigmaCut)
{
cout << " - TOF Proton Mean";
outFile << " - TOF Proton Mean";
}
if (TMath::Abs(devTOFnsigSigmaPion) > nSigmaCut)
{
cout << " - TOF Pion Sigma";
outFile << " - TOF Pion Sigma";
}
if (TMath::Abs(devTOFnsigSigmaKaon) > nSigmaCut)
{
cout << " - TOF Kaon Sigma";
outFile << " - TOF Kaon Sigma";
}
if (TMath::Abs(devTOFnsigSigmaProton) > nSigmaCut)
{
cout << " - TOF Proton Sigma";
outFile << " - TOF Proton Sigma";
}
cout << endl;
outFile << endl;
nBadNSig++;
if (isRunGood[irun]) isRunGood[irun] = kFALSE; // flag run as bad
}
}
cout << "Number of rejected runs: " << nBadNSig << endl;
outFile << "Number of rejected runs: " << nBadNSig << endl;
}
// for data, I have to fit the projection with a gaussian and cut on nSigmaCut using the sigma from the gaussian
else
{
// project the histos onto the y-axis
TH1F * TPCnsigMeanPionProj = new TH1F("TPCnsigMeanPionProj","",100,-1,1);
TH1F * TPCnsigMeanKaonProj = new TH1F("TPCnsigMeanKaonProj","",100,-1,1);
TH1F * TPCnsigMeanProtonProj = new TH1F("TPCnsigMeanProtonProj","",100,-1,1);
TH1F * TPCnsigSigmaPionProj = new TH1F("TPCnsigSigmaPionProj","",100,0,2);
TH1F * TPCnsigSigmaKaonProj = new TH1F("TPCnsigSigmaKaonProj","",100,0,2);
TH1F * TPCnsigSigmaProtonProj = new TH1F("TPCnsigSigmaProtonProj","",100,0,2);
TH1F * TOFnsigMeanPionProj = new TH1F("TOFnsigMeanPionProj","",100,-1,1);
TH1F * TOFnsigMeanKaonProj = new TH1F("TOFnsigMeanKaonProj","",100,-1,1);
TH1F * TOFnsigMeanProtonProj = new TH1F("TOFnsigMeanProtonProj","",100,-1,1);
TH1F * TOFnsigSigmaPionProj = new TH1F("TOFnsigSigmaPionProj","",100,0,2);
TH1F * TOFnsigSigmaKaonProj = new TH1F("TOFnsigSigmaKaonProj","",100,0,2);
TH1F * TOFnsigSigmaProtonProj = new TH1F("TOFnsigSigmaProtonProj","",100,0,2);
for (Int_t irun=0; irun<nRuns; irun++)
{
TPCnsigMeanPionProj->Fill(TPCnsigMeanTrendPion->GetBinContent(irun+1));
TPCnsigMeanKaonProj->Fill(TPCnsigMeanTrendKaon->GetBinContent(irun+1));
TPCnsigMeanProtonProj->Fill(TPCnsigMeanTrendProton->GetBinContent(irun+1));
TPCnsigSigmaPionProj->Fill(TPCnsigSigmaTrendPion->GetBinContent(irun+1));
TPCnsigSigmaKaonProj->Fill(TPCnsigSigmaTrendKaon->GetBinContent(irun+1));
TPCnsigSigmaProtonProj->Fill(TPCnsigSigmaTrendProton->GetBinContent(irun+1));
TOFnsigMeanPionProj->Fill(TOFnsigMeanTrendPion->GetBinContent(irun+1));
TOFnsigMeanKaonProj->Fill(TOFnsigMeanTrendKaon->GetBinContent(irun+1));
TOFnsigMeanProtonProj->Fill(TOFnsigMeanTrendProton->GetBinContent(irun+1));
TOFnsigSigmaPionProj->Fill(TOFnsigSigmaTrendPion->GetBinContent(irun+1));
TOFnsigSigmaKaonProj->Fill(TOFnsigSigmaTrendKaon->GetBinContent(irun+1));
TOFnsigSigmaProtonProj->Fill(TOFnsigSigmaTrendProton->GetBinContent(irun+1));
}
// fit with gaussians and reject runs that lie more than nSigmaCut from the mean
TF1 * fTPCnsigMeanPionFit = new TF1("fTPCnsigMeanPionFit","gaus");
TF1 * fTPCnsigMeanKaonFit = new TF1("fTPCnsigMeanKaonFit","gaus");
TF1 * fTPCnsigMeanProtonFit = new TF1("fTPCnsigMeanProtonFit","gaus");
TF1 * fTPCnsigSigmaPionFit = new TF1("fTPCnsigSigmaPionFit","gaus");
TF1 * fTPCnsigSigmaKaonFit = new TF1("fTPCnsigSigmaKaonFit","gaus");
TF1 * fTPCnsigSigmaProtonFit = new TF1("fTPCnsigSigmaProtonFit","gaus");
TF1 * fTOFnsigMeanPionFit = new TF1("fTOFnsigMeanPionFit","gaus");
TF1 * fTOFnsigMeanKaonFit = new TF1("fTOFnsigMeanKaonFit","gaus");
TF1 * fTOFnsigMeanProtonFit = new TF1("fTOFnsigMeanProtonFit","gaus");
TF1 * fTOFnsigSigmaPionFit = new TF1("fTOFnsigSigmaPionFit","gaus");
TF1 * fTOFnsigSigmaKaonFit = new TF1("fTOFnsigSigmaKaonFit","gaus");
TF1 * fTOFnsigSigmaProtonFit = new TF1("fTOFnsigSigmaProtonFit","gaus");
TPCnsigMeanPionProj->Fit(fTPCnsigMeanPionFit,"N","",-1,1);
TPCnsigMeanKaonProj->Fit(fTPCnsigMeanKaonFit,"N","",-1,1);
TPCnsigMeanProtonProj->Fit(fTPCnsigMeanProtonFit,"N","",-1,1);
TPCnsigSigmaPionProj->Fit(fTPCnsigSigmaPionFit,"N","",0,2);
TPCnsigSigmaKaonProj->Fit(fTPCnsigSigmaKaonFit,"N","",0,2);
TPCnsigSigmaProtonProj->Fit(fTPCnsigSigmaProtonFit,"N","",0,2);
TOFnsigMeanPionProj->Fit(fTOFnsigMeanPionFit,"N","",-1,1);
TOFnsigMeanKaonProj->Fit(fTOFnsigMeanKaonFit,"N","",-1,1);
TOFnsigMeanProtonProj->Fit(fTOFnsigMeanProtonFit,"N","",-1,1);
TOFnsigSigmaPionProj->Fit(fTOFnsigSigmaPionFit,"N","",0,2);
TOFnsigSigmaKaonProj->Fit(fTOFnsigSigmaKaonFit,"N","",0,2);
TOFnsigSigmaProtonProj->Fit(fTOFnsigSigmaProtonFit,"N","",0,2);
// means and sigmas from the gaussian fits
Float_t meanTPCnsigMeanPion = fTPCnsigMeanPionFit->GetParameter(1);
Float_t meanTPCnsigMeanKaon = fTPCnsigMeanKaonFit->GetParameter(1);
Float_t meanTPCnsigMeanProton = fTPCnsigMeanProtonFit->GetParameter(1);
Float_t meanTPCnsigSigmaPion = fTPCnsigSigmaPionFit->GetParameter(1);
Float_t meanTPCnsigSigmaKaon = fTPCnsigSigmaKaonFit->GetParameter(1);
Float_t meanTPCnsigSigmaProton = fTPCnsigSigmaProtonFit->GetParameter(1);
Float_t meanTOFnsigMeanPion = fTOFnsigMeanPionFit->GetParameter(1);
Float_t meanTOFnsigMeanKaon = fTOFnsigMeanKaonFit->GetParameter(1);
Float_t meanTOFnsigMeanProton = fTOFnsigMeanProtonFit->GetParameter(1);
Float_t meanTOFnsigSigmaPion = fTOFnsigSigmaPionFit->GetParameter(1);
Float_t meanTOFnsigSigmaKaon = fTOFnsigSigmaKaonFit->GetParameter(1);
Float_t meanTOFnsigSigmaProton = fTOFnsigSigmaProtonFit->GetParameter(1);
Float_t sigTPCnsigMeanPion = fTPCnsigMeanPionFit->GetParameter(2);
Float_t sigTPCnsigMeanKaon = fTPCnsigMeanKaonFit->GetParameter(2);
Float_t sigTPCnsigMeanProton = fTPCnsigMeanProtonFit->GetParameter(2);
Float_t sigTPCnsigSigmaPion = fTPCnsigSigmaPionFit->GetParameter(2);
Float_t sigTPCnsigSigmaKaon = fTPCnsigSigmaKaonFit->GetParameter(2);
Float_t sigTPCnsigSigmaProton = fTPCnsigSigmaProtonFit->GetParameter(2);
Float_t sigTOFnsigMeanPion = fTOFnsigMeanPionFit->GetParameter(2);
Float_t sigTOFnsigMeanKaon = fTOFnsigMeanKaonFit->GetParameter(2);
Float_t sigTOFnsigMeanProton = fTOFnsigMeanProtonFit->GetParameter(2);
Float_t sigTOFnsigSigmaPion = fTOFnsigSigmaPionFit->GetParameter(2);
Float_t sigTOFnsigSigmaKaon = fTOFnsigSigmaKaonFit->GetParameter(2);
Float_t sigTOFnsigSigmaProton = fTOFnsigSigmaProtonFit->GetParameter(2);
// histograms to plot the deviation as a function of the run number
TH1F * hDevTPCnsigMeanPion = new TH1F("hDevTPCnsigMeanPion","",nRuns,0,nRuns);
TH1F * hDevTPCnsigMeanKaon = new TH1F("hDevTPCnsigMeanKaon","",nRuns,0,nRuns);
TH1F * hDevTPCnsigMeanProton = new TH1F("hDevTPCnsigMeanProton","",nRuns,0,nRuns);
TH1F * hDevTPCnsigSigmaPion = new TH1F("hDevTPCnsigSigmaPion","",nRuns,0,nRuns);
TH1F * hDevTPCnsigSigmaKaon = new TH1F("hDevTPCnsigSigmaKaon","",nRuns,0,nRuns);
TH1F * hDevTPCnsigSigmaProton = new TH1F("hDevTPCnsigSigmaProton","",nRuns,0,nRuns);
TH1F * hDevTOFnsigMeanPion = new TH1F("hDevTOFnsigMeanPion","",nRuns,0,nRuns);
TH1F * hDevTOFnsigMeanKaon = new TH1F("hDevTOFnsigMeanKaon","",nRuns,0,nRuns);
TH1F * hDevTOFnsigMeanProton = new TH1F("hDevTOFnsigMeanProton","",nRuns,0,nRuns);
TH1F * hDevTOFnsigSigmaPion = new TH1F("hDevTOFnsigSigmaPion","",nRuns,0,nRuns);
TH1F * hDevTOFnsigSigmaKaon = new TH1F("hDevTOFnsigSigmaKaon","",nRuns,0,nRuns);
TH1F * hDevTOFnsigSigmaProton = new TH1F("hDevTOFnsigSigmaProton","",nRuns,0,nRuns);
cout << "\n\n\n!!! RUNS FOR WHICH AN NSIGMA FIT PARAMETER IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
outFile << "\n\n\n!!! RUNS FOR WHICH AN NSIGMA FIT PARAMETER IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
Int_t nBadNSig = 0;
for (Int_t irun=0; irun<nRuns; irun++)
{
Float_t devTPCnsigMeanPion = (TPCnsigMeanTrendPion->GetBinContent(irun+1) - meanTPCnsigMeanPion) / sigTPCnsigMeanPion;
Float_t devTPCnsigMeanKaon = (TPCnsigMeanTrendKaon->GetBinContent(irun+1) - meanTPCnsigMeanKaon) / sigTPCnsigMeanKaon;
Float_t devTPCnsigMeanProton = (TPCnsigMeanTrendProton->GetBinContent(irun+1) - meanTPCnsigMeanProton) / sigTPCnsigMeanProton;
Float_t devTPCnsigSigmaPion = (TPCnsigSigmaTrendPion->GetBinContent(irun+1) - meanTPCnsigSigmaPion) / sigTPCnsigSigmaPion;
Float_t devTPCnsigSigmaKaon = (TPCnsigSigmaTrendKaon->GetBinContent(irun+1) - meanTPCnsigSigmaKaon) / sigTPCnsigSigmaKaon;
Float_t devTPCnsigSigmaProton = (TPCnsigSigmaTrendProton->GetBinContent(irun+1) - meanTPCnsigSigmaProton) / sigTPCnsigSigmaProton;
Float_t devTOFnsigMeanPion = (TOFnsigMeanTrendPion->GetBinContent(irun+1) - meanTOFnsigMeanPion) / sigTOFnsigMeanPion;
Float_t devTOFnsigMeanKaon = (TOFnsigMeanTrendKaon->GetBinContent(irun+1) - meanTOFnsigMeanKaon) / sigTOFnsigMeanKaon;
Float_t devTOFnsigMeanProton = (TOFnsigMeanTrendProton->GetBinContent(irun+1) - meanTOFnsigMeanProton) / sigTOFnsigMeanProton;
Float_t devTOFnsigSigmaPion = (TOFnsigSigmaTrendPion->GetBinContent(irun+1) - meanTOFnsigSigmaPion) / sigTOFnsigSigmaPion;
Float_t devTOFnsigSigmaKaon = (TOFnsigSigmaTrendKaon->GetBinContent(irun+1) - meanTOFnsigSigmaKaon) / sigTOFnsigSigmaKaon;
Float_t devTOFnsigSigmaProton = (TOFnsigSigmaTrendProton->GetBinContent(irun+1) - meanTOFnsigSigmaProton) / sigTOFnsigSigmaProton;
hDevTPCnsigMeanPion->SetBinContent(irun+1,devTPCnsigMeanPion);
hDevTPCnsigMeanKaon->SetBinContent(irun+1,devTPCnsigMeanKaon);
hDevTPCnsigMeanProton->SetBinContent(irun+1,devTPCnsigMeanProton);
hDevTPCnsigSigmaPion->SetBinContent(irun+1,devTPCnsigSigmaPion);
hDevTPCnsigSigmaKaon->SetBinContent(irun+1,devTPCnsigSigmaKaon);
hDevTPCnsigSigmaProton->SetBinContent(irun+1,devTPCnsigSigmaProton);
hDevTOFnsigMeanPion->SetBinContent(irun+1,devTOFnsigMeanPion);
hDevTOFnsigMeanKaon->SetBinContent(irun+1,devTOFnsigMeanKaon);
hDevTOFnsigMeanProton->SetBinContent(irun+1,devTOFnsigMeanProton);
hDevTOFnsigSigmaPion->SetBinContent(irun+1,devTOFnsigSigmaPion);
hDevTOFnsigSigmaKaon->SetBinContent(irun+1,devTOFnsigSigmaKaon);
hDevTOFnsigSigmaProton->SetBinContent(irun+1,devTOFnsigSigmaProton);
if (TMath::Abs(devTPCnsigMeanPion) > nSigmaCut || TMath::Abs(devTPCnsigMeanKaon) > nSigmaCut || TMath::Abs(devTPCnsigMeanProton) > nSigmaCut ||
TMath::Abs(devTPCnsigSigmaPion) > nSigmaCut || TMath::Abs(devTPCnsigSigmaKaon) > nSigmaCut || TMath::Abs(devTPCnsigSigmaProton) > nSigmaCut ||
TMath::Abs(devTOFnsigMeanPion) > nSigmaCut || TMath::Abs(devTOFnsigMeanKaon) > nSigmaCut || TMath::Abs(devTOFnsigMeanProton) > nSigmaCut ||
TMath::Abs(devTOFnsigSigmaPion) > nSigmaCut || TMath::Abs(devTOFnsigSigmaKaon) > nSigmaCut || TMath::Abs(devTOFnsigSigmaProton) > nSigmaCut)
{
cout << runs[irun];
outFile << runs[irun];
if (TMath::Abs(devTPCnsigMeanPion) > nSigmaCut)
{
cout << " - TPC Pion Mean";
outFile << " - TPC Pion Mean";
}
if (TMath::Abs(devTPCnsigMeanKaon) > nSigmaCut)
{
cout << " - TPC Kaon Mean";
outFile << " - TPC Kaon Mean";
}
if (TMath::Abs(devTPCnsigMeanProton) > nSigmaCut)
{
cout << " - TPC Proton Mean";
outFile << " - TPC Proton Mean";
}
if (TMath::Abs(devTPCnsigSigmaPion) > nSigmaCut)
{
cout << " - TPC Pion Sigma";
outFile << " - TPC Pion Sigma";
}
if (TMath::Abs(devTPCnsigSigmaKaon) > nSigmaCut)
{
cout << " - TPC Kaon Sigma";
outFile << " - TPC Kaon Sigma";
}
if (TMath::Abs(devTPCnsigSigmaProton) > nSigmaCut)
{
cout << " - TPC Proton Sigma";
outFile << " - TPC Proton Sigma";
}
if (TMath::Abs(devTOFnsigMeanPion) > nSigmaCut)
{
cout << " - TOF Pion Mean";
outFile << " - TOF Pion Mean";
}
if (TMath::Abs(devTOFnsigMeanKaon) > nSigmaCut)
{
cout << " - TOF Kaon Mean";
outFile << " - TOF Kaon Mean";
}
if (TMath::Abs(devTOFnsigMeanProton) > nSigmaCut)
{
cout << " - TOF Proton Mean";
outFile << " - TOF Proton Mean";
}
if (TMath::Abs(devTOFnsigSigmaPion) > nSigmaCut)
{
cout << " - TOF Pion Sigma";
outFile << " - TOF Pion Sigma";
}
if (TMath::Abs(devTOFnsigSigmaKaon) > nSigmaCut)
{
cout << " - TOF Kaon Sigma";
outFile << " - TOF Kaon Sigma";
}
if (TMath::Abs(devTOFnsigSigmaProton) > nSigmaCut)
{
cout << " - TOF Proton Sigma";
outFile << " - TOF Proton Sigma";
}
cout << endl;
outFile << endl;
nBadNSig++;
if (isRunGood[irun]) isRunGood[irun] = kFALSE; // flag run as bad
}
}
cout << "Number of rejected runs: " << nBadNSig << endl;
outFile << "Number of rejected runs: " << nBadNSig << endl;
}
// draw the deviations as a function of the run number
TCanvas * cDevNSig = new TCanvas("cDevNSig","cDevNSig",300,150,700,500);
cDevNSig->Divide(2,2);
// TPC Means
cDevNSig->cd(1);
TH2F * hAxesDevTPCnsigMeans = new TH2F("hAxesDevTPCnsigMeans","",nRuns,0,nRuns,100,-10,10);
hAxesDevTPCnsigMeans->SetTitle("Mean, TPC");
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDevTPCnsigMeans->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDevTPCnsigMeans->GetYaxis()->SetTitle("# of #sigma from Mean Value (TPC Means)");
hAxesDevTPCnsigMeans->SetStats(kFALSE);
hAxesDevTPCnsigMeans->DrawCopy();
TLegend * lDevTPCnsigMean = new TLegend(.89,.79,.99,.99);
hDevTPCnsigMeanPion->SetMarkerColor(Color[0]);
hDevTPCnsigMeanPion->SetMarkerStyle(Marker[0]);
hDevTPCnsigMeanPion->SetLineColor(Color[0]);
hDevTPCnsigMeanPion->SetStats(kFALSE);
hDevTPCnsigMeanPion->DrawCopy("Psame");
lDevTPCnsigMean->AddEntry(hDevTPCnsigMeanPion,"#pi^{+}, #pi^{-}","p");
hDevTPCnsigMeanKaon->SetMarkerColor(Color[1]);
hDevTPCnsigMeanKaon->SetMarkerStyle(Marker[1]);
hDevTPCnsigMeanKaon->SetLineColor(Color[1]);
hDevTPCnsigMeanKaon->SetStats(kFALSE);
hDevTPCnsigMeanKaon->DrawCopy("Psame");
lDevTPCnsigMean->AddEntry(hDevTPCnsigMeanKaon,"K^{+}, K^{-}","p");
hDevTPCnsigMeanProton->SetMarkerColor(Color[2]);
hDevTPCnsigMeanProton->SetMarkerStyle(Marker[2]);
hDevTPCnsigMeanProton->SetLineColor(Color[2]);
hDevTPCnsigMeanProton->SetStats(kFALSE);
hDevTPCnsigMeanProton->DrawCopy("Psame");
lDevTPCnsigMean->AddEntry(hDevTPCnsigMeanProton,"p, #bar{p}","p");
lDevTPCnsigMean->SetFillColor(0);
lDevTPCnsigMean->DrawClone();
fLine1->DrawCopy("same");
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// TPC Sigmas
cDevNSig->cd(3);
TH2F * hAxesDevTPCnsigSigmas = new TH2F("hAxesDevTPCnsigSigmas","",nRuns,0,nRuns,100,-10,10);
hAxesDevTPCnsigSigmas->SetTitle("Sigma, TPC");
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDevTPCnsigSigmas->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDevTPCnsigSigmas->GetYaxis()->SetTitle("# of #sigma from Sigma Value (TPC Sigmas)");
hAxesDevTPCnsigSigmas->SetStats(kFALSE);
hAxesDevTPCnsigSigmas->DrawCopy();
TLegend * lDevTPCnsigSigma = new TLegend(.89,.79,.99,.99);
hDevTPCnsigSigmaPion->SetMarkerColor(Color[0]);
hDevTPCnsigSigmaPion->SetMarkerStyle(Marker[0]);
hDevTPCnsigSigmaPion->SetLineColor(Color[0]);
hDevTPCnsigSigmaPion->SetStats(kFALSE);
hDevTPCnsigSigmaPion->DrawCopy("Psame");
lDevTPCnsigSigma->AddEntry(hDevTPCnsigSigmaPion,"#pi^{+}, #pi^{-}","p");
hDevTPCnsigSigmaKaon->SetMarkerColor(Color[1]);
hDevTPCnsigSigmaKaon->SetMarkerStyle(Marker[1]);
hDevTPCnsigSigmaKaon->SetLineColor(Color[1]);
hDevTPCnsigSigmaKaon->SetStats(kFALSE);
hDevTPCnsigSigmaKaon->DrawCopy("Psame");
lDevTPCnsigSigma->AddEntry(hDevTPCnsigSigmaKaon,"K^{+}, K^{-}","p");
hDevTPCnsigSigmaProton->SetMarkerColor(Color[2]);
hDevTPCnsigSigmaProton->SetMarkerStyle(Marker[2]);
hDevTPCnsigSigmaProton->SetLineColor(Color[2]);
hDevTPCnsigSigmaProton->SetStats(kFALSE);
hDevTPCnsigSigmaProton->DrawCopy("Psame");
lDevTPCnsigSigma->AddEntry(hDevTPCnsigSigmaProton,"p, #bar{p}","p");
lDevTPCnsigSigma->SetFillColor(0);
lDevTPCnsigSigma->DrawClone();
fLine1->DrawCopy("same");
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// TOF Means
cDevNSig->cd(2);
TH2F * hAxesDevTOFnsigMeans = new TH2F("hAxesDevTOFnsigMeans","",nRuns,0,nRuns,100,-10,10);
hAxesDevTOFnsigMeans->SetTitle("Mean, TOF");
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDevTOFnsigMeans->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDevTOFnsigMeans->GetYaxis()->SetTitle("# of #sigma from Mean Value (TOF Means)");
hAxesDevTOFnsigMeans->SetStats(kFALSE);
hAxesDevTOFnsigMeans->DrawCopy();
TLegend * lDevTOFnsigMean = new TLegend(.89,.79,.99,.99);
hDevTOFnsigMeanPion->SetMarkerColor(Color[0]);
hDevTOFnsigMeanPion->SetMarkerStyle(Marker[0]);
hDevTOFnsigMeanPion->SetLineColor(Color[0]);
hDevTOFnsigMeanPion->SetStats(kFALSE);
hDevTOFnsigMeanPion->DrawCopy("Psame");
lDevTOFnsigMean->AddEntry(hDevTOFnsigMeanPion,"#pi^{+}, #pi^{-}","p");
hDevTOFnsigMeanKaon->SetMarkerColor(Color[1]);
hDevTOFnsigMeanKaon->SetMarkerStyle(Marker[1]);
hDevTOFnsigMeanKaon->SetLineColor(Color[1]);
hDevTOFnsigMeanKaon->SetStats(kFALSE);
hDevTOFnsigMeanKaon->DrawCopy("Psame");
lDevTOFnsigMean->AddEntry(hDevTOFnsigMeanKaon,"K^{+}, K^{-}","p");
hDevTOFnsigMeanProton->SetMarkerColor(Color[2]);
hDevTOFnsigMeanProton->SetMarkerStyle(Marker[2]);
hDevTOFnsigMeanProton->SetLineColor(Color[2]);
hDevTOFnsigMeanProton->SetStats(kFALSE);
hDevTOFnsigMeanProton->DrawCopy("Psame");
lDevTOFnsigMean->AddEntry(hDevTOFnsigMeanProton,"p, #bar{p}","p");
lDevTOFnsigMean->SetFillColor(0);
lDevTOFnsigMean->DrawClone();
fLine1->DrawCopy("same");
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// TOF Sigmas
cDevNSig->cd(4);
TH2F * hAxesDevTOFnsigSigmas = new TH2F("hAxesDevTOFnsigSigmas","",nRuns,0,nRuns,100,-10,10);
hAxesDevTOFnsigSigmas->SetTitle("Sigma, TOF");
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDevTOFnsigSigmas->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDevTOFnsigSigmas->GetYaxis()->SetTitle("# of #sigma from Sigma Value (TOF Sigmas)");
hAxesDevTOFnsigSigmas->SetStats(kFALSE);
hAxesDevTOFnsigSigmas->DrawCopy();
TLegend * lDevTOFnsigSigma = new TLegend(.89,.79,.99,.99);
hDevTOFnsigSigmaPion->SetMarkerColor(Color[0]);
hDevTOFnsigSigmaPion->SetMarkerStyle(Marker[0]);
hDevTOFnsigSigmaPion->SetLineColor(Color[0]);
hDevTOFnsigSigmaPion->SetStats(kFALSE);
hDevTOFnsigSigmaPion->DrawCopy("Psame");
lDevTOFnsigSigma->AddEntry(hDevTOFnsigSigmaPion,"#pi^{+}, #pi^{-}","p");
hDevTOFnsigSigmaKaon->SetMarkerColor(Color[1]);
hDevTOFnsigSigmaKaon->SetMarkerStyle(Marker[1]);
hDevTOFnsigSigmaKaon->SetLineColor(Color[1]);
hDevTOFnsigSigmaKaon->SetStats(kFALSE);
hDevTOFnsigSigmaKaon->DrawCopy("Psame");
lDevTOFnsigSigma->AddEntry(hDevTOFnsigSigmaKaon,"K^{+}, K^{-}","p");
hDevTOFnsigSigmaProton->SetMarkerColor(Color[2]);
hDevTOFnsigSigmaProton->SetMarkerStyle(Marker[2]);
hDevTOFnsigSigmaProton->SetLineColor(Color[2]);
hDevTOFnsigSigmaProton->SetStats(kFALSE);
hDevTOFnsigSigmaProton->DrawCopy("Psame");
lDevTOFnsigSigma->AddEntry(hDevTOFnsigSigmaProton,"p, #bar{p}","p");
lDevTOFnsigSigma->SetFillColor(0);
lDevTOFnsigSigma->DrawClone();
fLine1->DrawCopy("same");
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// write to file
fout->cd();
cDevNSig->Write();
//------------------------------------
// Raw yields integrated over all Pt -
//------------------------------------
// fit horizontal lines to the histograms and use the value of the y-intercept as the mean
TF1 * fitFuncIntegRawYieldAll = new TF1("fitFuncIntegRawYieldAll","[0]");
TF1 * fitFuncIntegRawYieldPiPlus = new TF1("fitFuncIntegRawYieldPiPlus","[0]");
TF1 * fitFuncIntegRawYieldKPlus = new TF1("fitFuncIntegRawYieldKPlus","[0]");
TF1 * fitFuncIntegRawYieldProton = new TF1("fitFuncIntegRawYieldProton","[0]");
TF1 * fitFuncIntegRawYieldPiMinus = new TF1("fitFuncIntegRawYieldPiMinus","[0]");
TF1 * fitFuncIntegRawYieldKMinus = new TF1("fitFuncIntegRawYieldKMinus","[0]");
TF1 * fitFuncIntegRawYieldAntiproton = new TF1("fitFuncIntegRawYieldAntiproton","[0]");
IntegRawYieldAll->Fit(fitFuncIntegRawYieldAll,"QN");
IntegRawYieldPiPlus->Fit(fitFuncIntegRawYieldPiPlus,"QN");
IntegRawYieldKPlus->Fit(fitFuncIntegRawYieldKPlus,"QN");
IntegRawYieldProton->Fit(fitFuncIntegRawYieldProton,"QN");
IntegRawYieldPiMinus->Fit(fitFuncIntegRawYieldPiMinus,"QN");
IntegRawYieldKMinus->Fit(fitFuncIntegRawYieldKMinus,"QN");
IntegRawYieldAntiproton->Fit(fitFuncIntegRawYieldAntiproton,"QN");
Float_t meanIntegRawYieldAll = fitFuncIntegRawYieldAll->GetParameter(0);
Float_t meanIntegRawYieldPiPlus = fitFuncIntegRawYieldPiPlus->GetParameter(0);
Float_t meanIntegRawYieldKPlus = fitFuncIntegRawYieldKPlus->GetParameter(0);
Float_t meanIntegRawYieldProton = fitFuncIntegRawYieldProton->GetParameter(0);
Float_t meanIntegRawYieldPiMinus = fitFuncIntegRawYieldPiMinus->GetParameter(0);
Float_t meanIntegRawYieldKMinus = fitFuncIntegRawYieldKMinus->GetParameter(0);
Float_t meanIntegRawYieldAntiproton = fitFuncIntegRawYieldAntiproton->GetParameter(0);
// report outliers distributed more than nSigmaCut sigma away from the median
// also fill histograms to plot the deviation in number of sigmas as a function of the run number
TH1F * hDevIntegRawYieldAll = new TH1F("hDevIntegRawYieldAll","",nRuns,0,nRuns);
TH1F * hDevIntegRawYieldPiPlus = new TH1F("hDevIntegRawYieldPiPlus","",nRuns,0,nRuns);
TH1F * hDevIntegRawYieldKPlus = new TH1F("hDevIntegRawYieldKPlus","",nRuns,0,nRuns);
TH1F * hDevIntegRawYieldProton = new TH1F("hDevIntegRawYieldProton","",nRuns,0,nRuns);
TH1F * hDevIntegRawYieldPiMinus = new TH1F("hDevIntegRawYieldPiMinus","",nRuns,0,nRuns);
TH1F * hDevIntegRawYieldKMinus = new TH1F("hDevIntegRawYieldKMinus","",nRuns,0,nRuns);
TH1F * hDevIntegRawYieldAntiproton = new TH1F("hDevIntegRawYieldAntiproton","",nRuns,0,nRuns);
cout << "\n\n\n!!! RUNS FOR WHICH THE INTEGRATED RAW YIELD IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
outFile << "\n\n\n!!! RUNS FOR WHICH THE INTEGRATED RAW YIELD IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
Int_t nBadIntegRaw = 0;
for (Int_t irun=0; irun<nRuns; irun++)
{
Float_t devIntegRawYieldAll = (IntegRawYieldAll->GetBinContent(irun+1) - meanIntegRawYieldAll) / IntegRawYieldAll->GetBinError(irun+1);
Float_t devIntegRawYieldPiPlus = (IntegRawYieldPiPlus->GetBinContent(irun+1) - meanIntegRawYieldPiPlus) / IntegRawYieldPiPlus->GetBinError(irun+1);
Float_t devIntegRawYieldKPlus = (IntegRawYieldKPlus->GetBinContent(irun+1) - meanIntegRawYieldKPlus) / IntegRawYieldKPlus->GetBinError(irun+1);
Float_t devIntegRawYieldProton = (IntegRawYieldProton->GetBinContent(irun+1) - meanIntegRawYieldProton) / IntegRawYieldProton->GetBinError(irun+1);
Float_t devIntegRawYieldPiMinus = (IntegRawYieldPiMinus->GetBinContent(irun+1) - meanIntegRawYieldPiMinus) / IntegRawYieldPiMinus->GetBinError(irun+1);
Float_t devIntegRawYieldKMinus = (IntegRawYieldKMinus->GetBinContent(irun+1) - meanIntegRawYieldKMinus) / IntegRawYieldKMinus->GetBinError(irun+1);
Float_t devIntegRawYieldAntiproton = (IntegRawYieldAntiproton->GetBinContent(irun+1) - meanIntegRawYieldAntiproton) / IntegRawYieldAntiproton->GetBinError(irun+1);
hDevIntegRawYieldAll->SetBinContent(irun+1,devIntegRawYieldAll);
hDevIntegRawYieldPiPlus->SetBinContent(irun+1,devIntegRawYieldPiPlus);
hDevIntegRawYieldKPlus->SetBinContent(irun+1,devIntegRawYieldKPlus);
hDevIntegRawYieldProton->SetBinContent(irun+1,devIntegRawYieldProton);
hDevIntegRawYieldPiMinus->SetBinContent(irun+1,devIntegRawYieldPiMinus);
hDevIntegRawYieldKMinus->SetBinContent(irun+1,devIntegRawYieldKMinus);
hDevIntegRawYieldAntiproton->SetBinContent(irun+1,devIntegRawYieldAntiproton);
if (TMath::Abs(devIntegRawYieldAll) > nSigmaCut || TMath::Abs(devIntegRawYieldPiPlus) > nSigmaCut || TMath::Abs(devIntegRawYieldKPlus) > nSigmaCut ||
TMath::Abs(devIntegRawYieldProton) > nSigmaCut || TMath::Abs(devIntegRawYieldPiMinus) > nSigmaCut || TMath::Abs(devIntegRawYieldKMinus) > nSigmaCut ||
TMath::Abs(devIntegRawYieldAntiproton) > nSigmaCut)
{
cout << runs[irun];
outFile << runs[irun] << endl;
if (TMath::Abs(devIntegRawYieldAll) > nSigmaCut)
{
cout << " - All";
outFile << " - All";
}
if (TMath::Abs(devIntegRawYieldPiPlus) > nSigmaCut)
{
cout << " - PiPlus";
outFile << " - PiPlus";
}
if (TMath::Abs(devIntegRawYieldKPlus) > nSigmaCut)
{
cout << " - KPlus";
outFile << " - KPlus";
}
if (TMath::Abs(devIntegRawYieldProton) > nSigmaCut)
{
cout << " - Proton";
outFile << " - Proton";
}
if (TMath::Abs(devIntegRawYieldPiMinus) > nSigmaCut)
{
cout << " - PiMinus";
outFile << " - PiMinus";
}
if (TMath::Abs(devIntegRawYieldKMinus) > nSigmaCut)
{
cout << " - KMinus";
outFile << " - KMinus";
}
if (TMath::Abs(devIntegRawYieldAntiproton) > nSigmaCut)
{
cout << " - Antiproton";
outFile << " - Antiproton";
}
cout << endl;
outFile << endl;
nBadIntegRaw++;
if (isRunGood[irun]) isRunGood[irun] = kFALSE; // flag run as bad
}
}
cout << "Number of rejected runs: " << nBadIntegRaw << endl;
outFile << "Number of rejected runs: " << nBadIntegRaw << endl;
// draw the deviations as a function of the run number
TCanvas * cDevRawYield = new TCanvas("cDevRawYield","cDevRawYield",350,175,700,500);
TLegend * lDevIntegRawYield = new TLegend(.89,.79,.99,.99);
lDevIntegRawYield->SetFillColor(0);
// all particle spectrum
for (Int_t irun=0; irun<nRuns; irun++)
hDevIntegRawYieldAll->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hDevIntegRawYieldAll->SetTitle("Raw Yield, Integrated over all p_{T};;# of #sigma from Mean");
hDevIntegRawYieldAll->GetYaxis()->SetTitleOffset(0.6);
hDevIntegRawYieldAll->GetYaxis()->CenterTitle();
hDevIntegRawYieldAll->SetStats(kFALSE);
hDevIntegRawYieldAll->GetYaxis()->SetRangeUser(-7,7);
hDevIntegRawYieldAll->SetMarkerStyle(34);
hDevIntegRawYieldAll->SetMarkerColor(kGreen);
hDevIntegRawYieldAll->DrawCopy("P");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldAll,"All Particles","p");
// individual particles
hDevIntegRawYieldPiPlus->SetMarkerColor(Color[0]);
hDevIntegRawYieldPiPlus->SetLineColor(Color[0]);
hDevIntegRawYieldPiPlus->SetMarkerStyle(Marker[0]);
hDevIntegRawYieldPiPlus->SetStats(kFALSE);
hDevIntegRawYieldPiPlus->DrawCopy("Psame");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldPiPlus,"#pi^{+}","p");
hDevIntegRawYieldKPlus->SetMarkerColor(Color[1]);
hDevIntegRawYieldKPlus->SetLineColor(Color[1]);
hDevIntegRawYieldKPlus->SetMarkerStyle(Marker[1]);
hDevIntegRawYieldKPlus->SetStats(kFALSE);
hDevIntegRawYieldKPlus->DrawCopy("Psame");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldKPlus,"K^{+}","p");
hDevIntegRawYieldProton->SetMarkerColor(Color[2]);
hDevIntegRawYieldProton->SetLineColor(Color[2]);
hDevIntegRawYieldProton->SetMarkerStyle(Marker[2]);
hDevIntegRawYieldProton->SetStats(kFALSE);
hDevIntegRawYieldProton->DrawCopy("Psame");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldProton,"p","p");
hDevIntegRawYieldPiMinus->SetMarkerColor(Color[0]);
hDevIntegRawYieldPiMinus->SetLineColor(Color[0]);
hDevIntegRawYieldPiMinus->SetMarkerStyle(Marker[3]);
hDevIntegRawYieldPiMinus->SetStats(kFALSE);
hDevIntegRawYieldPiMinus->DrawCopy("Psame");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldPiMinus,"#pi^{-}","p");
hDevIntegRawYieldKMinus->SetMarkerColor(Color[1]);
hDevIntegRawYieldKMinus->SetLineColor(Color[1]);
hDevIntegRawYieldKMinus->SetMarkerStyle(Marker[4]);
hDevIntegRawYieldKMinus->SetStats(kFALSE);
hDevIntegRawYieldKMinus->DrawCopy("Psame");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldKMinus,"K^{-}","p");
hDevIntegRawYieldAntiproton->SetMarkerColor(Color[2]);
hDevIntegRawYieldAntiproton->SetLineColor(Color[2]);
hDevIntegRawYieldAntiproton->SetMarkerStyle(Marker[5]);
hDevIntegRawYieldAntiproton->SetStats(kFALSE);
hDevIntegRawYieldAntiproton->SetTitle("Raw Yield, Integrated over all p_{T};;# of #sigma from Mean");
hDevIntegRawYieldAntiproton->GetYaxis()->SetTitleOffset(0.6);
hDevIntegRawYieldAntiproton->GetYaxis()->CenterTitle();
hDevIntegRawYieldAntiproton->DrawCopy("Psame");
lDevIntegRawYield->AddEntry(hDevIntegRawYieldAntiproton,"#bar{p}","p");
lDevIntegRawYield->DrawClone();
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// write to file
fout->cd();
cDevRawYield->Write();
//---------------
// efficiencies -
//---------------
if (useMC)
{
// fit horizontal lines to the histograms and use the value of the y-intercept as the mean
TF1 * fitFuncEffPiPlus = new TF1("fitFuncEffPiPlus","[0]");
TF1 * fitFuncEffKPlus = new TF1("fitFuncEffKPlus","[0]");
TF1 * fitFuncEffProton = new TF1("fitFuncEffProton","[0]");
TF1 * fitFuncEffPiMinus = new TF1("fitFuncEffPiMinus","[0]");
TF1 * fitFuncEffKMinus = new TF1("fitFuncEffKMinus","[0]");
TF1 * fitFuncEffAntiproton = new TF1("fitFuncEffAntiproton","[0]");
EfficiencyPiPlus->Fit(fitFuncEffPiPlus,"QN");
EfficiencyKPlus->Fit(fitFuncEffKPlus,"QN");
EfficiencyProton->Fit(fitFuncEffProton,"QN");
EfficiencyPiMinus->Fit(fitFuncEffPiMinus,"QN");
EfficiencyKMinus->Fit(fitFuncEffKMinus,"QN");
EfficiencyAntiproton->Fit(fitFuncEffAntiproton,"QN");
Float_t meanEffPiPlus = fitFuncEffPiPlus->GetParameter(0);
Float_t meanEffKPlus = fitFuncEffKPlus->GetParameter(0);
Float_t meanEffProton = fitFuncEffProton->GetParameter(0);
Float_t meanEffPiMinus = fitFuncEffPiMinus->GetParameter(0);
Float_t meanEffKMinus = fitFuncEffKMinus->GetParameter(0);
Float_t meanEffAntiproton = fitFuncEffAntiproton->GetParameter(0);
// report outliers distributed more than nSigmaCut sigma away from the median
// also fill histograms to plot the deviation in number of sigmas as a function of the run number
TH1F * hDevEffPiPlus = new TH1F("hDevEffPiPlus","",nRuns,0,nRuns);
TH1F * hDevEffKPlus = new TH1F("hDevEffKPlus","",nRuns,0,nRuns);
TH1F * hDevEffProton = new TH1F("hDevEffProton","",nRuns,0,nRuns);
TH1F * hDevEffPiMinus = new TH1F("hDevEffPiMinus","",nRuns,0,nRuns);
TH1F * hDevEffKMinus = new TH1F("hDevEffKMinus","",nRuns,0,nRuns);
TH1F * hDevEffAntiproton = new TH1F("hDevEffAntiproton","",nRuns,0,nRuns);
cout << "\n\n\n!!! RUNS FOR WHICH THE EFFICIENCY IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
outFile << "\n\n\n!!! RUNS FOR WHICH THE EFFICIENCY IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
Int_t nBadEff = 0;
for (Int_t irun=0; irun<nRuns; irun++)
{
// I know this is not very robust, but it's only one run that's giving me a problem b/c the proton efficiency has 0 error
if (EfficiencyProton->GetBinError(irun+1) == 0)
{
cout << runs[irun] << " - PROTON EFFICIENCY HAS ZERO ERROR\n";
outFile << runs[irun] << " - PROTON EFFICIENCY HAS ZERO ERROR\n";
nBadEff++;
continue;
}
Float_t devEffPiPlus = (EfficiencyPiPlus->GetBinContent(irun+1) - meanEffPiPlus) / EfficiencyPiPlus->GetBinError(irun+1);
Float_t devEffKPlus = (EfficiencyKPlus->GetBinContent(irun+1) - meanEffKPlus) / EfficiencyKPlus->GetBinError(irun+1);
Float_t devEffProton = (EfficiencyProton->GetBinContent(irun+1) - meanEffProton) / EfficiencyProton->GetBinError(irun+1);
Float_t devEffPiMinus = (EfficiencyPiMinus->GetBinContent(irun+1) - meanEffPiMinus) / EfficiencyPiMinus->GetBinError(irun+1);
Float_t devEffKMinus = (EfficiencyKMinus->GetBinContent(irun+1) - meanEffKMinus) / EfficiencyKMinus->GetBinError(irun+1);
Float_t devEffAntiproton = (EfficiencyAntiproton->GetBinContent(irun+1) - meanEffAntiproton) / EfficiencyAntiproton->GetBinError(irun+1);
hDevEffPiPlus->SetBinContent(irun+1,devEffPiPlus);
hDevEffKPlus->SetBinContent(irun+1,devEffKPlus);
hDevEffProton->SetBinContent(irun+1,devEffProton);
hDevEffPiMinus->SetBinContent(irun+1,devEffPiMinus);
hDevEffKMinus->SetBinContent(irun+1,devEffKMinus);
hDevEffAntiproton->SetBinContent(irun+1,devEffAntiproton);
if (TMath::Abs(devEffPiPlus) > nSigmaCut || TMath::Abs(devEffKPlus) > nSigmaCut || TMath::Abs(devEffProton) > nSigmaCut ||
TMath::Abs(devEffPiMinus) > nSigmaCut || TMath::Abs(devEffKMinus) > nSigmaCut || TMath::Abs(devEffAntiproton) > nSigmaCut)
{
cout << runs[irun];
outFile << runs[irun];
if (TMath::Abs(devEffPiPlus) > nSigmaCut)
{
cout << " - PiPlus";
outFile << " - PiPlus";
}
if (TMath::Abs(devEffKPlus) > nSigmaCut)
{
cout << " - KPlus";
outFile << " - KPlus";
}
if (TMath::Abs(devEffProton) > nSigmaCut)
{
cout << " - Proton";
outFile << " - Proton";
}
if (TMath::Abs(devEffPiMinus) > nSigmaCut)
{
cout << " - PiMinus";
outFile << " - PiMinus";
}
if (TMath::Abs(devEffKMinus) > nSigmaCut)
{
cout << " - KMinus";
outFile << " - KMinus";
}
if (TMath::Abs(devEffAntiproton) > nSigmaCut)
{
cout << " - Antiproton";
outFile << " - Antiproton";
}
cout << endl;
outFile << endl;
nBadEff++;
if (isRunGood[irun]) isRunGood[irun] = kFALSE; // flag run as bad
}
}
cout << "Number of rejected runs: " << nBadEff << endl;
outFile << "Number of rejected runs: " << nBadEff << endl;
// draw the deviations as a function of the run number
TCanvas * cDevEff = new TCanvas("cDevEff","cDevEff",400,200,700,500);
TH2F * hAxesDevEff = new TH2F("hAxesDevEff","",nRuns,0,nRuns,100,-15,15);
hAxesDevEff->SetTitle("MC Correction Factor at p_{T} = 0.9 GeV/c");
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDevEff->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDevEff->GetYaxis()->SetTitle("# of #sigma from mean");
hAxesDevEff->GetYaxis()->CenterTitle();
hAxesDevEff->SetStats(kFALSE);
hAxesDevEff->DrawCopy();
TLegend * lDevEff = new TLegend(.89,.79,.99,.99);
hDevEffPiPlus->SetMarkerColor(Color[0]);
hDevEffPiPlus->SetLineColor(Color[0]);
hDevEffPiPlus->SetMarkerStyle(Marker[0]);
hDevEffPiPlus->SetStats(kFALSE);
hDevEffPiPlus->DrawCopy("Psame");
lDevEff->AddEntry(hDevEffPiPlus,"#pi^{+}","p");
hDevEffKPlus->SetMarkerColor(Color[1]);
hDevEffKPlus->SetLineColor(Color[1]);
hDevEffKPlus->SetMarkerStyle(Marker[1]);
hDevEffKPlus->SetStats(kFALSE);
hDevEffKPlus->DrawCopy("Psame");
lDevEff->AddEntry(hDevEffKPlus,"K^{+}","p");
hDevEffProton->SetMarkerColor(Color[2]);
hDevEffProton->SetLineColor(Color[2]);
hDevEffProton->SetMarkerStyle(Marker[2]);
hDevEffProton->SetStats(kFALSE);
hDevEffProton->DrawCopy("Psame");
lDevEff->AddEntry(hDevEffProton,"p","p");
hDevEffPiMinus->SetMarkerColor(Color[0]);
hDevEffPiMinus->SetLineColor(Color[0]);
hDevEffPiMinus->SetMarkerStyle(Marker[3]);
hDevEffPiMinus->SetStats(kFALSE);
hDevEffPiMinus->DrawCopy("Psame");
lDevEff->AddEntry(hDevEffPiMinus,"#pi^{-}","p");
hDevEffKMinus->SetMarkerColor(Color[1]);
hDevEffKMinus->SetLineColor(Color[1]);
hDevEffKMinus->SetMarkerStyle(Marker[4]);
hDevEffKMinus->SetStats(kFALSE);
hDevEffKMinus->DrawCopy("Psame");
lDevEff->AddEntry(hDevEffKMinus,"K^{-}","p");
hDevEffAntiproton->SetMarkerColor(Color[2]);
hDevEffAntiproton->SetLineColor(Color[2]);
hDevEffAntiproton->SetMarkerStyle(Marker[5]);
hDevEffAntiproton->SetStats(kFALSE);
hDevEffAntiproton->DrawCopy("Psame");
lDevEff->AddEntry(hDevEffAntiproton,"#bar{p}","p");
lDevEff->SetFillColor(0);
lDevEff->DrawClone();
fLine1->DrawCopy("same");
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// write to file
fout->cd();
cDevEff->Write();
} // end if (useMC)
//------------------------
// matching efficiencies -
//------------------------
// because the error bars are so small for data, I can only use the error bars for MC
if (useMC)
{
// fit horizontal lines to the histograms and use the value of the y-intercept as the mean
TF1 * fitFuncMatchEffPos = new TF1("fitFuncMatchEffPos","[0]");
TF1 * fitFuncMatchEffNeg = new TF1("fitFuncMatchEffNeg","[0]");
MatchEffPos->Fit(fitFuncMatchEffPos,"QN");
MatchEffNeg->Fit(fitFuncMatchEffNeg,"QN");
Float_t meanMatchEffPos = fitFuncMatchEffPos->GetParameter(0);
Float_t meanMatchEffNeg = fitFuncMatchEffNeg->GetParameter(0);
// report outliers distributed more than nSigmaCut sigma away from the median
// also fill histograms to plot the deviation in number of sigmas as a function of the run number
TH1F * hDevMatchEffPos = new TH1F("hDevMatchEffPos","",nRuns,0,nRuns);
TH1F * hDevMatchEffNeg = new TH1F("hDevMatchEffNeg","",nRuns,0,nRuns);
cout << "\n\n\n!!! RUNS FOR WHICH THE MATCHING EFFICIENCY IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
outFile << "\n\n\n!!! RUNS FOR WHICH THE MATCHING EFFICIENCY IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
Int_t nBadMatchEff = 0;
for (Int_t irun=0; irun<nRuns; irun++)
{
Float_t devMatchEffPos = (MatchEffPos->GetBinContent(irun+1) - meanMatchEffPos) / MatchEffPos->GetBinError(irun+1);
Float_t devMatchEffNeg = (MatchEffNeg->GetBinContent(irun+1) - meanMatchEffNeg) / MatchEffNeg->GetBinError(irun+1);
hDevMatchEffPos->SetBinContent(irun+1,devMatchEffPos);
hDevMatchEffNeg->SetBinContent(irun+1,devMatchEffNeg);
if (TMath::Abs(devMatchEffPos) > nSigmaCut || TMath::Abs(devMatchEffNeg) > nSigmaCut)
{
cout << runs[irun];
outFile << runs[irun];
if (TMath::Abs(devMatchEffPos) > nSigmaCut)
{
cout << " - Pos";
outFile << " - Pos";
}
if (TMath::Abs(devMatchEffNeg) > nSigmaCut)
{
cout << " - Neg";
outFile << " - Neg";
}
cout << endl;
outFile << endl;
nBadMatchEff++;
if (isRunGood[irun]) isRunGood[irun] = kFALSE; // flag run as bad
}
}
cout << "Number of rejected runs: " << nBadMatchEff << endl;
outFile << "Number of rejected runs: " << nBadMatchEff << endl;
}
else
{
// project the matching efficiency histograms onto the y-axis
TH1F * MatchEffPosProj = new TH1F("MatchEffPosProj","",100,0.54,0.68);
TH1F * MatchEffNegProj = new TH1F("MatchEffNegProj","",100,0.54,0.68);
for (Int_t irun=0; irun<nRuns; irun++)
{
MatchEffPosProj->Fill(MatchEffPos->GetBinContent(irun+1));
MatchEffNegProj->Fill(MatchEffNeg->GetBinContent(irun+1));
}
// fit with gaussians and reject runs that lie more than 3 sigma from the mean
TF1 * fMatchEffPosProjFit = new TF1("fMatchEffPosProjFit","gaus");
TF1 * fMatchEffNegProjFit = new TF1("fMatchEffNegProjFit","gaus");
MatchEffPosProj->Fit(fMatchEffPosProjFit,"N","",.55,.65);
MatchEffNegProj->Fit(fMatchEffNegProjFit,"N","",.55,.65);
Float_t meanMatchEffPos = fMatchEffPosProjFit->GetParameter(1);
Float_t sigMatchEffPos = fMatchEffPosProjFit->GetParameter(2);
Float_t meanMatchEffNeg = fMatchEffNegProjFit->GetParameter(1);
Float_t sigMatchEffNeg = fMatchEffNegProjFit->GetParameter(2);
// histograms for plotting the deviation against the run number
TH1F * hDevMatchEffPos = new TH1F("hDevMatchEffPos","",nRuns,0,nRuns);
TH1F * hDevMatchEffNeg = new TH1F("hDevMatchEffNeg","",nRuns,0,nRuns);
cout << "\n\n\n!!! RUNS FOR WHICH THE MATCHING EFFICIENCY IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
outFile << "\n\n\n!!! RUNS FOR WHICH THE MATCHING EFFICIENCY IS MORE THAN " << nSigmaCut << " SIGMA FROM THE MEAN:\n";
Int_t nBadMatchEff = 0;
for (Int_t irun=0; irun<nRuns; irun++)
{
Float_t devMatchEffPos = (MatchEffPos->GetBinContent(irun+1) - meanMatchEffPos) / sigMatchEffPos;
Float_t devMatchEffNeg = (MatchEffNeg->GetBinContent(irun+1) - meanMatchEffNeg) / sigMatchEffNeg;
hDevMatchEffPos->SetBinContent(irun+1,devMatchEffPos);
hDevMatchEffNeg->SetBinContent(irun+1,devMatchEffNeg);
if (TMath::Abs(devMatchEffPos) > nSigmaCut || TMath::Abs(devMatchEffNeg) > nSigmaCut)
{
cout << runs[irun];
outFile << runs[irun];
if (TMath::Abs(devMatchEffPos) > nSigmaCut)
{
cout << " - Pos";
outFile << " - Pos";
}
if (TMath::Abs(devMatchEffNeg) > nSigmaCut)
{
cout << " - Neg";
outFile << " - Neg";
}
cout << endl;
outFile << endl;
nBadMatchEff++;
if (isRunGood[irun]) isRunGood[irun] = kFALSE; // flag run as bad
}
}
cout << "Number of rejected runs: " << nBadMatchEff << endl;
outFile << "Number of rejected runs: " << nBadMatchEff << endl;
}
// draw the deviations as a function of the run number
TCanvas * cDevMatchEff = new TCanvas("cDevMatchEff","cDevMatchEff",450,225,700,500);
TH2F * hAxesDevMatchEff = new TH2F("hAxesDevMatchEff","",nRuns,0,nRuns,100,-30,30);
hAxesDevMatchEff->SetTitle("TOF Matching Efficiency at p_{T} = 0.9 GeV/c;;Deviation from the Mean in # of #sigma");
hAxesDevMatchEff->GetYaxis()->CenterTitle();
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDevMatchEff->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDevMatchEff->SetStats(kFALSE);
hAxesDevMatchEff->DrawCopy();
TLegend * lDevMatchEff = new TLegend(.89,.79,.99,.99);
hDevMatchEffPos->SetMarkerColor(kBlue);
hDevMatchEffPos->SetLineColor(kBlue);
hDevMatchEffPos->SetMarkerStyle(Marker[0]);
hDevMatchEffPos->SetStats(kFALSE);
hDevMatchEffPos->DrawCopy("Psame");
lDevMatchEff->AddEntry(hDevMatchEffPos,"Positive Particles","p");
hDevMatchEffNeg->SetMarkerColor(kRed);
hDevMatchEffNeg->SetLineColor(kRed);
hDevMatchEffNeg->SetMarkerStyle(Marker[1]);
hDevMatchEffNeg->SetStats(kFALSE);
hDevMatchEffNeg->DrawCopy("Psame");
lDevMatchEff->AddEntry(hDevMatchEffNeg,"Negative Particles","p");
lDevMatchEff->SetFillColor(0);
lDevMatchEff->DrawClone();
// fLine1->DrawCopy("same");
fLine2->DrawCopy("same");
fLine3->DrawCopy("same");
// write to file
fout->cd();
cDevMatchEff->Write();
// also plot value/mean on a new canvas
TCanvas * cDataOverMeanMatchEff = new TCanvas("cDataOverMeanMatchEff","cDataOverMeanMatchEff");
TH1F * hDataOverFitMatchEffPos = (TH1F*)MatchEffPos->Clone();
hDataOverFitMatchEffPos->Scale(1./meanMatchEffPos);
TH1F * hDataOverFitMatchEffNeg = (TH1F*)MatchEffNeg->Clone();
hDataOverFitMatchEffNeg->Scale(1./meanMatchEffNeg);
TH2F * hAxesDataOverMeanMatchEff = new TH2F("hAxesDataOverMeanMatchEff","Value/Mean for TOF Matching Efficiency at p_{T} = 0.9 GeV/c",nRuns,0,nRuns,100,0.5,1.5);
for (Int_t irun=0; irun<nRuns; irun++)
hAxesDataOverMeanMatchEff->GetXaxis()->SetBinLabel(irun+1,Form("%i",runs[irun]));
hAxesDataOverMeanMatchEff->DrawCopy();
TLegend * lDataOverMeanMatchEff = new TLegend(.69,.69,.99,.99);
hDataOverFitMatchEffPos->SetMarkerColor(kBlue);
hDataOverFitMatchEffPos->SetMarkerStyle(Marker[0]);
hDataOverFitMatchEffPos->SetMarkerSize(.75);
hDataOverFitMatchEffPos->DrawCopy("histPsame");
lDataOverMeanMatchEff->AddEntry(hDataOverFitMatchEffPos,"Pos","p");
hDataOverFitMatchEffNeg->SetMarkerColor(kRed);
hDataOverFitMatchEffNeg->SetMarkerStyle(Marker[1]);
hDataOverFitMatchEffNeg->SetMarkerSize(.75);
hDataOverFitMatchEffNeg->DrawCopy("histPsame");
lDataOverMeanMatchEff->AddEntry(hDataOverFitMatchEffNeg,"Neg","p");
lDataOverMeanMatchEff->DrawClone();
// write to file
fout->cd();
cDataOverMeanMatchEff->Write();
//--------------------
// All rejected runs -
//--------------------
cout << "\n\n\n!!! LIST OF ALL REJECTED RUNS:\n";
outFile << "\n\n\n!!! LIST OF ALL REJECTED RUNS:\n";
Int_t nBadTotal=0;
for (Int_t irun=0; irun<nRuns; irun++)
{
if (!isRunGood[irun])
{
cout << runs[irun] << endl;
outFile << runs[irun] << endl;
nBadTotal++;
}
}
cout << "Total number of rejected runs: " << nBadTotal << endl;
outFile << "Total number of rejected runs: " << nBadTotal << endl;
// close the output text file
outFile.close();
Printf("\n\n\n--- Leaving function FindOutliers() ---\n\n\n");
}
|
3109f7c10f438f11f9932e327e3851f070010e3b
|
9ceacf33fd96913cac7ef15492c126d96cae6911
|
/usr.bin/ctfconv/dw.h
|
07a204f48fa283593eb6504a412bd09cc33eea0e
|
[] |
no_license
|
openbsd/src
|
ab97ef834fd2d5a7f6729814665e9782b586c130
|
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
|
refs/heads/master
| 2023-09-02T18:54:56.624627
| 2023-09-02T15:16:12
| 2023-09-02T15:16:12
| 66,966,208
| 3,394
| 1,235
| null | 2023-08-08T02:42:25
| 2016-08-30T18:18:25
|
C
|
UTF-8
|
C
| false
| false
| 2,638
|
h
|
dw.h
|
/* $OpenBSD: dw.h,v 1.2 2017/08/11 14:58:56 jasper Exp $ */
/*
* Copyright (c) 2016 Martin Pieuchot
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _DW_H_
#define _DW_H_
struct dwbuf {
const char *buf;
size_t len;
};
struct dwattr {
SIMPLEQ_ENTRY(dwattr) dat_next;
uint64_t dat_attr;
uint64_t dat_form;
};
struct dwaval {
SIMPLEQ_ENTRY(dwaval) dav_next;
struct dwattr *dav_dat; /* corresponding attribute */
union {
struct dwbuf _buf;
struct {
const char *_str;
union {
uint64_t _u64;
int64_t _s64;
uint32_t _u32;
uint16_t _u16;
uint8_t _u8;
} _T;
} _V;
} AV;
#define dav_buf AV._buf
#define dav_str AV._V._str
#define dav_u64 AV._V._T._u64
#define dav_s64 AV._V._T._s64
#define dav_u32 AV._V._T._u32
#define dav_u16 AV._V._T._u16
#define dav_u8 AV._V._T._u8
};
SIMPLEQ_HEAD(dwaval_queue, dwaval);
struct dwdie {
SIMPLEQ_ENTRY(dwdie) die_next;
struct dwabbrev *die_dab;
size_t die_offset;
uint8_t die_lvl;
struct dwaval_queue die_avals;
};
SIMPLEQ_HEAD(dwdie_queue, dwdie);
struct dwabbrev {
SIMPLEQ_ENTRY(dwabbrev) dab_next;
uint64_t dab_code;
uint64_t dab_tag;
uint8_t dab_children;
SIMPLEQ_HEAD(, dwattr) dab_attrs;
};
SIMPLEQ_HEAD(dwabbrev_queue, dwabbrev);
struct dwcu {
uint64_t dcu_length;
uint64_t dcu_abbroff;
uint16_t dcu_version;
uint8_t dcu_psize;
size_t dcu_offset; /* offset in the segment */
struct dwabbrev_queue dcu_abbrevs;
struct dwdie_queue dcu_dies;
};
const char *dw_tag2name(uint64_t);
const char *dw_at2name(uint64_t);
const char *dw_form2name(uint64_t);
const char *dw_op2name(uint8_t);
int dw_loc_parse(struct dwbuf *, uint8_t *, uint64_t *, uint64_t *);
int dw_ab_parse(struct dwbuf *, struct dwabbrev_queue *);
int dw_cu_parse(struct dwbuf *, struct dwbuf *, size_t, struct dwcu **);
void dw_dabq_purge(struct dwabbrev_queue *);
void dw_dcu_free(struct dwcu *);
#endif /* _DW_H_ */
|
1061f70cd6f2b90e33af7713c8a102e57e05dcdc
|
5a6ccde5f37cc86b6fc0812b2bf40f42eab23906
|
/A-set/44A.Indian Summer.c
|
29da9210df1f47f2b261bd8795aa55ba84b501f5
|
[] |
no_license
|
Waqar-107/Codeforces
|
23f2b1edffb85f6f020107f03e09a455d3e6e792
|
f0d2f25aa6a09c06083b82c39cdf3288ec2eecba
|
refs/heads/master
| 2023-03-09T07:55:46.583363
| 2023-03-04T09:57:44
| 2023-03-04T09:57:44
| 82,915,896
| 196
| 138
| null | 2023-02-11T22:06:20
| 2017-02-23T10:29:34
|
C++
|
UTF-8
|
C
| false
| false
| 894
|
c
|
44A.Indian Summer.c
|
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
int i,j,k;
int count=0;
int n;
cin>>n;
char s[n][25],s2[25];
for(i=0;i<=n;i++)
{
gets(s[i]);
}
/* printf("%s\n",s[1]);
printf("%s\n",s[2]);
printf("%s\n",s[3]);*/
for(i=0;i<=n;i++)
{
for(j=i+1;j<=n;)
{
if(strcmp(s[i],s[j])==0)
{
for(k=j;k<n;k++)
{
strcpy(s[k],s[k+1]);
}
n--;
}
else
j++;
}
}
cout<<n;
return 0;
}
|
62dc8d33d42830a071db0ceac976ee0b3101d800
|
1661c43eaf9e44dfe7cce269cfaae62e336036f1
|
/test/func/trap_rdtsc_test.c
|
ff2523dc0f6571cc1be2740d33dc8656fa603f78
|
[] |
permissive
|
jart/blink
|
3354eaf084e3e85a50372f1a93fc75ff2b9488b1
|
312a027d0908c1b1f9d1e9ebba837da569606b82
|
refs/heads/master
| 2023-08-31T21:30:40.551686
| 2023-08-22T15:42:44
| 2023-08-22T15:42:44
| 561,183,031
| 6,089
| 192
|
ISC
| 2023-08-22T15:42:46
| 2022-11-03T06:07:09
|
C
|
UTF-8
|
C
| false
| false
| 1,339
|
c
|
trap_rdtsc_test.c
|
// test kernel lets us trap rdtsc instruction
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <signal.h>
#include <stdint.h>
#include <sys/prctl.h>
#include <ucontext.h>
#include <unistd.h>
#define rdtsc() \
({ \
uint64_t rax_, rdx_; \
asm volatile("rdtsc" : "=a"(rax_), "=d"(rdx_) : : "memory"); \
rdx_ << 32 | rax_; \
})
static void OnSigSegv(int sig, siginfo_t *si, void *vctx) {
ucontext_t *ctx = (ucontext_t *)vctx;
const char *code = (const char *)ctx->uc_mcontext.gregs[REG_RIP];
if (code[0] == 0x0f && code[1] == 0x31) {
ctx->uc_mcontext.gregs[REG_RDX] = 3;
ctx->uc_mcontext.gregs[REG_RAX] = 0x13370000;
ctx->uc_mcontext.gregs[REG_RIP] += 2;
} else {
_exit(20);
}
}
int main(int argc, char *argv[]) {
uint64_t x, y;
if (prctl(PR_SET_TSC, PR_TSC_ENABLE)) return 1;
x = rdtsc();
y = rdtsc();
if (x == y) return 2;
if (y < x) return 3;
struct sigaction sa = {.sa_sigaction = OnSigSegv};
if (sigaction(SIGSEGV, &sa, 0)) return 4;
if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV)) return 5;
if (rdtsc() != 0x313370000) return 6;
if (rdtsc() != 0x313370000) return 7;
return 0;
}
|
0ebac80c51013051d37ebd6f27bd977bd1224983
|
7f6c235b0598353549959c18f69eefd20b766907
|
/libsrc/target/cpm/fcntl/getfcb.c
|
ff2e99dc2210b1ae7810e90a6f6d9e0c4d35a90a
|
[
"ClArtistic"
] |
permissive
|
z88dk/z88dk
|
46dfd4905f36d99333173cadd0a660839befc9f0
|
8b07f37cc43c5d9ffe69b563c80763491d8faff7
|
refs/heads/master
| 2023-09-04T19:29:49.254958
| 2023-09-03T20:51:24
| 2023-09-03T20:51:24
| 54,035,569
| 820
| 263
|
NOASSERTION
| 2023-09-05T11:09:04
| 2016-03-16T13:48:16
|
Assembly
|
UTF-8
|
C
| false
| false
| 464
|
c
|
getfcb.c
|
/*
* Get a free File Control Block
*
* 27/1/2002 - djm
*
* $Id: getfcb.c,v 1.1 2002-01-27 21:28:48 dom Exp $
*/
#include <cpm.h>
#include <stdio.h>
struct fcb *getfcb(void)
{
struct fcb *fcb;
for ( fcb = _fcb ; fcb < &_fcb[MAXFILE]; fcb++ ) {
if ( fcb->use == 0 ) {
fcb->use = U_READ;
fcb->rwptr = 0;
fcb->cached_record = 0xffffffff;
return fcb;
}
}
return NULL;
}
|
fd24119d611ab34ca4e7438c2bf8d3cfaad45894
|
7959f79db83471de22b3fe68c9d241acfa5a70e5
|
/scripts_src/headers/base.h
|
d40b584430fc1d74bcaf91f2e3967b50775a9411
|
[] |
no_license
|
BGforgeNet/Fallout2_Restoration_Project
|
b67952f82a17f71f78f0e7cbb863cce9abe28263
|
b6ef067a9e04799addef367045b518a09fc818fa
|
refs/heads/master
| 2023-08-18T02:05:25.178648
| 2023-08-13T02:51:03
| 2023-08-13T02:51:03
| 193,099,881
| 306
| 55
| null | 2023-09-05T04:22:33
| 2019-06-21T13:08:39
|
C
|
UTF-8
|
C
| false
| false
| 5,500
|
h
|
base.h
|
/*
Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.
*/
#ifndef BASE_H
#define BASE_H
#ifndef tile_in_box
#define tile_in_box(x, ul, ur, lr, ll) tile_in_tile_rect(ul, ur, ll, lr, x)
#endif
#define PET_1_PID PID_TOUGH_DEATHCLAW
#define PET_2_PID PID_TOUGH_FIRE_GECKO
#define PET_3_PID PID_NASTY_FLOATER
#define PET_4_PID PID_MUTATED_MOLE_RAT
#define PET_1_AI AI_GECKO
#define PET_2_AI AI_FIRE_GECKOS
#define PET_3_AI AI_FLOATER
#define PET_4_AI AI_MUTATED_RAT
#define pid_is_poisoning_pid(x) ((x) == PID_MUTATED_MOLE_RAT)
#define pid_is_radiating_pid(x) ((x) == PID_MUTATED_MOLE_RAT)
#define pets_released (4)
#define last_pet_mvar (MVAR_MELCHIOR_PET_NUM_4)
#define Portal_Hex_1 (13928) // throw tile 1
#define Portal_Hex_2 (13132)
#define Portal_Hex_3 (14120) // throw tile 2
#define Portal_Hex_4 (13319)
#define number_to_throw_tile(x) ((Portal_Hex_1 * (((x) % 4) <= 1)) + \
(Portal_Hex_3 * (((x) % 4) >= 2)))
#define number_to_portal_tile(x) ((Portal_Hex_1 * ((x) == 0)) + \
(Portal_Hex_2 * ((x) == 1)) + \
(Portal_Hex_3 * ((x) == 2)) + \
(Portal_Hex_4 * ((x) == 3)))
#define number_to_portal_num(x) ((x) % pets_released)
#define number_to_portal(x) number_to_portal_tile(number_to_portal_num(x))
#define pid_no_goo_effect(x) (((x) == PET_1_PID) or \
((x) == PET_2_PID) or \
((x) == PET_3_PID) or \
((x) == PET_4_PID) or \
((x) == PID_MELCHOIR))
#define obj_no_goo_effect(x) (has_trait(TRAIT_OBJECT,(x),OBJECT_TEAM_NUM) == TEAM_SUPER_MUTANT)
#define tile_has_rad_goo(x,elev) ((tile_contains_pid_obj((x), elev, PID_RAD_GOO_1) != 0) or \
(tile_contains_pid_obj((x), elev, PID_RAD_GOO_2) != 0) or \
(tile_contains_pid_obj((x), elev, PID_RAD_GOO_3) != 0) or \
(tile_contains_pid_obj((x), elev, PID_RAD_GOO_4) != 0))
#define portal_has_pet(x) ((tile_contains_pid_obj((x), self_elevation, PET_1_PID) != 0) or \
(tile_contains_pid_obj((x), self_elevation, PET_2_PID) != 0) or \
(tile_contains_pid_obj((x), self_elevation, PET_3_PID) != 0) or \
(tile_contains_pid_obj((x), self_elevation, PET_4_PID) != 0) or \
(tile_contains_pid_obj((x), self_elevation, PID_MELCHOIR) != 0))
#define pid_to_mvar_num(x) ((MVAR_MELCHIOR_PET_NUM_1 * ((x) == PET_1_PID)) + \
(MVAR_MELCHIOR_PET_NUM_2 * ((x) == PET_2_PID)) + \
(MVAR_MELCHIOR_PET_NUM_3 * ((x) == PET_3_PID)) + \
(MVAR_MELCHIOR_PET_NUM_4 * ((x) == PET_4_PID)))
#define pid_to_ai(x) ((((x) == PET_1_PID) * PET_1_AI) + \
(((x) == PET_2_PID) * PET_2_AI) + \
(((x) == PET_3_PID) * PET_3_AI) + \
(((x) == PET_4_PID) * PET_4_AI))
#define current_portal_num (map_var(MVAR_PORTAL_TILE_NUM) % 4)
#define current_portal_tile (number_to_portal_tile(current_portal_num))
#define inc_portal_num inc_map_var(MVAR_PORTAL_TILE_NUM)
#define Generator_Fixed (base_power)
#define base_lighting if (Generator_Fixed) then begin \
Military_Base_Lighting; \
end else \
Cavern_Lighting
#define self_in_portal_area (tile_in_box(self_tile, 12937, 12929, 14929, 14937) or \
tile_in_box(self_tile, 12722, 12716, 14716, 14722))
#define clump_is_free(the_tile) ((tile_is_blocked(the_tile, self_elevation) == false) and (tile_is_blocked(tile_num_in_direction(the_tile, 0, 1), self_elevation) == false) and (tile_is_blocked(tile_num_in_direction(the_tile, 1, 1), self_elevation) == false) and (tile_is_blocked(tile_num_in_direction(the_tile, 2, 1), self_elevation) == false) and (tile_is_blocked(tile_num_in_direction(the_tile, 3, 1), self_elevation) == false) and (tile_is_blocked(tile_num_in_direction(the_tile, 4, 1), self_elevation) == false) and (tile_is_blocked(tile_num_in_direction(the_tile, 5, 1), self_elevation) == false))
// base flags
#define base_power_bit bit_1
#define base_opened_bit bit_2
#define base_power (gvar_bit(GVAR_MILITARY_BASE_FLAGS, base_power_bit))
#define set_base_power set_gvar_bit_on(GVAR_MILITARY_BASE_FLAGS, base_power_bit)
#define base_opened (gvar_bit(GVAR_MILITARY_BASE_FLAGS, base_opened_bit))
#define set_base_opened set_gvar_bit_on(GVAR_MILITARY_BASE_FLAGS, base_opened_bit)
#endif // BASE_H
|
c62294ac6ff01f2ec8f68785c718ec82408bcfc5
|
0e083f405af00029c9ec31849f0f7f81c56844b5
|
/csrc/mmdeploy/backend_ops/onnxruntime/common/onnxruntime_register.h
|
28d2a2b782e5f9b1787afcf502e5564d0b04253e
|
[
"Apache-2.0"
] |
permissive
|
open-mmlab/mmdeploy
|
39b9e7b611caab2c76a6142fcb99f0bf1d92ad24
|
5479c8774f5b88d7ed9d399d4e305cb42cc2e73a
|
refs/heads/main
| 2023-09-01T21:29:25.315371
| 2023-08-31T09:59:29
| 2023-08-31T09:59:29
| 441,467,833
| 2,164
| 605
|
Apache-2.0
| 2023-09-14T10:39:04
| 2021-12-24T13:04:44
|
Python
|
UTF-8
|
C
| false
| false
| 442
|
h
|
onnxruntime_register.h
|
// Copyright (c) OpenMMLab. All rights reserved.
#ifndef ONNXRUNTIME_REGISTER_H
#define ONNXRUNTIME_REGISTER_H
#include <onnxruntime_c_api.h>
#include "mmdeploy/core/macro.h"
#ifdef __cplusplus
extern "C" {
#endif
MMDEPLOY_API OrtStatus *ORT_API_CALL RegisterCustomOps(OrtSessionOptions *options,
const OrtApiBase *api);
#ifdef __cplusplus
}
#endif
#endif // ONNXRUNTIME_REGISTER_H
|
b14a92d921fd7cd9786de152b1669265ecaeac3b
|
99bdb3251fecee538e0630f15f6574054dfc1468
|
/bsp/at91/at91sam9260/platform/gpio.h
|
52f34453d776d0d360f5dfbce7f138a3e7403fc4
|
[
"Apache-2.0",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"MIT",
"BSD-3-Clause",
"X11",
"BSD-4-Clause-UC",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
RT-Thread/rt-thread
|
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
|
3602f891211904a27dcbd51e5ba72fefce7326b2
|
refs/heads/master
| 2023-09-01T04:10:20.295801
| 2023-08-31T16:20:55
| 2023-08-31T16:20:55
| 7,408,108
| 9,599
| 5,805
|
Apache-2.0
| 2023-09-14T13:37:26
| 2013-01-02T14:49:21
|
C
|
UTF-8
|
C
| false
| false
| 5,035
|
h
|
gpio.h
|
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2011-01-13 weety first version
*/
#ifndef __GPIO_H__
#define __GPIO_H__
#include <rtthread.h>
#include <at91_aic.h>
#define PIN_BASE AIC_IRQS
#define MAX_GPIO_BANKS 3
#define PIN_IRQS (MAX_GPIO_BANKS*32)
/* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */
#define AT91_PIN_PA0 (PIN_BASE + 0x00 + 0)
#define AT91_PIN_PA1 (PIN_BASE + 0x00 + 1)
#define AT91_PIN_PA2 (PIN_BASE + 0x00 + 2)
#define AT91_PIN_PA3 (PIN_BASE + 0x00 + 3)
#define AT91_PIN_PA4 (PIN_BASE + 0x00 + 4)
#define AT91_PIN_PA5 (PIN_BASE + 0x00 + 5)
#define AT91_PIN_PA6 (PIN_BASE + 0x00 + 6)
#define AT91_PIN_PA7 (PIN_BASE + 0x00 + 7)
#define AT91_PIN_PA8 (PIN_BASE + 0x00 + 8)
#define AT91_PIN_PA9 (PIN_BASE + 0x00 + 9)
#define AT91_PIN_PA10 (PIN_BASE + 0x00 + 10)
#define AT91_PIN_PA11 (PIN_BASE + 0x00 + 11)
#define AT91_PIN_PA12 (PIN_BASE + 0x00 + 12)
#define AT91_PIN_PA13 (PIN_BASE + 0x00 + 13)
#define AT91_PIN_PA14 (PIN_BASE + 0x00 + 14)
#define AT91_PIN_PA15 (PIN_BASE + 0x00 + 15)
#define AT91_PIN_PA16 (PIN_BASE + 0x00 + 16)
#define AT91_PIN_PA17 (PIN_BASE + 0x00 + 17)
#define AT91_PIN_PA18 (PIN_BASE + 0x00 + 18)
#define AT91_PIN_PA19 (PIN_BASE + 0x00 + 19)
#define AT91_PIN_PA20 (PIN_BASE + 0x00 + 20)
#define AT91_PIN_PA21 (PIN_BASE + 0x00 + 21)
#define AT91_PIN_PA22 (PIN_BASE + 0x00 + 22)
#define AT91_PIN_PA23 (PIN_BASE + 0x00 + 23)
#define AT91_PIN_PA24 (PIN_BASE + 0x00 + 24)
#define AT91_PIN_PA25 (PIN_BASE + 0x00 + 25)
#define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26)
#define AT91_PIN_PA27 (PIN_BASE + 0x00 + 27)
#define AT91_PIN_PA28 (PIN_BASE + 0x00 + 28)
#define AT91_PIN_PA29 (PIN_BASE + 0x00 + 29)
#define AT91_PIN_PA30 (PIN_BASE + 0x00 + 30)
#define AT91_PIN_PA31 (PIN_BASE + 0x00 + 31)
#define AT91_PIN_PB0 (PIN_BASE + 0x20 + 0)
#define AT91_PIN_PB1 (PIN_BASE + 0x20 + 1)
#define AT91_PIN_PB2 (PIN_BASE + 0x20 + 2)
#define AT91_PIN_PB3 (PIN_BASE + 0x20 + 3)
#define AT91_PIN_PB4 (PIN_BASE + 0x20 + 4)
#define AT91_PIN_PB5 (PIN_BASE + 0x20 + 5)
#define AT91_PIN_PB6 (PIN_BASE + 0x20 + 6)
#define AT91_PIN_PB7 (PIN_BASE + 0x20 + 7)
#define AT91_PIN_PB8 (PIN_BASE + 0x20 + 8)
#define AT91_PIN_PB9 (PIN_BASE + 0x20 + 9)
#define AT91_PIN_PB10 (PIN_BASE + 0x20 + 10)
#define AT91_PIN_PB11 (PIN_BASE + 0x20 + 11)
#define AT91_PIN_PB12 (PIN_BASE + 0x20 + 12)
#define AT91_PIN_PB13 (PIN_BASE + 0x20 + 13)
#define AT91_PIN_PB14 (PIN_BASE + 0x20 + 14)
#define AT91_PIN_PB15 (PIN_BASE + 0x20 + 15)
#define AT91_PIN_PB16 (PIN_BASE + 0x20 + 16)
#define AT91_PIN_PB17 (PIN_BASE + 0x20 + 17)
#define AT91_PIN_PB18 (PIN_BASE + 0x20 + 18)
#define AT91_PIN_PB19 (PIN_BASE + 0x20 + 19)
#define AT91_PIN_PB20 (PIN_BASE + 0x20 + 20)
#define AT91_PIN_PB21 (PIN_BASE + 0x20 + 21)
#define AT91_PIN_PB22 (PIN_BASE + 0x20 + 22)
#define AT91_PIN_PB23 (PIN_BASE + 0x20 + 23)
#define AT91_PIN_PB24 (PIN_BASE + 0x20 + 24)
#define AT91_PIN_PB25 (PIN_BASE + 0x20 + 25)
#define AT91_PIN_PB26 (PIN_BASE + 0x20 + 26)
#define AT91_PIN_PB27 (PIN_BASE + 0x20 + 27)
#define AT91_PIN_PB28 (PIN_BASE + 0x20 + 28)
#define AT91_PIN_PB29 (PIN_BASE + 0x20 + 29)
#define AT91_PIN_PB30 (PIN_BASE + 0x20 + 30)
#define AT91_PIN_PB31 (PIN_BASE + 0x20 + 31)
#define AT91_PIN_PC0 (PIN_BASE + 0x40 + 0)
#define AT91_PIN_PC1 (PIN_BASE + 0x40 + 1)
#define AT91_PIN_PC2 (PIN_BASE + 0x40 + 2)
#define AT91_PIN_PC3 (PIN_BASE + 0x40 + 3)
#define AT91_PIN_PC4 (PIN_BASE + 0x40 + 4)
#define AT91_PIN_PC5 (PIN_BASE + 0x40 + 5)
#define AT91_PIN_PC6 (PIN_BASE + 0x40 + 6)
#define AT91_PIN_PC7 (PIN_BASE + 0x40 + 7)
#define AT91_PIN_PC8 (PIN_BASE + 0x40 + 8)
#define AT91_PIN_PC9 (PIN_BASE + 0x40 + 9)
#define AT91_PIN_PC10 (PIN_BASE + 0x40 + 10)
#define AT91_PIN_PC11 (PIN_BASE + 0x40 + 11)
#define AT91_PIN_PC12 (PIN_BASE + 0x40 + 12)
#define AT91_PIN_PC13 (PIN_BASE + 0x40 + 13)
#define AT91_PIN_PC14 (PIN_BASE + 0x40 + 14)
#define AT91_PIN_PC15 (PIN_BASE + 0x40 + 15)
#define AT91_PIN_PC16 (PIN_BASE + 0x40 + 16)
#define AT91_PIN_PC17 (PIN_BASE + 0x40 + 17)
#define AT91_PIN_PC18 (PIN_BASE + 0x40 + 18)
#define AT91_PIN_PC19 (PIN_BASE + 0x40 + 19)
#define AT91_PIN_PC20 (PIN_BASE + 0x40 + 20)
#define AT91_PIN_PC21 (PIN_BASE + 0x40 + 21)
#define AT91_PIN_PC22 (PIN_BASE + 0x40 + 22)
#define AT91_PIN_PC23 (PIN_BASE + 0x40 + 23)
#define AT91_PIN_PC24 (PIN_BASE + 0x40 + 24)
#define AT91_PIN_PC25 (PIN_BASE + 0x40 + 25)
#define AT91_PIN_PC26 (PIN_BASE + 0x40 + 26)
#define AT91_PIN_PC27 (PIN_BASE + 0x40 + 27)
#define AT91_PIN_PC28 (PIN_BASE + 0x40 + 28)
#define AT91_PIN_PC29 (PIN_BASE + 0x40 + 29)
#define AT91_PIN_PC30 (PIN_BASE + 0x40 + 30)
#define AT91_PIN_PC31 (PIN_BASE + 0x40 + 31)
rt_inline rt_uint32_t gpio_to_irq(rt_uint32_t gpio)
{
return gpio;
}
#endif
|
671ea532d1b0e2252543b0719aa0bb6511d57d87
|
581731c0a1c166a00d2e18ecf5e73da155fad8d1
|
/src/ai/regu.c
|
b82ba749279bb277c944272f25fea73149a4e063
|
[
"DOC"
] |
permissive
|
andwn/cave-story-md
|
03e9004ab643574601726c41a851190c1adb25f6
|
2b225269c56dd7877e140f9012f8c233270cf966
|
refs/heads/master
| 2023-06-22T21:33:09.710999
| 2023-06-21T11:52:35
| 2023-06-21T11:52:35
| 32,826,698
| 531
| 47
| null | 2023-04-04T00:36:56
| 2015-03-24T21:39:08
|
C
|
UTF-8
|
C
| false
| false
| 14,995
|
c
|
regu.c
|
#include "ai_common.h"
void ai_jenka(Entity *e) {
e->dir = 1;
e->frame = 0;
RANDBLINK(e, 1, 200);
}
void ai_doctor(Entity *e) {
enum { STAND1, STAND2, FLOAT, HAND1, HAND2 };
switch(e->state) {
case 10: // he chuckles
{
e->state = 11;
e->timer2 = 0;
ANIMATE(e, 10, 1,0);
}
/* fallthrough */
case 11:
{
if (++e->timer2 > TIME(8*6)) {
e->frame = 0;
e->state = 1;
}
}
break;
case 20: // he rises up and hovers
{
e->state = 21;
e->timer = 0;
e->frame = 2;
e->y_mark = e->y - (32 << CSF);
}
/* fallthrough */
case 21:
{
e->y_speed += (e->y > e->y_mark) ? -SPEED(0x20) : SPEED(0x20);
LIMIT_Y(SPEED(0x200));
}
break;
case 30: // he teleports away
{
e->timer = 0;
e->frame = 2;
e->y_speed = 0;
e->state++;
}
/* fallthrough */
case 31:
{
//if (DoTeleportOut(e, 1)) {
e->state = STATE_DELETE;
//}
}
break;
case 40: // he teleports in and hovers
{
e->timer = 0;
e->state = 41;
e->frame = 2;
}
/* fallthrough */
case 41:
{
//if (DoTeleportIn(o, 1)) {
e->state = 20;
e->y_speed = -SPEED(0x200);
//}
}
break;
}
e->y += e->y_speed;
}
void ai_toroko(Entity *e) {
if(e->state != 500) {
e->x_next = e->x + e->x_speed;
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
}
switch(e->state) {
case 0: // stand and blink
{
e->x_speed = 0;
e->state = 1;
}
/* fallthrough */
case 1:
{
e->frame = 0;
RANDBLINK(e, 7, 200);
}
break;
case 3: // run away!!
case 4:
{
ANIMATE(e, 8, 1,2);
if((e->y_speed < 0 && collide_stage_leftwall(e)) ||
(e->y_speed > 0 && collide_stage_rightwall(e))) {
TURN_AROUND(e);
}
MOVE_X(SPEED(0x3E0));
}
break;
case 6: // hop and run away!!
{
e->state = 7;
e->frame = 1;
e->y_speed = -SPEED(0x400);
e->grounded = FALSE;
}
/* fallthrough */
case 7:
{
MOVE_X(SPEED(0x100));
if(e->grounded) e->state = 3;
}
break;
// small hop straight up/down from Balrog
// shaking the ground, used in Shack
case 8:
{
e->frame = 1;
e->timer = 0;
e->state = 9;
e->y_speed = -SPEED(0x200);
e->grounded = FALSE;
}
/* fallthrough */
case 9:
{
if(e->grounded) e->state = 0;
}
break;
case 10: // eeks and falls down
{
e->state = 11;
e->frame = 5;
e->y_speed = -SPEED(0x400);
e->grounded = FALSE;
sound_play(SND_ENEMY_SQUEAK, 5);
MOVE_X(SPEED(0x200));
}
break;
case 11: // falling down
{
if (e->grounded) {
e->state = 12;
e->frame = 6;
e->flags |= NPC_INTERACTIVE;
e->x_speed = 0;
}
}
break;
case 500: // In bubble - don't move or collide with anything
{
e->frame = 1;
}
break;
default: // Toroko getting up after you shoot her, don't know the real state
FACE_PLAYER(e);
e->alwaysActive = TRUE;
if(stageID != 0x23) e->frame = 0;
}
if(e->state != 500) {
e->x = e->x_next;
e->y = e->y_next;
if(!e->grounded) e->y_speed += SPEED(0x40);
LIMIT_Y(SPEED(0x5FF));
}
// I hate this
if(stageID == STAGE_MIMIGA_SHACK && e->frame == 0) e->dir = 0;
}
void ai_toroko_tele_in(Entity *e) {
e->x_next = e->x;
e->y_next = e->y + e->y_speed;
e->grounded = collide_stage_floor(e);
switch(e->state) {
case 0:
{
e->grounded = FALSE;
e->state = 1;
e->timer = 0;
e->flags &= ~NPC_IGNORESOLID; // this is set in npc.tbl, but uh, why?
}
/* fallthrough */
case 1:
{
//if (DoTeleportIn(o, 2)) {
if(++e->timer > TIME(50)) {
e->frame = 1;
e->state = 2;
}
}
break;
case 2:
{
if (e->grounded) {
e->state = 4;
e->frame = 6;
sound_play(SND_THUD, 5);
}
}
break;
case 4: break; // knocked out
}
e->y = e->y_next;
// fall unless teleporting
if (e->state >= 2) {
if(!e->grounded) e->y_speed += SPEED(0x20);
LIMIT_Y(SPEED(0x5FF));
}
}
// Use the shared global x and y mark for red crystal
#define crystal_xmark curly_target_x
#define crystal_ymark curly_target_y
void onspawn_sue(Entity *e) {
if(e->flags & NPC_OPTION2) e->dir = TRUE;
// This keeps Sue behind the cage in Mimiga Village
if(stageID == STAGE_MIMIGA_VILLAGE) e->alwaysActive = TRUE;
if(stageID == STAGE_FALLING) {
e->alwaysActive = TRUE;
//e->state = 50;
} else {
SNAP_TO_GROUND(e);
}
}
void ai_sue(Entity *e) {
e->x_next = e->x + e->x_speed;
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
switch(e->state) {
case 0: // stand and blink
{
e->timer = 0;
e->frame = 0;
e->x_speed = 0;
e->linkedEntity = NULL;
RANDBLINK(e, 3, 200);
}
break;
case 3: // walking
case 4: // walking
case 5: // face away
{
generic_npc_states(e);
}
break;
case 6: // got punched by Igor
{
e->state = 7;
e->frame = 5;
e->timer = 0;
sound_play(SND_ENEMY_SQUEAK, 5);
}
/* fallthrough */
case 7:
{
if (++e->timer > TIME_8(10)) e->state = 0;
}
break;
// got punched extra hard by Igor
// flys through air backwards and crashes
case 8:
{
e->state = 9;
e->frame = 5;
e->timer = 0;
sound_play(SND_ENEMY_SQUEAK, 5);
e->y_speed = -SPEED_10(0x200);
MOVE_X(-SPEED_10(0x3FF));
}
/* fallthrough */
case 9:
{
if (++e->timer > 3 && e->grounded) {
e->state = 10;
TURN_AROUND(e);
}
}
break;
case 10:
{
e->x_speed = 0;
e->frame = 6;
}
break;
// punching the air (when she tells Igor "I'm not afraid of you!")
case 11:
{
e->state = 12;
e->timer = 0;
}
/* fallthrough */
case 12:
{
e->timer++;
if((e->timer & 15) == 8) {
e->frame = 8;
} else if((e->timer & 15) == 0) {
e->frame = 0;
}
}
break;
// picked up & carried away by Igor
case 13:
{
e->frame = 7;
e->x_speed = 0;
e->y_speed = 0;
e->state = 14;
// Find Igor
Entity *find = entityList;
while(find && find->event != 501) find = find->next;
e->linkedEntity = find;
e->alwaysActive = TRUE;
}
/* fallthrough */
case 14: // being carried
{
Entity *link = e->linkedEntity;
if (link) {
e->x_next = link->x + (link->dir ? (8 << CSF) : -(8 << CSF));
e->y_next = link->y + (8 << CSF);
e->dir = link->dir;
}
}
break;
// spawn red crystal and call it to us (Undead Core intro)
case 15:
{
entity_create(e->x+pixel_to_sub(128), e->y, OBJ_RED_CRYSTAL, 0);
e->state = 16;
e->x_speed = 0;
e->frame = 0;
}
/* fallthrough */
case 16:
{
crystal_xmark = e->x - (18<<CSF);
crystal_ymark = e->y - (8<<CSF);
}
break;
case 17: // look up (still followed by red crystal)
{
e->x_speed = 0;
e->frame = 10;
crystal_xmark = e->x;
crystal_ymark = e->y - (8<<CSF);
}
break;
// run away from DOCTOR_GHOST and hide behind player
case 20:
case 21:
{
ANIMATE(e, 8, 1,0,2,0);
MOVE_X(SPEED_10(0x3FF));
if (e->x < player.x - (8<<CSF)) {
e->dir = 1;
e->state = 0;
}
}
break;
// run, during "we've got to get out of here" post-undead core cutscene.
case 30:
case 31:
{
ANIMATE(e, 8, 1,0,2,0);
MOVE_X(SPEED_10(0x3FF));
}
break;
case 40: // she jumps off the island
{
e->state = 41;
e->frame = 8;
e->y_speed = -SPEED_10(0x3FF);
e->grounded = FALSE;
}
break;
case 50:
{
moveMeToFront = TRUE;
e->dir = !e->linkedEntity->dir;
e->frame = 7;
e->x_next = e->linkedEntity->x + (e->dir ? (16 << CSF) : -(16 << CSF));
e->y_next = e->linkedEntity->y + (4 << CSF);
e->y_speed = 0;
e->grounded = TRUE;
} break;
}
e->x = e->x_next;
e->y = e->y_next;
if(!e->grounded) e->y_speed += SPEED(0x40);
LIMIT_Y(SPEED(0x5FF));
}
void ai_sue_teleport_in(Entity *e) {
e->x_next = e->x;
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
switch(e->state) {
case 0:
{
e->x += (6 << CSF);
e->timer = 0;
e->state = 1;
e->frame = 7; // her "hanging on a hook" frame
}
/* fallthrough */
case 1:
{
//if (DoTeleportIn(o, 2)) {
e->state = 2;
e->timer = 0;
e->grounded = FALSE;
//}
}
break;
case 2:
{
if (e->grounded) {
e->frame = 9; // crumpled;
e->state = 3;
e->timer = 0;
sound_play(SND_THUD, 5);
}
}
break;
}
e->y = e->y_next;
// fall unless teleporting
if (e->state >= 2) {
if(!e->grounded) e->y_speed += SPEED(0x20);
LIMIT_Y(SPEED(0x5FF));
}
}
// Kazuma has no physics, and doesn't blink
void ai_kazuma(Entity *e) {
generic_npc_states(e);
e->x += e->x_speed;
e->y += e->y_speed;
}
void ai_king(Entity *e) {
Entity *sword = e->linkedEntity;
e->x_next = e->x + e->x_speed;
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
switch(e->state) {
case 0:
{
e->enableSlopes = TRUE;
e->frame = 0;
e->x_speed = e->y_speed = 0;
}
break;
case 5: // he is knocked out
{
e->frame = 5;
e->x_speed = 0;
}
break;
case 6: // hop in air then fall and knocked out
{
e->state = 7;
e->timer = 0;
e->y_speed = -SPEED(0x400);
e->grounded = FALSE;
}
/* fallthrough */
case 7: // he falls and is knocked out
{
e->frame = 4;
MOVE_X(SPEED(0x280));
e->y_speed += 0x40;
if (e->timer++ && e->grounded) e->state = 5;
}
break;
case 8: // walking
case 9:
{
ANIMATE(e, 8, 1,0,2,0);
MOVE_X(SPEED(0x200));
}
break;
case 10: // run
{
ANIMATE(e, 8, 1,0,2,0);
MOVE_X(SPEED(0x400));
}
break;
case 20: // pull out sword
{
sword = entity_create(e->x, e->y, OBJ_KINGS_SWORD, 0);
sword->frame = 6;
sword->dir = 1;
e->linkedEntity = sword;
e->state = 0;
}
break;
case 30: // he goes flying in spec'd direction and smacks wall
{
e->enableSlopes = FALSE;
e->state = 31;
e->timer = 0;
e->frame = 4;
MOVE_X(SPEED(0x600));
e->y_speed = 0;
}
/* fallthrough */
case 31:
{
// Don't follow slopes
e->grounded = FALSE;
e->y_speed = 0;
e->y_next = e->y;
// Hit the wall
if (collide_stage_leftwall(e)) {
e->dir = 1;
e->state = 7;
e->timer = 0;
e->y_speed = -SPEED(0x400);
e->grounded = FALSE;
e->x_speed = SPEED(0x280);
sound_play(SND_LITTLE_CRASH, 5);
effect_create_smoke(e->x >> CSF, e->y >> CSF);
}
}
break;
case 40: // he flickers away and is replaced by the Blade
{
e->state = 41;
e->timer = 0;
}
/* fallthrough */
case 41:
{
e->hidden = (++e->timer & 2);
if (e->timer > TIME_8(100)) {
effect_create_smoke(e->x >> CSF, e->y >> CSF);
e->state = 42;
e->hidden = FALSE;
e->frame = 6; // Sword
}
}
break;
case 42: break;
case 60: // jump (used when he lunges with sword)
e->frame = 0;
e->state = 61;
e->y_speed = -SPEED(0x5FF);
e->x_speed = SPEED(0x380);
sword->dir = 0;
break;
case 61: // jumping
e->y_speed += SPEED(0x80);
if (e->grounded) {
e->state = 0;
e->x_speed = 0;
sword->dir = 1;
}
break;
}
e->x = e->x_next;
e->y = e->y_next;
if(sword) {
sword->x = e->x + (sword->dir ? (10 << CSF) : -(10 << CSF));
sword->y = e->y;
}
if(stageID == 0x23) e->dir = 1; // Stop turning left asshole
LIMIT_Y(SPEED(0x5FF));
}
void ai_blue_robot(Entity *e) {
e->x_next = e->x; // x_next must be set or collision will be wrong
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
e->frame = 0;
RANDBLINK(e, 1, 200);
e->y = e->y_next;
if(!e->grounded) e->y_speed += SPEED(0x40);
LIMIT_Y(SPEED(0x5FF));
}
void ai_kanpachi_fish(Entity *e) {
if (!e->state) {
SNAP_TO_GROUND(e);
e->state = 1;
}
// open eyes when player comes near
if(PLAYER_DIST_X(e, 64<<CSF) && PLAYER_DIST_Y2(e, 64<<CSF, 16<<CSF)) {
e->frame = 1;
RANDBLINK(e, 0, 200);
} else {
e->frame = 0;
}
}
void ai_booster(Entity *e) {
e->x_next = e->x + e->x_speed;
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
switch(e->state) {
case 0:
{
e->state = 1;
e->timer = 0;
e->x_speed = e->y_speed = 0;
}
/* fallthrough */
case 1:
{
e->frame = 0;
RANDBLINK(e, 3, 200);
}
break;
case 30: // teleporting in at Shelter
{
e->frame = 0;
sound_play(SND_TELEPORT, 5);
// move into middle of teleporter
e->x_next -= 16 << CSF;
e->y_next += 8 << CSF;
e->state++;
e->timer = 0;
}
/* fallthrough */
case 31: // teleporting-in animation
{
//if (DoTeleportIn(o, 2)) {
e->state++;
e->timer = 0;
//}
}
break;
case 32: // wait before hop out of teleporter
{
if (++e->timer > 20) {
e->state++;
e->frame = 1;
}
}
break;
case 33: // hopping out of teleporter
{
if (e->grounded) {
e->state++;
e->timer = 0;
e->frame = 0;
}
}
break;
default:
generic_npc_states(e);
break;
}
e->x = e->x_next;
e->y = e->y_next;
// no fall when teleporting in
if (!e->grounded && e->state != 31 && e->state != 32) e->y_speed += 0x40;
}
void ai_booster_falling(Entity *e) {
e->x_next = e->x + e->x_speed;
e->y_next = e->y + e->y_speed;
if(!e->grounded) e->grounded = collide_stage_floor(e);
else e->grounded = collide_stage_floor_grounded(e);
switch(e->state) {
case 0: // sitting on ground after fall
e->frame = 6;
break;
case 10: // falling
{
e->frame = 5;
e->y_speed += SPEED(0x40);
LIMIT_Y(SPEED(0x5FF));
}
break;
case 20: // dying (flickering away)
{
sound_play(SND_TELEPORT, 5);
e->state = 21;
e->timer = 0;
}
/* fallthrough */
case 21:
{
e->hidden = (++e->timer & 2);
if (e->timer > TIME(100)) {
//SmokeClouds(o, 4, 16, 16);
e->state = STATE_DELETE;
}
}
break;
}
e->x = e->x_next;
e->y = e->y_next;
}
// shared between OBJ_KAZUMA_AT_COMPUTER and OBJ_SUE_AT_COMPUTER
void ai_npc_at_computer(Entity *e) {
if(stageID == 1 && e->type == 0x3E) {
// Remove duplicate Kazuma from Arthur's house
e->state = STATE_DELETE;
}
enum { INIT=0, TYPING, PAUSE_SLOUCH, PAUSE_UPRIGHT };
switch(e->state) {
case INIT:
{
SNAP_TO_GROUND(e);
e->state = TYPING;
e->frame = 0;
e->x -= 4<<CSF;
} /* fallthrough */
case TYPING:
{
ANIMATE(e, 4, 0,1);
if(!(rand() & 63)) {
e->state = PAUSE_SLOUCH;
e->frame = 1;
e->timer = 0;
}
else if(!(rand() & 127)) {
e->state = PAUSE_UPRIGHT;
e->frame = 2;
e->timer = 0;
}
}
break;
case PAUSE_SLOUCH:
{
if (++e->timer > TIME_8(40)) {
e->state = PAUSE_UPRIGHT;
e->frame = 2;
e->timer = 0;
}
}
break;
case PAUSE_UPRIGHT:
{
if (++e->timer > TIME_8(80)) {
e->state = TYPING;
e->frame = 0;
e->timer = 0;
}
}
break;
}
}
|
016f63021f251d35a6b7031504c9c2dd136231a1
|
78b2b87d57c4db64463cdeba1f939e6b61a4a258
|
/examples/temp_sensor/test/TestUsartPutChar.c
|
766a88901b3af333bc3e6062ddbe74e62d2924a3
|
[
"MIT"
] |
permissive
|
ThrowTheSwitch/CMock
|
0325f80713e897ae8b6e5dd8e402083e6ca343c8
|
c548629a478ef07f89db8b86c1dd4041a1cf4053
|
refs/heads/master
| 2023-09-03T15:10:22.935594
| 2023-08-23T12:32:14
| 2023-08-23T12:32:14
| 3,276,848
| 589
| 312
|
MIT
| 2023-08-10T10:46:19
| 2012-01-26T19:51:32
|
C
|
UTF-8
|
C
| false
| false
| 1,039
|
c
|
TestUsartPutChar.c
|
#include "unity.h"
#include "Types.h"
#include "UsartPutChar.h"
#include "MockUsartTransmitBufferStatus.h"
AT91S_USART Usart0Peripheral;
void setUp(void)
{
}
void tearDown(void)
{
}
void testPutCharShouldWriteDesiredCharacterToUsartTransmitBuffer(void)
{
AT91C_BASE_US0->US_THR = 0;
Usart_ReadyToTransmit_ExpectAndReturn(TRUE);
Usart_PutChar('x');
TEST_ASSERT_EQUAL('x', AT91C_BASE_US0->US_THR);
Usart_ReadyToTransmit_ExpectAndReturn(TRUE);
Usart_PutChar('1');
TEST_ASSERT_EQUAL('1', AT91C_BASE_US0->US_THR);
Usart_ReadyToTransmit_ExpectAndReturn(TRUE);
Usart_PutChar(':');
TEST_ASSERT_EQUAL(':', AT91C_BASE_US0->US_THR);
}
void testPutCharShouldWaitUntilReadyToTransmitBeforeLoadingTransmitBufffer(void)
{
AT91C_BASE_US0->US_THR = 0;
Usart_ReadyToTransmit_ExpectAndReturn(FALSE);
Usart_ReadyToTransmit_ExpectAndReturn(FALSE);
Usart_ReadyToTransmit_ExpectAndReturn(FALSE);
Usart_ReadyToTransmit_ExpectAndReturn(TRUE);
Usart_PutChar('x');
TEST_ASSERT_EQUAL('x', AT91C_BASE_US0->US_THR);
}
|
d7a17290b6ed5aa32442450461a2cbc705582500
|
5eff7a36d9a9917dce9111f0c3074375fe6f7656
|
/lib/mesa/src/compiler/nir/nir_lower_is_helper_invocation.c
|
b2dfb84f65a8e5c01a9d9129c7bd3566e047edeb
|
[] |
no_license
|
openbsd/xenocara
|
cb392d02ebba06f6ff7d826fd8a89aa3b8401779
|
a012b5de33ea0b977095d77316a521195b26cc6b
|
refs/heads/master
| 2023-08-25T12:16:58.862008
| 2023-08-12T16:16:25
| 2023-08-12T16:16:25
| 66,967,384
| 177
| 66
| null | 2023-07-22T18:12:37
| 2016-08-30T18:36:01
|
C
|
UTF-8
|
C
| false
| false
| 4,529
|
c
|
nir_lower_is_helper_invocation.c
|
/*
* Copyright © 2021 Igalia S.L.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "nir.h"
#include "nir_builder.h"
/* Some hardware doesn't have a way to check if invocation was demoted,
* in such case we have to track it ourselves.
* OpIsHelperInvocationEXT is specified as:
*
* "An invocation is currently a helper invocation if it was originally
* invoked as a helper invocation or if it has been demoted to a helper
* invocation by OpDemoteToHelperInvocationEXT."
*
* Therefore we:
* - Set gl_IsHelperInvocationEXT = gl_HelperInvocation
* - Add "gl_IsHelperInvocationEXT = true" right before each demote
* - Add "gl_IsHelperInvocationEXT = gl_IsHelperInvocationEXT || condition"
* right before each demote_if
*/
static bool
nir_lower_load_and_store_is_helper(nir_builder *b, nir_instr *instr, void *data)
{
if (instr->type != nir_instr_type_intrinsic)
return false;
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
nir_deref_instr *is_helper_deref = (nir_deref_instr*) data;
switch (intrin->intrinsic) {
case nir_intrinsic_demote: {
b->cursor = nir_before_instr(instr);
nir_store_deref(b, is_helper_deref, nir_imm_bool(b, true), 1);
return true;
}
case nir_intrinsic_demote_if: {
b->cursor = nir_before_instr(instr);
nir_ssa_def *current_is_helper = nir_load_deref(b, is_helper_deref);
nir_ssa_def *updated_is_helper = nir_ior(b, current_is_helper, intrin->src[0].ssa);
nir_store_deref(b, is_helper_deref, updated_is_helper, 1);
return true;
}
case nir_intrinsic_is_helper_invocation: {
b->cursor = nir_before_instr(instr);
nir_ssa_def *is_helper = nir_load_deref(b, is_helper_deref);
nir_ssa_def_rewrite_uses(&intrin->dest.ssa, is_helper);
nir_instr_remove_v(instr);
return true;
}
default:
return false;
}
}
static bool
has_is_helper_invocation(nir_shader *shader)
{
nir_foreach_function(function, shader) {
if (!function->impl)
continue;
nir_foreach_block_safe(block, function->impl) {
nir_foreach_instr_safe(instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
if (intrin->intrinsic == nir_intrinsic_is_helper_invocation)
return true;
}
}
}
return false;
}
bool
nir_lower_is_helper_invocation(nir_shader *shader)
{
if (shader->info.stage != MESA_SHADER_FRAGMENT)
return false;
if (!has_is_helper_invocation(shader))
return false;
nir_function_impl *entrypoint = nir_shader_get_entrypoint(shader);
nir_builder b;
nir_builder_init(&b, entrypoint);
b.cursor = nir_before_cf_list(&entrypoint->body);
nir_variable *is_helper = nir_local_variable_create(entrypoint,
glsl_bool_type(),
"gl_IsHelperInvocationEXT");
nir_ssa_def *started_as_helper = nir_load_helper_invocation(&b, 1);
nir_deref_instr *is_helper_deref = nir_build_deref_var(&b, is_helper);
nir_store_deref(&b, is_helper_deref, started_as_helper, 1);
return nir_shader_instructions_pass(shader,
nir_lower_load_and_store_is_helper,
nir_metadata_all,
is_helper_deref);
}
|
5058e57f3a30680431d5bb8dd7c3c45ec44b167c
|
0744dcc5394cebf57ebcba343747af6871b67017
|
/os/board/rtl8730e/src/component/soc/amebad2/cmsis-dsp/Source/DistanceFunctions/arm_euclidean_distance_f32.c
|
3c90c7e76dd702b4d91e140e2f059f2abd318770
|
[
"GPL-1.0-or-later",
"BSD-3-Clause",
"ISC",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive",
"Apache-2.0"
] |
permissive
|
Samsung/TizenRT
|
96abf62f1853f61fcf91ff14671a5e0c6ca48fdb
|
1a5c2e00a4b1bbf4c505bbf5cc6a8259e926f686
|
refs/heads/master
| 2023-08-31T08:59:33.327998
| 2023-08-08T06:09:20
| 2023-08-31T04:38:20
| 82,517,252
| 590
| 719
|
Apache-2.0
| 2023-09-14T06:54:49
| 2017-02-20T04:38:30
|
C
|
UTF-8
|
C
| false
| false
| 3,687
|
c
|
arm_euclidean_distance_f32.c
|
/* ----------------------------------------------------------------------
* Project: CMSIS DSP Library
* Title: arm_euclidean_distance_f32.c
* Description: Euclidean distance between two vectors
*
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
/*
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "arm_math.h"
#include <limits.h>
#include <math.h>
/**
@addtogroup FloatDist
@{
*/
/**
* @brief Euclidean distance between two vectors
* @param[in] pA First vector
* @param[in] pB Second vector
* @param[in] blockSize vector length
* @return distance
*
*/
#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE)
#include "arm_helium_utils.h"
#include "arm_vec_math.h"
float32_t arm_euclidean_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
{
uint32_t blkCnt;
float32_t tmp;
f32x4_t a, b, accumV, tempV;
accumV = vdupq_n_f32(0.0f);
blkCnt = blockSize >> 2;
while (blkCnt > 0U) {
a = vld1q(pA);
b = vld1q(pB);
tempV = vsubq(a, b);
accumV = vfmaq(accumV, tempV, tempV);
pA += 4;
pB += 4;
blkCnt--;
}
/*
* tail
* (will be merged thru tail predication)
*/
blkCnt = blockSize & 3;
if (blkCnt > 0U) {
mve_pred16_t p0 = vctp32q(blkCnt);
a = vldrwq_z_f32(pA, p0);
b = vldrwq_z_f32(pB, p0);
tempV = vsubq(a, b);
accumV = vfmaq_m(accumV, tempV, tempV, p0);
}
arm_sqrt_f32(vecAddAcrossF32Mve(accumV), &tmp);
return (tmp);
}
#else
#if defined(ARM_MATH_NEON)
#include "NEMath.h"
float32_t arm_euclidean_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
{
float32_t accum=0.0f,tmp;
uint32_t blkCnt;
float32x4_t a,b,accumV;
float32x2_t accumV2;
accumV = vdupq_n_f32(0.0f);
blkCnt = blockSize >> 2;
while(blkCnt > 0)
{
a = vld1q_f32(pA);
b = vld1q_f32(pB);
a = vsubq_f32(a,b);
accumV = vmlaq_f32(accumV,a,a);
pA += 4;
pB += 4;
blkCnt --;
}
accumV2 = vpadd_f32(vget_low_f32(accumV),vget_high_f32(accumV));
accum = vget_lane_f32(accumV2, 0) + vget_lane_f32(accumV2, 1);
blkCnt = blockSize & 3;
while(blkCnt > 0)
{
tmp = *pA++ - *pB++;
accum += SQ(tmp);
blkCnt --;
}
arm_sqrt_f32(accum,&tmp);
return(tmp);
}
#else
float32_t arm_euclidean_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
{
float32_t accum=0.0f,tmp;
while(blockSize > 0)
{
tmp = *pA++ - *pB++;
accum += SQ(tmp);
blockSize --;
}
arm_sqrt_f32(accum,&tmp);
return(tmp);
}
#endif
#endif /* defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) */
/**
* @} end of FloatDist group
*/
|
fdfadcd4fdab2261f9cbad68878f75a08291ef38
|
f84321cbc44eadc437dddeb4e3529ddcc1c5bcae
|
/openmp/slm.c
|
e578c6c5c3e879ea445c140a894ca87d7373bca5
|
[
"MIT"
] |
permissive
|
jeffhammond/HPCInfo
|
7d08fda4ab3a6301f6c7853bd72c7fbe06639f9f
|
8aff33b946cbd978b951f22c1b5a9140587be95e
|
refs/heads/master
| 2023-08-17T01:45:51.607023
| 2023-08-11T05:28:50
| 2023-08-11T05:28:50
| 12,674,497
| 261
| 60
|
MIT
| 2023-04-19T14:47:20
| 2013-09-08T01:45:33
|
C
|
UTF-8
|
C
| false
| false
| 1,269
|
c
|
slm.c
|
// icx -fiopenmp -fopenmp-targets=spir64 slm.c && ./a.out
#include <stdio.h>
#include <omp.h>
int main(void)
{
int mxtm = 0;//omp_get_max_teams();
int mxtd = 0;//omp_get_teams_thread_limit();
printf("omp_get_max_teams = %d\n",mxtm);
printf("omp_get_teams_thread_limit = %d\n",mxtd);
#pragma omp target teams reduction(max:mxtm,mxtd)
{
mxtm = omp_get_num_teams();
mxtd = omp_get_max_threads();
}
printf("omp_get_max_teams = %d\n",mxtm);
printf("omp_get_teams_thread_limit = %d\n",mxtd);
//int * a = omp_target_alloc(mxtm*mxtd*sizeof(int),omp_get_default_device());
int * restrict a = calloc(mxtm*mxtd,sizeof(int));
printf("a=%p\n",a);
#pragma omp target teams map(tofrom:a[0:mxtm*mxtd]) //num_teams(4)
{
const int team = omp_get_team_num();
#pragma omp parallel shared(a) //num_threads(4)
{
mxtd = omp_get_max_threads();
const int thrd = omp_get_thread_num();
printf("team %6d thread %6d total %9d\n", team, thrd, mxtd*team+thrd);
#pragma omp atomic write
a[mxtd*team+thrd] = mxtd*team+thrd;
}
}
for (int i=0; i<mxtd*mxtm; i++) {
if (a[i] != 0) printf("%d,",a[i]);
}
return 0;
}
|
20530cedc72bab1687c314c04978b6c9e39cd98a
|
ec34c10de6b7cde45b12fa40e036120633069996
|
/cam_KWIQGuider/KWIQGuider_priv.h
|
71314c126261e2219973e02e55a9fd1c84d25a28
|
[
"BSD-3-Clause"
] |
permissive
|
OpenPHDGuiding/phd2
|
7640bba3e9a20501ac99d0504fecc5be73d53633
|
9ff645f1fd5861722497221ecc4d000136b66e28
|
refs/heads/master
| 2023-09-01T18:13:37.555796
| 2023-08-27T23:53:18
| 2023-08-27T23:53:18
| 38,025,807
| 239
| 115
|
BSD-3-Clause
| 2023-09-11T02:33:21
| 2015-06-25T03:31:41
|
C++
|
UTF-8
|
C
| false
| false
| 5,500
|
h
|
KWIQGuider_priv.h
|
/*********************************************************************************************
Copyright/Use header?
*********************************************************************************************/
// Enable 'DBG' macro
//#define DEBUG 1
#ifndef __KWIQGUIDER_PRIV_H_
#define __KWIQGUIDER_PRIV_H_
//#ifdef HAVE_CONFIG_H
//# include "config.h"
//#endif
#include <libusb.h>
#include <cassert>
//#include <usb.h>
#ifdef __WIN32__
# include "windows.h"
# define sleep(n) Sleep(1000 * n)
#else
# include <unistd.h>
#endif
#if DEBUG
# define DBG(...) fprintf(stderr, __VA_ARGS__)
#else
# define DBG(...)
#endif
#ifdef SSAG_LOADER_VENDOR_ID
#error should not happen
#undef SSAG_LOADER_VENDOR_ID
#endif
#undef SSAG_LOADER_PRODUCT_ID
#undef SSAG_VENDOR_ID
#undef SSAG_PRODUCT_ID
/**********************************************/
/****** LOADER_*_ID's are presented when device first plugged in ******/
/**********************************************/
/* KWIQGuider Loader VID/PID for loading firmware */
#define SSAG_LOADER_VENDOR_ID 0x1618
#define SSAG_LOADER_PRODUCT_ID 0x0901
/* SSAG VID/PID */
#define SSAG_VENDOR_ID 0x1856
#define SSAG_PRODUCT_ID 0x0012
/* Opens a usb_dev_handle based on the vendor id and product id */
static inline int usb_open_device(libusb_device_handle **device, int vendorID, int productId, const char *serial)
{
libusb_device **list = 0;
libusb_device_handle *handle = 0;
ssize_t cnt = libusb_get_device_list(NULL, &list);
if (cnt < 0)
{
DBG("No USB device found.");
return 0;
}
for (ssize_t i = 0; i < cnt; i++)
{
assert(handle == 0);
libusb_device *device = list[i];
struct libusb_device_descriptor desc;
int r = libusb_get_device_descriptor(device, &desc);
if (r < 0)
{
DBG("Device description querying failed for device %d.", i);
continue;
}
if (desc.idVendor == vendorID && desc.idProduct == productId)
{
r = libusb_open(device, &handle);
if(r < 0 || handle == 0)
{
DBG("Device #%d opening error (serial %d).", i, desc.iSerialNumber);
continue;
}
if (serial == NULL)
{
goto havedevice;
}
char devserial[256];
/* Copy serial */
int len = libusb_get_string_descriptor_ascii(
handle,
desc.iSerialNumber & 0xff,
(unsigned char*)devserial,
(int) sizeof(devserial));
if (len < 0)
{
DBG("Device open failed: cannot get the serial from the handle.");
libusb_close(handle);
handle = 0;
continue;
}
if ((len > 0) && (strcmp(devserial, serial) == 0)) {
goto havedevice;
}
libusb_close(handle);
handle = 0;
}
}
libusb_free_device_list(list, 1);
return 0;
havedevice:
libusb_set_configuration(handle, 1);
int r = libusb_claim_interface(handle, 0);
if (r != 0)
{
DBG("USB error in claiming the interface");
}
*device = handle;
return 1;
/*
usb_find_busses();
usb_find_devices();
for (bus = usb_get_busses(); bus; bus = bus->next) {
for (dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == vendorID &&
dev->descriptor.idProduct == productId) {
handle = usb_open(dev);
if (handle)
{
if (serial == NULL) {
goto havedevice;
}
else
{
char devserial[256];
int len = 0;
if (dev->descriptor.iSerialNumber > 0) {
len = usb_get_string_simple(handle, dev->descriptor.iSerialNumber, devserial, sizeof(devserial));
}
if ((len > 0) && (strcmp(devserial, serial) == 0)) {
goto havedevice;
}
}
}
}
}
}
return 0;
havedevice:
usb_set_configuration(handle, 1);
usb_claim_interface(handle, 0);
*/
/*** JB--- "Function not implemented" so don't call it?
libusb Developers Guide says, "Implemented on Linux only."
Why is #ifdef=TRUE, if it's not implemented (and where is it getting set true)?
KWIQGuider will always fail (may crash) to connect with this uncommented (even though it may say it succeeded???)***/
/*
#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
if (usb_detach_kernel_driver_np(handle, 0) < 0) {
fprintf(stderr, "Warning: Could not detach kernel driver: %s\nYou may need to run this as root or add yourself to the usb group\n", usb_strerror());
return 0;
}
#endif
*/
// *device = handle;
// return 1;
}
#endif /* __KWIQGUIDER_PRIV_H_ */
|
95800760cf54a7b7e20b1fc491cf7d5998fe8f7f
|
e683a0b8dbb87c7ceb99e0d06896174a559d2c67
|
/Library/JS/srccore/statemnt.c
|
41c8364f24fa1350a03e5af264fa7db0e3c4050a
|
[
"Apache-2.0"
] |
permissive
|
bluewaysw/pcgeos
|
f093d79567d977d992f47065056d14d5a04b9f14
|
c6ae4c8e77b54b9ff654c3916f2191f8b1a1b65d
|
refs/heads/master
| 2023-08-31T00:17:54.481175
| 2023-08-29T19:00:49
| 2023-08-29T19:00:49
| 157,968,410
| 603
| 88
|
Apache-2.0
| 2023-09-13T07:44:06
| 2018-11-17T09:09:55
|
Assembly
|
UTF-8
|
C
| false
| false
| 31,496
|
c
|
statemnt.c
|
/* Statemnt.c Compile statements to secodes
*/
/* (c) COPYRIGHT 1993-98 NOMBAS, INC.
* 64 SALEM ST.
* MEDFORD, MA 02155 USA
*
* ALL RIGHTS RESERVED
*
* This software is the property of Nombas, Inc. and is furnished under
* license by Nombas, Inc.; this software may be used only in accordance
* with the terms of said license. This copyright notice may not be removed,
* modified or obliterated without the prior written permission of Nombas, Inc.
*
* This software is a Trade Secret of Nombas, Inc.
*
* This software may not be copied, transmitted, provided to or otherwise made
* available to any other person, company, corporation or other entity except
* as specified in the terms of said license.
*
* No right, title, ownership or other interest in the software is hereby
* granted or transferred.
*
* The information contained herein is subject to change without notice and
* should not be construed as a commitment by Nombas, Inc.
*/
#include "srccore.h"
#if (0!=JSE_COMPILER)
/* ---------------------------------------------------------------------- */
/* Statement compilers. They mirror the stuff in the old 'statement.cpp' */
/* as much as possible. */
/* ---------------------------------------------------------------------- */
static jsebool NEAR_CALL
secompileIf(struct secompile *this)
{
ADDR_TYPE falseptr,elseptr;
assert( tokType(this->token)==seTokIf );
secompileAdvancePtr(this);
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreBAD_IF);
return False;
}
secompileAdvancePtr(this);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
assert( this->expr.type==EXPR_STACKTOP );
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_IF);
return False;
}
falseptr = secompileCurrentItem(this);
secompileAddItem(this,seGotoFalse,(ADDR_TYPE)0);
secompileAdvancePtr(this);
if( !secompileStatement(this) ) return False;
elseptr = secompileCurrentItem(this);
if( tokType(this->token)==seTokElse )
{
secompileAddItem(this,seGoto,(ADDR_TYPE)0);
}
secompileGotoHere(this,falseptr);
if( tokType(this->token)==seTokElse )
{
secompileAdvancePtr(this);
if( !secompileStatement(this) ) return False;
secompileGotoHere(this,elseptr);
}
return True;
}
static jsebool NEAR_CALL
secompileWhile(struct secompile *this,struct gotoItem *label)
{
ADDR_TYPE top_of_loop,ptr;
assert( tokType(this->token)==seTokWhile );
top_of_loop = secompileCurrentItem(this);
secompileAdvancePtr(this);
if( !secompileNewLoop(this,label) ) return False;
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreBAD_WHILE);
return False;
}
secompileAdvancePtr(this);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
assert( this->expr.type==EXPR_STACKTOP );
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_WHILE);
return False;
}
secompileAdvancePtr(this);
ptr = secompileCurrentItem(this);
secompileAddItem(this,seGotoFalse,(ADDR_TYPE)0);
if( !secompileStatement(this) ) return False;
secompileAddItem(this,seGoto,top_of_loop);
secompileGotoHere(this,ptr);
secompileEndLoop(this,secompileCurrentItem(this),top_of_loop,label);
return True;
}
static jsebool NEAR_CALL
secompileDo(struct secompile *this,struct gotoItem *label)
{
ADDR_TYPE top_of_loop;
assert( tokType(this->token)==seTokDo );
top_of_loop = secompileCurrentItem(this);
secompileAdvancePtr(this);
if( !secompileNewLoop(this,label) ) return False;
if( !secompileStatement(this) ) return False;
if( tokType(this->token)!=seTokWhile )
{
callQuit(this->call,textcoreBAD_DO);
return False;
}
secompileAdvancePtr(this);
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreBAD_DO);
return False;
}
secompileAdvancePtr(this);
secompileAddItem(this,seContinueFunc,this->prevLineNumber);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
assert( this->expr.type==EXPR_STACKTOP );
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_DO);
return False;
}
secompileAdvancePtr(this);
secompileAddItem(this,seGotoTrue,top_of_loop);
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
secompileEndLoop(this,secompileCurrentItem(this),top_of_loop,label);
return True;
}
static jsebool NEAR_CALL
secompileVar(struct secompile *this)
{
assert( tokType(this->token)==seTokVar );
do {
secompileAdvancePtr(this);
if( tokType(this->token)!=seTokIdentifier )
{
callQuit(this->call,textcoreVAR_NEEDS_VARNAME);
return False;
}
/* don't add if already a parameter name */
if( LOCAL_TEST_IF_INIT_FUNCTION(this->locfunc,this->call) ||
loclFindParam(this->locfunc,tokGetName(this->token))==-1 )
{
loclAddLocal(this->call,this->locfunc,tokGetName(this->token));
}
/* initialize to call expression parser */
SE_NEW_EXPR(this);
/* assignment statements can't have commas in them */
if( !secompileOperatorExpression(this,PRI_ASSIGN,False) ) return False;
/* we don't do anything with the value */
secompileDiscard(this);
} while( tokType(this->token)==',' );
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
return True;
}
static jsebool NEAR_CALL
secompileFor(struct secompile *this,struct gotoItem *label)
{
jsebool has_init = False;
VarName index = NULL;
assert( tokType(this->token)==seTokFor );
secompileAdvancePtr(this);
if( !secompileNewLoop(this,label) ) return False;
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreBAD_FOR_STATEMENT);
return False;
}
secompileAdvancePtr(this);
if( tokType(this->token)==seTokVar )
{
struct tok tok;
tokLookAhead(this,&tok);
/* if it is not really a variable, this will be bad, but then
* the var statement will fail anyway, so we are ok.
*/
index = tokGetName(&tok);
/* initialization is really For statment. */
if( !secompileVar(this) ) return False;
}
else
{
/* possible to have no initialization */
if( tokType(this->token)!=';' )
{
/* initialization is just some expression */
SE_NEW_EXPR(this);
if( !secompileExpressionNoIn(this) ) return False;
has_init = True;
}
if( tokType(this->token)!=';' &&
tokType(this->token)!=seTokIn )
{
callQuit(this->call,textcoreBAD_FOR_STATEMENT);
return False;
}
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
}
/* Do the for..in part */
if( tokType(this->token)==seTokIn )
{
ADDR_TYPE top;
struct seExpression save;
if( index!=NULL )
{
if( !LOCAL_TEST_IF_INIT_FUNCTION(this->locfunc,this->call) &&
(this->expr.index = loclFindLocal(this->locfunc,index))!=-1 )
{
this->expr.index++;
this->expr.type = EXPR_LOCAL;
}
else if( !LOCAL_TEST_IF_INIT_FUNCTION(this->locfunc,this->call) &&
(this->expr.index = loclFindParam(this->locfunc,index))!=-1 )
{
this->expr.index = (sword16)(-this->expr.index);
this->expr.type = EXPR_LOCAL;
}
else
{
this->expr.name = index;
this->expr.type = EXPR_GLOBAL;
}
}
save = this->expr;
if( this->expr.type==EXPR_MEMBER || this->expr.type==EXPR_ARRAY )
{
callQuit(this->call,textcoreBAD_FOR_IN_STATEMENT);
return False;
}
if( !has_init && index==NULL )
{
callQuit(this->call,textcoreBAD_FOR_IN_STATEMENT);
return False;
}
secompileAdvancePtr(this);
SE_NEW_EXPR(this);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_FOR_IN_STATEMENT);
return False;
}
secompileAdvancePtr(this);
secompileAddItem(this,seToObject);
secompileAddItem(this,sePushNull);
top = secompileCurrentItem(this);
secompileAddItem(this,seGotoForIn,(ADDR_TYPE)0);
this->expr = save;
secompilePutValue(this);
secompileDiscard(this);
if( !secompileStatement(this) ) return False;
secompileAddItem(this,seGoto,top);
secompileFixupGotoItem(this,top,secompileCurrentItem(this));
secompileEndLoop(this,secompileCurrentItem(this),top,label);
secompileAddItem(this,sePopDiscard);
secompileAddItem(this,sePopDiscard);
}
else
{
ADDR_TYPE out_of_loop = 0;
jsebool patch_out_of_loop = False;
ADDR_TYPE test;
ADDR_TYPE go_into_loop,increment;
/* do the regular for loop part */
if( has_init ) secompileDiscard(this);
test = secompileCurrentItem(this);
/* choice made here to have the test portion be the only place
* that mayIContinue is called. It seems the natural place
* for a compiler to stop.
*/
secompileAddItem(this,seContinueFunc,this->prevLineNumber);
if( tokType(this->token)!=';' )
{
/* this is the test */
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
patch_out_of_loop = True;
out_of_loop = secompileCurrentItem(this);
secompileAddItem(this,seGotoFalse,(ADDR_TYPE)0);
this->expr.type = EXPR_VOID;
if( tokType(this->token)!=';' )
{
callQuit(this->call,textcoreBAD_FOR_STATEMENT);
return False;
}
}
else
{
/* no test */
}
go_into_loop = secompileCurrentItem(this);
secompileAddItem(this,seGoto,(ADDR_TYPE)0);
increment = secompileCurrentItem(this);
secompileAdvancePtr(this);
if( tokType(this->token)!=')' )
{
/* the increment */
if( !secompileExpression(this) ) return False;
/* the increment is only used for side effects */
secompileDiscard(this);
}
secompileAddItem(this,seGoto,test);
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_FOR_STATEMENT);
return False;
}
secompileGotoHere(this,go_into_loop);
secompileAdvancePtr(this);
if( !secompileStatement(this) ) return False;
/* we go back up and do the test and increment */
secompileAddItem(this,seGoto,increment);
if( patch_out_of_loop ) secompileGotoHere(this,out_of_loop);
secompileEndLoop(this,secompileCurrentItem(this),increment,label);
}
return True;
}
/*
* Whenever any case matches, we clean up the test from the stack.
* Bigger code, but its another thing I don't have to keep track
* of in the interpret() loop. It would be easy if the switch always
* fully executed, in which case we could just do the pop once,
* but there can be a return in it.
*/
static jsebool NEAR_CALL
secompileSwitch(struct secompile *this,struct gotoItem *label)
{
ADDR_TYPE def_ptr;
ADDR_TYPE goto_ptr2 = (ADDR_TYPE)-1;
ADDR_TYPE goto_ptr;
assert( tokType(this->token)==seTokSwitch );
secompileAdvancePtr(this);
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreBAD_SWITCH);
return False;
}
secompileAdvancePtr(this);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_WHILE);
return False;
}
secompileAdvancePtr(this);
if( tokType(this->token)!='{' )
{
callQuit(this->call,textcoreSWITCH_NEEDS_BRACE);
return False;
}
secompileAdvancePtr(this);
def_ptr = (ADDR_TYPE)-1;
/* goto ptr is the last test for a case if false, so it must always chain
* to the next test
*/
if( !secompileNewLoop(this,label) ) return False;
/* set up to jump to the first comparison */
goto_ptr = secompileCurrentItem(this);
secompileAddItem(this,seGoto,(ADDR_TYPE)0);
while( tokType(this->token)!='}' )
{
if( tokType(this->token)==seTokDefault )
{
secompileAdvancePtr(this);
if( tokType(this->token)!=':' )
{
callQuit(this->call,textcoreCONDITIONAL_MISSING_COLON);
return False;
}
secompileAdvancePtr(this);
if( def_ptr!=(ADDR_TYPE)-1 )
{
callQuit(this->call,textcoreDUPLICATE_DEFAULT);
return False;
}
def_ptr = (ADDR_TYPE) secompileCurrentItem(this);
continue;
}
/* each case is an if test. We jump over this test first, so any
* fallthru will act correctly. If the test succeeds we pop the value
* from the stack so any executing code doesn't have to try to
* remember that it is there
*/
if( tokType(this->token)==seTokCase )
{
secompileAdvancePtr(this);
if( goto_ptr!=(ADDR_TYPE)-1 )
{
/* if we are already executing the code for a successful comparison
* jump over this test into the code for the next case (the
* fallthru.) Otherwise this is the first test, so make it.
*/
goto_ptr2 = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seGoto,(ADDR_TYPE)0);
secompileGotoHere(this,(uint)goto_ptr);
}
else
{
goto_ptr2 = (ADDR_TYPE)-1;
}
secompileAddItem(this,sePushDup);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
if( tokType(this->token)!=':' )
{
callQuit(this->call,textcoreCONDITIONAL_MISSING_COLON);
return False;
}
secompileAdvancePtr(this);
secompileAddItem(this,seStrictEqual);
goto_ptr = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seGotoFalse,(ADDR_TYPE)0);
/* this is it, get rid of the item being tested on the stack */
secompileAddItem(this,sePopDiscard);
if( goto_ptr2!=(ADDR_TYPE)-1 ) secompileGotoHere(this,(uint)goto_ptr2);
continue;
}
/* else this is a statement in the switch */
if( goto_ptr==(ADDR_TYPE)-1 )
{
callQuit(this->call,textcoreSWITCH_NEEDS_CASE);
return False;
}
if( !secompileStatement(this) ) return False;
}
assert( tokType(this->token)=='}' );
secompileAdvancePtr(this);
if( goto_ptr!=(ADDR_TYPE)-1 )
{
goto_ptr2 = (ADDR_TYPE)secompileCurrentItem(this);
secompileAddItem(this,seGoto,(ADDR_TYPE)0);
secompileGotoHere(this,(uint)goto_ptr);
}
/* we are at the end of the switch, get rid of the still remaining
* comparison item, then goto the default if any.
*/
secompileAddItem(this,sePopDiscard);
if( def_ptr!=(ADDR_TYPE)-1 ) secompileAddItem(this,seGoto,def_ptr);
secompileGotoHere(this,(uint)goto_ptr2);
/* break and continue on switch mean the same thing - just get out */
secompileEndLoop(this,secompileCurrentItem(this),
secompileCurrentItem(this),label);
return True;
}
/* With now acts very much like try - it has a fake 'finally'
* part which is where it removes the extra item from the
* scope chain.
*
* This has code cut-and-pasted from Try.
*/
static jsebool NEAR_CALL
secompileWith(struct secompile *this)
{
ADDR_TYPE one,two,three,out;
assert( tokType(this->token)==seTokWith );
secompileAdvancePtr(this);
one = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seStartTry,(ADDR_TYPE)0);
two = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seCatchTry,two); /* points to itself, no handler yet */
three = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seFinallyTry,(ADDR_TYPE)0);
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreBAD_WITH_STATEMENT);
return False;
}
secompileAdvancePtr(this);
if( !secompileExpression(this) ) return False;
secompileGetValue(this);
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreBAD_WITH_STATEMENT);
return False;
}
secompileAdvancePtr(this);
secompileAddItem(this,seScopeAdd);
this->with_depth++;
if( !secompileStatement(this) ) return False;
/* After block successfully completes, go to the finally section via
* a transfer out of the block. If we 'goto' the finally section directly,
* the section won't be flagged so if it then returns or such, it will
* call itself again rather than actually returning.
*/
out = (ADDR_TYPE)secompileCurrentItem(this);
secompileAddItem(this,seTransfer,(ADDR_TYPE)0);
/* Always go to the finally section. */
secompileGotoHere(this,(uint)three);
/* All done, make sure our finally does its cleanup */
secompileAddItem(this,seScopeRemove);
secompileAddItem(this,seEndTry);
secompileGotoHere(this,(uint)one);
secompileGotoHere(this,(uint)out);
this->with_depth--;
return True;
}
/* ECMA2.0: See secode.c for information on how this works. */
static jsebool NEAR_CALL
secompileTry(struct secompile *this)
{
ADDR_TYPE one,two,three,out;
jsebool catchfound = False;
assert( tokType(this->token)==seTokTry );
secompileAdvancePtr(this);
one = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seStartTry,(ADDR_TYPE)0);
two = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seCatchTry,two); /* points to itself, no handler yet */
three = (ADDR_TYPE) secompileCurrentItem(this);
secompileAddItem(this,seFinallyTry,(ADDR_TYPE)0);
/* Try must in fact be a block */
if( tokType(this->token)!='{' )
{
callQuit(this->call,textcoreTRY_NEEDS_BLOCK);
return False;
}
if( !secompileStatement(this) ) return False;
/* After block successfully completes, go to the finally section via
* a transfer out of the block. If we 'goto' the finally section directly,
* the section won't be flagged so if it then returns or such, it will
* call itself again rather than actually returning.
*/
out = (ADDR_TYPE)secompileCurrentItem(this);
secompileAddItem(this,seTransfer,(ADDR_TYPE)0);
if( tokType(this->token)==seTokCatch )
{
/* Point to first catch handler */
secompileGotoHere(this,(uint)two);
/* Catch clause is the format:
* code
* transferAlways <out of block>
*/
/* ECMA2.0: can only have a single catch clause */
if( tokType(this->token)==seTokCatch )
{
/* fixup last item if any */
assert( !catchfound );
catchfound = True;
secompileAdvancePtr(this);
if( tokType(this->token)!='(' )
{
callQuit(this->call,textcoreTRY_CATCH_PARAM);
return False;
}
secompileAdvancePtr(this);
if( tokType(this->token)!=seTokIdentifier )
{
callQuit(this->call,textcoreTRY_CATCH_PARAM);
return False;
}
secompileAddItem(this,seStartCatch,tokGetName(this->token));
this->with_depth++;
secompileAdvancePtr(this);
if( tokType(this->token)!=')' )
{
callQuit(this->call,textcoreTRY_CATCH_PARAM);
return False;
}
secompileAdvancePtr(this);
/* Try catch clauses must in fact be blocks */
if( tokType(this->token)!='{' )
{
callQuit(this->call,textcoreTRY_NEEDS_BLOCK);
return False;
}
if( !secompileStatement(this) ) return False;
this->with_depth--;
secompileAddItem(this,seEndCatch);
/* it is a bit inefficient to goto a transfer, but this way we
* don't need to save a list of all locations and then patch
* them all.
*/
secompileAddItem(this,seGoto,out);
}
if( tokType(this->token)==seTokCatch )
{
callQuit(this->call,textcoreTRY_CATCH_TWICE);
return False;
}
}
/* Always go to the finally section. */
secompileGotoHere(this,(uint)three);
/* First any user code */
if( tokType(this->token)==seTokFinally )
{
secompileAdvancePtr(this);
/* Try finally clause must in fact be a block */
if( tokType(this->token)!='{' )
{
callQuit(this->call,textcoreTRY_NEEDS_BLOCK);
return False;
}
if( !secompileStatement(this) ) return False;
}
else if( !catchfound )
{
callQuit(this->call,textcoreTRY_NEEDS_SOMETHING);
return False;
}
/* All done, make sure our finally does its cleanup */
secompileAddItem(this,seEndTry);
secompileGotoHere(this,one);
secompileGotoHere(this,out);
return True;
}
jsebool NEAR_CALL secompileStatement(struct secompile *this)
{
jsebool success = True;
struct gotoItem *label = this->looplabel;
this->looplabel = NULL;
if( tokType(this->token)==seTokFilename ||
tokType(this->token)==seTokLineNumber )
secompileAdvancePtr(this);
/* we check to see if we should continue at the beginning of each
* statement. For those people working on the debugger, if you think
* the debugger should pause at any particular time, put a mayIContinue
* at that time. The only place I can think of might be parts of
* a for() loop, but I don't think it should. We don't add it at the
* beginning of a block, since the first statement in the block is where
* it should stop - the begin block is just a grouping thing.
*
* I've restored ';', because otherwise an empty loop has no
* test in it. For instance, 'while( 1 ) {}' will not respond to
* ctrl-c.
*/
if( tokType(this->token)!='{' && /* tokType(this->token)!=';' && */
tokType(this->token)!=seTokFunction && tokType(this->token)!=seTokCFunction )
{
/* The one token lookahead causes the linenumber to appear too early.
* this fixes the problem
*/
secompileAddItem(this,seContinueFunc,this->prevLineNumber);
}
switch( tokType(this->token) )
{
/* ECMA2.0 */
case seTokFunction: case seTokCFunction:
success = secompileFunction(this,False);
break;
/* ECMA2.0 */
case seTokThrow:
{
struct tok tok;
tokLookAhead(this,&tok);
/* handle 'no line terminator here' in the production */
if( tokType(&tok)==seTokEOL )
{
/* newline not allowed -- nombas/brianc 10/17/00 */
callQuit(this->call,textcoreTHROW_NO_NEWLINE);
success = False;
break;
}
else
{
secompileAdvancePtr(this);
if( !secompileExpression(this) )
{
success = False;
break;
}
secompileGetValue(this);
/* the error condition will cause an immediate error */
secompileAddItem(this,seReturnThrow);
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
}
break;
}
case seTokReturn:
{
struct tok tok;
tokLookAhead(this,&tok);
/* handle 'no line terminator here' in the production */
/* also check for ending '}' -- nombas/brianc 10/17/00 */
if( tokType(&tok)==seTokEOL || tokType(&tok)=='}')
{
/* auto semicolon insertion */
secompileAdvancePtr(this);
secompileAddItem(this,sePushUndefined);
secompileAddItem(this,seReturn);
}
else
{
secompileAdvancePtr(this);
if( tokType(this->token)!=';' )
{
if( !secompileExpression(this) )
{
success = False;
break;
}
secompileGetValue(this);
}
else
{
secompileAddItem(this,sePushUndefined);
}
secompileAddItem(this,seReturn);
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
}
break;
}
case '{':
/* to parse this, we simply have any number of statements followed
* by an EndBlock
*/
secompileAdvancePtr(this);
if( tokType(this->token)=='}' )
{
/* need a break or an empty statement can end up with no
* continue which really bombs in a loop.
*/
secompileAddItem(this,seContinueFunc,this->prevLineNumber);
}
else
{
while( tokType(this->token)!='}' )
{
if( !secompileStatement(this) )
{
success = False;
break;
}
}
}
if( success )
{
assert( tokType(this->token)=='}' );
/* eat the '}' */
secompileAdvancePtr(this);
}
break;
/* several statement types just have us calling further routines to ease
* readability and modularize
*/
case seTokIf:
success = secompileIf(this);
break;
case seTokWhile:
success = secompileWhile(this,label);
break;
case seTokDo:
success = secompileDo(this,label);
break;
case seTokWith:
success = secompileWith(this);
break;
case seTokVar:
success = secompileVar(this);
break;
case seTokFor:
success = secompileFor(this,label);
break;
case seTokSwitch:
success = secompileSwitch(this,label);
break;
case seTokTry:
success = secompileTry(this);
break;
case seTokBreak: case seTokContinue:
{
/* Either can have a variable parameter. If so, that must be an
* existing label, and that label must have a loop associated with
* it.
*/
struct loopTracker *it = NULL;
jsebool isbreak = tokType(this->token)==seTokBreak;
secompileAdvancePtr(this);
/* handle 'no line terminator here' in the production */
if( tokType(this->token)==seTokIdentifier &&
tokType(SECOMPILE_PREV_TOKEN(this))!=seTokEOL )
{
uint x;
VarName name = tokGetName(this->token);
for( x=0;x<this->gotoTrack->labelsUsed;x++ )
{
if( this->gotoTrack->labels[x].label==name )
break;
}
/* This used to be >, but that is wrong */
if( x==this->gotoTrack->labelsUsed )
{
callQuit(this->call,textcoreGOTO_LABEL_NOT_FOUND,name);
success = False;
break;
}
else
{
it = this->gotoTrack->labels[x].loop;
if( it==NULL )
{
callQuit(this->call,textcoreNOT_LOOP_LABEL);
success = False;
break;
}
}
secompileAdvancePtr(this);
}
if( isbreak )
success = secompileAddBreak(this,it);
else
success = secompileAddContinue(this,it);
if( success )
{
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
}
break;
}
case seTokGoto:
secompileAdvancePtr(this);
if( tokType(this->token)!=seTokIdentifier )
{
callQuit(this->call,textcoreGOTO_LABEL_NOT_FOUND);
success = False;
break;
}
assert( tokGetName(this->token)!=NULL );
if( !secompileAddGoto(this,tokGetName(this->token)) )
{
success = False;
break;
}
secompileAdvancePtr(this);
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
break;
case ';':
secompileAdvancePtr(this);
break;
default:
{
struct tok tok;
/* If it is '/' or '/=', then it will end up being a
* regular expression. The look-ahead interferes with
* its parsing (both are hacks on top of a basic
* one-token look ahead.) Rather than rewrite each hack
* to know about each other, it is much easier just to
* make sure they don't interfere. Currently, an assert
* will trigger if they do.
*/
if( tokType(this->token)!='/' &&
tokType(this->token)!=seTokDivEqual )
{
tokLookAhead(this,&tok);
/* It is either an expression or a label */
if( tokType(this->token)==seTokIdentifier &&
tokType(&tok)==':' )
{
assert( tokGetName(this->token)!=NULL );
success = secompileAddLabel(this,tokGetName(this->token));
this->looplabel = this->gotoTrack->labels+(this->gotoTrack->labelsUsed-1);
if( success )
{
secompileAdvancePtr(this);
secompileAdvancePtr(this);
}
break;
}
}
SE_NEW_EXPR(this);
success = secompileExpression(this);
/* eat statement terminator if present */
if( tokType(this->token)==';' ) secompileAdvancePtr(this);
secompileDiscard(this);
break;
}
}
return success;
}
#endif
|
95331a7505430b7c92d8c49f49dfd91457686ac2
|
bdc27c22522a99b5bff2ec4cfa95fadcba65747d
|
/thirdparty/dill/dill/tests/rtest.c
|
88282b149ff6318839e200bba16afa2b678b8749
|
[
"Apache-2.0"
] |
permissive
|
ornladios/ADIOS2
|
a34e257b28adb26e6563b800502266ebb0c9088c
|
c8b7b66ed21b03bfb773bd972d5aeaaf10231e67
|
refs/heads/master
| 2023-08-31T18:11:22.186415
| 2023-08-29T20:45:03
| 2023-08-29T20:45:03
| 75,750,830
| 243
| 140
|
Apache-2.0
| 2023-09-14T11:15:00
| 2016-12-06T16:39:55
|
C++
|
UTF-8
|
C
| false
| false
| 381
|
c
|
rtest.c
|
#include <assert.h>
#include "vcode.h"
int main() {
static unsigned insn[1000];
struct v_reg al[10];
v_reg_type r;
struct v_cstate c;
v_clambda("foo", V_NLEAF, insn);
v_getreg(&r, V_I, V_TEMP);
v_push_init(&c);
v_push_argpi(c, "Hello: %d %d\n");
v_seti(r, 10);
v_push_argi(c, r);
v_seti(r,20);
v_push_argi(c, r);
v_ccallv(c, printf);
v_end().v();
return 0;
}
|
f027f1d50db2d36fb5f10183561e0d5408a83f99
|
e3cdfae1dd874479c928dad193b33a4e3b8a623e
|
/src/banim-efxhit.c
|
677f6565d1cfa0c09a1dc27af477ebc9a5ea6165
|
[] |
no_license
|
FireEmblemUniverse/fireemblem8u
|
11493bf94844617b33254110ba006316defb3510
|
b9ad9bcafd9d4ecb7fc13cc77a464e2a82ac8338
|
refs/heads/master
| 2023-09-05T23:39:53.791339
| 2023-09-04T17:31:47
| 2023-09-04T17:31:47
| 121,802,075
| 118
| 31
| null | 2023-09-11T13:08:37
| 2018-02-16T21:21:50
|
Assembly
|
UTF-8
|
C
| false
| false
| 9,306
|
c
|
banim-efxhit.c
|
#include "global.h"
#include "anime.h"
#include "ekrbattle.h"
#include "efxbattle.h"
#include "hardware.h"
#include "proc.h"
/**
* Hit effect for normal atk, pierce and ctr atk
*/
void NewEfxDamageMojiEffect(struct Anim *anim, int hitted)
{
struct ProcEfx *proc;
proc = Proc_Start(ProcScr_efxDamageMojiEffect, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->hitted = hitted;
LZ77UnCompVram(gUnknown_085BA0B8, OBJ_VRAM0 + 0x2000);
}
void efxDamageMojiEffectMain(struct ProcEfx *proc)
{
int time = ++proc->timer;
if (time == 1) {
NewEfxDamageMojiEffectOBJ(proc->anim, proc->hitted);
return;
}
if (time == 0xA) {
Proc_Break(proc);
return;
}
}
void NewEfxDamageMojiEffectOBJ(struct Anim *anim, int hitted)
{
u16 **buf, val1;
struct ProcEfxDamageMojiEffectOBJ *proc;
proc = Proc_Start(ProcScr_efxDamageMojiEffectOBJ, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
if (hitted == 0) {
proc->terminator = 0x32;
buf = gUnknown_085C81A4;
} else {
proc->terminator = 0x32;
buf = gUnknown_085C8218;
}
val1 = GetAnimPosition(anim) == EKR_POS_L ? 0x6100 : 0x5100;
proc->sub_proc = NewEkrsubAnimeEmulator(
anim->xPosition,
anim->yPosition - 0x28,
buf,
2, val1, 0, 3
);
}
void efxDamageMojiEffectOBJMain(struct ProcEfxDamageMojiEffectOBJ *proc)
{
proc->sub_proc->unk32 = proc->anim->xPosition;
if (++proc->timer > proc->terminator) {
Proc_End(proc->sub_proc);
Proc_Break(proc);
}
}
void NewEfxPierceCritical(struct Anim *anim)
{
struct ProcEfx *proc;
struct Anim *anim1 = GetAnimAnotherSide(anim);
int is_pierce;
is_pierce = GetBattleAnimRoundTypeFlags((anim1->nextRoundId - 1) * 2 + GetAnimPosition(anim1)) & ANIM_ROUND_PIERCE;
if (is_pierce != 0) {
NewEfxPierceCriticalEffect(anim);
} else {
SpellFx_ClearBG1Position();
proc = Proc_Start(ProcScr_efxCriricalEffect, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
}
}
void efxCriricalEffectMain(struct ProcEfx *proc)
{
int time = ++proc->timer;
if (time == 1) {
NewEfxCriricalEffectBG(proc->anim);
NewEfxCriricalEffectBGCOL(proc->anim);
return;
}
if (time == 0x11)
Proc_Break(proc);
}
void NewEfxCriricalEffectBG(struct Anim *anim)
{
struct ProcEfxBG *proc;
proc = Proc_Start(ProcScr_efxCriricalEffectBG, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
SpellFx_RegisterBgGfx(gUnknown_085E7028, 0x2000);
SpellFx_RegisterBgPal(gUnknown_085E8108, 0x20);
SpellFx_WriteBgMap(proc->anim, gUnknown_085E8308, gUnknown_085E87A8);
SpellFx_SetSomeColorEffect();
}
void efxCriricalEffectBGMain(struct ProcEfxBG *proc)
{
if (++proc->timer == 0x11) {
SpellFx_ClearBG1();
SetDefaultColorEffects_();
Proc_Break(proc);
}
}
void NewEfxCriricalEffectBGCOL(struct Anim *anim)
{
struct ProcEfxBGCOL *proc;
proc = Proc_Start(ProcScr_efxCriricalEffectBGCOL, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->frame = 0;
proc->frame_config = gUnknown_080DF188;
proc->unk4C = gUnknown_085E8108;
}
void efxCriricalEffectBGCOLMain(struct ProcEfxBGCOL *proc)
{
int ret;
ret = EfxAdvanceFrameLut((s16 *)&proc->timer, (s16 *)&proc->frame, proc->frame_config);
if (ret >= 0) {
u16 *pal = proc->unk4C;
SpellFx_RegisterBgPal(&PAL_BUF_COLOR(pal, ret, 0), 0x20);
return;
}
if (ret == -1) {
Proc_Break(proc);
return;
}
}
void NewEfxNormalEffect(struct Anim *anim)
{
struct ProcEfx *proc;
int is_pierce;
SpellFx_ClearBG1Position();
is_pierce = GetBattleAnimRoundTypeFlags((anim->nextRoundId - 1) * 2 + GetAnimPosition(anim)) & ANIM_ROUND_PIERCE;
if (is_pierce != 0) {
NewEfxPierceNormalEffect(anim);
} else {
proc = Proc_Start(ProcScr_efxNormalEffect, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
}
}
void efxNormalEffectMain(struct ProcEfx *proc)
{
int time;
struct Anim *anim1 = GetAnimAnotherSide(proc->anim);
time = ++proc->timer;
if (time == 1) {
NewEfxFlashBgWhite(proc->anim, 0x4);
return;
}
if (time == 0x4) {
NewEfxNormalEffectBG(anim1);
return;
}
if (time == 0x18) {
Proc_Break(proc);
return;
}
}
void NewEfxNormalEffectBG(struct Anim *anim)
{
struct ProcEfxBG *proc;
gEfxBgSemaphore++;
proc = Proc_Start(ProcScr_efxNormalEffectBG, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->frame = 0;
proc->frame_config = gUnknown_080DF1EE;
proc->tsal = gUnknown_085D8DF4;
proc->tsar = gUnknown_085D8DF4;
SpellFx_RegisterBgPal(gUnknown_085E9150, 0x20);
SpellFx_RegisterBgGfx(gUnknown_085E8D88, 0x2000);
SpellFx_SetSomeColorEffect();
if (gEkrDistanceType != EKR_DISTANCE_CLOSE) {
if (GetAnimPosition(proc->anim) == EKR_POS_L)
BG_SetPosition(BG_1, 0x18, 0);
else
BG_SetPosition(BG_1, 0xE8, 0);
}
}
void efxNormalEffectBGMain(struct ProcEfxBG *proc)
{
int ret;
ret = EfxAdvanceFrameLut((s16 *)&proc->timer, (s16 *)&proc->frame, proc->frame_config);
if (ret >= 0) {
u16 **buf1 = proc->tsal;
u16 **buf2 = proc->tsar;
SpellFx_WriteBgMap(proc->anim, buf1[ret], buf2[ret]);
return;
}
if (ret == -1) {
SpellFx_ClearBG1();
gEfxBgSemaphore--;
SetDefaultColorEffects_();
Proc_Break(proc);
}
}
void NewEfxPierceCriticalEffect(struct Anim *anim)
{
struct ProcEfx *proc;
SpellFx_ClearBG1Position();
proc = Proc_Start(ProcScr_efxPierceCriticalEffect, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
}
void efxPierceCriticalEffectMain(struct ProcEfxBG *proc)
{
int time = ++proc->timer;
if (time == 1) {
NewEfxPierceCriticalEffectBG(proc->anim);
NewEfxPierceCriticalEffectBGCOL(proc->anim);
return;
}
if (time == 0x11)
Proc_Break(proc);
}
void NewEfxPierceCriticalEffectBG(struct Anim *anim)
{
struct ProcEfxBG *proc;
proc = Proc_Start(ProcScr_efxPierceCriticalEffectBG, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
SpellFx_RegisterBgGfx(gUnknown_085CFB70, 0x2000);
SpellFx_RegisterBgPal(gUnknown_085D0820, 0x20);
SpellFx_WriteBgMap(proc->anim, gUnknown_085D0A20, gUnknown_085D0CE0);
SpellFx_SetSomeColorEffect();
}
void efxPierceCriticalEffectBGMain(struct ProcEfxBG *proc)
{
if (++proc->timer == 0x11) {
SpellFx_ClearBG1();
SetDefaultColorEffects_();
Proc_Break(proc);
}
}
void NewEfxPierceCriticalEffectBGCOL(struct Anim *anim)
{
struct ProcEfxBGCOL *proc;
proc = Proc_Start(ProcScr_efxPierceCriticalEffectBGCOL, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->frame = 0;
proc->frame_config = gUnknown_080DF26A;
proc->unk4C = gUnknown_085D0820;
}
void efxPierceCriticalEffectBGCOLMain(struct ProcEfxBGCOL *proc)
{
int ret;
ret = EfxAdvanceFrameLut((s16 *)&proc->timer, (s16 *)&proc->frame, proc->frame_config);
if (ret >= 0) {
u16 *pal = proc->unk4C;
SpellFx_RegisterBgPal(&PAL_BUF_COLOR(pal, ret, 0), 0x20);
return;
}
if (ret == -1) {
Proc_Break(proc);
return;
}
}
void NewEfxPierceNormalEffect(struct Anim *anim)
{
struct ProcEfx *proc;
SpellFx_ClearBG1Position();
proc = Proc_Start(ProcScr_efxPierceNormalEffect, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
}
void efxPierceNormalEffectMain(struct ProcEfx *proc)
{
int time;
struct Anim *anim1 = GetAnimAnotherSide(proc->anim);
time = ++proc->timer;
if (time == 0x1) {
NewEfxFlashBgWhite(proc->anim, 0x4);
return;
}
if (time == 0x4) {
NewEfxPierceNormalEffectBG(anim1);
return;
}
if (time == 0x18) {
Proc_Break(proc);
return;
}
}
void NewEfxPierceNormalEffectBG(struct Anim *anim)
{
struct ProcEfxBG *proc;
gEfxBgSemaphore++;
proc = Proc_Start(ProcScr_efxPierceNormalEffectBG, PROC_TREE_3);
proc->anim = anim;
proc->timer = 0;
proc->frame = 0;
proc->frame_config = gUnknown_080DF2DC;
proc->tsal = gUnknown_085D8E9C;
proc->tsar = gUnknown_085D8E9C;
SpellFx_RegisterBgPal(gUnknown_085D1470, 0x20);
SpellFx_RegisterBgGfx(gUnknown_085D0FD0, 0x2000);
SpellFx_SetSomeColorEffect();
if (gEkrDistanceType != EKR_DISTANCE_CLOSE) {
if (GetAnimPosition(proc->anim) == EKR_POS_L)
BG_SetPosition(BG_1, 0x18, 0);
else
BG_SetPosition(BG_1, 0xE8, 0);
}
}
void efxPierceNormalEffectBGMain(struct ProcEfxBG *proc)
{
int ret;
ret = EfxAdvanceFrameLut((s16 *)&proc->timer, (s16 *)&proc->frame, proc->frame_config);
if (ret >= 0) {
u16 **buf1 = proc->tsal;
u16 **buf2 = proc->tsar;
SpellFx_WriteBgMap(proc->anim, buf1[ret], buf2[ret]);
return;
}
if (ret == -1) {
SpellFx_ClearBG1();
gEfxBgSemaphore--;
SetDefaultColorEffects_();
Proc_Break(proc);
}
}
|
7e88772bb33bfc2a79e76c14c7d6a39698468c4d
|
fdbb74a95924e2677466614f6ab6e2bb13b2a95a
|
/libc/nt/struct/imageimportdescriptor.internal.h
|
ec31d26ad789848949c29456ff91bbd4278e511d
|
[
"ISC"
] |
permissive
|
jart/cosmopolitan
|
fb11b5658939023977060a7c6c71a74093d9cb44
|
0d748ad58e1063dd1f8560f18a0c75293b9415b7
|
refs/heads/master
| 2023-09-06T09:17:29.303607
| 2023-09-02T03:49:13
| 2023-09-02T03:50:18
| 272,457,606
| 11,887
| 435
|
ISC
| 2023-09-14T17:47:58
| 2020-06-15T14:16:13
|
C
|
UTF-8
|
C
| false
| false
| 448
|
h
|
imageimportdescriptor.internal.h
|
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTDESCRIPTOR_H_
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTDESCRIPTOR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
struct NtImageImportDescriptor {
uint32_t ImportLookupTable;
uint32_t TimeDateStamp;
uint32_t ForwarderChain;
uint32_t DllNameRva;
uint32_t ImportAddressTable;
};
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTDESCRIPTOR_H_ */
|
f4bc2940da0376508889f1e6f0165ee59a0ba34a
|
9ceacf33fd96913cac7ef15492c126d96cae6911
|
/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.c
|
a2633b8d300e5c45ce53cb975d587f22b847d51f
|
[] |
no_license
|
openbsd/src
|
ab97ef834fd2d5a7f6729814665e9782b586c130
|
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
|
refs/heads/master
| 2023-09-02T18:54:56.624627
| 2023-09-02T15:16:12
| 2023-09-02T15:16:12
| 66,966,208
| 3,394
| 1,235
| null | 2023-08-08T02:42:25
| 2016-08-30T18:18:25
|
C
|
UTF-8
|
C
| false
| false
| 21,453
|
c
|
dcn31_dio_link_encoder.c
|
/*
* Copyright 2012-15 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: AMD
*
*/
#include "reg_helper.h"
#include "core_types.h"
#include "link_encoder.h"
#include "dcn31_dio_link_encoder.h"
#include "stream_encoder.h"
#include "i2caux_interface.h"
#include "dc_bios_types.h"
#include "gpio_service_interface.h"
#include "link_enc_cfg.h"
#include "dc_dmub_srv.h"
#include "dal_asic_id.h"
#define CTX \
enc10->base.ctx
#define DC_LOGGER \
enc10->base.ctx->logger
#define REG(reg)\
(enc10->link_regs->reg)
#undef FN
#define FN(reg_name, field_name) \
enc10->link_shift->field_name, enc10->link_mask->field_name
#define IND_REG(index) \
(enc10->link_regs->index)
#define AUX_REG(reg)\
(enc10->aux_regs->reg)
#define AUX_REG_READ(reg_name) \
dm_read_reg(CTX, AUX_REG(reg_name))
#define AUX_REG_WRITE(reg_name, val) \
dm_write_reg(CTX, AUX_REG(reg_name), val)
#ifndef MIN
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
#endif
static uint8_t phy_id_from_transmitter(enum transmitter t)
{
uint8_t phy_id;
switch (t) {
case TRANSMITTER_UNIPHY_A:
phy_id = 0;
break;
case TRANSMITTER_UNIPHY_B:
phy_id = 1;
break;
case TRANSMITTER_UNIPHY_C:
phy_id = 2;
break;
case TRANSMITTER_UNIPHY_D:
phy_id = 3;
break;
case TRANSMITTER_UNIPHY_E:
phy_id = 4;
break;
case TRANSMITTER_UNIPHY_F:
phy_id = 5;
break;
case TRANSMITTER_UNIPHY_G:
phy_id = 6;
break;
default:
phy_id = 0;
break;
}
return phy_id;
}
static bool has_query_dp_alt(struct link_encoder *enc)
{
struct dc_dmub_srv *dc_dmub_srv = enc->ctx->dmub_srv;
if (enc->ctx->dce_version >= DCN_VERSION_3_15)
return true;
/* Supports development firmware and firmware >= 4.0.11 */
return dc_dmub_srv &&
!(dc_dmub_srv->dmub->fw_version >= DMUB_FW_VERSION(4, 0, 0) &&
dc_dmub_srv->dmub->fw_version <= DMUB_FW_VERSION(4, 0, 10));
}
static bool query_dp_alt_from_dmub(struct link_encoder *enc,
union dmub_rb_cmd *cmd)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
struct dc_dmub_srv *dc_dmub_srv = enc->ctx->dmub_srv;
memset(cmd, 0, sizeof(*cmd));
cmd->query_dp_alt.header.type = DMUB_CMD__VBIOS;
cmd->query_dp_alt.header.sub_type =
DMUB_CMD__VBIOS_TRANSMITTER_QUERY_DP_ALT;
cmd->query_dp_alt.header.payload_bytes = sizeof(cmd->query_dp_alt.data);
cmd->query_dp_alt.data.phy_id = phy_id_from_transmitter(enc10->base.transmitter);
if (!dc_dmub_srv_cmd_with_reply_data(dc_dmub_srv, cmd))
return false;
return true;
}
void dcn31_link_encoder_set_dio_phy_mux(
struct link_encoder *enc,
enum encoder_type_select sel,
uint32_t hpo_inst)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
switch (enc->transmitter) {
case TRANSMITTER_UNIPHY_A:
if (sel == ENCODER_TYPE_HDMI_FRL)
REG_UPDATE(DIO_LINKA_CNTL,
HPO_HDMI_ENC_SEL, hpo_inst);
else if (sel == ENCODER_TYPE_DP_128B132B)
REG_UPDATE(DIO_LINKA_CNTL,
HPO_DP_ENC_SEL, hpo_inst);
REG_UPDATE(DIO_LINKA_CNTL,
ENC_TYPE_SEL, sel);
break;
case TRANSMITTER_UNIPHY_B:
if (sel == ENCODER_TYPE_HDMI_FRL)
REG_UPDATE(DIO_LINKB_CNTL,
HPO_HDMI_ENC_SEL, hpo_inst);
else if (sel == ENCODER_TYPE_DP_128B132B)
REG_UPDATE(DIO_LINKB_CNTL,
HPO_DP_ENC_SEL, hpo_inst);
REG_UPDATE(DIO_LINKB_CNTL,
ENC_TYPE_SEL, sel);
break;
case TRANSMITTER_UNIPHY_C:
if (sel == ENCODER_TYPE_HDMI_FRL)
REG_UPDATE(DIO_LINKC_CNTL,
HPO_HDMI_ENC_SEL, hpo_inst);
else if (sel == ENCODER_TYPE_DP_128B132B)
REG_UPDATE(DIO_LINKC_CNTL,
HPO_DP_ENC_SEL, hpo_inst);
REG_UPDATE(DIO_LINKC_CNTL,
ENC_TYPE_SEL, sel);
break;
case TRANSMITTER_UNIPHY_D:
if (sel == ENCODER_TYPE_HDMI_FRL)
REG_UPDATE(DIO_LINKD_CNTL,
HPO_HDMI_ENC_SEL, hpo_inst);
else if (sel == ENCODER_TYPE_DP_128B132B)
REG_UPDATE(DIO_LINKD_CNTL,
HPO_DP_ENC_SEL, hpo_inst);
REG_UPDATE(DIO_LINKD_CNTL,
ENC_TYPE_SEL, sel);
break;
case TRANSMITTER_UNIPHY_E:
if (sel == ENCODER_TYPE_HDMI_FRL)
REG_UPDATE(DIO_LINKE_CNTL,
HPO_HDMI_ENC_SEL, hpo_inst);
else if (sel == ENCODER_TYPE_DP_128B132B)
REG_UPDATE(DIO_LINKE_CNTL,
HPO_DP_ENC_SEL, hpo_inst);
REG_UPDATE(DIO_LINKE_CNTL,
ENC_TYPE_SEL, sel);
break;
case TRANSMITTER_UNIPHY_F:
if (sel == ENCODER_TYPE_HDMI_FRL)
REG_UPDATE(DIO_LINKF_CNTL,
HPO_HDMI_ENC_SEL, hpo_inst);
else if (sel == ENCODER_TYPE_DP_128B132B)
REG_UPDATE(DIO_LINKF_CNTL,
HPO_DP_ENC_SEL, hpo_inst);
REG_UPDATE(DIO_LINKF_CNTL,
ENC_TYPE_SEL, sel);
break;
default:
/* Do nothing */
break;
}
}
static void enc31_hw_init(struct link_encoder *enc)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
/*
00 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__1to2 : 1/2
01 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__3to4 : 3/4
02 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__7to8 : 7/8
03 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__15to16 : 15/16
04 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__31to32 : 31/32
05 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__63to64 : 63/64
06 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__127to128 : 127/128
07 - DP_AUX_DPHY_RX_DETECTION_THRESHOLD__255to256 : 255/256
*/
/*
AUX_REG_UPDATE_5(AUX_DPHY_RX_CONTROL0,
AUX_RX_START_WINDOW = 1 [6:4]
AUX_RX_RECEIVE_WINDOW = 1 default is 2 [10:8]
AUX_RX_HALF_SYM_DETECT_LEN = 1 [13:12] default is 1
AUX_RX_TRANSITION_FILTER_EN = 1 [16] default is 1
AUX_RX_ALLOW_BELOW_THRESHOLD_PHASE_DETECT [17] is 0 default is 0
AUX_RX_ALLOW_BELOW_THRESHOLD_START [18] is 1 default is 1
AUX_RX_ALLOW_BELOW_THRESHOLD_STOP [19] is 1 default is 1
AUX_RX_PHASE_DETECT_LEN, [21,20] = 0x3 default is 3
AUX_RX_DETECTION_THRESHOLD [30:28] = 1
*/
// dmub will read AUX_DPHY_RX_CONTROL0/AUX_DPHY_TX_CONTROL from vbios table in dp_aux_init
//AUX_DPHY_TX_REF_CONTROL'AUX_TX_REF_DIV HW default is 0x32;
// Set AUX_TX_REF_DIV Divider to generate 2 MHz reference from refclk
// 27MHz -> 0xd
// 100MHz -> 0x32
// 48MHz -> 0x18
// Set TMDS_CTL0 to 1. This is a legacy setting.
REG_UPDATE(TMDS_CTL_BITS, TMDS_CTL0, 1);
dcn10_aux_initialize(enc10);
}
static const struct link_encoder_funcs dcn31_link_enc_funcs = {
.read_state = link_enc2_read_state,
.validate_output_with_stream =
dcn30_link_encoder_validate_output_with_stream,
.hw_init = enc31_hw_init,
.setup = dcn10_link_encoder_setup,
.enable_tmds_output = dcn10_link_encoder_enable_tmds_output,
.enable_dp_output = dcn31_link_encoder_enable_dp_output,
.enable_dp_mst_output = dcn31_link_encoder_enable_dp_mst_output,
.disable_output = dcn31_link_encoder_disable_output,
.dp_set_lane_settings = dcn10_link_encoder_dp_set_lane_settings,
.dp_set_phy_pattern = dcn10_link_encoder_dp_set_phy_pattern,
.update_mst_stream_allocation_table =
dcn10_link_encoder_update_mst_stream_allocation_table,
.psr_program_dp_dphy_fast_training =
dcn10_psr_program_dp_dphy_fast_training,
.psr_program_secondary_packet = dcn10_psr_program_secondary_packet,
.connect_dig_be_to_fe = dcn10_link_encoder_connect_dig_be_to_fe,
.enable_hpd = dcn10_link_encoder_enable_hpd,
.disable_hpd = dcn10_link_encoder_disable_hpd,
.is_dig_enabled = dcn10_is_dig_enabled,
.destroy = dcn10_link_encoder_destroy,
.fec_set_enable = enc2_fec_set_enable,
.fec_set_ready = enc2_fec_set_ready,
.fec_is_active = enc2_fec_is_active,
.get_dig_frontend = dcn10_get_dig_frontend,
.get_dig_mode = dcn10_get_dig_mode,
.is_in_alt_mode = dcn31_link_encoder_is_in_alt_mode,
.get_max_link_cap = dcn31_link_encoder_get_max_link_cap,
.set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux,
};
void dcn31_link_encoder_construct(
struct dcn20_link_encoder *enc20,
const struct encoder_init_data *init_data,
const struct encoder_feature_support *enc_features,
const struct dcn10_link_enc_registers *link_regs,
const struct dcn10_link_enc_aux_registers *aux_regs,
const struct dcn10_link_enc_hpd_registers *hpd_regs,
const struct dcn10_link_enc_shift *link_shift,
const struct dcn10_link_enc_mask *link_mask)
{
struct bp_encoder_cap_info bp_cap_info = {0};
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
enum bp_result result = BP_RESULT_OK;
struct dcn10_link_encoder *enc10 = &enc20->enc10;
enc10->base.funcs = &dcn31_link_enc_funcs;
enc10->base.ctx = init_data->ctx;
enc10->base.id = init_data->encoder;
enc10->base.hpd_source = init_data->hpd_source;
enc10->base.connector = init_data->connector;
enc10->base.preferred_engine = ENGINE_ID_UNKNOWN;
enc10->base.features = *enc_features;
enc10->base.transmitter = init_data->transmitter;
/* set the flag to indicate whether driver poll the I2C data pin
* while doing the DP sink detect
*/
/* if (dal_adapter_service_is_feature_supported(as,
FEATURE_DP_SINK_DETECT_POLL_DATA_PIN))
enc10->base.features.flags.bits.
DP_SINK_DETECT_POLL_DATA_PIN = true;*/
enc10->base.output_signals =
SIGNAL_TYPE_DVI_SINGLE_LINK |
SIGNAL_TYPE_DVI_DUAL_LINK |
SIGNAL_TYPE_LVDS |
SIGNAL_TYPE_DISPLAY_PORT |
SIGNAL_TYPE_DISPLAY_PORT_MST |
SIGNAL_TYPE_EDP |
SIGNAL_TYPE_HDMI_TYPE_A;
/* For DCE 8.0 and 8.1, by design, UNIPHY is hardwired to DIG_BE.
* SW always assign DIG_FE 1:1 mapped to DIG_FE for non-MST UNIPHY.
* SW assign DIG_FE to non-MST UNIPHY first and MST last. So prefer
* DIG is per UNIPHY and used by SST DP, eDP, HDMI, DVI and LVDS.
* Prefer DIG assignment is decided by board design.
* For DCE 8.0, there are only max 6 UNIPHYs, we assume board design
* and VBIOS will filter out 7 UNIPHY for DCE 8.0.
* By this, adding DIGG should not hurt DCE 8.0.
* This will let DCE 8.1 share DCE 8.0 as much as possible
*/
enc10->link_regs = link_regs;
enc10->aux_regs = aux_regs;
enc10->hpd_regs = hpd_regs;
enc10->link_shift = link_shift;
enc10->link_mask = link_mask;
switch (enc10->base.transmitter) {
case TRANSMITTER_UNIPHY_A:
enc10->base.preferred_engine = ENGINE_ID_DIGA;
break;
case TRANSMITTER_UNIPHY_B:
enc10->base.preferred_engine = ENGINE_ID_DIGB;
break;
case TRANSMITTER_UNIPHY_C:
enc10->base.preferred_engine = ENGINE_ID_DIGC;
break;
case TRANSMITTER_UNIPHY_D:
enc10->base.preferred_engine = ENGINE_ID_DIGD;
break;
case TRANSMITTER_UNIPHY_E:
enc10->base.preferred_engine = ENGINE_ID_DIGE;
break;
case TRANSMITTER_UNIPHY_F:
enc10->base.preferred_engine = ENGINE_ID_DIGF;
break;
default:
ASSERT_CRITICAL(false);
enc10->base.preferred_engine = ENGINE_ID_UNKNOWN;
}
/* default to one to mirror Windows behavior */
enc10->base.features.flags.bits.HDMI_6GB_EN = 1;
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
enc10->base.id, &bp_cap_info);
/* Override features with DCE-specific values */
if (result == BP_RESULT_OK) {
enc10->base.features.flags.bits.IS_HBR2_CAPABLE =
bp_cap_info.DP_HBR2_EN;
enc10->base.features.flags.bits.IS_HBR3_CAPABLE =
bp_cap_info.DP_HBR3_EN;
enc10->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN;
enc10->base.features.flags.bits.IS_DP2_CAPABLE = bp_cap_info.IS_DP2_CAPABLE;
enc10->base.features.flags.bits.IS_UHBR10_CAPABLE = bp_cap_info.DP_UHBR10_EN;
enc10->base.features.flags.bits.IS_UHBR13_5_CAPABLE = bp_cap_info.DP_UHBR13_5_EN;
enc10->base.features.flags.bits.IS_UHBR20_CAPABLE = bp_cap_info.DP_UHBR20_EN;
enc10->base.features.flags.bits.DP_IS_USB_C =
bp_cap_info.DP_IS_USB_C;
} else {
DC_LOG_WARNING("%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n",
__func__,
result);
}
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
enc10->base.features.flags.bits.HDMI_6GB_EN = 0;
}
}
void dcn31_link_encoder_construct_minimal(
struct dcn20_link_encoder *enc20,
struct dc_context *ctx,
const struct encoder_feature_support *enc_features,
const struct dcn10_link_enc_registers *link_regs,
enum engine_id eng_id)
{
struct dcn10_link_encoder *enc10 = &enc20->enc10;
enc10->base.funcs = &dcn31_link_enc_funcs;
enc10->base.ctx = ctx;
enc10->base.id.type = OBJECT_TYPE_ENCODER;
enc10->base.hpd_source = HPD_SOURCEID_UNKNOWN;
enc10->base.connector.type = OBJECT_TYPE_CONNECTOR;
enc10->base.preferred_engine = eng_id;
enc10->base.features = *enc_features;
enc10->base.transmitter = TRANSMITTER_UNKNOWN;
enc10->link_regs = link_regs;
enc10->base.output_signals =
SIGNAL_TYPE_DISPLAY_PORT |
SIGNAL_TYPE_DISPLAY_PORT_MST |
SIGNAL_TYPE_EDP;
}
/* DPIA equivalent of link_transmitter_control. */
static bool link_dpia_control(struct dc_context *dc_ctx,
struct dmub_cmd_dig_dpia_control_data *dpia_control)
{
union dmub_rb_cmd cmd;
struct dc_dmub_srv *dmub = dc_ctx->dmub_srv;
memset(&cmd, 0, sizeof(cmd));
cmd.dig1_dpia_control.header.type = DMUB_CMD__DPIA;
cmd.dig1_dpia_control.header.sub_type =
DMUB_CMD__DPIA_DIG1_DPIA_CONTROL;
cmd.dig1_dpia_control.header.payload_bytes =
sizeof(cmd.dig1_dpia_control) -
sizeof(cmd.dig1_dpia_control.header);
cmd.dig1_dpia_control.dpia_control = *dpia_control;
dc_dmub_srv_cmd_queue(dmub, &cmd);
dc_dmub_srv_cmd_execute(dmub);
dc_dmub_srv_wait_idle(dmub);
return true;
}
static void link_encoder_disable(struct dcn10_link_encoder *enc10)
{
/* reset training complete */
REG_UPDATE(DP_LINK_CNTL, DP_LINK_TRAINING_COMPLETE, 0);
}
void dcn31_link_encoder_enable_dp_output(
struct link_encoder *enc,
const struct dc_link_settings *link_settings,
enum clock_source_id clock_source)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
/* Enable transmitter and encoder. */
if (!link_enc_cfg_is_transmitter_mappable(enc->ctx->dc, enc)) {
DC_LOG_DEBUG("%s: enc_id(%d)\n", __func__, enc->preferred_engine);
dcn20_link_encoder_enable_dp_output(enc, link_settings, clock_source);
} else {
struct dmub_cmd_dig_dpia_control_data dpia_control = { 0 };
struct dc_link *link;
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
enc1_configure_encoder(enc10, link_settings);
dpia_control.action = (uint8_t)TRANSMITTER_CONTROL_ENABLE;
dpia_control.enc_id = enc->preferred_engine;
dpia_control.mode_laneset.digmode = 0; /* 0 for SST; 5 for MST */
dpia_control.lanenum = (uint8_t)link_settings->lane_count;
dpia_control.symclk_10khz = link_settings->link_rate *
LINK_RATE_REF_FREQ_IN_KHZ / 10;
/* DIG_BE_CNTL.DIG_HPD_SELECT set to 5 (hpdsel - 1) to indicate HPD pin
* unused by DPIA.
*/
dpia_control.hpdsel = 6;
if (link) {
dpia_control.dpia_id = link->ddc_hw_inst;
dpia_control.fec_rdy = dc_link_should_enable_fec(link);
} else {
DC_LOG_ERROR("%s: Failed to execute DPIA enable DMUB command.\n", __func__);
BREAK_TO_DEBUGGER();
return;
}
DC_LOG_DEBUG("%s: DPIA(%d) - enc_id(%d)\n", __func__, dpia_control.dpia_id, dpia_control.enc_id);
link_dpia_control(enc->ctx, &dpia_control);
}
}
void dcn31_link_encoder_enable_dp_mst_output(
struct link_encoder *enc,
const struct dc_link_settings *link_settings,
enum clock_source_id clock_source)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
/* Enable transmitter and encoder. */
if (!link_enc_cfg_is_transmitter_mappable(enc->ctx->dc, enc)) {
DC_LOG_DEBUG("%s: enc_id(%d)\n", __func__, enc->preferred_engine);
dcn10_link_encoder_enable_dp_mst_output(enc, link_settings, clock_source);
} else {
struct dmub_cmd_dig_dpia_control_data dpia_control = { 0 };
struct dc_link *link;
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
enc1_configure_encoder(enc10, link_settings);
dpia_control.action = (uint8_t)TRANSMITTER_CONTROL_ENABLE;
dpia_control.enc_id = enc->preferred_engine;
dpia_control.mode_laneset.digmode = 5; /* 0 for SST; 5 for MST */
dpia_control.lanenum = (uint8_t)link_settings->lane_count;
dpia_control.symclk_10khz = link_settings->link_rate *
LINK_RATE_REF_FREQ_IN_KHZ / 10;
/* DIG_BE_CNTL.DIG_HPD_SELECT set to 5 (hpdsel - 1) to indicate HPD pin
* unused by DPIA.
*/
dpia_control.hpdsel = 6;
if (link) {
dpia_control.dpia_id = link->ddc_hw_inst;
dpia_control.fec_rdy = dc_link_should_enable_fec(link);
} else {
DC_LOG_ERROR("%s: Failed to execute DPIA enable DMUB command.\n", __func__);
BREAK_TO_DEBUGGER();
return;
}
DC_LOG_DEBUG("%s: DPIA(%d) - enc_id(%d)\n", __func__, dpia_control.dpia_id, dpia_control.enc_id);
link_dpia_control(enc->ctx, &dpia_control);
}
}
void dcn31_link_encoder_disable_output(
struct link_encoder *enc,
enum amd_signal_type signal)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
/* Disable transmitter and encoder. */
if (!link_enc_cfg_is_transmitter_mappable(enc->ctx->dc, enc)) {
DC_LOG_DEBUG("%s: enc_id(%d)\n", __func__, enc->preferred_engine);
dcn10_link_encoder_disable_output(enc, signal);
} else {
struct dmub_cmd_dig_dpia_control_data dpia_control = { 0 };
struct dc_link *link;
if (!dcn10_is_dig_enabled(enc))
return;
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
dpia_control.action = (uint8_t)TRANSMITTER_CONTROL_DISABLE;
dpia_control.enc_id = enc->preferred_engine;
if (signal == SIGNAL_TYPE_DISPLAY_PORT) {
dpia_control.mode_laneset.digmode = 0; /* 0 for SST; 5 for MST */
} else if (signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
dpia_control.mode_laneset.digmode = 5; /* 0 for SST; 5 for MST */
} else {
DC_LOG_ERROR("%s: USB4 DPIA only supports DisplayPort.\n", __func__);
BREAK_TO_DEBUGGER();
}
if (link) {
dpia_control.dpia_id = link->ddc_hw_inst;
} else {
DC_LOG_ERROR("%s: Failed to execute DPIA enable DMUB command.\n", __func__);
BREAK_TO_DEBUGGER();
return;
}
DC_LOG_DEBUG("%s: DPIA(%d) - enc_id(%d)\n", __func__, dpia_control.dpia_id, dpia_control.enc_id);
link_dpia_control(enc->ctx, &dpia_control);
link_encoder_disable(enc10);
}
}
bool dcn31_link_encoder_is_in_alt_mode(struct link_encoder *enc)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
union dmub_rb_cmd cmd;
uint32_t dp_alt_mode_disable;
/* Only applicable to USB-C PHY. */
if (!enc->features.flags.bits.DP_IS_USB_C)
return false;
/*
* Use the new interface from DMCUB if available.
* Avoids hanging the RDCPSPIPE if DMCUB wasn't already running.
*/
if (has_query_dp_alt(enc)) {
if (!query_dp_alt_from_dmub(enc, &cmd))
return false;
return (cmd.query_dp_alt.data.is_dp_alt_disable == 0);
}
/* Legacy path, avoid if possible. */
if (enc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_B0) {
REG_GET(RDPCSTX_PHY_CNTL6, RDPCS_PHY_DPALT_DISABLE,
&dp_alt_mode_disable);
} else {
/*
* B0 phys use a new set of registers to check whether alt mode is disabled.
* if value == 1 alt mode is disabled, otherwise it is enabled.
*/
if ((enc10->base.transmitter == TRANSMITTER_UNIPHY_A) ||
(enc10->base.transmitter == TRANSMITTER_UNIPHY_B) ||
(enc10->base.transmitter == TRANSMITTER_UNIPHY_E)) {
REG_GET(RDPCSTX_PHY_CNTL6, RDPCS_PHY_DPALT_DISABLE,
&dp_alt_mode_disable);
} else {
REG_GET(RDPCSPIPE_PHY_CNTL6, RDPCS_PHY_DPALT_DISABLE,
&dp_alt_mode_disable);
}
}
return (dp_alt_mode_disable == 0);
}
void dcn31_link_encoder_get_max_link_cap(struct link_encoder *enc, struct dc_link_settings *link_settings)
{
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
union dmub_rb_cmd cmd;
uint32_t is_in_usb_c_dp4_mode = 0;
dcn10_link_encoder_get_max_link_cap(enc, link_settings);
/* Take the link cap directly if not USB */
if (!enc->features.flags.bits.DP_IS_USB_C)
return;
/*
* Use the new interface from DMCUB if available.
* Avoids hanging the RDCPSPIPE if DMCUB wasn't already running.
*/
if (has_query_dp_alt(enc)) {
if (!query_dp_alt_from_dmub(enc, &cmd))
return;
if (cmd.query_dp_alt.data.is_usb &&
cmd.query_dp_alt.data.is_dp4 == 0)
link_settings->lane_count = MIN(LANE_COUNT_TWO, link_settings->lane_count);
return;
}
/* Legacy path, avoid if possible. */
if (enc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_B0) {
REG_GET(RDPCSTX_PHY_CNTL6, RDPCS_PHY_DPALT_DP4,
&is_in_usb_c_dp4_mode);
} else {
if ((enc10->base.transmitter == TRANSMITTER_UNIPHY_A) ||
(enc10->base.transmitter == TRANSMITTER_UNIPHY_B) ||
(enc10->base.transmitter == TRANSMITTER_UNIPHY_E)) {
REG_GET(RDPCSTX_PHY_CNTL6, RDPCS_PHY_DPALT_DP4,
&is_in_usb_c_dp4_mode);
} else {
REG_GET(RDPCSPIPE_PHY_CNTL6, RDPCS_PHY_DPALT_DP4,
&is_in_usb_c_dp4_mode);
}
}
if (!is_in_usb_c_dp4_mode)
link_settings->lane_count = MIN(LANE_COUNT_TWO, link_settings->lane_count);
}
|
c44103163cedbd9499eb4c02bb98060f4cf5d76f
|
28d0f8c01599f8f6c711bdde0b59f9c2cd221203
|
/sys/dev/pcmcia/pcmcia.c
|
63621a92f4b49e1e95976de74f727efbf59ad337
|
[] |
no_license
|
NetBSD/src
|
1a9cbc22ed778be638b37869ed4fb5c8dd616166
|
23ee83f7c0aea0777bd89d8ebd7f0cde9880d13c
|
refs/heads/trunk
| 2023-08-31T13:24:58.105962
| 2023-08-27T15:50:47
| 2023-08-27T15:50:47
| 88,439,547
| 656
| 348
| null | 2023-07-20T20:07:24
| 2017-04-16T20:03:43
| null |
UTF-8
|
C
| false
| false
| 23,689
|
c
|
pcmcia.c
|
/* $NetBSD: pcmcia.c,v 1.96 2021/08/07 16:19:15 thorpej Exp $ */
/*
* Copyright (c) 2004 Charles M. Hannum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Charles M. Hannum.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*/
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Marc Horowitz.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.96 2021/08/07 16:19:15 thorpej Exp $");
#include "opt_pcmciaverbose.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <net/if.h>
#include <dev/pcmcia/pcmciareg.h>
#include <dev/pcmcia/pcmciachip.h>
#include <dev/pcmcia/pcmciavar.h>
#ifdef IT8368E_LEGACY_MODE /* XXX -uch */
#include <arch/hpcmips/dev/it8368var.h>
#endif
#include "locators.h"
#ifdef PCMCIADEBUG
int pcmcia_debug = 0;
#define DPRINTF(arg) if (pcmcia_debug) printf arg
#else
#define DPRINTF(arg)
#endif
#ifdef PCMCIAVERBOSE
int pcmcia_verbose = 1;
#else
int pcmcia_verbose = 0;
#endif
int pcmcia_match(device_t, cfdata_t, void *);
void pcmcia_attach(device_t, device_t, void *);
int pcmcia_detach(device_t, int);
int pcmcia_rescan(device_t, const char *, const int *);
void pcmcia_childdetached(device_t, device_t);
int pcmcia_print(void *, const char *);
CFATTACH_DECL3_NEW(pcmcia, sizeof(struct pcmcia_softc),
pcmcia_match, pcmcia_attach, pcmcia_detach, NULL,
pcmcia_rescan, pcmcia_childdetached, DVF_DETACH_SHUTDOWN);
int
pcmcia_ccr_read(struct pcmcia_function *pf, int ccr)
{
return (bus_space_read_1(pf->pf_ccrt, pf->pf_ccrh,
pf->pf_ccr_offset + ccr * 2));
}
void
pcmcia_ccr_write(struct pcmcia_function *pf, int ccr, int val)
{
if (pf->ccr_mask & (1 << ccr)) {
bus_space_write_1(pf->pf_ccrt, pf->pf_ccrh,
pf->pf_ccr_offset + ccr * 2, val);
}
}
int
pcmcia_match(device_t parent, cfdata_t match, void *aux)
{
struct pcmciabus_attach_args *paa = aux;
if (strcmp(paa->paa_busname, match->cf_name)) {
return 0;
}
/* if the autoconfiguration got this far, there's a socket here */
return (1);
}
void
pcmcia_attach(device_t parent, device_t self, void *aux)
{
struct pcmciabus_attach_args *paa = aux;
struct pcmcia_softc *sc = device_private(self);
aprint_naive("\n");
aprint_normal("\n");
sc->dev = self;
sc->pct = paa->pct;
sc->pch = paa->pch;
sc->ih = NULL;
if (!pmf_device_register(self, NULL, NULL))
aprint_error_dev(self, "couldn't establish power handler\n");
}
int
pcmcia_detach(device_t self, int flags)
{
int rc;
if ((rc = config_detach_children(self, flags)) != 0)
return rc;
pmf_device_deregister(self);
return 0;
}
int
pcmcia_card_attach(device_t dev)
{
struct pcmcia_softc *sc = device_private(dev);
struct pcmcia_function *pf;
int error;
static const int wildcard[PCMCIACF_NLOCS] = {
PCMCIACF_FUNCTION_DEFAULT
};
/*
* this is here so that when socket_enable calls gettype, trt happens
*/
SIMPLEQ_FIRST(&sc->card.pf_head) = NULL;
pcmcia_socket_enable(dev);
pcmcia_read_cis(sc);
pcmcia_check_cis_quirks(sc);
#if 1 /* XXX remove this, done below ??? */
/*
* bail now if the card has no functions, or if there was an error in
* the cis.
*/
if (sc->card.error ||
SIMPLEQ_EMPTY(&sc->card.pf_head)) {
printf("%s: card appears to have bogus CIS\n",
device_xname(sc->dev));
error = EIO;
goto done;
}
#endif
if (pcmcia_verbose)
pcmcia_print_cis(sc);
SIMPLEQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
if (SIMPLEQ_EMPTY(&pf->cfe_head))
continue;
#ifdef DIAGNOSTIC
if (pf->child != NULL) {
printf("%s: %s still attached to function %d!\n",
device_xname(sc->dev), device_xname(pf->child),
pf->number);
panic("pcmcia_card_attach");
}
#endif
pf->sc = sc;
pf->child = NULL;
pf->cfe = NULL;
pf->pf_ih = NULL;
}
error = pcmcia_rescan(dev, NULL, wildcard);
done:
pcmcia_socket_disable(dev);
return (error);
}
int
pcmcia_rescan(device_t self, const char *ifattr, const int *locators)
{
struct pcmcia_softc *sc = device_private(self);
struct pcmcia_function *pf;
struct pcmcia_attach_args paa;
int locs[PCMCIACF_NLOCS];
if (sc->card.error ||
SIMPLEQ_EMPTY(&sc->card.pf_head)) {
/* XXX silently ignore if no card present? */
return (EIO);
}
SIMPLEQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
if (SIMPLEQ_EMPTY(&pf->cfe_head))
continue;
if ((locators[PCMCIACF_FUNCTION] != PCMCIACF_FUNCTION_DEFAULT)
&& (locators[PCMCIACF_FUNCTION] != pf->number))
continue;
if (pf->child)
continue;
locs[PCMCIACF_FUNCTION] = pf->number;
paa.manufacturer = sc->card.manufacturer;
paa.product = sc->card.product;
paa.card = &sc->card;
paa.pf = pf;
pf->child = config_found(self, &paa, pcmcia_print,
CFARGS(.submatch = config_stdsubmatch,
.locators = locs));
}
return (0);
}
void
pcmcia_card_detach(device_t dev, int flags)
/* flags: DETACH_* flags */
{
struct pcmcia_softc *sc = device_private(dev);
struct pcmcia_function *pf;
int error;
/*
* We are running on either the PCMCIA socket's event thread
* or in user context detaching a device by user request.
*/
SIMPLEQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
pf->pf_flags |= PFF_DETACHED;
if (SIMPLEQ_EMPTY(&pf->cfe_head))
continue;
if (pf->child == NULL)
continue;
DPRINTF(("%s: detaching %s (function %d)\n",
device_xname(sc->dev), device_xname(pf->child), pf->number));
if ((error = config_detach(pf->child, flags)) != 0) {
printf("%s: error %d detaching %s (function %d)\n",
device_xname(sc->dev), error, device_xname(pf->child),
pf->number);
}
}
if (sc->sc_enabled_count != 0) {
#ifdef DIAGNOSTIC
printf("pcmcia_card_detach: enabled_count should be 0 here??\n");
#endif
pcmcia_chip_socket_disable(sc->pct, sc->pch);
sc->sc_enabled_count = 0;
}
}
void
pcmcia_childdetached(device_t self, device_t child)
{
struct pcmcia_softc *sc = device_private(self);
struct pcmcia_function *pf;
SIMPLEQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
if (SIMPLEQ_EMPTY(&pf->cfe_head))
continue;
if (pf->child == child) {
KASSERT(device_locator(child, PCMCIACF_FUNCTION)
== pf->number);
pf->child = NULL;
return;
}
}
aprint_error_dev(self, "pcmcia_childdetached: %s not found\n",
device_xname(child));
}
void
pcmcia_card_deactivate(device_t dev)
{
struct pcmcia_softc *sc = device_private(dev);
struct pcmcia_function *pf;
/*
* We're in the chip's card removal interrupt handler.
* Deactivate the child driver. The PCMCIA socket's
* event thread will run later to finish the detach.
*/
SIMPLEQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
if (SIMPLEQ_EMPTY(&pf->cfe_head))
continue;
if (pf->child == NULL)
continue;
DPRINTF(("%s: deactivating %s (function %d)\n",
device_xname(sc->dev), device_xname(pf->child), pf->number));
config_deactivate(pf->child);
}
}
int
pcmcia_print(void *arg, const char *pnp)
{
struct pcmcia_attach_args *pa = arg;
struct pcmcia_softc *sc = pa->pf->sc;
struct pcmcia_card *card = &sc->card;
char devinfo[256];
if (pnp)
aprint_normal("%s", pnp);
pcmcia_devinfo(card, !!pnp, devinfo, sizeof(devinfo));
aprint_normal(" function %d: %s\n", pa->pf->number, devinfo);
return (UNCONF);
}
void
pcmcia_devinfo(struct pcmcia_card *card, int showhex, char *cp, size_t cplen)
{
int i, n;
if (cplen > 1) {
*cp++ = '<';
*cp = '\0';
cplen--;
}
for (i = 0; i < 4 && card->cis1_info[i] != NULL && cplen > 1; i++) {
n = snprintf(cp, cplen, "%s%s", i ? ", " : "",
card->cis1_info[i]);
cp += n;
if (cplen < n)
return;
cplen -= n;
}
if (cplen > 1) {
*cp++ = '>';
*cp = '\0';
cplen--;
}
if (showhex && cplen > 1)
snprintf(cp, cplen, " (manufacturer 0x%04x, product 0x%04x)",
card->manufacturer, card->product);
}
const void *
pcmcia_product_lookup(struct pcmcia_attach_args *pa, const void *tab, size_t nent, size_t ent_size, pcmcia_product_match_fn matchfn)
{
const struct pcmcia_product *pp;
int n;
int matches;
#ifdef DIAGNOSTIC
if (sizeof *pp > ent_size)
panic("pcmcia_product_lookup: bogus ent_size %ld",
(long) ent_size);
#endif
for (pp = tab, n = nent; n; pp = (const struct pcmcia_product *)
((const char *)pp + ent_size), n--) {
/* see if it matches vendor/product */
matches = 0;
if ((pp->pp_vendor != PCMCIA_VENDOR_INVALID &&
pp->pp_vendor == pa->manufacturer) &&
(pp->pp_product != PCMCIA_PRODUCT_INVALID &&
pp->pp_product == pa->product))
matches = 1;
if ((pp->pp_cisinfo[0] && pa->card->cis1_info[0] &&
!strcmp(pp->pp_cisinfo[0], pa->card->cis1_info[0])) &&
(pp->pp_cisinfo[1] && pa->card->cis1_info[1] &&
!strcmp(pp->pp_cisinfo[1], pa->card->cis1_info[1])) &&
(!pp->pp_cisinfo[2] || (pa->card->cis1_info[2] &&
!strcmp(pp->pp_cisinfo[2], pa->card->cis1_info[2]))) &&
(!pp->pp_cisinfo[3] || (pa->card->cis1_info[3] &&
!strcmp(pp->pp_cisinfo[3], pa->card->cis1_info[3]))))
matches = 1;
/* if a separate match function is given, let it override */
if (matchfn)
matches = (*matchfn)(pa, pp, matches);
if (matches)
return (pp);
}
return (0);
}
void
pcmcia_socket_settype(device_t dev, int type)
{
struct pcmcia_softc *sc = device_private(dev);
pcmcia_chip_socket_settype(sc->pct, sc->pch, type);
}
/*
* Initialize a PCMCIA function. May be called as long as the function is
* disabled.
*/
void
pcmcia_function_init(struct pcmcia_function *pf, struct pcmcia_config_entry *cfe)
{
if (pf->pf_flags & PFF_ENABLED)
panic("pcmcia_function_init: function is enabled");
/* Remember which configuration entry we are using. */
pf->cfe = cfe;
}
void
pcmcia_socket_enable(device_t dev)
{
struct pcmcia_softc *sc = device_private(dev);
if (sc->sc_enabled_count++ == 0)
pcmcia_chip_socket_enable(sc->pct, sc->pch);
DPRINTF(("%s: ++enabled_count = %d\n", device_xname(sc->dev),
sc->sc_enabled_count));
}
void
pcmcia_socket_disable(device_t dev)
{
struct pcmcia_softc *sc = device_private(dev);
if (--sc->sc_enabled_count == 0)
pcmcia_chip_socket_disable(sc->pct, sc->pch);
DPRINTF(("%s: --enabled_count = %d\n", device_xname(sc->dev),
sc->sc_enabled_count));
}
/* Enable a PCMCIA function */
int
pcmcia_function_enable(struct pcmcia_function *pf)
{
struct pcmcia_softc *sc = pf->sc;
struct pcmcia_function *tmp;
int reg;
int error;
if (pf->cfe == NULL)
panic("pcmcia_function_enable: function not initialized");
/*
* Increase the reference count on the socket, enabling power, if
* necessary.
*/
pcmcia_socket_enable(sc->dev);
pcmcia_socket_settype(sc->dev, pf->cfe->iftype);
if (pf->pf_flags & PFF_ENABLED) {
/*
* Don't do anything if we're already enabled.
*/
return (0);
}
/*
* it's possible for different functions' CCRs to be in the same
* underlying page. Check for that.
*/
SIMPLEQ_FOREACH(tmp, &sc->card.pf_head, pf_list) {
if ((tmp->pf_flags & PFF_ENABLED) &&
(pf->ccr_base >= (tmp->ccr_base - tmp->pf_ccr_offset)) &&
((pf->ccr_base + PCMCIA_CCR_SIZE) <=
(tmp->ccr_base - tmp->pf_ccr_offset +
tmp->pf_ccr_realsize))) {
pf->pf_ccrt = tmp->pf_ccrt;
pf->pf_ccrh = tmp->pf_ccrh;
pf->pf_ccr_realsize = tmp->pf_ccr_realsize;
/*
* pf->pf_ccr_offset = (tmp->pf_ccr_offset -
* tmp->ccr_base) + pf->ccr_base;
*/
pf->pf_ccr_offset =
(tmp->pf_ccr_offset + pf->ccr_base) -
tmp->ccr_base;
pf->pf_ccr_window = tmp->pf_ccr_window;
break;
}
}
if (tmp == NULL) {
error = pcmcia_mem_alloc(pf, PCMCIA_CCR_SIZE, &pf->pf_pcmh);
if (error)
goto bad;
error = pcmcia_mem_map(pf, PCMCIA_MEM_ATTR, pf->ccr_base,
PCMCIA_CCR_SIZE, &pf->pf_pcmh, &pf->pf_ccr_offset,
&pf->pf_ccr_window);
if (error) {
pcmcia_mem_free(pf, &pf->pf_pcmh);
goto bad;
}
}
if (pcmcia_mfc(sc) || 1) {
pcmcia_ccr_write(pf, PCMCIA_CCR_IOBASE0,
(pf->pf_mfc_iobase >> 0) & 0xff);
pcmcia_ccr_write(pf, PCMCIA_CCR_IOBASE1,
(pf->pf_mfc_iobase >> 8) & 0xff);
pcmcia_ccr_write(pf, PCMCIA_CCR_IOBASE2,
(pf->pf_mfc_iobase >> 16) & 0xff);
pcmcia_ccr_write(pf, PCMCIA_CCR_IOBASE3,
(pf->pf_mfc_iobase >> 24) & 0xff);
pcmcia_ccr_write(pf, PCMCIA_CCR_IOLIMIT,
pf->pf_mfc_iomax - pf->pf_mfc_iobase);
}
reg = 0;
if (pf->cfe->flags & PCMCIA_CFE_AUDIO)
reg |= PCMCIA_CCR_STATUS_AUDIO;
pcmcia_ccr_write(pf, PCMCIA_CCR_STATUS, reg);
pcmcia_ccr_write(pf, PCMCIA_CCR_SOCKETCOPY, 0);
reg = (pf->cfe->number & PCMCIA_CCR_OPTION_CFINDEX);
reg |= PCMCIA_CCR_OPTION_LEVIREQ;
if (pcmcia_mfc(sc)) {
reg |= (PCMCIA_CCR_OPTION_FUNC_ENABLE |
PCMCIA_CCR_OPTION_ADDR_DECODE);
if (pf->pf_ih)
reg |= PCMCIA_CCR_OPTION_IREQ_ENABLE;
}
pcmcia_ccr_write(pf, PCMCIA_CCR_OPTION, reg);
#ifdef PCMCIADEBUG
if (pcmcia_debug) {
SIMPLEQ_FOREACH(tmp, &sc->card.pf_head, pf_list) {
printf("%s: function %d CCR at %d offset %lx: "
"%x %x %x %x, %x %x %x %x, %x\n",
device_xname(tmp->sc->dev), tmp->number,
tmp->pf_ccr_window,
(unsigned long) tmp->pf_ccr_offset,
pcmcia_ccr_read(tmp, 0),
pcmcia_ccr_read(tmp, 1),
pcmcia_ccr_read(tmp, 2),
pcmcia_ccr_read(tmp, 3),
pcmcia_ccr_read(tmp, 5),
pcmcia_ccr_read(tmp, 6),
pcmcia_ccr_read(tmp, 7),
pcmcia_ccr_read(tmp, 8),
pcmcia_ccr_read(tmp, 9));
}
}
#endif
#ifdef IT8368E_LEGACY_MODE
/* return to I/O mode */
it8368_mode(pf, IT8368_IO_MODE, IT8368_WIDTH_16);
#endif
pf->pf_flags |= PFF_ENABLED;
return (0);
bad:
/*
* Decrement the reference count, and power down the socket, if
* necessary.
*/
printf("%s: couldn't map the CCR\n", device_xname(pf->child));
pcmcia_socket_disable(sc->dev);
return (error);
}
/* Disable PCMCIA function. */
void
pcmcia_function_disable(struct pcmcia_function *pf)
{
struct pcmcia_softc *sc = pf->sc;
struct pcmcia_function *tmp;
int reg;
if (pf->cfe == NULL)
panic("pcmcia_function_enable: function not initialized");
if ((pf->pf_flags & PFF_ENABLED) == 0) {
/*
* Don't do anything but decrement if we're already disabled.
*/
goto out;
}
if (pcmcia_mfc(sc) &&
(pf->pf_flags & PFF_DETACHED) == 0) {
reg = pcmcia_ccr_read(pf, PCMCIA_CCR_OPTION);
reg &= ~(PCMCIA_CCR_OPTION_FUNC_ENABLE|
PCMCIA_CCR_OPTION_ADDR_DECODE|
PCMCIA_CCR_OPTION_IREQ_ENABLE);
pcmcia_ccr_write(pf, PCMCIA_CCR_OPTION, reg);
}
/*
* it's possible for different functions' CCRs to be in the same
* underlying page. Check for that. Note we mark us as disabled
* first to avoid matching ourself.
*/
pf->pf_flags &= ~PFF_ENABLED;
SIMPLEQ_FOREACH(tmp, &sc->card.pf_head, pf_list) {
if ((tmp->pf_flags & PFF_ENABLED) &&
(pf->ccr_base >= (tmp->ccr_base - tmp->pf_ccr_offset)) &&
((pf->ccr_base + PCMCIA_CCR_SIZE) <=
(tmp->ccr_base - tmp->pf_ccr_offset + tmp->pf_ccr_realsize)))
break;
}
/* Not used by anyone else; unmap the CCR. */
if (tmp == NULL) {
pcmcia_mem_unmap(pf, pf->pf_ccr_window);
pcmcia_mem_free(pf, &pf->pf_pcmh);
}
out:
/*
* Decrement the reference count, and power down the socket, if
* necessary.
*/
pcmcia_socket_disable(sc->dev);
}
int
pcmcia_io_map(struct pcmcia_function *pf, int width, struct pcmcia_io_handle *pcihp, int *windowp)
{
struct pcmcia_softc *sc = pf->sc;
int error;
if (pf->pf_flags & PFF_ENABLED)
printf("pcmcia_io_map: function is enabled!\n");
error = pcmcia_chip_io_map(sc->pct, sc->pch,
width, 0, pcihp->size, pcihp, windowp);
if (error)
return (error);
/*
* XXX in the multifunction multi-iospace-per-function case, this
* needs to cooperate with io_alloc to make sure that the spaces
* don't overlap, and that the ccr's are set correctly
*/
if (pcmcia_mfc(sc) || 1) {
bus_addr_t iobase = pcihp->addr;
bus_addr_t iomax = pcihp->addr + pcihp->size - 1;
DPRINTF(("window iobase %lx iomax %lx\n", (long)iobase,
(long)iomax));
if (pf->pf_mfc_iobase == 0) {
pf->pf_mfc_iobase = iobase;
pf->pf_mfc_iomax = iomax;
} else {
if (iobase < pf->pf_mfc_iobase)
pf->pf_mfc_iobase = iobase;
if (iomax > pf->pf_mfc_iomax)
pf->pf_mfc_iomax = iomax;
}
DPRINTF(("function iobase %lx iomax %lx\n",
(long)pf->pf_mfc_iobase, (long)pf->pf_mfc_iomax));
}
return (0);
}
void
pcmcia_io_unmap(struct pcmcia_function *pf, int window)
{
struct pcmcia_softc *sc = pf->sc;
if (pf->pf_flags & PFF_ENABLED)
printf("pcmcia_io_unmap: function is enabled!\n");
pcmcia_chip_io_unmap(sc->pct, sc->pch, window);
}
void *
pcmcia_intr_establish(struct pcmcia_function *pf, int ipl,
int (*ih_fct)(void *), void *ih_arg)
{
if (pf->pf_flags & PFF_ENABLED)
printf("pcmcia_intr_establish: function is enabled!\n");
if (pf->pf_ih)
panic("pcmcia_intr_establish: already done\n");
pf->pf_ih = pcmcia_chip_intr_establish(pf->sc->pct, pf->sc->pch,
pf, ipl, ih_fct, ih_arg);
if (!pf->pf_ih)
aprint_error_dev(pf->child, "interrupt establish failed\n");
return (pf->pf_ih);
}
void
pcmcia_intr_disestablish(struct pcmcia_function *pf, void *ih)
{
if (pf->pf_flags & PFF_ENABLED)
printf("pcmcia_intr_disestablish: function is enabled!\n");
if (!pf->pf_ih)
panic("pcmcia_intr_distestablish: already done\n");
pcmcia_chip_intr_disestablish(pf->sc->pct, pf->sc->pch, ih);
pf->pf_ih = 0;
}
int
pcmcia_config_alloc(struct pcmcia_function *pf, struct pcmcia_config_entry *cfe)
{
int error = 0;
int n, m;
for (n = 0; n < cfe->num_iospace; n++) {
bus_addr_t start = cfe->iospace[n].start;
bus_size_t length = cfe->iospace[n].length;
bus_size_t align = cfe->iomask ? (1 << cfe->iomask) :
length;
bus_size_t skew = start & (align - 1);
if ((start - skew) == 0 && align < 0x400) {
if (skew)
printf("Drats! I need a skew!\n");
start = 0;
}
DPRINTF(("pcmcia_config_alloc: io %d start=%lx length=%lx align=%lx skew=%lx\n",
n, (long)start, (long)length, (long)align, (long)skew));
error = pcmcia_io_alloc(pf, start, length, align,
&cfe->iospace[n].handle);
if (error)
break;
}
if (n < cfe->num_iospace) {
for (m = 0; m < n; m++)
pcmcia_io_free(pf, &cfe->iospace[m].handle);
return (error);
}
for (n = 0; n < cfe->num_memspace; n++) {
bus_size_t length = cfe->memspace[n].length;
DPRINTF(("pcmcia_config_alloc: mem %d length %lx\n", n,
(long)length));
error = pcmcia_mem_alloc(pf, length, &cfe->memspace[n].handle);
if (error)
break;
}
if (n < cfe->num_memspace) {
for (m = 0; m < cfe->num_iospace; m++)
pcmcia_io_free(pf, &cfe->iospace[m].handle);
for (m = 0; m < n; m++)
pcmcia_mem_free(pf, &cfe->memspace[m].handle);
return (error);
}
/* This one's good! */
return (error);
}
void
pcmcia_config_free(struct pcmcia_function *pf)
{
struct pcmcia_config_entry *cfe = pf->cfe;
int m;
for (m = 0; m < cfe->num_iospace; m++)
pcmcia_io_free(pf, &cfe->iospace[m].handle);
for (m = 0; m < cfe->num_memspace; m++)
pcmcia_mem_free(pf, &cfe->memspace[m].handle);
}
int
pcmcia_config_map(struct pcmcia_function *pf)
{
struct pcmcia_config_entry *cfe = pf->cfe;
int error = 0;
int n, m;
for (n = 0; n < cfe->num_iospace; n++) {
int width;
if (cfe->flags & PCMCIA_CFE_IO16)
width = PCMCIA_WIDTH_AUTO;
else
width = PCMCIA_WIDTH_IO8;
error = pcmcia_io_map(pf, width, &cfe->iospace[n].handle,
&cfe->iospace[n].window);
if (error)
break;
}
if (n < cfe->num_iospace) {
for (m = 0; m < n; m++)
pcmcia_io_unmap(pf, cfe->iospace[m].window);
return (error);
}
for (n = 0; n < cfe->num_memspace; n++) {
bus_size_t length = cfe->memspace[n].length;
int width;
DPRINTF(("pcmcia_config_alloc: mem %d length %lx\n", n,
(long)length));
/*XXX*/
width = PCMCIA_WIDTH_MEM8|PCMCIA_MEM_COMMON;
error = pcmcia_mem_map(pf, width, 0, length,
&cfe->memspace[n].handle, &cfe->memspace[n].offset,
&cfe->memspace[n].window);
if (error)
break;
}
if (n < cfe->num_memspace) {
for (m = 0; m < cfe->num_iospace; m++)
pcmcia_io_unmap(pf, cfe->iospace[m].window);
for (m = 0; m < n; m++)
pcmcia_mem_unmap(pf, cfe->memspace[m].window);
return (error);
}
/* This one's good! */
return (error);
}
void
pcmcia_config_unmap(struct pcmcia_function *pf)
{
struct pcmcia_config_entry *cfe = pf->cfe;
int m;
for (m = 0; m < cfe->num_iospace; m++)
pcmcia_io_unmap(pf, cfe->iospace[m].window);
for (m = 0; m < cfe->num_memspace; m++)
pcmcia_mem_unmap(pf, cfe->memspace[m].window);
}
int
pcmcia_function_configure(struct pcmcia_function *pf,
int (*validator)(struct pcmcia_config_entry *))
{
struct pcmcia_config_entry *cfe;
int error = ENOENT;
SIMPLEQ_FOREACH(cfe, &pf->cfe_head, cfe_list) {
error = validator(cfe);
if (error)
continue;
error = pcmcia_config_alloc(pf, cfe);
if (!error)
break;
}
if (!cfe) {
DPRINTF(("pcmcia_function_configure: no config entry found, error=%d\n",
error));
return (error);
}
/* Remember which configuration entry we are using. */
pf->cfe = cfe;
error = pcmcia_config_map(pf);
if (error) {
DPRINTF(("pcmcia_function_configure: map failed, error=%d\n",
error));
return (error);
}
return (0);
}
void
pcmcia_function_unconfigure(struct pcmcia_function *pf)
{
pcmcia_config_unmap(pf);
pcmcia_config_free(pf);
}
|
43727495103de5f47246dfbd68d9b011d04b7b8e
|
d6518411f2d602cef8f4d8651f7f6e3e386442c6
|
/src/vn_http_parse.h
|
02852ce8eda34faf93b19a575ca9f193fe569b54
|
[
"MIT"
] |
permissive
|
tinylcy/vino
|
7e92915918eb16426c1dfaeff2224616dd570000
|
70279865b49bd134e52a66f532d65b44cdc40b9c
|
refs/heads/master
| 2021-08-30T00:33:56.301578
| 2017-12-15T11:28:16
| 2017-12-15T11:28:16
| 66,211,939
| 182
| 31
|
MIT
| 2018-04-23T10:52:13
| 2016-08-21T17:39:07
|
C
|
UTF-8
|
C
| false
| false
| 710
|
h
|
vn_http_parse.h
|
/*
* Copyright (C) Chenyang Li
* Copyright (C) Vino
*/
#ifndef VINO_VN_HTTP_PARSE_H
#define VINO_VN_HTTP_PARSE_H
#include "vn_request.h"
#define CR '\r'
#define LF '\n'
#define VN_OK 0
#define VN_AGAIN 1
#define VN_HTTP_PARSE_INVALID_METHOD -1
#define VN_HTTP_PARSE_INVALID_REQUEST -2
#define VN_HTTP_PARSE_INVALID_URI -3
#define VN_HTTP_PARSE_INVALID_VERSION -4
#define VN_HTTP_PARSE_HEADER_DONE 2
#define VN_HTTP_PARSE_INVALID_HEADER -5
int vn_http_parse_request_line(vn_http_connection_t *conn, const char *buf);
int vn_http_parse_header_line(vn_http_connection_t *conn, const char *buf);
#endif /* VINO_VN_HTTP_PARSE_H */
|
894d7f3f24d81bb73326b309f1e24c4fecc242cf
|
99bdb3251fecee538e0630f15f6574054dfc1468
|
/bsp/mm32f327x/Libraries/MM32F327x/HAL_Lib/Src/hal_adc.c
|
503e91a6733f8ba9a03a977ccb28f97cd1c9be04
|
[
"Apache-2.0",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"MIT",
"BSD-3-Clause",
"X11",
"BSD-4-Clause-UC",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
RT-Thread/rt-thread
|
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
|
3602f891211904a27dcbd51e5ba72fefce7326b2
|
refs/heads/master
| 2023-09-01T04:10:20.295801
| 2023-08-31T16:20:55
| 2023-08-31T16:20:55
| 7,408,108
| 9,599
| 5,805
|
Apache-2.0
| 2023-09-14T13:37:26
| 2013-01-02T14:49:21
|
C
|
UTF-8
|
C
| false
| false
| 25,058
|
c
|
hal_adc.c
|
////////////////////////////////////////////////////////////////////////////////
/// @file hal_adc.c
/// @author AE TEAM
/// @brief THIS FILE PROVIDES ALL THE ADC FIRMWARE FUNCTIONS.
////////////////////////////////////////////////////////////////////////////////
/// @attention
///
/// THE EXISTING FIRMWARE IS ONLY FOR REFERENCE, WHICH IS DESIGNED TO PROVIDE
/// CUSTOMERS WITH CODING INFORMATION ABOUT THEIR PRODUCTS SO THEY CAN SAVE
/// TIME. THEREFORE, MINDMOTION SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT OR
/// CONSEQUENTIAL DAMAGES ABOUT ANY CLAIMS ARISING OUT OF THE CONTENT OF SUCH
/// HARDWARE AND/OR THE USE OF THE CODING INFORMATION CONTAINED HEREIN IN
/// CONNECTION WITH PRODUCTS MADE BY CUSTOMERS.
///
/// <H2><CENTER>© COPYRIGHT MINDMOTION </CENTER></H2>
////////////////////////////////////////////////////////////////////////////////
// Define to prevent recursive inclusion
#define _HAL_ADC_C_
// Files includes
#include "hal_adc.h"
#include "hal_rcc.h"
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup MM32_Hardware_Abstract_Layer
/// @{
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup ADC_HAL
/// @{
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup ADC_Exported_Functions
/// @{
////////////////////////////////////////////////////////////////////////////////
/// @brief Deinitializes the adc peripheral registers to their default
/// reset values.
/// @param adc: select the ADC peripheral.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_DeInit(ADC_TypeDef* adc)
{
switch (*(vu32*)&adc) {
case ADC1_BASE:
exRCC_APB2PeriphReset(RCC_APB2ENR_ADC1);
break;
case ADC2_BASE:
exRCC_APB2PeriphReset(RCC_APB2ENR_ADC2);
break;
case ADC3_BASE:
exRCC_APB2PeriphReset(RCC_APB2ENR_ADC3);
break;
default:
break;
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Initializes the adc peripheral according to the specified parameters
/// in the init_struct, Please use this function if you want to be
/// compatible with older versions of the library.
/// @param adc: select the ADC peripheral.
/// @param init_struct: pointer to an ADC_InitTypeDef structure that contains
/// the configuration information for the specified ADC peripheral.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_Init(ADC_TypeDef* adc, ADC_InitTypeDef* init_struct)
{
adc->ADCFG &= ~(ADC_CFGR_PRE | ADC_CFGR_RSLTCTL);
adc->ADCFG |= (u32)(init_struct->ADC_PRESCARE) | init_struct->ADC_Resolution;
adc->ADCR &= ~(ADC_CR_ALIGN | ADC_CR_MODE | ADC_CR_TRGSEL);
adc->ADCR |= ((u32)init_struct->ADC_DataAlign) | init_struct->ADC_ExternalTrigConv | ((u32)init_struct->ADC_Mode);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Fills each init_struct member with its default value.
/// @param init_struct : pointer to an ADC_InitTypeDef structure which will be
/// initialized.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_StructInit(ADC_InitTypeDef* init_struct)
{
init_struct->ADC_Resolution = ADC_Resolution_12b;
init_struct->ADC_PRESCARE = ADC_PCLK2_PRESCARE_2;
init_struct->ADC_Mode = ADC_CR_IMM; //ADC_Mode_Single;
init_struct->ADC_ContinuousConvMode = DISABLE; // useless
init_struct->ADC_ExternalTrigConv = ADC1_ExternalTrigConv_T1_CC1;
init_struct->ADC_DataAlign = ADC_DataAlign_Right;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the specified ADC peripheral.
/// @param adc:select the ADC peripheral.
/// @param state: new state of the adc peripheral.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_Cmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ADCFG |= ADC_CFGR_ADEN) : (adc->ADCFG &= ~ADC_CFGR_ADEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the specified ADC DMA request.
/// @param adc: select the ADC peripheral.
/// @param state: New state of the selected ADC DMA transfer.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_DMACmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ADCR |= ADC_CR_DMAEN) : (adc->ADCR &= ~ADC_CR_DMAEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the specified ADC interrupts.
/// @param adc: select the ADC peripheral.
/// @param adc_interrupt: specifies the ADC interrupt sources to be enabled or disabled.
/// @param state: New state of the specified ADC interrupts.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ITConfig(ADC_TypeDef* adc, ADCFLAG_TypeDef adc_interrupt, FunctionalState state)
{
if (adc_interrupt == ADC_IT_EOC)
(state) ? (adc->ADCR |= ADC_CR_ADIE) : (adc->ADCR &= ~ADC_CR_ADIE);
else
(state) ? (adc->ADCR |= ADC_CR_ADWIE) : (adc->ADCR &= ~ADC_CR_ADWIE);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the selected ADC software start conversion .
/// @param adc: select the ADC peripheral.
/// @param state: New state of the selected ADC software start conversion.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_SoftwareStartConvCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ADCR |= ADC_CR_ADST) : (adc->ADCR &= ~ADC_CR_ADST);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Gets the selected ADC Software start conversion Status.
/// @param adc: select the ADC peripheral.
/// @retval The new state of ADC software start conversion (SET or RESET).
////////////////////////////////////////////////////////////////////////////////
FlagStatus ADC_GetSoftwareStartConvStatus(ADC_TypeDef* adc)
{
return (((adc->ADCR & ADC_CR_ADST) != (u32)RESET) ? SET : RESET);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enable the selected ADC channel and configure its sample time. Please
/// use this function if you want to be compatible with older versions
/// of the library.
/// @param adc: select the ADC peripheral.
/// @param channel: the ADC channel to configure.
/// @param sample_time: the ADC Channel n Sample time to configure.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_RegularChannelConfig(ADC_TypeDef* adc, u32 channel, u8 rank, u32 sample_time) //ADCSAM_TypeDef
{
u32 tempchan;
sample_time = sample_time & 0xF;
tempchan = channel;
if(tempchan > 8) {
tempchan = tempchan & 0xF;
tempchan = tempchan - 8;
adc->SMPR2 &= ~(0xF << tempchan);
adc->SMPR2 |= (sample_time << tempchan);
}
else {
adc->SMPR1 &= ~(0xF << tempchan);
adc->SMPR1 |= (sample_time << tempchan);
}
adc->ADCHS &= ~(1 << channel);
adc->ADCHS |= (1 << channel);
if (channel & ADC_CHSR_CHT)
ADC_TempSensorVrefintCmd(ENABLE);
else if (channel & ADC_CHSR_CHV)
ADC_TempSensorVrefintCmd(ENABLE);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the adc conversion through external trigger.
/// @param adc: select the ADC peripheral.
/// @param state: New state of the selected ADC external trigger.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ExternalTrigConvCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ADCR |= ADC_CR_TRGEN) : (adc->ADCR &= ~ADC_CR_TRGEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Configures the adc external trigger for injected channels conversion.
/// @param adc: select the ADC peripheral.
/// @param adc_external_trig_source: Configuring the external trigger source
/// for the ADC.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ExternalTrigConvConfig(ADC_TypeDef* adc, EXTERTRIG_TypeDef adc_external_trig_source)
{
adc->ADCR &= ~ADC_CR_TRGSEL;
adc->ADCR |= adc_external_trig_source;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Returns the last adc conversion result data for regular channel.
/// @param adc: select the ADC peripheral.
/// @retval The data conversion value.
////////////////////////////////////////////////////////////////////////////////
u16 ADC_GetConversionValue(ADC_TypeDef* adc)
{
return (u16)adc->ADDATA;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Returns the last ADC conversion result data in dual mode.
/// @param None
/// @retval The Data conversion value.
////////////////////////////////////////////////////////////////////////////////
u32 ADC_GetDualModeConversionValue()
{
return (*(vu32*)ADC1_BASE);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the analog watchdog.
/// @param adc: to select the ADC peripheral.
/// @param state: New state of the selected ADC analog watchdog.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_AnalogWatchdogCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ADCFG |= ADC_CFGR_ADWEN) : (adc->ADCFG &= ~ADC_CFGR_ADWEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Configures the high and low thresholds of the analog watchdog.
/// @param adc: select the ADC peripheral.
/// @param high_threshold: the ADC analog watchdog High threshold value.
/// This parameter must be a 12bit value.
/// @param low_threshold: the ADC analog watchdog Low threshold value.
/// This parameter must be a 12bit value.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* adc, u16 high_threshold, u16 low_threshold)
{
u32 tempThreshold;
tempThreshold = high_threshold;
adc->ADCMPR = (tempThreshold << 16) | low_threshold;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Configures the analog watchdog guarded single channel
/// @param adc: select the ADC peripheral.
/// @param channel: the ADC channel to configure for the analog watchdog.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* adc, ADCCHANNEL_TypeDef channel)
{
adc->ADCR &= ~ADC_CR_CMPCH;
adc->ADCR |= (channel << ADC_CR_CMPCH_Pos);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the temperature sensor and Vrefint channel.
/// @param state: New state of the temperature sensor.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_TempSensorVrefintCmd(FunctionalState state)
{
(state) ? (ADC1->ADCFG |= (ADC_CFGR_TEN | ADC_CFGR_VEN))
: (ADC1->ADCFG &= ~(ADC_CFGR_TEN | ADC_CFGR_VEN));
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the temperature sensor .
/// @param state: New state of the temperature sensor.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_TempSensorCmd(FunctionalState state)
{
ADC_TempSensorVrefintCmd(state);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the Vrefint channel.
/// @param state: New state of the Vrefint channel.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_VrefintCmd(FunctionalState state)
{
ADC_TempSensorVrefintCmd(state);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the temperature sensor and Vrefint channel.
/// @param chs: temperature sensor bit & Vrefint bit.
/// @param state: New state of the temperature sensor.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void exADC_TempSensorVrefintCmd(u32 chs, FunctionalState state)
{
if (chs & ADC_CHSR_CHT) {
(state) ? (ADC1->ADCFG |= ADC_CFGR_TEN)
: (ADC1->ADCFG &= ~ADC_CFGR_TEN);
}
else if (chs & ADC_CHSR_CHV) {
(state) ? (ADC1->ADCFG |= ADC_CFGR_VEN)
: (ADC1->ADCFG &= ~ADC_CFGR_VEN);
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Checks whether the specified ADC flag is set or not.
/// @param adc: select the ADC peripheral.
/// @param adc_flag: specifies the flag to check.
/// @retval The New state of adc_flag (SET or RESET).
////////////////////////////////////////////////////////////////////////////////
FlagStatus ADC_GetFlagStatus(ADC_TypeDef* adc, ADCFLAG_TypeDef adc_flag)
{
return (adc_flag == ADC_IT_EOC) ? ((adc->ADSTA & ADC_SR_ADIF) ? SET : RESET) : ((adc->ADSTA & ADC_SR_ADWIF) ? SET : RESET);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Clears the adc's pending flags.
/// @param adc: select the ADC peripheral.
/// @param adc_flag: specifies the flag to clear.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ClearFlag(ADC_TypeDef* adc, ADCFLAG_TypeDef adc_flag)
{
(adc_flag == ADC_IT_EOC) ? (adc->ADSTA |= ADC_SR_ADIF) : (adc->ADSTA |= ADC_SR_ADWIF);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Checks whether the specified adc's interrupt has occurred or not.
/// @param adc: select the ADC peripheral.
/// @param adc_interrupt: specifies the ADC interrupt source to check.
/// @retval The new state of adc_interrupt (SET or RESET).
////////////////////////////////////////////////////////////////////////////////
ITStatus ADC_GetITStatus(ADC_TypeDef* adc, ADCFLAG_TypeDef adc_interrupt)
{
return (adc_interrupt == ADC_IT_EOC) ? ((adc->ADSTA & ADC_SR_ADIF) ? SET : RESET) : ((adc->ADSTA & ADC_SR_ADWIF) ? SET : RESET);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Clears the adc's interrupt pending bits.
/// @param adc: select the ADC peripheral.
/// @param adc_interrupt: specifies the ADC interrupt pending bit to clear.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ClearITPendingBit(ADC_TypeDef* adc, ADCFLAG_TypeDef adc_interrupt)
{
(adc_interrupt == ADC_IT_EOC) ? (adc->ADSTA |= ADC_SR_ADIF) : (adc->ADSTA |= ADC_SR_ADWIF);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Configures the adc any channels conversion rank and channel.
/// @param adc: select the ADC peripheral.
/// @param rank: rank can be 0x0~0xf for the convert sequence.
/// @param adc_channel: Configuring the target channel to be converted.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ANY_CH_Config(ADC_TypeDef* adc, u8 rank, ADCCHANNEL_TypeDef adc_channel)
{
rank = rank & 0xF;
if(rank < 8) {
adc->CHANY0 &= ~(0x0F << (4 * rank));
adc->CHANY0 |= (adc_channel << (4 * rank));
}
else {
adc->CHANY1 &= ~(0x0F << (4 * (rank - 8)));
adc->CHANY1 |= (adc_channel << (4 * (rank - 8)));
}
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Configures the adc any channels conversion Max rank number
/// @param adc: select the ADC peripheral.
/// @param num: Configuring the max rank number for the ADC.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ANY_NUM_Config(ADC_TypeDef* adc, u8 num)
{
if(num > 15) num = 15; //15 ? 16 need to be confirmed
adc->ANYCFG = num;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the ANY channel converter.
/// @param state: enable or disable the ANY channel converter mode.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_ANY_Cmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ANYCR |= ADC1_CHANY_CR_MDEN) : (adc->ANYCR &= ~ADC1_CHANY_CR_MDEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the selected ADC automatic injected group
/// conversion after regular one.
/// @param adc: where x can be 1, 2 or 3 to select the ADC peripheral.
/// @param state: new state of the selected ADC auto injected conversion
/// This parameter can be: ENABLE or DISABLE.
/// @retval None
////////////////////////////////////////////////////////////////////////////////
void ADC_AutoInjectedConvCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ANYCR |= ADC_ANY_CR_JAUTO) : (adc->ANYCR &= ~ADC_ANY_CR_JAUTO);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Configures the adc external trigger for injected channels conversion.
/// @param adc: where x can be 1, 2 or 3 to select the ADC peripheral.
/// @param ADC_ExtInjTrigSource: specifies the ADC trigger to start injected conversion.
/// @retval None
////////////////////////////////////////////////////////////////////////////////
void ADC_ExternalTrigInjectedConvertConfig(ADC_TypeDef* adc, EXTER_INJ_TRIG_TypeDef ADC_ExtInjTrigSource)
{
u32 tmpreg = 0;
// Get the old register value
tmpreg = adc->ANYCR;
// Clear the old external event selection for injected group
tmpreg &= ADC_ANY_CR_JTRGSEL;
// Set the external event selection for injected group
tmpreg |= ADC_ExtInjTrigSource;
// Store the new register value
adc->ANYCR = tmpreg;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the adc injected channels conversion through
/// external trigger
/// @param adc: where x can be 1, 2 or 3 to select the ADC peripheral.
/// @param state: new state of the selected ADC external trigger start of
/// injected conversion.
/// This parameter can be: ENABLE or DISABLE.
/// @retval None
////////////////////////////////////////////////////////////////////////////////
void ADC_ExternalTrigInjectedConvCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ANYCR |= ADC_ANY_CR_JTRGEN) : (adc->ANYCR &= ~ADC_ANY_CR_JTRGEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the selected ADC start of the injected
/// channels conversion.
/// @param adc: where x can be 1, 2 or 3 to select the ADC peripheral.
/// @param state: new state of the selected ADC software start injected conversion.
/// This parameter can be: ENABLE or DISABLE.
/// @retval None
////////////////////////////////////////////////////////////////////////////////
void ADC_InjectedConvCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ANYCR |= ADC_ANY_CR_JCEN) : (adc->ANYCR &= ~ADC_ANY_CR_JCEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enables or disables the selected ADC start of the injected
/// channels conversion.
/// @param adc: where x can be 1, 2 or 3 to select the ADC peripheral.
/// @param NewState: new state of the selected ADC software start injected conversion.
/// This parameter can be: ENABLE or DISABLE.
/// @retval None
////////////////////////////////////////////////////////////////////////////////
void ADC_SoftwareStartInjectedConvCmd(ADC_TypeDef* adc, FunctionalState state)
{
(state) ? (adc->ANYCR |= ADC_ANY_CR_JADST) : (adc->ANYCR &= ~ADC_ANY_CR_JADST);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Enable the selected ADC channel and configure its sample time. Please
/// use this function if you want to be compatible with older versions
/// of the library.
/// @param adc: select the ADC peripheral.
/// @param event: the ADC external event to configure.
/// @param sample_time: the ADC Channel n Sample time to configure.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_InjectedSequencerConfig(ADC_TypeDef* adc, u32 event, u32 sample_time)
{
adc->ANYCR &= ~(ADC_ANY_CR_JCEN | ADC_ANY_CR_CHANY_MDEN | ADC_ANY_CR_JTRGSEL_EXTI12 \
| ADC_ANY_CR_JTRGSHIFT_512 | ADC_ANY_CR_JTRGEN);
adc->ANYCR |= (ADC_ANY_CR_JCEN | ADC_ANY_CR_CHANY_MDEN | sample_time | event | ADC_ANY_CR_JTRGEN);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Injection channel length configuration.
/// @param adc: select the ADC peripheral.
/// @param Length: Injection channel length.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_InjectedSequencerLengthConfig(ADC_TypeDef* adc, ADC_INJ_SEQ_LEN_TypeDef Length)
{
adc->JSQR &= ~(0x03 << ADC_JSQR_JL_Pos);
adc->JSQR |= Length << ADC_JSQR_JL_Pos;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Injection channel configuration.
/// @param adc : select the ADC peripheral.
/// @param off_addr : Injection channel offset address.
/// @param channel: The sampling channel.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_InjectedSequencerChannelConfig(ADC_TypeDef* adc, ADC_INJ_SEQ_Channel_TypeDef off_addr, ADCCHANNEL_TypeDef channel)
{
adc->JSQR &= ~(0x1F << (off_addr >> 2) * 5);
adc->JSQR |= (channel << (off_addr >> 2) * 5);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Injection channel converted value.
/// @param adc : select the ADC peripheral.
/// @param off_addr : Injection channel offset address.
/// @retval value.
////////////////////////////////////////////////////////////////////////////////
u16 ADC_GetInjectedConversionValue(ADC_TypeDef* adc, ADC_INJ_SEQ_Channel_TypeDef off_addr)
{
u32 value;
value = (*(vu32*)(*(vu32*)&adc + 0xB0 + off_addr)) - (*(vu32*)(*(vu32*)&adc + 0x7C + off_addr));
return (u16)value;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Injection current converted value.
/// @param adc : select the ADC peripheral.
/// @retval value. Returns the last adc conversion result data for injected channel.
////////////////////////////////////////////////////////////////////////////////
u16 ADC_GetInjectedCurrentConvertedValue(ADC_TypeDef* adc)
{
return (u16)adc->JDATA;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Injection channel compensation configuration.
/// @param adc : select the ADC peripheral.
/// @param off_addr : Injection channel.
/// @param value : compensation value.
/// @retval None.
////////////////////////////////////////////////////////////////////////////////
void ADC_SetInjectedOffset(ADC_TypeDef* adc, ADC_INJ_SEQ_Channel_TypeDef off_addr, u16 value)
{
*(vu32*)(*(vu32*)&adc + 0x7C + off_addr) = value;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief Get channel convertion result.
/// @param adc : select the ADC peripheral.
/// @param channel : Converted channel.
/// @retval The Data conversion value.
////////////////////////////////////////////////////////////////////////////////
u16 ADC_GetChannelConvertedValue(ADC_TypeDef* adc, ADCCHANNEL_TypeDef channel)
{
return (u16)(*(vu32*) ((u32)adc + 0x18 + ((u32)channel << 2)));
}
/// @}
/// @}
/// @}
|
d8b1df6b37d523b5ff0a11bbef4273b8f5e95d98
|
010279e2ba272d09e9d2c4e903722e5faba2cf7a
|
/contrib/tools/python3/src/Modules/clinic/arraymodule.c.h
|
6358ba2f81fa388dd19fbcc855e5d00b6fb03f89
|
[
"Apache-2.0",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-other-copyleft",
"Python-2.0",
"BSD-3-Clause",
"0BSD",
"GPL-1.0-or-later",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
catboost/catboost
|
854c1a1f439a96f1ae6b48e16644be20aa04dba2
|
f5042e35b945aded77b23470ead62d7eacefde92
|
refs/heads/master
| 2023-09-01T12:14:14.174108
| 2023-09-01T10:01:01
| 2023-09-01T10:22:12
| 97,556,265
| 8,012
| 1,425
|
Apache-2.0
| 2023-09-11T03:32:32
| 2017-07-18T05:29:04
|
Python
|
UTF-8
|
C
| false
| false
| 18,312
|
h
|
arraymodule.c.h
|
/*[clinic input]
preserve
[clinic start generated code]*/
PyDoc_STRVAR(array_array___copy____doc__,
"__copy__($self, /)\n"
"--\n"
"\n"
"Return a copy of the array.");
#define ARRAY_ARRAY___COPY___METHODDEF \
{"__copy__", (PyCFunction)array_array___copy__, METH_NOARGS, array_array___copy____doc__},
static PyObject *
array_array___copy___impl(arrayobject *self);
static PyObject *
array_array___copy__(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array___copy___impl(self);
}
PyDoc_STRVAR(array_array___deepcopy____doc__,
"__deepcopy__($self, unused, /)\n"
"--\n"
"\n"
"Return a copy of the array.");
#define ARRAY_ARRAY___DEEPCOPY___METHODDEF \
{"__deepcopy__", (PyCFunction)array_array___deepcopy__, METH_O, array_array___deepcopy____doc__},
PyDoc_STRVAR(array_array_count__doc__,
"count($self, v, /)\n"
"--\n"
"\n"
"Return number of occurrences of v in the array.");
#define ARRAY_ARRAY_COUNT_METHODDEF \
{"count", (PyCFunction)array_array_count, METH_O, array_array_count__doc__},
PyDoc_STRVAR(array_array_index__doc__,
"index($self, v, start=0, stop=sys.maxsize, /)\n"
"--\n"
"\n"
"Return index of first occurrence of v in the array.\n"
"\n"
"Raise ValueError if the value is not present.");
#define ARRAY_ARRAY_INDEX_METHODDEF \
{"index", _PyCFunction_CAST(array_array_index), METH_FASTCALL, array_array_index__doc__},
static PyObject *
array_array_index_impl(arrayobject *self, PyObject *v, Py_ssize_t start,
Py_ssize_t stop);
static PyObject *
array_array_index(arrayobject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *v;
Py_ssize_t start = 0;
Py_ssize_t stop = PY_SSIZE_T_MAX;
if (!_PyArg_CheckPositional("index", nargs, 1, 3)) {
goto exit;
}
v = args[0];
if (nargs < 2) {
goto skip_optional;
}
if (!_PyEval_SliceIndexNotNone(args[1], &start)) {
goto exit;
}
if (nargs < 3) {
goto skip_optional;
}
if (!_PyEval_SliceIndexNotNone(args[2], &stop)) {
goto exit;
}
skip_optional:
return_value = array_array_index_impl(self, v, start, stop);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_remove__doc__,
"remove($self, v, /)\n"
"--\n"
"\n"
"Remove the first occurrence of v in the array.");
#define ARRAY_ARRAY_REMOVE_METHODDEF \
{"remove", (PyCFunction)array_array_remove, METH_O, array_array_remove__doc__},
PyDoc_STRVAR(array_array_pop__doc__,
"pop($self, i=-1, /)\n"
"--\n"
"\n"
"Return the i-th element and delete it from the array.\n"
"\n"
"i defaults to -1.");
#define ARRAY_ARRAY_POP_METHODDEF \
{"pop", _PyCFunction_CAST(array_array_pop), METH_FASTCALL, array_array_pop__doc__},
static PyObject *
array_array_pop_impl(arrayobject *self, Py_ssize_t i);
static PyObject *
array_array_pop(arrayobject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t i = -1;
if (!_PyArg_CheckPositional("pop", nargs, 0, 1)) {
goto exit;
}
if (nargs < 1) {
goto skip_optional;
}
{
Py_ssize_t ival = -1;
PyObject *iobj = _PyNumber_Index(args[0]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
}
if (ival == -1 && PyErr_Occurred()) {
goto exit;
}
i = ival;
}
skip_optional:
return_value = array_array_pop_impl(self, i);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_extend__doc__,
"extend($self, bb, /)\n"
"--\n"
"\n"
"Append items to the end of the array.");
#define ARRAY_ARRAY_EXTEND_METHODDEF \
{"extend", _PyCFunction_CAST(array_array_extend), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_extend__doc__},
static PyObject *
array_array_extend_impl(arrayobject *self, PyTypeObject *cls, PyObject *bb);
static PyObject *
array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", NULL};
static _PyArg_Parser _parser = {NULL, _keywords, "extend", 0};
PyObject *argsbuf[1];
PyObject *bb;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
if (!args) {
goto exit;
}
bb = args[0];
return_value = array_array_extend_impl(self, cls, bb);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_insert__doc__,
"insert($self, i, v, /)\n"
"--\n"
"\n"
"Insert a new item v into the array before position i.");
#define ARRAY_ARRAY_INSERT_METHODDEF \
{"insert", _PyCFunction_CAST(array_array_insert), METH_FASTCALL, array_array_insert__doc__},
static PyObject *
array_array_insert_impl(arrayobject *self, Py_ssize_t i, PyObject *v);
static PyObject *
array_array_insert(arrayobject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t i;
PyObject *v;
if (!_PyArg_CheckPositional("insert", nargs, 2, 2)) {
goto exit;
}
{
Py_ssize_t ival = -1;
PyObject *iobj = _PyNumber_Index(args[0]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
}
if (ival == -1 && PyErr_Occurred()) {
goto exit;
}
i = ival;
}
v = args[1];
return_value = array_array_insert_impl(self, i, v);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_buffer_info__doc__,
"buffer_info($self, /)\n"
"--\n"
"\n"
"Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array\'s contents.\n"
"\n"
"The length should be multiplied by the itemsize attribute to calculate\n"
"the buffer length in bytes.");
#define ARRAY_ARRAY_BUFFER_INFO_METHODDEF \
{"buffer_info", (PyCFunction)array_array_buffer_info, METH_NOARGS, array_array_buffer_info__doc__},
static PyObject *
array_array_buffer_info_impl(arrayobject *self);
static PyObject *
array_array_buffer_info(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array_buffer_info_impl(self);
}
PyDoc_STRVAR(array_array_append__doc__,
"append($self, v, /)\n"
"--\n"
"\n"
"Append new value v to the end of the array.");
#define ARRAY_ARRAY_APPEND_METHODDEF \
{"append", (PyCFunction)array_array_append, METH_O, array_array_append__doc__},
PyDoc_STRVAR(array_array_byteswap__doc__,
"byteswap($self, /)\n"
"--\n"
"\n"
"Byteswap all items of the array.\n"
"\n"
"If the items in the array are not 1, 2, 4, or 8 bytes in size, RuntimeError is\n"
"raised.");
#define ARRAY_ARRAY_BYTESWAP_METHODDEF \
{"byteswap", (PyCFunction)array_array_byteswap, METH_NOARGS, array_array_byteswap__doc__},
static PyObject *
array_array_byteswap_impl(arrayobject *self);
static PyObject *
array_array_byteswap(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array_byteswap_impl(self);
}
PyDoc_STRVAR(array_array_reverse__doc__,
"reverse($self, /)\n"
"--\n"
"\n"
"Reverse the order of the items in the array.");
#define ARRAY_ARRAY_REVERSE_METHODDEF \
{"reverse", (PyCFunction)array_array_reverse, METH_NOARGS, array_array_reverse__doc__},
static PyObject *
array_array_reverse_impl(arrayobject *self);
static PyObject *
array_array_reverse(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array_reverse_impl(self);
}
PyDoc_STRVAR(array_array_fromfile__doc__,
"fromfile($self, f, n, /)\n"
"--\n"
"\n"
"Read n objects from the file object f and append them to the end of the array.");
#define ARRAY_ARRAY_FROMFILE_METHODDEF \
{"fromfile", _PyCFunction_CAST(array_array_fromfile), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_fromfile__doc__},
static PyObject *
array_array_fromfile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f,
Py_ssize_t n);
static PyObject *
array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", "", NULL};
static _PyArg_Parser _parser = {NULL, _keywords, "fromfile", 0};
PyObject *argsbuf[2];
PyObject *f;
Py_ssize_t n;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
if (!args) {
goto exit;
}
f = args[0];
{
Py_ssize_t ival = -1;
PyObject *iobj = _PyNumber_Index(args[1]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
}
if (ival == -1 && PyErr_Occurred()) {
goto exit;
}
n = ival;
}
return_value = array_array_fromfile_impl(self, cls, f, n);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_tofile__doc__,
"tofile($self, f, /)\n"
"--\n"
"\n"
"Write all items (as machine values) to the file object f.");
#define ARRAY_ARRAY_TOFILE_METHODDEF \
{"tofile", _PyCFunction_CAST(array_array_tofile), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_tofile__doc__},
static PyObject *
array_array_tofile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f);
static PyObject *
array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", NULL};
static _PyArg_Parser _parser = {NULL, _keywords, "tofile", 0};
PyObject *argsbuf[1];
PyObject *f;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
if (!args) {
goto exit;
}
f = args[0];
return_value = array_array_tofile_impl(self, cls, f);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_fromlist__doc__,
"fromlist($self, list, /)\n"
"--\n"
"\n"
"Append items to array from list.");
#define ARRAY_ARRAY_FROMLIST_METHODDEF \
{"fromlist", (PyCFunction)array_array_fromlist, METH_O, array_array_fromlist__doc__},
PyDoc_STRVAR(array_array_tolist__doc__,
"tolist($self, /)\n"
"--\n"
"\n"
"Convert array to an ordinary list with the same items.");
#define ARRAY_ARRAY_TOLIST_METHODDEF \
{"tolist", (PyCFunction)array_array_tolist, METH_NOARGS, array_array_tolist__doc__},
static PyObject *
array_array_tolist_impl(arrayobject *self);
static PyObject *
array_array_tolist(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array_tolist_impl(self);
}
PyDoc_STRVAR(array_array_frombytes__doc__,
"frombytes($self, buffer, /)\n"
"--\n"
"\n"
"Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method.");
#define ARRAY_ARRAY_FROMBYTES_METHODDEF \
{"frombytes", (PyCFunction)array_array_frombytes, METH_O, array_array_frombytes__doc__},
static PyObject *
array_array_frombytes_impl(arrayobject *self, Py_buffer *buffer);
static PyObject *
array_array_frombytes(arrayobject *self, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer buffer = {NULL, NULL};
if (PyObject_GetBuffer(arg, &buffer, PyBUF_SIMPLE) != 0) {
goto exit;
}
if (!PyBuffer_IsContiguous(&buffer, 'C')) {
_PyArg_BadArgument("frombytes", "argument", "contiguous buffer", arg);
goto exit;
}
return_value = array_array_frombytes_impl(self, &buffer);
exit:
/* Cleanup for buffer */
if (buffer.obj) {
PyBuffer_Release(&buffer);
}
return return_value;
}
PyDoc_STRVAR(array_array_tobytes__doc__,
"tobytes($self, /)\n"
"--\n"
"\n"
"Convert the array to an array of machine values and return the bytes representation.");
#define ARRAY_ARRAY_TOBYTES_METHODDEF \
{"tobytes", (PyCFunction)array_array_tobytes, METH_NOARGS, array_array_tobytes__doc__},
static PyObject *
array_array_tobytes_impl(arrayobject *self);
static PyObject *
array_array_tobytes(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array_tobytes_impl(self);
}
PyDoc_STRVAR(array_array_fromunicode__doc__,
"fromunicode($self, ustr, /)\n"
"--\n"
"\n"
"Extends this array with data from the unicode string ustr.\n"
"\n"
"The array must be a unicode type array; otherwise a ValueError is raised.\n"
"Use array.frombytes(ustr.encode(...)) to append Unicode data to an array of\n"
"some other type.");
#define ARRAY_ARRAY_FROMUNICODE_METHODDEF \
{"fromunicode", (PyCFunction)array_array_fromunicode, METH_O, array_array_fromunicode__doc__},
static PyObject *
array_array_fromunicode_impl(arrayobject *self, PyObject *ustr);
static PyObject *
array_array_fromunicode(arrayobject *self, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *ustr;
if (!PyUnicode_Check(arg)) {
_PyArg_BadArgument("fromunicode", "argument", "str", arg);
goto exit;
}
if (PyUnicode_READY(arg) == -1) {
goto exit;
}
ustr = arg;
return_value = array_array_fromunicode_impl(self, ustr);
exit:
return return_value;
}
PyDoc_STRVAR(array_array_tounicode__doc__,
"tounicode($self, /)\n"
"--\n"
"\n"
"Extends this array with data from the unicode string ustr.\n"
"\n"
"Convert the array to a unicode string. The array must be a unicode type array;\n"
"otherwise a ValueError is raised. Use array.tobytes().decode() to obtain a\n"
"unicode string from an array of some other type.");
#define ARRAY_ARRAY_TOUNICODE_METHODDEF \
{"tounicode", (PyCFunction)array_array_tounicode, METH_NOARGS, array_array_tounicode__doc__},
static PyObject *
array_array_tounicode_impl(arrayobject *self);
static PyObject *
array_array_tounicode(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array_tounicode_impl(self);
}
PyDoc_STRVAR(array_array___sizeof____doc__,
"__sizeof__($self, /)\n"
"--\n"
"\n"
"Size of the array in memory, in bytes.");
#define ARRAY_ARRAY___SIZEOF___METHODDEF \
{"__sizeof__", (PyCFunction)array_array___sizeof__, METH_NOARGS, array_array___sizeof____doc__},
static PyObject *
array_array___sizeof___impl(arrayobject *self);
static PyObject *
array_array___sizeof__(arrayobject *self, PyObject *Py_UNUSED(ignored))
{
return array_array___sizeof___impl(self);
}
PyDoc_STRVAR(array__array_reconstructor__doc__,
"_array_reconstructor($module, arraytype, typecode, mformat_code, items,\n"
" /)\n"
"--\n"
"\n"
"Internal. Used for pickling support.");
#define ARRAY__ARRAY_RECONSTRUCTOR_METHODDEF \
{"_array_reconstructor", _PyCFunction_CAST(array__array_reconstructor), METH_FASTCALL, array__array_reconstructor__doc__},
static PyObject *
array__array_reconstructor_impl(PyObject *module, PyTypeObject *arraytype,
int typecode,
enum machine_format_code mformat_code,
PyObject *items);
static PyObject *
array__array_reconstructor(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyTypeObject *arraytype;
int typecode;
enum machine_format_code mformat_code;
PyObject *items;
if (!_PyArg_CheckPositional("_array_reconstructor", nargs, 4, 4)) {
goto exit;
}
arraytype = (PyTypeObject *)args[0];
if (!PyUnicode_Check(args[1])) {
_PyArg_BadArgument("_array_reconstructor", "argument 2", "a unicode character", args[1]);
goto exit;
}
if (PyUnicode_READY(args[1])) {
goto exit;
}
if (PyUnicode_GET_LENGTH(args[1]) != 1) {
_PyArg_BadArgument("_array_reconstructor", "argument 2", "a unicode character", args[1]);
goto exit;
}
typecode = PyUnicode_READ_CHAR(args[1], 0);
mformat_code = _PyLong_AsInt(args[2]);
if (mformat_code == -1 && PyErr_Occurred()) {
goto exit;
}
items = args[3];
return_value = array__array_reconstructor_impl(module, arraytype, typecode, mformat_code, items);
exit:
return return_value;
}
PyDoc_STRVAR(array_array___reduce_ex____doc__,
"__reduce_ex__($self, value, /)\n"
"--\n"
"\n"
"Return state information for pickling.");
#define ARRAY_ARRAY___REDUCE_EX___METHODDEF \
{"__reduce_ex__", _PyCFunction_CAST(array_array___reduce_ex__), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array___reduce_ex____doc__},
static PyObject *
array_array___reduce_ex___impl(arrayobject *self, PyTypeObject *cls,
PyObject *value);
static PyObject *
array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", NULL};
static _PyArg_Parser _parser = {NULL, _keywords, "__reduce_ex__", 0};
PyObject *argsbuf[1];
PyObject *value;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
if (!args) {
goto exit;
}
value = args[0];
return_value = array_array___reduce_ex___impl(self, cls, value);
exit:
return return_value;
}
PyDoc_STRVAR(array_arrayiterator___reduce____doc__,
"__reduce__($self, /)\n"
"--\n"
"\n"
"Return state information for pickling.");
#define ARRAY_ARRAYITERATOR___REDUCE___METHODDEF \
{"__reduce__", _PyCFunction_CAST(array_arrayiterator___reduce__), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_arrayiterator___reduce____doc__},
static PyObject *
array_arrayiterator___reduce___impl(arrayiterobject *self, PyTypeObject *cls);
static PyObject *
array_arrayiterator___reduce__(arrayiterobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
if (nargs) {
PyErr_SetString(PyExc_TypeError, "__reduce__() takes no arguments");
return NULL;
}
return array_arrayiterator___reduce___impl(self, cls);
}
PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
"__setstate__($self, state, /)\n"
"--\n"
"\n"
"Set state information for unpickling.");
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
/*[clinic end generated code: output=85a5fec90d9615b9 input=a9049054013a1b77]*/
|
226bd4673f8855fd5c4bbfbf599e6b6bb82d03dc
|
8a51a96f61699f0318315ccc89cef39f6866f2b5
|
/src/pl/plpython/plpy_resultobject.c
|
95acce654935c8743b544535402bb0c92c3f0165
|
[
"PostgreSQL"
] |
permissive
|
postgres/postgres
|
979febf2b41c00090d1256228f768f33e7ef3b6f
|
b5934bfd6071fed3a38cea0cfaa93afda63d9c0c
|
refs/heads/master
| 2023-08-31T00:10:01.373472
| 2023-08-30T23:07:48
| 2023-08-30T23:07:48
| 927,442
| 13,691
| 4,807
|
NOASSERTION
| 2023-09-09T13:59:15
| 2010-09-21T11:35:45
|
C
|
UTF-8
|
C
| false
| false
| 5,664
|
c
|
plpy_resultobject.c
|
/*
* the PLyResult class
*
* src/pl/plpython/plpy_resultobject.c
*/
#include "postgres.h"
#include "plpy_elog.h"
#include "plpy_resultobject.h"
#include "plpython.h"
static void PLy_result_dealloc(PyObject *arg);
static PyObject *PLy_result_colnames(PyObject *self, PyObject *unused);
static PyObject *PLy_result_coltypes(PyObject *self, PyObject *unused);
static PyObject *PLy_result_coltypmods(PyObject *self, PyObject *unused);
static PyObject *PLy_result_nrows(PyObject *self, PyObject *args);
static PyObject *PLy_result_status(PyObject *self, PyObject *args);
static Py_ssize_t PLy_result_length(PyObject *arg);
static PyObject *PLy_result_item(PyObject *arg, Py_ssize_t idx);
static PyObject *PLy_result_str(PyObject *arg);
static PyObject *PLy_result_subscript(PyObject *arg, PyObject *item);
static int PLy_result_ass_subscript(PyObject *arg, PyObject *item, PyObject *value);
static char PLy_result_doc[] = "Results of a PostgreSQL query";
static PySequenceMethods PLy_result_as_sequence = {
.sq_length = PLy_result_length,
.sq_item = PLy_result_item,
};
static PyMappingMethods PLy_result_as_mapping = {
.mp_length = PLy_result_length,
.mp_subscript = PLy_result_subscript,
.mp_ass_subscript = PLy_result_ass_subscript,
};
static PyMethodDef PLy_result_methods[] = {
{"colnames", PLy_result_colnames, METH_NOARGS, NULL},
{"coltypes", PLy_result_coltypes, METH_NOARGS, NULL},
{"coltypmods", PLy_result_coltypmods, METH_NOARGS, NULL},
{"nrows", PLy_result_nrows, METH_VARARGS, NULL},
{"status", PLy_result_status, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};
static PyTypeObject PLy_ResultType = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "PLyResult",
.tp_basicsize = sizeof(PLyResultObject),
.tp_dealloc = PLy_result_dealloc,
.tp_as_sequence = &PLy_result_as_sequence,
.tp_as_mapping = &PLy_result_as_mapping,
.tp_str = &PLy_result_str,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_doc = PLy_result_doc,
.tp_methods = PLy_result_methods,
};
void
PLy_result_init_type(void)
{
if (PyType_Ready(&PLy_ResultType) < 0)
elog(ERROR, "could not initialize PLy_ResultType");
}
PyObject *
PLy_result_new(void)
{
PLyResultObject *ob;
if ((ob = PyObject_New(PLyResultObject, &PLy_ResultType)) == NULL)
return NULL;
/* ob->tuples = NULL; */
Py_INCREF(Py_None);
ob->status = Py_None;
ob->nrows = PyLong_FromLong(-1);
ob->rows = PyList_New(0);
ob->tupdesc = NULL;
if (!ob->rows)
{
Py_DECREF(ob);
return NULL;
}
return (PyObject *) ob;
}
static void
PLy_result_dealloc(PyObject *arg)
{
PLyResultObject *ob = (PLyResultObject *) arg;
Py_XDECREF(ob->nrows);
Py_XDECREF(ob->rows);
Py_XDECREF(ob->status);
if (ob->tupdesc)
{
FreeTupleDesc(ob->tupdesc);
ob->tupdesc = NULL;
}
arg->ob_type->tp_free(arg);
}
static PyObject *
PLy_result_colnames(PyObject *self, PyObject *unused)
{
PLyResultObject *ob = (PLyResultObject *) self;
PyObject *list;
int i;
if (!ob->tupdesc)
{
PLy_exception_set(PLy_exc_error, "command did not produce a result set");
return NULL;
}
list = PyList_New(ob->tupdesc->natts);
if (!list)
return NULL;
for (i = 0; i < ob->tupdesc->natts; i++)
{
Form_pg_attribute attr = TupleDescAttr(ob->tupdesc, i);
PyList_SET_ITEM(list, i, PLyUnicode_FromString(NameStr(attr->attname)));
}
return list;
}
static PyObject *
PLy_result_coltypes(PyObject *self, PyObject *unused)
{
PLyResultObject *ob = (PLyResultObject *) self;
PyObject *list;
int i;
if (!ob->tupdesc)
{
PLy_exception_set(PLy_exc_error, "command did not produce a result set");
return NULL;
}
list = PyList_New(ob->tupdesc->natts);
if (!list)
return NULL;
for (i = 0; i < ob->tupdesc->natts; i++)
{
Form_pg_attribute attr = TupleDescAttr(ob->tupdesc, i);
PyList_SET_ITEM(list, i, PyLong_FromLong(attr->atttypid));
}
return list;
}
static PyObject *
PLy_result_coltypmods(PyObject *self, PyObject *unused)
{
PLyResultObject *ob = (PLyResultObject *) self;
PyObject *list;
int i;
if (!ob->tupdesc)
{
PLy_exception_set(PLy_exc_error, "command did not produce a result set");
return NULL;
}
list = PyList_New(ob->tupdesc->natts);
if (!list)
return NULL;
for (i = 0; i < ob->tupdesc->natts; i++)
{
Form_pg_attribute attr = TupleDescAttr(ob->tupdesc, i);
PyList_SET_ITEM(list, i, PyLong_FromLong(attr->atttypmod));
}
return list;
}
static PyObject *
PLy_result_nrows(PyObject *self, PyObject *args)
{
PLyResultObject *ob = (PLyResultObject *) self;
Py_INCREF(ob->nrows);
return ob->nrows;
}
static PyObject *
PLy_result_status(PyObject *self, PyObject *args)
{
PLyResultObject *ob = (PLyResultObject *) self;
Py_INCREF(ob->status);
return ob->status;
}
static Py_ssize_t
PLy_result_length(PyObject *arg)
{
PLyResultObject *ob = (PLyResultObject *) arg;
return PyList_Size(ob->rows);
}
static PyObject *
PLy_result_item(PyObject *arg, Py_ssize_t idx)
{
PyObject *rv;
PLyResultObject *ob = (PLyResultObject *) arg;
rv = PyList_GetItem(ob->rows, idx);
if (rv != NULL)
Py_INCREF(rv);
return rv;
}
static PyObject *
PLy_result_str(PyObject *arg)
{
PLyResultObject *ob = (PLyResultObject *) arg;
return PyUnicode_FromFormat("<%s status=%S nrows=%S rows=%S>",
Py_TYPE(ob)->tp_name,
ob->status,
ob->nrows,
ob->rows);
}
static PyObject *
PLy_result_subscript(PyObject *arg, PyObject *item)
{
PLyResultObject *ob = (PLyResultObject *) arg;
return PyObject_GetItem(ob->rows, item);
}
static int
PLy_result_ass_subscript(PyObject *arg, PyObject *item, PyObject *value)
{
PLyResultObject *ob = (PLyResultObject *) arg;
return PyObject_SetItem(ob->rows, item, value);
}
|
c3af12a3e3891345edc2bf60213ef5d7ad2d3b25
|
376e1818d427b5e4d32fa6dd6c7b71e9fd88afdb
|
/sysutils/hytctl/files/sbin/hytctl.c
|
22c25e7b93cd94d0ffb01d37884223cb67c83ec6
|
[] |
no_license
|
NetBSD/pkgsrc
|
a0732c023519650ef821ab89c23ab6ab59e25bdb
|
d042034ec4896cc5b47ed6f2e5b8802d9bc5c556
|
refs/heads/trunk
| 2023-09-01T07:40:12.138283
| 2023-09-01T05:25:19
| 2023-09-01T05:25:19
| 88,439,572
| 321
| 138
| null | 2023-07-12T22:34:14
| 2017-04-16T20:04:15
| null |
UTF-8
|
C
| false
| false
| 10,484
|
c
|
hytctl.c
|
/*
* $Header: /cvsroot/pkgsrc/sysutils/hytctl/files/sbin/hytctl.c,v 1.1 2015/09/06 06:50:53 kardel Exp $
*
* $Created: Fri May 16 20:29:08 2014 $
*/
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank Kardel.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: hytctl.c,v 1.1 2015/09/06 06:50:53 kardel Exp $");
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/gpio.h>
#include "hytp14reg.h"
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <util.h>
#include <dev/i2c/i2c_io.h>
#define ARG_GPIODEV 1
#define ARG_GPIOPIN 2
#define ARG_I2CDEV 3
#define ARG_I2CADDR 4
#define ARG_EEPROMADDR 5
#define ARG_EEPROMVAL 6
static int debug = 0;
__dead static void
usage(void)
{
fprintf(stderr, "usage: %s [-d] <gpio-dev> <pin#|pin-name> <i2c-dev> <i2c-addr> <eeprom-address> [<new eeprom value>]\n", getprogname());
exit(EXIT_FAILURE);
}
static void
waitfor(int usec)
{
struct timeval tv1;
struct timeval tv2;
gettimeofday(&tv1, NULL);
tv2.tv_sec = tv1.tv_sec + usec / 1000000;
tv2.tv_usec = tv1.tv_usec + usec % 1000000;
tv2.tv_sec += tv2.tv_usec / 1000000;
tv2.tv_usec %= 1000000;
while (tv2.tv_sec > tv1.tv_sec || (tv2.tv_usec > tv1.tv_usec && tv2.tv_sec == tv1.tv_sec)) {
gettimeofday(&tv1, NULL);
}
}
static int
iic_write(int fd, i2c_addr_t addr, int clen, uint8_t *cmd, int blen, uint8_t *buf)
{
i2c_ioctl_exec_t iie;
iie.iie_op = I2C_OP_WRITE_WITH_STOP;
iie.iie_addr = addr;
iie.iie_cmd = cmd;
iie.iie_cmdlen = clen;
iie.iie_buf = buf;
iie.iie_buflen = blen;
if (ioctl(fd, I2C_IOCTL_EXEC, &iie) == -1) {
return errno;
}
return 0;
}
static int
iic_read(int fd, i2c_addr_t addr, int clen, uint8_t *cmd, int blen, uint8_t *buf)
{
i2c_ioctl_exec_t iie;
iie.iie_op = I2C_OP_READ_WITH_STOP;
iie.iie_addr = addr;
iie.iie_cmd = cmd;
iie.iie_cmdlen = clen;
iie.iie_buf = buf;
iie.iie_buflen = blen;
if (ioctl(fd, I2C_IOCTL_EXEC, &iie) == -1) {
return errno;
}
return 0;
}
static int
exec_cmd(int fd, i2c_addr_t addr, int cmdlen, uint8_t *cmd, int datalen, uint8_t *data)
{
int error;
/* send command */
if ((error = iic_write(fd, addr, cmdlen, cmd, 0, NULL)) == 0)
{
int loops = 0;
for (;;) {
/* read reply */
memset(data, 0, datalen);
if ((error = iic_read(fd, addr, 0, NULL, sizeof data, data)) == 0)
{
if (data[0] & HYTP14_RESP_CMDMODE) {
char b[80];
snprintb(b, sizeof b, HYT_STATUS_FMT,
data[0]);
if (debug) {
fprintf(stderr, "CM_MODE command 0x%02x status=%s\n", cmd[0], b);
}
} else {
if (cmd[0] != HYTP14_CMD_START_NOM)
fprintf(stderr, "CM mode command 0x%02x unexpectedly turned off\n", cmd[0]);
return 0;
}
switch (data[0] & HYTP14_RESP_MASK)
{
case HYTP14_RESP_ACK:
return 1;
case HYTP14_RESP_NACK:
fprintf(stderr, "Command 0x%02x failed with NACK\n", cmd[0]);
return 0;
case HYTP14_RESP_BUSY:
/* do not wait forever for an ACK */
if (++loops > 100) {
fprintf(stderr, "result wait loop count exceeded\n");
return 0;
}
}
} else {
if (cmd[0] != HYTP14_CMD_START_NOM)
fprintf(stderr, "Command 0x%02x READ failed (errno=%d)\n", cmd[0], error);
return 0;
}
}
} else {
fprintf(stderr, "Command 0x%02x WRITE failed (errno=%d)\n", cmd[0], error);
return 0;
}
}
int
main(int argc, char *argv[])
{
int argidx = 0;
int gfd, fd, error;
i2c_addr_t addr = HYTP14_DEFAULT_ADDR;
int eeaddr = 0;
uint8_t data[4];
uint8_t cmd[3];
int count = 0;
char *endptr;
long gpio_pinnumber = -1;
int pinstatus;
struct gpio_info gpioinfo;
struct gpio_req gpioreq;
struct gpio_set gpioset;
setprogname(*argv);
if ((argc > 1) && (strcmp(argv[1], "-d") == 0)) {
debug = 1;
argidx = 1;
}
if ((argc-argidx) <= ARG_EEPROMADDR) {
usage();
}
fd = open(argv[argidx + ARG_I2CDEV], O_RDWR);
if (fd == -1) {
err(EXIT_FAILURE, "couldn't open %s", argv[argidx + ARG_I2CDEV]);
}
addr = strtol(argv[argidx + ARG_I2CADDR], &endptr, 0);
if (addr < 1 || addr > 0x7f || argv[argidx + ARG_I2CADDR][0] == '\0' || *endptr != '\0') {
err(EXIT_FAILURE, "I2C address (%s) is invalid", argv[argidx + ARG_I2CADDR]);
}
eeaddr = strtol(argv[argidx + ARG_EEPROMADDR], &endptr, 0);
if (eeaddr < 0 || eeaddr >= HYTP14_NUM_WORDS || argv[argidx + ARG_EEPROMADDR][0] == '\0' || *endptr != '\0') {
err(EXIT_FAILURE, "HYT EEPROM address (%s) is invalid", argv[argidx + ARG_EEPROMADDR]);
}
gpio_pinnumber = strtol(argv[argidx + ARG_GPIOPIN], &endptr, 0);
if (argv[argidx + ARG_GPIOPIN][0] != '\0' && *endptr == '\0') {
gpioreq.gp_pin = gpio_pinnumber;
gpioreq.gp_name[0] = '\0';
gpioset.gp_pin = gpio_pinnumber;
gpioset.gp_name[0] = '\0';
} else {
gpioreq.gp_pin = -1;
strncpy(gpioreq.gp_name, argv[argidx + ARG_GPIOPIN],
sizeof gpioreq.gp_name);
gpioset.gp_pin = -1;
strncpy(gpioset.gp_name, argv[argidx + ARG_GPIOPIN],
sizeof gpioset.gp_name);
}
gpioset.gp_flags = 0;
gpioset.gp_name2[0] = '\0';
gfd = open(argv[argidx + ARG_GPIODEV], O_RDWR);
if (gfd == -1) {
err(EXIT_FAILURE, "couldn't open %s", argv[argidx + ARG_GPIODEV]);
}
if (ioctl(gfd, GPIOSET, &gpioset) == -1) {
err(EXIT_FAILURE, "failed getting GPIO configuration");
}
if (debug) {
printf("GPIO: Pin %d (%s) flags: 0x%x\n",
gpioset.gp_pin, gpioset.gp_name, gpioset.gp_flags);
}
if ((gpioset.gp_flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INOUT)) == 0) {
err(EXIT_FAILURE, "Pin %d (%s) not configured for output",
gpioset.gp_pin, gpioset.gp_name);
}
if (ioctl(gfd, GPIOREAD, &gpioreq) == -1) {
err(EXIT_FAILURE, "failed getting GPIO status");
}
if (debug) {
printf("GPIO: Pin %d (%s) state %s\n",
gpioreq.gp_pin, gpioreq.gp_name,
(gpioreq.gp_value == GPIO_PIN_HIGH) ? "HIGH" : "LOW");
}
pinstatus = gpioreq.gp_value;
if (gpioreq.gp_value == GPIO_PIN_HIGH) {
gpioreq.gp_value = GPIO_PIN_LOW;
if (ioctl(gfd, GPIOWRITE, &gpioreq) == -1) {
err(EXIT_FAILURE, "failed switching off gpio pin");
}
}
waitfor(10000);
gpioreq.gp_value = GPIO_PIN_HIGH;
if (ioctl(gfd, GPIOWRITE, &gpioreq) == -1) {
err(EXIT_FAILURE, "failed switching on gpio pin");
}
waitfor(1000);
memset(data, 0, sizeof data);
memset(cmd, 0, sizeof cmd);
cmd[0] = HYTP14_CMD_START_CM;
/* send START_CM command */
while (!exec_cmd(fd, addr, sizeof cmd, cmd, sizeof data, data)
&& ++count < 3)
/* empty */;
if (count >= 3) {
printf("FAILED entering CM mode\n");
} else {
cmd[0] = HYTP14_CMD_GET_REV;
if (exec_cmd(fd, addr, sizeof cmd, cmd, sizeof data, data))
{
printf("Revision = 0x%02x%02x\n", data[1], data[2]);
} else {
errc(EXIT_FAILURE, error,
"sending GET_REV command to %s address 0x%x",
argv[argidx + ARG_I2CDEV], addr);
}
cmd[0] = HYTP14_READ_EEPROM(eeaddr);
if (exec_cmd(fd, addr, sizeof cmd, cmd, sizeof data, data))
{
printf("EEPROM(0x%02x) = 0x%02x%02x\n",
eeaddr, data[1], data[2]);
} else {
errc(EXIT_FAILURE, error,
"sending READ_EEPROM command to %s address 0x%x",
argv[argidx + ARG_I2CDEV], addr);
}
if (argc > argidx + ARG_EEPROMVAL) {
long val;
val = strtol(argv[argidx + ARG_EEPROMVAL], &endptr, 0);
if (argv[argidx + ARG_EEPROMVAL][0] == '\0' || *endptr != '\0') {
err(EXIT_FAILURE,
"EEPROM value (%s) is invalid",
argv[argidx + ARG_EEPROMVAL]);
}
cmd[0] = HYTP14_WRITE_EEPROM(eeaddr);
cmd[1] = (val >> 8) & 0xFF;
cmd[2] = val & 0xFF;
if (exec_cmd(fd, addr,
sizeof cmd, cmd, sizeof data, data))
{
printf("EEPROM(0x%02x) set to 0x%02x%02x\n",
eeaddr, cmd[1], cmd[2]);
memset(cmd, 0, sizeof cmd);
cmd[0] = HYTP14_READ_EEPROM(eeaddr);
if (exec_cmd(fd, addr, sizeof cmd, cmd,
sizeof data, data))
{
printf("EEPROM(0x%02x) = 0x%02x%02x\n",
eeaddr, data[1], data[2]);
}
else
{
errc(EXIT_FAILURE, error,
"sending READ_EEPROM command to %s address 0x%x",
argv[argidx + ARG_I2CDEV], addr);
}
} else {
errc(EXIT_FAILURE, error,
"sending WRITE_EEPROM command to %s address 0x%x",
argv[argidx + ARG_I2CDEV], addr);
}
}
/* leave command mode */
memset(cmd, 0, sizeof cmd);
cmd[0] = HYTP14_CMD_START_NOM;
exec_cmd(fd, addr, sizeof cmd, cmd, sizeof data, data);
}
/* restore original pin status */
gpioreq.gp_value = pinstatus;
if (ioctl(gfd, GPIOWRITE, &gpioreq) == -1) {
err(EXIT_FAILURE, "failed restoring gpio pin status");
} else {
if (debug) {
printf("GPIO: Pin %d (%s) state %s\n",
gpioreq.gp_pin, gpioreq.gp_name,
(gpioreq.gp_value == GPIO_PIN_HIGH) ? "HIGH" : "LOW");
}
}
close(gfd);
close(fd);
return EXIT_SUCCESS;
}
/*
* $Log: hytctl.c,v $
* Revision 1.1 2015/09/06 06:50:53 kardel
* Added hytctl utility to manage HYT 221/271/939 EEPROMS
*
*/
|
5161305972d08116dcd76b8da13aaf60a6ff8b51
|
70ffcb065027032a399f44b9ec91e7b61d73583d
|
/plugins/renepay/uncertainty_network.c
|
c726c95500fe94003ae8cd5773e75622bc335815
|
[
"MIT"
] |
permissive
|
ElementsProject/lightning
|
4e260841b2ebad8c772a5ff91ef1ebbc3fe1ad71
|
990096f904e26386527a4eddd8d3262464bacabd
|
refs/heads/master
| 2023-09-01T07:11:34.794039
| 2023-08-31T09:55:14
| 2023-08-31T22:02:14
| 37,350,472
| 2,812
| 961
|
NOASSERTION
| 2023-09-14T19:33:22
| 2015-06-13T00:04:22
|
C
|
UTF-8
|
C
| false
| false
| 10,251
|
c
|
uncertainty_network.c
|
#include "config.h"
#include <plugins/renepay/debug.h>
#include <plugins/renepay/uncertainty_network.h>
static bool chan_extra_check_invariants(struct chan_extra *ce)
{
bool all_ok = true;
for(int i=0;i<2;++i)
{
all_ok &= amount_msat_less_eq(ce->half[i].known_min,
ce->half[i].known_max);
all_ok &= amount_msat_less_eq(ce->half[i].known_max,
ce->capacity);
}
struct amount_msat diff_cb,diff_ca;
all_ok &= amount_msat_sub(&diff_cb,ce->capacity,ce->half[1].known_max);
all_ok &= amount_msat_sub(&diff_ca,ce->capacity,ce->half[1].known_min);
all_ok &= amount_msat_eq(ce->half[0].known_min,diff_cb);
all_ok &= amount_msat_eq(ce->half[0].known_max,diff_ca);
return all_ok;
}
/* Checks the entire uncertainty network for invariant violations. */
bool uncertainty_network_check_invariants(struct chan_extra_map *chan_extra_map)
{
bool all_ok = true;
struct chan_extra_map_iter it;
for(struct chan_extra *ce = chan_extra_map_first(chan_extra_map,&it);
ce && all_ok;
ce=chan_extra_map_next(chan_extra_map,&it))
{
all_ok &= chan_extra_check_invariants(ce);
}
return all_ok;
}
static void add_hintchan(
struct chan_extra_map *chan_extra_map,
struct gossmap_localmods *local_gossmods,
const struct node_id *src,
const struct node_id *dst,
u16 cltv_expiry_delta,
const struct short_channel_id scid,
u32 fee_base_msat,
u32 fee_proportional_millionths)
{
int dir = node_id_cmp(src, dst) < 0 ? 0 : 1;
struct chan_extra *ce = chan_extra_map_get(chan_extra_map,
scid);
if(!ce)
{
/* this channel is not public, we don't know his capacity */
// TODO(eduardo): one possible solution is set the capacity to
// MAX_CAP and the state to [0,MAX_CAP]. Alternatively we set
// the capacity to amoung and state to [amount,amount].
ce = new_chan_extra(chan_extra_map,
scid,
MAX_CAP);
/* FIXME: features? */
gossmap_local_addchan(local_gossmods,
src, dst, &scid, NULL);
gossmap_local_updatechan(local_gossmods,
&scid,
/* We assume any HTLC is allowed */
AMOUNT_MSAT(0), MAX_CAP,
fee_base_msat, fee_proportional_millionths,
cltv_expiry_delta,
true,
dir);
}
/* It is wrong to assume that this channel has sufficient capacity!
* Doing so leads to knowledge updates in which the known min liquidity
* is greater than the channel's capacity. */
// chan_extra_can_send(chan_extra_map,scid,dir,amount);
}
/* Add routehints provided by bolt11 */
void uncertainty_network_add_routehints(
struct chan_extra_map *chan_extra_map,
const struct route_info **routes,
struct payment *p)
{
for (size_t i = 0; i < tal_count(routes); i++) {
/* Each one, presumably, leads to the destination */
const struct route_info *r = routes[i];
const struct node_id *end = & p->destination;
for (int j = tal_count(r)-1; j >= 0; j--) {
add_hintchan(
chan_extra_map,
p->local_gossmods,
&r[j].pubkey, end,
r[j].cltv_expiry_delta,
r[j].short_channel_id,
r[j].fee_base_msat,
r[j].fee_proportional_millionths);
end = &r[j].pubkey;
}
}
}
/* Mirror the gossmap in the public uncertainty network.
* result: Every channel in gossmap must have associated data in chan_extra_map,
* while every channel in chan_extra_map is also registered in gossmap.
* */
void uncertainty_network_update(
const struct gossmap *gossmap,
struct chan_extra_map *chan_extra_map)
{
const tal_t* this_ctx = tal(tmpctx,tal_t);
// For each chan in chan_extra_map remove if not in the gossmap
struct short_channel_id *del_list
= tal_arr(this_ctx,struct short_channel_id,0);
struct chan_extra_map_iter it;
for(struct chan_extra *ce = chan_extra_map_first(chan_extra_map,&it);
ce;
ce=chan_extra_map_next(chan_extra_map,&it))
{
struct gossmap_chan * chan = gossmap_find_chan(gossmap,&ce->scid);
/* Only if the channel is not in the gossmap and there are not
* HTLCs pending we can remove it. */
if(!chan && !chan_extra_is_busy(ce))
{
// TODO(eduardo): is this efficiently implemented?
// otherwise i'll use a ccan list
tal_arr_expand(&del_list, ce->scid);
}
}
for(size_t i=0;i<tal_count(del_list);++i)
{
struct chan_extra *ce = chan_extra_map_get(chan_extra_map,del_list[i]);
if(!ce)
{
debug_err("%s (line %d) unexpected chan_extra ce is NULL",
__PRETTY_FUNCTION__,
__LINE__);
}
chan_extra_map_del(chan_extra_map, ce);
tal_free(ce);
// TODO(eduardo): if you had added a destructor to ce, you could have removed
// the ce from the map automatically.
}
// For each channel in the gossmap, create a extra data in
// chan_extra_map
for(struct gossmap_chan *chan = gossmap_first_chan(gossmap);
chan;
chan=gossmap_next_chan(gossmap,chan))
{
struct short_channel_id scid =
gossmap_chan_scid(gossmap,chan);
struct chan_extra *ce = chan_extra_map_get(chan_extra_map,
gossmap_chan_scid(gossmap,chan));
if(!ce)
{
struct amount_sat cap;
struct amount_msat cap_msat;
if(!gossmap_chan_get_capacity(gossmap,chan,&cap))
{
debug_err("%s (line %d) unable to fetch channel capacity",
__PRETTY_FUNCTION__,
__LINE__);
}
if(!amount_sat_to_msat(&cap_msat,cap))
{
debug_err("%s (line %d) unable convert sat to msat",
__PRETTY_FUNCTION__,
__LINE__);
}
new_chan_extra(chan_extra_map,scid,cap_msat);
}
}
tal_free(this_ctx);
}
void uncertainty_network_flow_success(
struct chan_extra_map *chan_extra_map,
struct pay_flow *pf)
{
for (size_t i = 0; i < tal_count(pf->path_scidds); i++)
{
chan_extra_sent_success(
pf, chan_extra_map,
&pf->path_scidds[i],
pf->amounts[i]);
}
}
/* All parts up to erridx succeeded, so we know something about min
* capacity! */
void uncertainty_network_channel_can_send(
struct chan_extra_map * chan_extra_map,
struct pay_flow *pf,
u32 erridx)
{
for (size_t i = 0; i < erridx; i++)
{
chan_extra_can_send(chan_extra_map,
&pf->path_scidds[i],
/* This channel can send all that was
* commited in HTLCs.
* Had we removed the commited amount then
* we would have to put here pf->amounts[i]. */
AMOUNT_MSAT(0));
}
}
/* listpeerchannels gives us the certainty on local channels' capacity. Of course,
* this is racy and transient, but better than nothing! */
bool uncertainty_network_update_from_listpeerchannels(
struct chan_extra_map * chan_extra_map,
struct node_id my_id,
struct payment *p,
const char *buf,
const jsmntok_t *toks)
{
const jsmntok_t *channels, *channel;
size_t i;
if (json_get_member(buf, toks, "error"))
goto malformed;
channels = json_get_member(buf, toks, "channels");
if (!channels)
goto malformed;
json_for_each_arr(i, channel, channels) {
struct short_channel_id_dir scidd;
const jsmntok_t *scidtok = json_get_member(buf, channel, "short_channel_id");
/* If channel is still opening, this won't be there.
* Also it won't be in the gossmap, so there is
* no need to mark it as disabled. */
if (!scidtok)
continue;
if (!json_to_short_channel_id(buf, scidtok, &scidd.scid))
goto malformed;
bool connected;
if(!json_to_bool(buf,
json_get_member(buf,channel,"peer_connected"),
&connected))
goto malformed;
if (!connected) {
payment_disable_chan(p, scidd.scid, LOG_DBG,
"peer disconnected");
continue;
}
const jsmntok_t *spendabletok, *dirtok,*statetok, *totaltok,
*peeridtok;
struct amount_msat spendable,capacity;
const struct node_id src=my_id;
struct node_id dst;
spendabletok = json_get_member(buf, channel, "spendable_msat");
dirtok = json_get_member(buf, channel, "direction");
statetok = json_get_member(buf, channel, "state");
totaltok = json_get_member(buf, channel, "total_msat");
peeridtok = json_get_member(buf,channel,"peer_id");
if(spendabletok==NULL || dirtok==NULL || statetok==NULL ||
totaltok==NULL || peeridtok==NULL)
goto malformed;
if (!json_to_msat(buf, spendabletok, &spendable))
goto malformed;
if (!json_to_msat(buf, totaltok, &capacity))
goto malformed;
if (!json_to_int(buf, dirtok, &scidd.dir))
goto malformed;
if(!json_to_node_id(buf,peeridtok,&dst))
goto malformed;
/* Don't report opening/closing channels */
if (!json_tok_streq(buf, statetok, "CHANNELD_NORMAL")
&& !json_tok_streq(buf, statetok, "CHANNELD_AWAITING_SPLICE")) {
payment_disable_chan(p, scidd.scid, LOG_DBG,
"channel in state %.*s",
statetok->end - statetok->start,
buf + statetok->start);
continue;
}
struct chan_extra *ce = chan_extra_map_get(chan_extra_map,
scidd.scid);
if(!ce)
{
/* this channel is not public, but it belongs to us */
ce = new_chan_extra(chan_extra_map,
scidd.scid,
capacity);
/* FIXME: features? */
gossmap_local_addchan(p->local_gossmods,
&src, &dst, &scidd.scid, NULL);
gossmap_local_updatechan(p->local_gossmods,
&scidd.scid,
/* TODO(eduardo): does it
* matter to consider HTLC
* limits in our own channel? */
AMOUNT_MSAT(0),capacity,
/* fees = */0,0,
/* TODO(eduardo): does it
* matter to set this delay? */
/*delay=*/0,
true,
scidd.dir);
}
/* FIXME: There is a bug with us trying to send more down a local
* channel (after fees) than it has capacity. For now, we reduce
* our capacity by 1% of total, to give fee headroom. */
if (!amount_msat_sub(&spendable, spendable,
amount_msat_div(p->amount, 100)))
spendable = AMOUNT_MSAT(0);
// TODO(eduardo): this includes pending HTLC of previous
// payments!
/* We know min and max liquidity exactly now! */
chan_extra_set_liquidity(chan_extra_map,
&scidd,spendable);
}
return true;
malformed:
return false;
}
/* Forget ALL channels information by a fraction of the capacity. */
void uncertainty_network_relax_fraction(
struct chan_extra_map* chan_extra_map,
double fraction)
{
struct chan_extra_map_iter it;
for(struct chan_extra *ce=chan_extra_map_first(chan_extra_map,&it);
ce;
ce=chan_extra_map_next(chan_extra_map,&it))
{
chan_extra_relax_fraction(ce,fraction);
}
}
|
bc4c838989885180f7ef451ddb0ca2f2b9bc0b28
|
ba6029ab6b9e1511ce447a223b08df864ee1f6a5
|
/code/dnmx/msg/msg_macros.h
|
4f50decdd50a7f32f924291f271a10a2914c143b
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
iboB/dynamix
|
a47d3d822860a74ea2156f584a5ebdc3f76292e3
|
d69e989ddb0913a6fe7a17ed2b7cb303671c4b42
|
refs/heads/master
| 2023-05-05T21:01:05.967634
| 2023-04-26T04:16:16
| 2023-04-26T04:16:16
| 61,472,488
| 680
| 57
|
MIT
| 2023-04-23T03:31:23
| 2016-06-19T09:11:56
|
C++
|
UTF-8
|
C
| false
| false
| 860
|
h
|
msg_macros.h
|
// Copyright (c) Borislav Stanimirov
// SPDX-License-Identifier: MIT
//
#pragma once
#include "../bits/pp.h"
#include <splat/pp_select.h>
#define I_DNMX_MSG_STRUCT_NAME(msg_name) I_DNMX_PP_CAT(msg_name, _msg)
#define I_DNMX_ITERATE_0(MACRO)
#define I_DNMX_ITERATE_1(MACRO, t0) MACRO(t0, 0)
#define I_DNMX_ITERATE_2(MACRO, t0, t1) MACRO(t0, 0), MACRO(t1, 1)
#define I_DNMX_ITERATE_3(MACRO, t0, t1, t2) MACRO(t0, 0), MACRO(t1, 1), MACRO(t2, 2)
#define I_DNMX_ITERATE_4(MACRO, t0, t1, t2, t3) MACRO(t0, 0), MACRO(t1, 1), MACRO(t2, 2), MACRO(t3, 3)
#define I_DNMX_ITERATE_BY(MACRO, ...) SPLAT_SELECT_ARITY_UPTO_5(_, I_DNMX_ITERATE_0, I_DNMX_ITERATE_1, I_DNMX_ITERATE_2, I_DNMX_ITERATE_3, I_DNMX_ITERATE_4, MACRO, ##__VA_ARGS__)
#define I_DNMX_DECL_ARG(t, i) t I_DNMX_PP_CAT(a, i)
#define I_DNMX_DECL_ARGS(...) I_DNMX_ITERATE_BY(I_DNMX_DECL_ARG, ##__VA_ARGS__)
|
b38fa42d61094bd3999342bd5c4cba1567f5b1d3
|
5741e4e7e3fedc3ae03996843b2bcfec70e17049
|
/c/meterpreter/source/extensions/lanattacks/lanattacks.c
|
db69a4fb7397557b5af895630dd7b34619bd8f59
|
[
"BSD-3-Clause",
"PSF-2.0",
"Python-2.0",
"Zlib",
"BSD-4-Clause",
"BSD-2-Clause"
] |
permissive
|
rapid7/metasploit-payloads
|
5981b44a1054d307d97b9cffcdbb559bfc690625
|
dcaad10486e22885d0cbcbce508e3e763ce689e9
|
refs/heads/master
| 2023-09-01T01:27:12.834909
| 2023-07-11T13:27:41
| 2023-07-11T13:27:41
| 18,418,533
| 1,674
| 743
|
NOASSERTION
| 2023-09-14T16:58:38
| 2014-04-03T21:18:24
|
C
|
UTF-8
|
C
| false
| false
| 6,716
|
c
|
lanattacks.c
|
/*
* This module implements LAN attacks, like pxesploit and DHCP attacks
*/
#define _CRT_SECURE_NO_DEPRECATE 1
#include "common.h"
#include "common_metapi.h"
// Required so that use of the API works.
MetApi* met_api = NULL;
#define RDIDLL_NOEXPORT
#include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c"
#include <windows.h>
#include "lanattacks.h"
void* dhcpserver = NULL; //global DHCP server pointer
void* tftpserver = NULL; //global TFTP server pointer
//Launches the DHCP server
DWORD request_lanattacks_start_dhcp(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
int res = startDHCPServer(dhcpserver);
met_api->packet.transmit_response(res, remote, response);
return ERROR_SUCCESS;
}
//Reset the DHCP server
DWORD request_lanattacks_reset_dhcp(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
destroyDHCPServer(dhcpserver);
dhcpserver = createDHCPServer();
met_api->packet.transmit_response(ERROR_SUCCESS, remote, response);
return ERROR_SUCCESS;
}
//Set a DHCP option based on the name and value specified in the packet
DWORD request_lanattacks_set_dhcp_option(Remote *remote, Packet *packet)
{
DWORD retval = ERROR_SUCCESS;
char* name = NULL;
unsigned int namelen = 0;
Packet *response = met_api->packet.create_response(packet);
do
{
//Get option value
Tlv tlv;
if ((retval = met_api->packet.get_tlv(packet, TLV_TYPE_LANATTACKS_OPTION, &tlv)) != ERROR_SUCCESS)
{
break;
}
//Get option name
name = met_api->packet.get_tlv_value_string(packet, TLV_TYPE_LANATTACKS_OPTION_NAME);
namelen = (unsigned int)strlen(name);
setDHCPOption(dhcpserver, name, namelen, (char*)tlv.buffer, tlv.header.length);
} while (0);
met_api->packet.transmit_response(retval, remote, response);
return ERROR_SUCCESS;
}
//Turns off the DHCP server
DWORD request_lanattacks_stop_dhcp(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
int res = stopDHCPServer(dhcpserver);
met_api->packet.transmit_response(res, remote, response);
return ERROR_SUCCESS;
}
//Gets and resets the DHCP log
DWORD request_lanattacks_dhcp_log(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
unsigned long loglen;
unsigned char * log = getDHCPLog(dhcpserver, &loglen);
met_api->packet.add_tlv_raw(response, TLV_TYPE_LANATTACKS_RAW, log, loglen);
met_api->packet.transmit_response(ERROR_SUCCESS, remote, response);
free(log);
return ERROR_SUCCESS;
}
//Launches the TFTP server
DWORD request_lanattacks_start_tftp(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
int res = startTFTPServer(tftpserver);
met_api->packet.transmit_response(res, remote, response);
return ERROR_SUCCESS;
}
//Reset the TFTP server
DWORD request_lanattacks_reset_tftp(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
destroyTFTPServer(tftpserver);
tftpserver = createTFTPServer();
met_api->packet.transmit_response(ERROR_SUCCESS, remote, response);
return ERROR_SUCCESS;
}
//Adds a file to serve based on the name and value specified in the packet
DWORD request_lanattacks_add_tftp_file(Remote *remote, Packet *packet)
{
DWORD retval = ERROR_SUCCESS;
char* name = NULL;
unsigned int namelen = 0;
Packet *response = met_api->packet.create_response(packet);
do{
Tlv tlv;
//Get file contents
if ((retval = met_api->packet.get_tlv(packet, TLV_TYPE_LANATTACKS_RAW, &tlv)) != ERROR_SUCCESS)
{
break;
}
//Get file name
name = met_api->packet.get_tlv_value_string(packet, TLV_TYPE_LANATTACKS_OPTION_NAME);
namelen = (unsigned int)strlen(name);
addTFTPFile(tftpserver, name, namelen, (char*)tlv.buffer, tlv.header.length);
} while (0);
met_api->packet.transmit_response(retval, remote, response);
return ERROR_SUCCESS;
}
//Turns off the TFTP server
DWORD request_lanattacks_stop_tftp(Remote *remote, Packet *packet)
{
Packet *response = met_api->packet.create_response(packet);
int res = stopTFTPServer(tftpserver);
met_api->packet.transmit_response(res, remote, response);
return ERROR_SUCCESS;
}
Command customCommands[] =
{
COMMAND_REQ(COMMAND_ID_LANATTACKS_START_DHCP, request_lanattacks_start_dhcp),
COMMAND_REQ(COMMAND_ID_LANATTACKS_RESET_DHCP, request_lanattacks_reset_dhcp),
COMMAND_REQ(COMMAND_ID_LANATTACKS_SET_DHCP_OPTION, request_lanattacks_set_dhcp_option),
COMMAND_REQ(COMMAND_ID_LANATTACKS_STOP_DHCP, request_lanattacks_stop_dhcp),
COMMAND_REQ(COMMAND_ID_LANATTACKS_DHCP_LOG, request_lanattacks_dhcp_log),
COMMAND_REQ(COMMAND_ID_LANATTACKS_START_TFTP, request_lanattacks_start_tftp),
COMMAND_REQ(COMMAND_ID_LANATTACKS_RESET_TFTP, request_lanattacks_stop_tftp),
COMMAND_REQ(COMMAND_ID_LANATTACKS_ADD_TFTP_FILE, request_lanattacks_add_tftp_file),
COMMAND_REQ(COMMAND_ID_LANATTACKS_STOP_TFTP, request_lanattacks_stop_tftp),
COMMAND_TERMINATOR
};
/*!
* @brief Initialize the server extension.
* @param api Pointer to the Meterpreter API structure.
* @param remote Pointer to the remote instance.
* @return Indication of success or failure.
*/
DWORD InitServerExtension(MetApi* api, Remote* remote)
{
met_api = api;
SET_LOGGING_CONTEXT(api)
met_api->command.register_all(customCommands);
dhcpserver = createDHCPServer();
tftpserver = createTFTPServer();
if (tftpserver)
{
return ERROR_SUCCESS;
}
return ERROR_NOT_ENOUGH_MEMORY;
}
/*!
* @brief Deinitialize the server extension.
* @param remote Pointer to the remote instance.
* @return Indication of success or failure.
*/
DWORD DeinitServerExtension(Remote* remote)
{
destroyTFTPServer(tftpserver);
tftpserver = NULL;
destroyDHCPServer(dhcpserver);
dhcpserver = NULL;
met_api->command.deregister_all(customCommands);
return ERROR_SUCCESS;
}
/*!
* @brief Do a stageless initialisation of the extension.
* @param ID of the extension that the init was intended for.
* @param buffer Pointer to the buffer that contains the init data.
* @param bufferSize Size of the \c buffer parameter.
* @return Indication of success or failure.
*/
DWORD StagelessInit(UINT extensionId, const LPBYTE buffer, DWORD bufferSize)
{
return ERROR_SUCCESS;
}
/*!
* @brief Callback for when a command has been added to the meterpreter instance.
* @param commandId The ID of the command that has been added.
*/
VOID CommandAdded(UINT commandId)
{
}
|
70aa5e4a3442902287e0b57ea2790d94979998d8
|
15a46f79cc5edfd08ebc63a8416dd02b13a2df33
|
/GLUS/src/GLUS/glus_wavefront.h
|
c124ce08292d1c6b90332895576df81686452d29
|
[
"Apache-2.0",
"LGPL-3.0-only"
] |
permissive
|
McNopper/OpenGL
|
a24a99de305f475205b00d39b4dde42d33645c6f
|
42fa2736e2b37db1df99c2b205279855ec6f2b1d
|
refs/heads/master
| 2022-07-16T06:44:44.845154
| 2022-05-21T11:47:12
| 2022-05-21T11:47:12
| 8,373,358
| 2,270
| 771
|
Apache-2.0
| 2022-05-21T11:51:12
| 2013-02-23T09:26:37
|
C
|
UTF-8
|
C
| false
| false
| 7,217
|
h
|
glus_wavefront.h
|
/*
* GLUS - Modern OpenGL, OpenGL ES and OpenVG Utilities. Copyright (C) since 2010 Norbert Nopper
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GLUS_WAVEFRONT_H_
#define GLUS_WAVEFRONT_H_
/**
* Structure for holding material data.
*/
typedef struct _GLUSmaterial
{
/**
* Name of the material.
*/
GLUSchar name[GLUS_MAX_STRING];
/**
* Emissive color.
*/
GLUSfloat emissive[4];
/**
* Ambient color.
*/
GLUSfloat ambient[4];
/**
* Diffuse color.
*/
GLUSfloat diffuse[4];
/**
* Specular color.
*/
GLUSfloat specular[4];
/**
* Shininess.
*/
GLUSfloat shininess;
/**
* Transparency, which is the alpha value.
*/
GLUSfloat transparency;
/**
* Reflection.
*/
GLUSboolean reflection;
/**
* Refraction.
*/
GLUSboolean refraction;
/**
* Index of refraction.
*/
GLUSfloat indexOfRefraction;
/**
* Emissive color texture filename.
*/
GLUSchar emissiveTextureFilename[GLUS_MAX_STRING];
/**
* Ambient color texture filename.
*/
GLUSchar ambientTextureFilename[GLUS_MAX_STRING];
/**
* Diffuse color texture filename.
*/
GLUSchar diffuseTextureFilename[GLUS_MAX_STRING];
/**
* Specular color texture filename.
*/
GLUSchar specularTextureFilename[GLUS_MAX_STRING];
/**
* Transparency texture filename.
*/
GLUSchar transparencyTextureFilename[GLUS_MAX_STRING];
/**
* Bump texture filename.
*/
GLUSchar bumpTextureFilename[GLUS_MAX_STRING];
/**
* Can be used to store the emissive texture name.
*/
GLUSuint emissiveTextureName;
/**
* Can be used to store the ambient texture name.
*/
GLUSuint ambientTextureName;
/**
* Can be used to store the diffuse texture name.
*/
GLUSuint diffuseTextureName;
/**
* Can be used to store the specular texture name.
*/
GLUSuint specularTextureName;
/**
* Can be used to store the transparency texture name.
*/
GLUSuint transparencyTextureName;
/**
* Can be used to store the bump texture name.
*/
GLUSuint bumpTextureName;
} GLUSmaterial;
/**
* Structure for holding material data list.
*/
typedef struct _GLUSmaterialList
{
/**
* The material data.
*/
GLUSmaterial material;
/**
* The pointer to the next element.
*/
struct _GLUSmaterialList* next;
} GLUSmaterialList;
/**
* Group of geometry.
*/
typedef struct _GLUSgroup
{
/**
* Name of the group.
*/
GLUSchar name[GLUS_MAX_STRING];
/**
* Name of the material.
*/
GLUSchar materialName[GLUS_MAX_STRING];
/**
* Pointer to the material.
*/
GLUSmaterial* material;
/**
* Indices.
*/
GLUSindex* indices;
/**
* Indices VBO.
*/
GLUSuint indicesVBO;
/**
* VAO of this group.
*/
GLUSuint vao;
/**
* Number of indices.
*/
GLUSuint numberIndices;
/**
* Triangle render mode - could be either:
*
* GLUS_TRIANGLES
* GLUS_TRIANGLE_STRIP
*/
GLUSenum mode;
} GLUSgroup;
/**
* Structure for holding the group data list.
*/
typedef struct _GLUSgroupList
{
/**
* The group data.
*/
GLUSgroup group;
/**
* The pointer to the next group element.
*/
struct _GLUSgroupList* next;
} GLUSgroupList;
/**
* Structure for a complete wavefront object file.
*/
typedef struct _GLUSwavefront
{
/**
* Name of the object.
*/
GLUSchar name[GLUS_MAX_STRING];
/**
* Vertices in homogeneous coordinates.
*/
GLUSfloat* vertices;
/**
* Vertices VBO.
*/
GLUSuint verticesVBO;
/**
* Normals.
*/
GLUSfloat* normals;
/**
* Normals VBO.
*/
GLUSuint normalsVBO;
/**
* Tangents.
*/
GLUSfloat* tangents;
/**
* Tangents VBO.
*/
GLUSuint tangentsVBO;
/**
* Bitangents.
*/
GLUSfloat* bitangents;
/**
* Bitangents VBO.
*/
GLUSuint bitangentsVBO;
/**
* Texture coordinates.
*/
GLUSfloat* texCoords;
/**
* Texture corrdinates VBO.
*/
GLUSuint texCoordsVBO;
/**
* Number of vertices.
*/
GLUSuint numberVertices;
/**
* Pointer to the first element of the groups.
*/
GLUSgroupList* groups;
/**
* Pointer to the first element of the materials.
*/
GLUSmaterialList* materials;
} GLUSwavefront;
/**
* Structure for holding the object data list.
*/
typedef struct _GLUSobjectList
{
/**
* The object data.
*/
GLUSwavefront object;
/**
* The pointer to the next group element.
*/
struct _GLUSobjectList* next;
} GLUSobjectList;
/**
* Structure for holding the scene.
*/
typedef struct _GLUSscene
{
/**
* The root object list data.
*/
GLUSobjectList* objectList;
} GLUSscene;
/**
* Loads a wavefront object file with groups and materials.
*
* @param filename The name of the wavefront file including extension.
* @param wavefront The data is stored into this structure.
*
* @return GLUS_TRUE, if loading succeeded.
*/
GLUSAPI GLUSboolean GLUSAPIENTRY glusWavefrontLoad(const GLUSchar* filename, GLUSwavefront* wavefront);
/**
* Destroys the wavefront structure by freeing the allocated memory. VBOs, VAOs and textures are not freed.
*
* @param wavefront The structure which contains the dynamic allocated wavefront data, which will be freed by this function.
*/
GLUSAPI GLUSvoid GLUSAPIENTRY glusWavefrontDestroy(GLUSwavefront* wavefront);
/**
* Loads a wavefront scene file with objects, groups and materials.
*
* @param filename The name of the wavefront file including extension.
* @param scene The data is stored into this structure.
*
* @return GLUS_TRUE, if loading succeeded.
*/
GLUSAPI GLUSboolean GLUSAPIENTRY glusWavefrontLoadScene(const GLUSchar* filename, GLUSscene* scene);
/**
* Destroys the wavefront structure by freeing the allocated memory. VBOs, VAOs and textures are not freed.
*
* @param scene The structure which contains the dynamic allocated wavefront data, which will be freed by this function.
*/
GLUSAPI GLUSvoid GLUSAPIENTRY glusWavefrontDestroyScene(GLUSscene* scene);
#endif /* GLUS_WAVEFRONT_H_ */
|
756d633b04412e03cb97b91aad723711230c5025
|
05a4d2bf45b32798d2f6820c4ec001dd8ef13e4a
|
/tests/unit/conn/conn-recv.c
|
2b9fa5f8b7d4d2ab83390483a2ab117f9a38be2d
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
pmem/rpma
|
207ee08f465a22341f92c80b15132a9617e57596
|
93d31224fd69786d4b1ace0084108aa270e4c263
|
refs/heads/main
| 2023-09-01T05:29:34.609582
| 2023-06-13T12:12:10
| 2023-06-13T12:12:10
| 240,216,867
| 115
| 63
|
NOASSERTION
| 2023-09-05T14:31:33
| 2020-02-13T08:59:31
|
C
|
UTF-8
|
C
| false
| false
| 2,797
|
c
|
conn-recv.c
|
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020-2021, Intel Corporation */
/*
* conn-recv.c -- the rpma_recv() unit tests
*
* APIs covered:
* - rpma_recv()
*/
#include "conn-common.h"
#include "mocks-ibverbs.h"
#include "mocks-rdma_cm.h"
/*
* recv__conn_NULL - NULL conn is invalid
*/
static void
recv__conn_NULL(void **unused)
{
/* run test */
int ret = rpma_recv(NULL, MOCK_RPMA_MR_LOCAL, MOCK_LOCAL_OFFSET,
MOCK_LEN, MOCK_OP_CONTEXT);
/* verify the results */
assert_int_equal(ret, RPMA_E_INVAL);
}
/*
* recv__dst_NULL_offset_not_NULL - NULL dst
* and not NULL offset is invalid
*/
static void
recv__dst_NULL_offset_not_NULL(void **unused)
{
/* run test */
int ret = rpma_recv(MOCK_CONN, NULL, MOCK_LOCAL_OFFSET,
0, MOCK_OP_CONTEXT);
/* verify the results */
assert_int_equal(ret, RPMA_E_INVAL);
}
/*
* recv__dst_NULL_len_not_NULL - NULL dst
* and not NULL len is invalid
*/
static void
recv__dst_NULL_len_not_NULL(void **unused)
{
/* run test */
int ret = rpma_recv(MOCK_CONN, NULL, 0,
MOCK_LEN, MOCK_OP_CONTEXT);
/* verify the results */
assert_int_equal(ret, RPMA_E_INVAL);
}
/*
* recv__dst_NULL_offset_len_not_NULL - NULL dst
* and not NULL offset or len are invalid
*/
static void
recv__dst_NULL_offset_len_not_NULL(void **unused)
{
/* run test */
int ret = rpma_recv(MOCK_CONN, NULL, MOCK_LOCAL_OFFSET,
MOCK_LEN, MOCK_OP_CONTEXT);
/* verify the results */
assert_int_equal(ret, RPMA_E_INVAL);
}
/*
* recv__success - happy day scenario
*/
static void
recv__success(void **cstate_ptr)
{
struct conn_test_state *cstate = *cstate_ptr;
/* configure mocks */
expect_value(rpma_mr_recv, qp, MOCK_QP);
expect_value(rpma_mr_recv, dst, MOCK_RPMA_MR_LOCAL);
expect_value(rpma_mr_recv, offset, MOCK_LOCAL_OFFSET);
expect_value(rpma_mr_recv, len, MOCK_LEN);
expect_value(rpma_mr_recv, op_context, MOCK_OP_CONTEXT);
will_return(rpma_mr_recv, MOCK_OK);
/* run test */
int ret = rpma_recv(cstate->conn, MOCK_RPMA_MR_LOCAL, MOCK_LOCAL_OFFSET,
MOCK_LEN, MOCK_OP_CONTEXT);
/* verify the results */
assert_int_equal(ret, MOCK_OK);
}
/*
* group_setup_recv -- prepare resources for all tests in the group
*/
static int
group_setup_recv(void **unused)
{
/* set value of QP in mock of CM ID */
Cm_id.qp = MOCK_QP;
return 0;
}
static const struct CMUnitTest tests_recv[] = {
/* rpma_recv() unit tests */
cmocka_unit_test(recv__conn_NULL),
cmocka_unit_test(recv__dst_NULL_offset_not_NULL),
cmocka_unit_test(recv__dst_NULL_len_not_NULL),
cmocka_unit_test(recv__dst_NULL_offset_len_not_NULL),
cmocka_unit_test_setup_teardown(recv__success,
setup__conn_new, teardown__conn_delete),
cmocka_unit_test(NULL)
};
int
main(int argc, char *argv[])
{
return cmocka_run_group_tests(tests_recv, group_setup_recv, NULL);
}
|
4df2594c34403c5e02427f300b8860cba7a57c9d
|
5eff7a36d9a9917dce9111f0c3074375fe6f7656
|
/driver/xf86-video-geode/src/gfx/gfx_rtns.h
|
bfcfe9f00c009674d9c7ac8a197e6a584e5d4801
|
[
"MIT"
] |
permissive
|
openbsd/xenocara
|
cb392d02ebba06f6ff7d826fd8a89aa3b8401779
|
a012b5de33ea0b977095d77316a521195b26cc6b
|
refs/heads/master
| 2023-08-25T12:16:58.862008
| 2023-08-12T16:16:25
| 2023-08-12T16:16:25
| 66,967,384
| 177
| 66
| null | 2023-07-22T18:12:37
| 2016-08-30T18:36:01
|
C
|
UTF-8
|
C
| false
| false
| 30,740
|
h
|
gfx_rtns.h
|
/* Copyright (c) 2005 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Neither the name of the Advanced Micro Devices, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
* */
/*
* This header file defines the Durango routines and variables used
* to access the memory mapped regions.
* */
#ifndef _gfx_rtns_h
#define _gfx_rtns_h
/* INCLUDE DURANGO DEFINITIONS */
/* These definitions are placed in another file to allow their inclusion
* in a user application. Such applications generally work through driver
* shell routines that simply pass their parameters to Durango routines.
* An external file provides an easy way to provide the definitions for these
* parameters without the applications gaining any Durango visisbility.
* */
#include "gfx_type.h"
/* COMPILER OPTION FOR C++ PROGRAMS */
#ifdef __cplusplus
extern "C" {
#endif
/* DURANGO MEMORY POINTERS */
extern unsigned char *gfx_virt_regptr;
extern unsigned char *gfx_virt_fbptr;
extern unsigned char *gfx_virt_vidptr;
extern unsigned char *gfx_virt_vipptr;
extern unsigned char *gfx_virt_spptr;
extern unsigned char *gfx_virt_gpptr;
extern unsigned char *gfx_phys_regptr;
extern unsigned char *gfx_phys_fbptr;
extern unsigned char *gfx_phys_vidptr;
extern unsigned char *gfx_phys_vipptr;
extern unsigned char *gfx_phys_spptr;
extern unsigned char *gfx_phys_gpptr;
/* DURANGO VARIBLES FOR RUNTIME SELECTION AND POSSIBLE VALUES */
extern int gfx_display_type;
#define GFX_DISPLAY_TYPE_GU1 0x0001
#define GFX_DISPLAY_TYPE_GU2 0x0002
extern int gfx_init_type;
#define GFX_INIT_TYPE_GU1 0x0001
#define GFX_INIT_TYPE_GU2 0x0002
extern int gfx_msr_type;
#define GFX_MSR_TYPE_REDCLOUD 0x0001
extern int gfx_2daccel_type;
#define GFX_2DACCEL_TYPE_GU1 0x0001
#define GFX_2DACCEL_TYPE_GU2 0x0002
extern int gfx_video_type;
#define GFX_VIDEO_TYPE_CS5530 0x0001
#define GFX_VIDEO_TYPE_SC1200 0x0002
#define GFX_VIDEO_TYPE_REDCLOUD 0x0004
extern int gfx_vip_type;
#define GFX_VIP_TYPE_SC1200 0x0001
extern int gfx_decoder_type;
#define GFX_DECODER_TYPE_SAA7114 0x0001
extern int gfx_tv_type;
#define GFX_TV_TYPE_SC1200 0x0001
#define GFX_TV_TYPE_FS451 0x0002
extern int gfx_i2c_type;
#define GFX_I2C_TYPE_ACCESS 0x0001
#define GFX_I2C_TYPE_GPIO 0x0002
/* GLOBAL CPU INFORMATION */
extern unsigned long gfx_cpu_version;
extern unsigned long gfx_cpu_frequency;
extern unsigned long gfx_vid_version;
extern ChipType gfx_chip_revision;
/* ROUTINES IN GFX_INIT.C */
unsigned long gfx_pci_config_read(unsigned long address);
void gfx_pci_config_write(unsigned long address, unsigned long data);
unsigned long gfx_get_core_freq(void);
unsigned long gfx_detect_cpu(void);
unsigned long gfx_detect_video(void);
unsigned long gfx_get_cpu_register_base(void);
unsigned long gfx_get_graphics_register_base(void);
unsigned long gfx_get_frame_buffer_base(void);
unsigned long gfx_get_frame_buffer_size(void);
unsigned long gfx_get_vid_register_base(void);
unsigned long gfx_get_vip_register_base(void);
/* ROUTINES IN GFX_MSR.C */
int gfx_msr_init(void);
DEV_STATUS gfx_id_msr_device(MSR * pDev, unsigned long address);
DEV_STATUS gfx_get_msr_dev_address(unsigned int device,
unsigned long *address);
DEV_STATUS gfx_get_glink_id_at_address(unsigned int *device,
unsigned long address);
DEV_STATUS gfx_msr_read(unsigned int device, unsigned int msrRegister,
Q_WORD * msrValue);
DEV_STATUS gfx_msr_write(unsigned int device, unsigned int msrRegister,
Q_WORD * msrValue);
/* ROUTINES IN GFX_DISP.C */
int gfx_set_display_bpp(unsigned short bpp);
int gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz);
int gfx_set_display_mode(int xres, int yres, int bpp, int hz);
int gfx_set_display_timings(unsigned short bpp, unsigned short flags,
unsigned short hactive,
unsigned short hblank_start,
unsigned short hsync_start,
unsigned short hsync_end,
unsigned short hblank_end,
unsigned short htotal, unsigned short vactive,
unsigned short vblank_start,
unsigned short vsync_start,
unsigned short vsync_end,
unsigned short vblank_end,
unsigned short vtotal, unsigned long frequency);
int gfx_set_vtotal(unsigned short vtotal);
void gfx_set_display_pitch(unsigned short pitch);
void gfx_set_display_offset(unsigned long offset);
int gfx_set_display_palette_entry(unsigned long index,
unsigned long palette);
int gfx_set_display_palette(unsigned long *palette);
void gfx_video_shutdown(void);
void gfx_set_clock_frequency(unsigned long frequency);
int gfx_set_crt_enable(int enable);
void gfx_set_cursor_enable(int enable);
void gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor);
void gfx_set_cursor_position(unsigned long memoffset,
unsigned short xpos, unsigned short ypos,
unsigned short xhotspot,
unsigned short yhotspot);
void gfx_set_cursor_shape32(unsigned long memoffset, unsigned long *andmask,
unsigned long *xormask);
void gfx_set_cursor_shape64(unsigned long memoffset, unsigned long *andmask,
unsigned long *xormask);
void gfx_set_icon_enable(int enable);
void gfx_set_icon_colors(unsigned long color0, unsigned long color1,
unsigned long color2);
void gfx_set_icon_position(unsigned long memoffset, unsigned short xpos);
void gfx_set_icon_shape64(unsigned long memoffset, unsigned long *andmask,
unsigned long *xormask, unsigned int lines);
int gfx_set_compression_enable(int enable);
int gfx_set_compression_offset(unsigned long offset);
int gfx_set_compression_pitch(unsigned short pitch);
int gfx_set_compression_size(unsigned short size);
void gfx_set_display_priority_high(int enable);
int gfx_test_timing_active(void);
int gfx_test_vertical_active(void);
int gfx_wait_vertical_blank(void);
void gfx_delay_milliseconds(unsigned long milliseconds);
void gfx_delay_microseconds(unsigned long microseconds);
void gfx_enable_panning(int x, int y);
int gfx_is_panel_mode_supported(int panelResX, int panelResY,
unsigned short width, unsigned short height,
unsigned short bpp);
int gfx_set_fixed_timings(int panelResX, int panelResY,
unsigned short width, unsigned short height,
unsigned short bpp);
int gfx_set_panel_present(int panelResX, int panelResY,
unsigned short width, unsigned short height,
unsigned short bpp);
void gfx_reset_timing_lock(void);
/* "READ" ROUTINES IN GFX_DISP.C */
int gfx_get_display_details(unsigned int mode, int *xres, int *yres,
int *hz);
unsigned short gfx_get_display_pitch(void);
int gfx_get_vsa2_softvga_enable(void);
int gfx_get_sync_polarities(void);
unsigned long gfx_get_clock_frequency(void);
unsigned long gfx_get_max_supported_pixel_clock(void);
int gfx_mode_frequency_supported(int xres, int yres, int bpp,
unsigned long frequency);
int gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp,
int *hz, unsigned long frequency);
int gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
unsigned long frequency);
int gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp,
int hz, int *frequency);
int gfx_get_display_mode_count(void);
int gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz);
unsigned long gfx_get_frame_buffer_line_size(void);
unsigned short gfx_get_hactive(void);
unsigned short gfx_get_hblank_start(void);
unsigned short gfx_get_hsync_start(void);
unsigned short gfx_get_hsync_end(void);
unsigned short gfx_get_hblank_end(void);
unsigned short gfx_get_htotal(void);
unsigned short gfx_get_vactive(void);
unsigned short gfx_get_vline(void);
unsigned short gfx_get_vblank_start(void);
unsigned short gfx_get_vsync_start(void);
unsigned short gfx_get_vsync_end(void);
unsigned short gfx_get_vblank_end(void);
unsigned short gfx_get_vtotal(void);
unsigned short gfx_get_display_bpp(void);
unsigned long gfx_get_display_offset(void);
int gfx_get_display_palette_entry(unsigned long index,
unsigned long *palette);
void gfx_get_display_palette(unsigned long *palette);
unsigned long gfx_get_cursor_enable(void);
unsigned long gfx_get_cursor_offset(void);
unsigned long gfx_get_cursor_position(void);
unsigned long gfx_get_cursor_clip(void);
unsigned long gfx_get_cursor_color(int color);
unsigned long gfx_get_icon_enable(void);
unsigned long gfx_get_icon_offset(void);
unsigned long gfx_get_icon_position(void);
unsigned long gfx_get_icon_color(int color);
int gfx_get_compression_enable(void);
unsigned long gfx_get_compression_offset(void);
unsigned short gfx_get_compression_pitch(void);
unsigned short gfx_get_compression_size(void);
int gfx_get_display_priority_high(void);
int gfx_get_valid_bit(int line);
/* ROUTINES IN GFX_RNDR.C */
void gfx_set_bpp(unsigned short bpp);
void gfx_set_solid_pattern(unsigned long color);
void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor,
unsigned long data0, unsigned long data1,
unsigned char transparency);
void gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor,
unsigned long data0, unsigned long data1,
unsigned long data2, unsigned long data3,
unsigned char transparency);
void gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8);
void gfx_set_solid_source(unsigned long color);
void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
unsigned short transparent);
void gfx_set_pattern_flags(unsigned short flags);
void gfx_set_raster_operation(unsigned char rop);
void gfx_pattern_fill(unsigned short x, unsigned short y,
unsigned short width, unsigned short height);
void gfx_color_pattern_fill(unsigned short x, unsigned short y,
unsigned short width, unsigned short height,
unsigned long *pattern);
void gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy,
unsigned short dstx, unsigned short dsty,
unsigned short width, unsigned short height);
void gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy,
unsigned short dstx, unsigned short dsty,
unsigned short width, unsigned short height,
unsigned long color);
void gfx_color_bitmap_to_screen_blt(unsigned short srcx,
unsigned short srcy,
unsigned short dstx,
unsigned short dsty,
unsigned short width,
unsigned short height,
unsigned char *data, long pitch);
void gfx_color_bitmap_to_screen_xblt(unsigned short srcx,
unsigned short srcy,
unsigned short dstx,
unsigned short dsty,
unsigned short width,
unsigned short height,
unsigned char *data, long pitch,
unsigned long color);
void gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
unsigned short dstx, unsigned short dsty,
unsigned short width,
unsigned short height,
unsigned char *data, short pitch);
void gfx_text_blt(unsigned short dstx, unsigned short dsty,
unsigned short width, unsigned short height,
unsigned char *data);
void gfx_bresenham_line(unsigned short x, unsigned short y,
unsigned short length, unsigned short initerr,
unsigned short axialerr, unsigned short diagerr,
unsigned short flags);
void gfx_wait_until_idle(void);
int gfx_test_blt_pending(void);
/* SECOND GENERATION RENDERING ROUTINES */
void gfx2_set_source_stride(unsigned short stride);
void gfx2_set_destination_stride(unsigned short stride);
void gfx2_set_pattern_origin(int x, int y);
void gfx2_set_source_transparency(unsigned long color, unsigned long mask);
void gfx2_set_alpha_mode(int mode);
void gfx2_set_alpha_value(unsigned char value);
void gfx2_pattern_fill(unsigned long dstoffset, unsigned short width,
unsigned short height);
void gfx2_color_pattern_fill(unsigned long dstoffset,
unsigned short width, unsigned short height,
unsigned long *pattern);
void gfx2_screen_to_screen_blt(unsigned long srcoffset,
unsigned long dstoffset,
unsigned short width, unsigned short height,
int flags);
void gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx,
unsigned short srcy, unsigned long dstoffset,
unsigned short width, unsigned short height,
int byte_packed);
void gfx2_color_bitmap_to_screen_blt(unsigned short srcx,
unsigned short srcy,
unsigned long dstoffset,
unsigned short width,
unsigned short height,
unsigned char *data, short pitch);
void gfx2_mono_bitmap_to_screen_blt(unsigned short srcx,
unsigned short srcy,
unsigned long dstoffset,
unsigned short width,
unsigned short height,
unsigned char *data, short pitch);
void gfx2_text_blt(unsigned long dstoffset, unsigned short width,
unsigned short height, unsigned char *data);
void gfx2_bresenham_line(unsigned long dstoffset, unsigned short length,
unsigned short initerr, unsigned short axialerr,
unsigned short diagerr, unsigned short flags);
void gfx2_sync_to_vblank(void);
/* ROUTINES IN GFX_VID.C */
int gfx_set_video_enable(int enable);
int gfx_set_video_format(unsigned long format);
int gfx_set_video_size(unsigned short width, unsigned short height);
int gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch);
int gfx_set_video_offset(unsigned long offset);
int gfx_set_video_yuv_offsets(unsigned long yoffset,
unsigned long uoffset, unsigned long voffset);
int gfx_set_video_window(short x, short y, unsigned short w,
unsigned short h);
int gfx_set_video_left_crop(unsigned short x);
int gfx_set_video_upscale(unsigned short srcw, unsigned short srch,
unsigned short dstw, unsigned short dsth);
int gfx_set_video_scale(unsigned short srcw, unsigned short srch,
unsigned short dstw, unsigned short dsth);
int gfx_set_video_vertical_downscale(unsigned short srch,
unsigned short dsth);
void gfx_set_video_vertical_downscale_enable(int enable);
int gfx_set_video_downscale_config(unsigned short type, unsigned short m);
int gfx_set_video_color_key(unsigned long key, unsigned long mask,
int bluescreen);
int gfx_set_video_filter(int xfilter, int yfilter);
int gfx_set_video_palette(unsigned long *palette);
int gfx_set_graphics_palette(unsigned long *palette);
int gfx_set_video_palette_bypass(int enable);
int gfx_set_video_palette_entry(unsigned long index, unsigned long color);
int gfx_set_graphics_palette_entry(unsigned long index,
unsigned long color);
int gfx_set_video_downscale_coefficients(unsigned short coef1,
unsigned short coef2,
unsigned short coef3,
unsigned short coef4);
int gfx_set_video_downscale_enable(int enable);
int gfx_set_video_source(VideoSourceType source);
int gfx_set_vbi_source(VbiSourceType source);
int gfx_set_vbi_lines(unsigned long even, unsigned long odd);
int gfx_set_vbi_total(unsigned long even, unsigned long odd);
int gfx_set_video_interlaced(int enable);
int gfx_set_color_space_YUV(int enable);
int gfx_set_vertical_scaler_offset(char offset);
int gfx_set_top_line_in_odd(int enable);
int gfx_set_genlock_delay(unsigned long delay);
int gfx_set_genlock_enable(int flags);
int gfx_set_video_cursor(unsigned long key, unsigned long mask,
unsigned short select_color2, unsigned long color1,
unsigned long color2);
int gfx_set_video_cursor_enable(int enable);
int gfx_set_video_request(short x, short y);
int gfx_select_alpha_region(int region);
int gfx_set_alpha_enable(int enable);
int gfx_set_alpha_window(short x, short y,
unsigned short width, unsigned short height);
int gfx_set_alpha_value(unsigned char alpha, char delta);
int gfx_set_alpha_priority(int priority);
int gfx_set_alpha_color(unsigned long color);
int gfx_set_alpha_color_enable(int enable);
int gfx_set_no_ck_outside_alpha(int enable);
int gfx_disable_softvga(void);
int gfx_enable_softvga(void);
int gfx_set_macrovision_enable(int enable);
unsigned long gfx_get_max_video_width(void);
/* READ ROUTINES IN GFX_VID.C */
int gfx_get_video_enable(void);
int gfx_get_video_format(void);
unsigned long gfx_get_video_src_size(void);
unsigned long gfx_get_video_line_size(void);
unsigned long gfx_get_video_xclip(void);
unsigned long gfx_get_video_offset(void);
void gfx_get_video_yuv_offsets(unsigned long *yoffset,
unsigned long *uoffset,
unsigned long *voffset);
void gfx_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch);
unsigned long gfx_get_video_upscale(void);
unsigned long gfx_get_video_scale(void);
unsigned long gfx_get_video_downscale_delta(void);
int gfx_get_video_vertical_downscale_enable(void);
int gfx_get_video_downscale_config(unsigned short *type, unsigned short *m);
void gfx_get_video_downscale_coefficients(unsigned short *coef1,
unsigned short *coef2,
unsigned short *coef3,
unsigned short *coef4);
void gfx_get_video_downscale_enable(int *enable);
unsigned long gfx_get_video_dst_size(void);
unsigned long gfx_get_video_position(void);
unsigned long gfx_get_video_color_key(void);
unsigned long gfx_get_video_color_key_mask(void);
int gfx_get_video_palette_entry(unsigned long index,
unsigned long *palette);
int gfx_get_video_color_key_src(void);
int gfx_get_video_filter(void);
int gfx_get_video_request(short *x, short *y);
int gfx_get_video_source(VideoSourceType * source);
int gfx_get_vbi_source(VbiSourceType * source);
unsigned long gfx_get_vbi_lines(int odd);
unsigned long gfx_get_vbi_total(int odd);
int gfx_get_video_interlaced(void);
int gfx_get_color_space_YUV(void);
int gfx_get_vertical_scaler_offset(char *offset);
unsigned long gfx_get_genlock_delay(void);
int gfx_get_genlock_enable(void);
int gfx_get_video_cursor(unsigned long *key, unsigned long *mask,
unsigned short *select_color2,
unsigned long *color1, unsigned short *color2);
unsigned long gfx_read_crc(void);
unsigned long gfx_read_crc32(void);
unsigned long gfx_read_window_crc(int source, unsigned short x,
unsigned short y, unsigned short width,
unsigned short height, int crc32);
int gfx_get_macrovision_enable(void);
void gfx_get_alpha_enable(int *enable);
void gfx_get_alpha_size(unsigned short *x, unsigned short *y,
unsigned short *width, unsigned short *height);
void gfx_get_alpha_value(unsigned char *alpha, char *delta);
void gfx_get_alpha_priority(int *priority);
void gfx_get_alpha_color(unsigned long *color);
/* ROUTINES IN GFX_VIP.C */
int gfx_set_vip_enable(int enable);
int gfx_set_vip_capture_run_mode(int mode);
int gfx_set_vip_base(unsigned long even, unsigned long odd);
int gfx_set_vip_pitch(unsigned long pitch);
int gfx_set_vip_mode(int mode);
int gfx_set_vbi_enable(int enable);
int gfx_set_vbi_mode(int mode);
int gfx_set_vbi_base(unsigned long even, unsigned long odd);
int gfx_set_vbi_pitch(unsigned long pitch);
int gfx_set_vbi_direct(unsigned long even_lines, unsigned long odd_lines);
int gfx_set_vbi_interrupt(int enable);
int gfx_set_vip_bus_request_threshold_high(int enable);
int gfx_set_vip_last_line(int last_line);
int gfx_test_vip_odd_field(void);
int gfx_test_vip_bases_updated(void);
int gfx_test_vip_fifo_overflow(void);
int gfx_get_vip_line(void);
/* READ ROUTINES IN GFX_VIP.C */
int gfx_get_vip_enable(void);
unsigned long gfx_get_vip_base(int odd);
unsigned long gfx_get_vip_pitch(void);
int gfx_get_vip_mode(void);
int gfx_get_vbi_enable(void);
int gfx_get_vbi_mode(void);
unsigned long gfx_get_vbi_base(int odd);
unsigned long gfx_get_vbi_pitch(void);
unsigned long gfx_get_vbi_direct(int odd);
int gfx_get_vbi_interrupt(void);
int gfx_get_vip_bus_request_threshold_high(void);
/* ROUTINES IN GFX_DCDR.C */
int gfx_set_decoder_defaults(void);
int gfx_set_decoder_analog_input(unsigned char input);
int gfx_set_decoder_brightness(unsigned char brightness);
int gfx_set_decoder_contrast(unsigned char contrast);
int gfx_set_decoder_hue(char hue);
int gfx_set_decoder_saturation(unsigned char saturation);
int gfx_set_decoder_input_offset(unsigned short x, unsigned short y);
int gfx_set_decoder_input_size(unsigned short width, unsigned short height);
int gfx_set_decoder_output_size(unsigned short width,
unsigned short height);
int gfx_set_decoder_scale(unsigned short srcw, unsigned short srch,
unsigned short dstw, unsigned short dsth);
int gfx_set_decoder_vbi_format(int start, int end, int format);
int gfx_set_decoder_vbi_enable(int enable);
int gfx_set_decoder_vbi_upscale(void);
int gfx_set_decoder_TV_standard(TVStandardType TVStandard);
int gfx_set_decoder_luminance_filter(unsigned char lufi);
int gfx_decoder_software_reset(void);
int gfx_decoder_detect_macrovision(void);
int gfx_decoder_detect_video(void);
/* READ ROUTINES IN GFX_DCDR.C */
unsigned char gfx_get_decoder_brightness(void);
unsigned char gfx_get_decoder_contrast(void);
char gfx_get_decoder_hue(void);
unsigned char gfx_get_decoder_saturation(void);
unsigned long gfx_get_decoder_input_offset(void);
unsigned long gfx_get_decoder_input_size(void);
unsigned long gfx_get_decoder_output_size(void);
int gfx_get_decoder_vbi_format(int line);
/* ROUTINES IN GFX_I2C.C */
int gfx_i2c_reset(unsigned char busnum, short adr, char freq);
int gfx_i2c_write(unsigned char busnum, unsigned char chipadr,
unsigned char subadr, unsigned char bytes,
unsigned char *data);
int gfx_i2c_read(unsigned char busnum, unsigned char chipadr,
unsigned char subadr, unsigned char bytes,
unsigned char *data);
int gfx_i2c_select_gpio(int clock, int data);
int gfx_i2c_init(void);
void gfx_i2c_cleanup(void);
/* ROUTINES IN GFX_TV.C */
int gfx_set_tv_format(TVStandardType format, GfxOnTVType resolution);
int gfx_set_tv_output(int output);
int gfx_set_tv_enable(int enable);
int gfx_set_tv_flicker_filter(int ff);
int gfx_set_tv_sub_carrier_reset(int screset);
int gfx_set_tv_vphase(int vphase);
int gfx_set_tv_YC_delay(int delay);
int gfx_set_tvenc_reset_interval(int interval);
int gfx_set_tv_cc_enable(int enable);
int gfx_set_tv_cc_data(unsigned char data1, unsigned char data2);
int gfx_set_tv_display(int width, int height);
int gfx_test_tvout_odd_field(void);
int gfx_test_tvenc_odd_field(void);
int gfx_set_tv_field_status_invert(int enable);
int gfx_get_tv_vphase(void);
int gfx_get_tv_enable(unsigned int *p_on);
int gfx_get_tv_output(void);
int gfx_get_tv_mode_count(TVStandardType format);
int gfx_get_tv_display_mode(int *width, int *height, int *bpp, int *hz);
int gfx_get_tv_display_mode_frequency(unsigned short width,
unsigned short height,
TVStandardType format,
int *frequency);
int gfx_is_tv_display_mode_supported(unsigned short width,
unsigned short height,
TVStandardType format);
int gfx_get_tv_standard(unsigned long *p_standard);
int gfx_get_available_tv_standards(unsigned long *p_standards);
int gfx_set_tv_standard(unsigned long standard);
int gfx_get_tv_vga_mode(unsigned long *p_vga_mode);
int gfx_get_available_tv_vga_modes(unsigned long *p_vga_modes);
int gfx_set_tv_vga_mode(unsigned long vga_mode);
int gfx_get_tvout_mode(unsigned long *p_tvout_mode);
int gfx_set_tvout_mode(unsigned long tvout_mode);
int gfx_get_sharpness(int *p_sharpness);
int gfx_set_sharpness(int sharpness);
int gfx_get_flicker_filter(int *p_flicker);
int gfx_set_flicker_filter(int flicker);
int gfx_get_overscan(int *p_x, int *p_y);
int gfx_set_overscan(int x, int y);
int gfx_get_position(int *p_x, int *p_y);
int gfx_set_position(int x, int y);
int gfx_get_color(int *p_color);
int gfx_set_color(int color);
int gfx_get_brightness(int *p_brightness);
int gfx_set_brightness(int brightness);
int gfx_get_contrast(int *p_contrast);
int gfx_set_contrast(int constrast);
int gfx_get_yc_filter(unsigned int *p_yc_filter);
int gfx_set_yc_filter(unsigned int yc_filter);
int gfx_get_aps_trigger_bits(unsigned int *p_trigger_bits);
int gfx_set_aps_trigger_bits(unsigned int trigger_bits);
/* ROUTINES IN GFX_VGA.C */
int gfx_get_softvga_active(void);
int gfx_vga_test_pci(void);
unsigned char gfx_vga_get_pci_command(void);
int gfx_vga_set_pci_command(unsigned char command);
int gfx_vga_seq_reset(int reset);
int gfx_vga_set_graphics_bits(void);
int gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz);
int gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch);
int gfx_vga_save(gfx_vga_struct * vga, int flags);
int gfx_vga_restore(gfx_vga_struct * vga, int flags);
int gfx_vga_mode_switch(int active);
void gfx_vga_clear_extended(void);
/* CLOSE BRACKET FOR C++ COMPLILATION */
#ifdef __cplusplus
}
#endif
#endif /* !_gfx_rtns_h */
/* END OF FILE */
|
9cd08fc748414a6053713b60638040f22c136e29
|
bdc27c22522a99b5bff2ec4cfa95fadcba65747d
|
/thirdparty/dill/dill/virtual.c
|
909bf856c78f05f4d85085d9ab3d254478370d20
|
[
"Apache-2.0"
] |
permissive
|
ornladios/ADIOS2
|
a34e257b28adb26e6563b800502266ebb0c9088c
|
c8b7b66ed21b03bfb773bd972d5aeaaf10231e67
|
refs/heads/master
| 2023-08-31T18:11:22.186415
| 2023-08-29T20:45:03
| 2023-08-29T20:45:03
| 75,750,830
| 243
| 140
|
Apache-2.0
| 2023-09-14T11:15:00
| 2016-12-06T16:39:55
|
C++
|
UTF-8
|
C
| false
| false
| 155,174
|
c
|
virtual.c
|
#undef NDEBUG
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "dill.h"
#ifdef _MSC_VER
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#else
#include <unistd.h>
#endif
#include "dill_internal.h"
#include "virtual.h"
extern char* arith3_name[];
extern char* arith2_name[];
extern char* dill_type_names[];
extern char* branch_op_names[];
extern char* compare_op_names[];
typedef void (*apply_func)(dill_stream c,
basic_block b,
virtual_insn* ip,
int loc);
static void
apply_to_each(dill_stream c,
void* insns,
virtual_mach_info vmi,
apply_func func);
static const char* prefix_names[] = {"X86_CS_PREFIX", "X86_SS_PREFIX",
"X86_DS_PREFIX", "X86_ES_PREFIX",
"X86_FS_PREFIX", "X86_GS_PREFIX"};
#define OPND(x) \
((x >= 100) ? ((dill_type_of(c, x) == DILL_B) ? 'B' : 'R') : 'P'), x
extern int
virtual_print_insn(dill_stream c, void* info_ptr, void* i)
{
virtual_insn* insn = (virtual_insn*)i;
int insn_code = insn->insn_code;
switch (insn->class_code) {
case iclass_arith3:
printf("%s %c%d, %c%d, %c%d", arith3_name[insn_code],
OPND(insn->opnds.a3.dest), OPND(insn->opnds.a3.src1),
OPND(insn->opnds.a3.src2));
break;
case iclass_arith3i:
printf("%si %c%d, %c%d, %zu", arith3_name[insn_code],
OPND(insn->opnds.a3i.dest), OPND(insn->opnds.a3i.src),
insn->opnds.a3i.u.imm);
break;
case iclass_arith2:
printf("%s %c%d, %c%d", arith2_name[insn_code],
OPND(insn->opnds.a2.dest), OPND(insn->opnds.a2.src));
break;
case iclass_convert: {
int from_index = (insn->insn_code >> 4) & 0xf;
int to_index = insn->insn_code & 0xf;
printf("cv%s2%s %c%d, %c%d", dill_type_names[from_index],
dill_type_names[to_index], OPND(insn->opnds.a2.dest),
OPND(insn->opnds.a2.src));
break;
}
case iclass_loadstore: {
int typ = insn->insn_code & 0xf;
int store = (insn->insn_code & 0x10) == 0x10;
int bswap = (insn->insn_code & 0x20) == 0x20;
printf("%s%s%s %c%d, %c%d, %c%d", bswap ? "bs" : "",
store == 0 ? "ld" : "st", dill_type_names[typ],
OPND(insn->opnds.a3.dest), OPND(insn->opnds.a3.src1),
OPND(insn->opnds.a3.src2));
break;
}
case iclass_loadstorei: {
int typ = insn->insn_code & 0xf;
int store = (insn->insn_code & 0x10) == 0x10;
int bswap = (insn->insn_code & 0x20) == 0x20;
printf("%s%s%si %c%d, %c%d, %zu", bswap ? "bs" : "",
store == 0 ? "ld" : "st", dill_type_names[typ],
OPND(insn->opnds.a3i.dest), OPND(insn->opnds.a3i.src),
insn->opnds.a3i.u.imm);
break;
}
case iclass_lea: {
printf("lea %c%d, %c%d, %zx", OPND(insn->opnds.a3i.dest),
OPND(insn->opnds.a3i.src), insn->opnds.a3i.u.imm);
break;
}
case iclass_set: {
int typ = insn->insn_code & 0xf;
printf("set%s %c%d, %zx", dill_type_names[typ],
OPND(insn->opnds.a3i.dest), insn->opnds.a3i.u.imm);
break;
}
case iclass_setf: {
int typ = insn->insn_code & 0xf;
union {
double imm;
int imm_i[2];
} u;
u.imm = insn->opnds.sf.imm;
printf("set%s %c%d, %g 0x(%x)0x(%x)", dill_type_names[typ],
OPND(insn->opnds.sf.dest), insn->opnds.sf.imm, u.imm_i[0],
u.imm_i[1]);
break;
}
case iclass_mov: {
int typ = insn->insn_code & 0xf;
printf("mov%s %c%d, %c%d", dill_type_names[typ],
OPND(insn->opnds.a2.dest), OPND(insn->opnds.a2.src));
break;
}
case iclass_reti: {
int typ = insn->insn_code & 0xf;
printf("ret%si %zu", dill_type_names[typ], insn->opnds.a3i.u.imm);
break;
}
case iclass_ret: {
int typ = insn->insn_code & 0xf;
printf("ret%s %c%d", dill_type_names[typ], OPND(insn->opnds.a1.src));
break;
}
case iclass_branch: {
int br_op = insn->insn_code;
struct branch_table* t = &c->p->branch_table;
printf("b%s %c%d, %c%d, L%d", branch_op_names[br_op],
OPND(insn->opnds.br.src1), OPND(insn->opnds.br.src2),
insn->opnds.br.label);
if (t->label_name[insn->opnds.br.label] != NULL) {
printf("<%s>", t->label_name[insn->opnds.br.label]);
}
break;
}
case iclass_compare: {
int c_op = insn->insn_code;
printf("%s %c%d, %c%d, %c%d", compare_op_names[c_op],
OPND(insn->opnds.a3.dest), OPND(insn->opnds.a3.src1),
OPND(insn->opnds.a3.src2));
break;
}
case iclass_branchi: {
int br_op = insn->insn_code;
struct branch_table* t = &c->p->branch_table;
printf("b%si %c%d, %p, L%d", branch_op_names[br_op],
OPND(insn->opnds.bri.src), (void*)insn->opnds.bri.imm_l,
insn->opnds.bri.label);
if (t->label_name[insn->opnds.bri.label] != NULL) {
printf("<%s>", t->label_name[insn->opnds.bri.label]);
}
break;
}
case iclass_jump_to_label: {
struct branch_table* t = &c->p->branch_table;
printf("br L%d", insn->opnds.br.label);
if (t->label_name[insn->opnds.br.label] != NULL) {
printf("<%s>", t->label_name[insn->opnds.br.label]);
}
break;
}
case iclass_mark_label: {
struct branch_table* t = &c->p->branch_table;
printf("L%d:", insn->opnds.label.label);
if (t->label_name[insn->opnds.label.label] != NULL) {
printf("<%s>", t->label_name[insn->opnds.label.label]);
}
break;
}
case iclass_jump_to_reg: {
printf("jmp %c%d", OPND(insn->opnds.br.src1));
break;
}
case iclass_jump_to_imm: {
printf("jmp 0x%p", insn->opnds.bri.imm_a);
break;
}
case iclass_special: {
switch (insn->opnds.spec.type) {
case DILL_NOP:
printf("special NOP");
break;
case DILL_SEGMENTED_FOLLOWS:
printf("special SEGMENTED %s",
prefix_names[insn->opnds.spec.param]);
break;
}
break;
}
case iclass_call: {
int typ = insn->insn_code & 0xf;
int reg = insn->insn_code & 0x10;
if (typ != DILL_V) {
if (reg != 0) {
printf("call%s R%p, %c%d", dill_type_names[typ],
(void*)insn->opnds.calli.imm_l,
OPND(insn->opnds.calli.src));
} else {
const char* call_name = insn->opnds.calli.xfer_name;
if (call_name) {
printf("call%s 0x%p<%s>, %c%d", dill_type_names[typ],
insn->opnds.calli.imm_a, call_name,
OPND(insn->opnds.calli.src));
} else {
printf("call%s 0x%p, %c%d", dill_type_names[typ],
insn->opnds.calli.imm_a,
OPND(insn->opnds.calli.src));
}
}
} else {
if (reg != 0) {
printf("call%s R%p", dill_type_names[typ],
(void*)insn->opnds.calli.imm_l);
} else {
const char* call_name = insn->opnds.calli.xfer_name;
if (call_name) {
printf("call%s 0x%p<%s>", dill_type_names[typ],
insn->opnds.calli.imm_a, call_name);
} else {
printf("call%s 0x%p", dill_type_names[typ],
insn->opnds.calli.imm_a);
}
}
}
break;
}
case iclass_push: {
int typ = insn->insn_code & 0xf;
if ((short)insn->opnds.a1.src < 0) {
if ((short)insn->opnds.a1.src == -1) {
printf("pushinit");
} else {
int non_var_arg = -((short)insn->opnds.a1.src) - 2;
printf("pushinit varidiac, %d nonvar args", non_var_arg);
}
} else {
printf("push%s %c%d", dill_type_names[typ],
OPND(insn->opnds.a1.src));
}
break;
}
case iclass_pushi: {
int typ = insn->insn_code & 0xf;
if (typ == DILL_P) {
printf("push%si 0x%p", dill_type_names[typ],
insn->opnds.a3i.u.imm_a);
} else {
printf("push%si 0x%zx", dill_type_names[typ],
insn->opnds.a3i.u.imm);
}
break;
}
case iclass_pushf: {
int typ = insn->insn_code;
printf("push%si %g", dill_type_names[typ], insn->opnds.sf.imm);
break;
}
case iclass_nop:
printf("nop");
}
return sizeof(*insn);
}
static int
insn_same_except_dest(virtual_insn* i, virtual_insn* j)
{
int icode = i->insn_code;
int jcode = j->insn_code;
if (i->class_code != j->class_code)
return 0;
switch (i->class_code) {
case iclass_arith3:
case iclass_compare:
return ((icode == jcode) && (i->opnds.a3.src1 == j->opnds.a3.src1) &&
(i->opnds.a3.src2 == j->opnds.a3.src2));
case iclass_arith3i:
return ((icode == jcode) && (i->opnds.a3i.src == j->opnds.a3i.src) &&
(i->opnds.a3i.u.imm == j->opnds.a3i.u.imm));
case iclass_arith2:
return ((icode == jcode) && (i->opnds.a2.src == j->opnds.a2.src));
case iclass_convert:
return ((icode == jcode) && (i->opnds.a2.src == j->opnds.a2.src));
case iclass_loadstore:
return ((icode == jcode) && (i->opnds.a3.src1 == j->opnds.a3.src1) &&
(i->opnds.a3.src2 == j->opnds.a3.src2));
case iclass_loadstorei:
return ((icode == jcode) && (i->opnds.a3i.src == j->opnds.a3i.src) &&
(i->opnds.a3i.u.imm == j->opnds.a3i.u.imm));
case iclass_lea:
return ((i->opnds.a3i.src == j->opnds.a3i.src) &&
(i->opnds.a3i.u.imm == j->opnds.a3i.u.imm));
case iclass_set:
case iclass_setf:
return 0;
case iclass_mov:
return ((icode == jcode) && (i->opnds.a2.src == j->opnds.a2.src));
case iclass_reti:
case iclass_ret:
case iclass_branch:
case iclass_branchi:
case iclass_jump_to_label:
case iclass_jump_to_reg:
case iclass_jump_to_imm:
case iclass_special:
case iclass_call:
case iclass_push:
case iclass_pushi:
case iclass_pushf:
case iclass_nop:
case iclass_mark_label:
break;
}
return 0;
}
static void
pushpop_inuse_regs(dill_stream c, int pop, virtual_insn* ip)
{
int i = 0;
/* no actual reg assigns, so only the params are in use */
for (i = 0; i < c->p->c_param_count; i++) {
if (c->p->c_param_args[i].is_register) {
c->j->save_restore(c, pop, c->p->c_param_args[i].type,
c->p->c_param_args[i].in_reg);
}
}
}
#define end_bb(b, lab, f) \
{ \
bb->end_branch_label = lab; \
bb->fall_through = f; \
bb->end = i - 1; \
vmi->bbcount++; \
vmi->bblist = realloc( \
vmi->bblist, sizeof(struct basic_block) * (vmi->bbcount + 1)); \
bb = &vmi->bblist[vmi->bbcount]; \
bb->start = i; \
bb->end = -1; \
bb->label = -1; \
bb->end_branch_label = -1; \
bb->fall_through = 0; \
bb->is_loop_start = 0; \
bb->is_loop_end = 0; \
bb->regs_used = new_bit_vec(c->p->vreg_count); \
bb->regs_defined = new_bit_vec(c->p->vreg_count); \
}
static bit_vec
new_bit_vec(int max)
{
int len = (max + 7) >> 3;
bit_vec ret = malloc(sizeof(struct bitv) + len - 2);
ret->len = len;
memset(&ret->vec[0], 0, len);
return ret;
}
static void
init_bit_vec(bit_vec vec, int size)
{
int len = size - 2;
vec->len = len;
memset(&vec->vec[0], 0, len);
}
static void
bit_vec_set(bit_vec v, int bit)
{
int index = bit >> 3;
int mask = 1 << (bit & 0x7);
v->vec[index] |= mask;
}
static void
bit_vec_clear(bit_vec v, int bit)
{
int index = bit >> 3;
int mask = ~(1 << (bit & 0x7));
v->vec[index] &= mask;
}
static int
bit_vec_is_set(bit_vec v, int bit)
{
int index = bit >> 3;
int mask = 1 << (bit & 0x7);
return ((v->vec[index] & mask) == mask);
}
static void
dump_reg_vec(bit_vec v)
{
int i;
if (v == NULL)
return;
for (i = 0; i < v->len; i++) {
int j;
for (j = 0; j < 7; j++) {
if ((v->vec[i] & (1 << j)) != 0) {
printf(" R%d", i * 8 + j + 100);
}
}
}
}
static int
has_single_def_use(dill_stream c, int vreg)
{
if (vreg >= 100) {
return ((c->p->vregs[vreg - 100].use_info.use_count == 1) &&
(c->p->vregs[vreg - 100].use_info.def_count == 1));
}
return 0;
}
static void
set_unused(dill_stream c, basic_block bb, int vreg)
{
if (vreg >= 100) {
c->p->vregs[vreg - 100].use_info.use_count = 0;
c->p->vregs[vreg - 100].use_info.def_count = 0;
bit_vec_clear(bb->regs_defined, vreg - 100);
bit_vec_clear(bb->regs_used, vreg - 100);
}
}
static void
set_used(dill_stream c, int vreg)
{
if (vreg >= 100) {
c->p->vregs[vreg - 100].use_info.use_count++;
} else {
c->p->c_param_args[vreg].used++;
}
}
static void
set_defined(dill_stream c, int vreg)
{
if (vreg >= 100) {
c->p->vregs[vreg - 100].use_info.def_count++;
}
}
static void
bb_defines(dill_stream c, basic_block bb, int vreg)
{
if (vreg >= 100) {
/* not param */
if (!bit_vec_is_set(bb->regs_used, vreg - 100)) {
bit_vec_set(bb->regs_defined, vreg - 100);
}
set_defined(c, vreg);
}
}
static void
bb_uses(dill_stream c, basic_block bb, int vreg)
{
if (vreg >= 100) {
/* not param */
if (!bit_vec_is_set(bb->regs_defined, vreg - 100)) {
bit_vec_set(bb->regs_used, vreg - 100);
}
set_used(c, vreg);
}
}
static void
add_pred(basic_block bb, int pred)
{
bb->pred_list = realloc(bb->pred_list, (bb->pred_count + 1) * sizeof(int));
bb->pred_list[bb->pred_count] = pred;
bb->pred_count++;
}
static void
dump_bb(dill_stream c, struct basic_block* bb, int i)
{
size_t j;
printf(
"\nBasic block %d, start %zd, end %zd, label %d, fall %d, branch_to "
"%d\n",
i, bb->start, bb->end, bb->label, bb->fall_through,
bb->end_branch_label);
printf(" defines :");
dump_reg_vec(bb->regs_defined);
printf("\n uses :");
dump_reg_vec(bb->regs_used);
printf("\n live_at_end :");
dump_reg_vec(bb->live_at_end);
printf("\n succ :");
for (j = 0; j < bb->succ_count; j++) {
printf(" %d", bb->succ_list[j]);
}
printf("\n preds :");
for (j = 0; j < bb->pred_count; j++) {
printf(" %d", bb->pred_list[j]);
}
if (bb->is_loop_start)
printf(" - LOOP_START");
if (bb->is_loop_end)
printf(" - LOOP_END");
printf("\n");
for (j = (size_t)bb->start; j <= (size_t)bb->end; j++) {
printf(" %zd - ", j);
virtual_print_insn(
c, NULL,
((char*)c->p->virtual.code_base) + j * sizeof(virtual_insn));
printf("\n");
}
}
static void
dump_bbs(dill_stream c)
{
virtual_mach_info vmi = (virtual_mach_info)c->p->mach_info;
int i;
for (i = 0; i < vmi->bbcount; i++) {
dump_bb(c, &vmi->bblist[i], i);
}
}
static int
add_regs(bit_vec dest, bit_vec src)
{
int change = 0;
int i, len = dest->len;
if (len > src->len)
i = src->len;
for (i = 0; i < len; i++) {
char tmp = (dest->vec[i] | src->vec[i]);
if (tmp != dest->vec[i]) {
change = 1;
dest->vec[i] = tmp;
}
}
return change;
}
static void
remove_regs(bit_vec dest, bit_vec src)
{
int i, len = dest->len;
if (len > src->len)
i = src->len;
for (i = 0; i < len; i++) {
dest->vec[i] = (dest->vec[i] & ~src->vec[i]);
}
}
static void
clear_bit_vec(bit_vec b)
{
memset(&b->vec[0], 0, b->len);
}
static void
build_live(dill_stream c)
{
virtual_mach_info vmi = (virtual_mach_info)c->p->mach_info;
int i, change = 1;
bit_vec live_at_begin = new_bit_vec(c->p->vreg_count);
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
bb->live_at_end = new_bit_vec(c->p->vreg_count);
}
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
int j;
for (j = 0; j < bb->pred_count; j++) {
/* foreach predecessor add regs we use to preds live_at_end */
basic_block pred_bb = &vmi->bblist[bb->pred_list[j]];
(void)add_regs(pred_bb->live_at_end, bb->regs_used);
}
}
while (change) {
/* go through the bbs until live lists stabilize */
change = 0;
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
int j;
clear_bit_vec(live_at_begin);
add_regs(live_at_begin, bb->live_at_end);
remove_regs(live_at_begin, bb->regs_defined);
for (j = 0; j < bb->pred_count; j++) {
/*
* foreach predecessor add regs live at our beginning
* to preds live_at_end
*/
basic_block pred_bb = &vmi->bblist[bb->pred_list[j]];
change |= add_regs(pred_bb->live_at_end, live_at_begin);
}
}
}
free(live_at_begin);
}
static int
insn_defines(virtual_insn* insn)
{
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
return insn->opnds.a3.dest;
case iclass_arith3i:
return insn->opnds.a3i.dest;
case iclass_arith2:
return insn->opnds.a2.dest;
case iclass_convert:
return insn->opnds.a2.dest;
case iclass_loadstorei:
if (insn->insn_code & 0x10) {
/* store */
return -1;
} else {
return insn->opnds.a3i.dest;
}
case iclass_lea:
return insn->opnds.a3i.dest;
case iclass_loadstore:
if (insn->insn_code & 0x10) {
/* store */
return -1;
} else {
return insn->opnds.a3.dest;
}
case iclass_set:
return insn->opnds.a3i.dest;
case iclass_setf:
return insn->opnds.sf.dest;
case iclass_mov:
return insn->opnds.a2.dest;
case iclass_reti:
case iclass_ret:
case iclass_branch:
case iclass_branchi:
case iclass_jump_to_label:
case iclass_jump_to_reg:
case iclass_jump_to_imm:
case iclass_special:
return -1;
case iclass_call: {
int typ = insn->insn_code & 0xf;
/* put the return register definition in the next bb */
if (typ != DILL_V) {
return insn->opnds.calli.src;
}
return -1;
}
case iclass_push:
case iclass_pushi:
case iclass_pushf:
case iclass_nop:
case iclass_mark_label:
return -1;
default:
assert(0);
}
return -1;
}
static int
insn_define_test(virtual_insn* insn, int vreg)
{
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
return insn->opnds.a3.dest == vreg;
case iclass_arith3i:
return insn->opnds.a3i.dest == vreg;
case iclass_arith2:
return insn->opnds.a2.dest == vreg;
case iclass_convert:
return insn->opnds.a2.dest == vreg;
case iclass_lea:
return insn->opnds.a3i.dest == vreg;
case iclass_loadstorei:
if (insn->insn_code & 0x10) {
/* store */
return 0;
} else {
return insn->opnds.a3i.dest == vreg;
}
case iclass_loadstore:
if (insn->insn_code & 0x10) {
/* store */
return 0;
} else {
return insn->opnds.a3.dest == vreg;
}
case iclass_set:
return insn->opnds.a3i.dest == vreg;
case iclass_setf:
return insn->opnds.sf.dest == vreg;
case iclass_mov:
return insn->opnds.a2.dest == vreg;
case iclass_reti:
case iclass_ret:
case iclass_branch:
case iclass_branchi:
case iclass_jump_to_label:
case iclass_jump_to_reg:
case iclass_jump_to_imm:
case iclass_special:
return 0;
case iclass_call: {
int typ = insn->insn_code & 0xf;
/* put the return register definition in the next bb */
if (typ != DILL_V) {
return insn->opnds.calli.src == vreg;
}
return 0;
}
case iclass_push:
case iclass_pushi:
case iclass_pushf:
case iclass_nop:
case iclass_mark_label:
return 0;
default:
assert(0);
}
return 0;
}
static void
insn_uses(virtual_insn* insn, int* used)
{
used[0] = -1;
used[1] = -1;
used[2] = -1;
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
used[0] = insn->opnds.a3.src1;
used[1] = insn->opnds.a3.src2;
break;
case iclass_arith3i:
used[0] = insn->opnds.a3i.src;
break;
case iclass_arith2:
used[0] = insn->opnds.a2.src;
break;
case iclass_convert:
used[0] = insn->opnds.a2.src;
break;
case iclass_lea:
used[0] = insn->opnds.a3i.src;
break;
case iclass_loadstorei:
used[0] = insn->opnds.a3i.src;
if (insn->insn_code & 0x10) {
/* store */
used[1] = insn->opnds.a3i.dest;
}
break;
case iclass_loadstore:
used[0] = insn->opnds.a3.src1;
used[1] = insn->opnds.a3.src2;
if (insn->insn_code & 0x10) {
/* store */
used[2] = insn->opnds.a3.dest;
}
break;
case iclass_set:
break;
case iclass_setf:
break;
case iclass_mov:
used[0] = insn->opnds.a2.src;
break;
case iclass_reti:
break;
case iclass_ret:
used[0] = insn->opnds.a1.src;
break;
case iclass_branch:
used[0] = insn->opnds.br.src1;
used[1] = insn->opnds.br.src2;
break;
case iclass_branchi:
used[0] = insn->opnds.bri.src;
break;
case iclass_jump_to_label:
break;
case iclass_jump_to_reg:
used[0] = insn->opnds.bri.src;
break;
case iclass_jump_to_imm:
case iclass_special:
break;
case iclass_call: {
int reg = insn->insn_code & 0x10;
if (reg != 0) {
size_t imm = (size_t)insn->opnds.calli.imm_l;
int src1_vreg = (int)imm;
used[0] = src1_vreg;
}
break;
}
case iclass_push:
if ((short)insn->opnds.a1.src >= 0)
used[0] = insn->opnds.a1.src;
break;
case iclass_pushi:
break;
case iclass_pushf:
break;
case iclass_nop:
break;
}
}
static void
replace_insn_src(virtual_insn* insn, int replace_vreg, int new_vreg)
{
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
if (replace_vreg == insn->opnds.a3.src1) {
insn->opnds.a3.src1 = new_vreg;
return;
};
if (replace_vreg == insn->opnds.a3.src2) {
insn->opnds.a3.src2 = new_vreg;
return;
};
break;
case iclass_arith3i:
if (replace_vreg == insn->opnds.a3i.src) {
insn->opnds.a3i.src = new_vreg;
return;
};
break;
case iclass_arith2:
if (replace_vreg == insn->opnds.a2.src) {
insn->opnds.a2.src = new_vreg;
return;
};
break;
case iclass_convert:
if (replace_vreg == insn->opnds.a2.src) {
insn->opnds.a2.src = new_vreg;
return;
};
break;
case iclass_lea:
if (replace_vreg == insn->opnds.a3i.src) {
insn->opnds.a3i.src = new_vreg;
return;
};
break;
case iclass_loadstorei:
if (replace_vreg == insn->opnds.a3i.src) {
insn->opnds.a3i.src = new_vreg;
return;
};
if (insn->insn_code & 0x10) {
/* store */
if (replace_vreg == insn->opnds.a3i.dest) {
insn->opnds.a3i.dest = new_vreg;
return;
};
}
break;
case iclass_loadstore:
if (replace_vreg == insn->opnds.a3.src1) {
insn->opnds.a3.src1 = new_vreg;
return;
};
if (replace_vreg == insn->opnds.a3.src2) {
insn->opnds.a3.src2 = new_vreg;
return;
};
if (insn->insn_code & 0x10) {
/* store */
if (replace_vreg == insn->opnds.a3.dest) {
insn->opnds.a3.dest = new_vreg;
return;
};
}
break;
case iclass_set:
break;
case iclass_setf:
break;
case iclass_mov:
if (replace_vreg == insn->opnds.a2.src) {
insn->opnds.a2.src = new_vreg;
return;
};
break;
case iclass_reti:
break;
case iclass_ret:
if (replace_vreg == insn->opnds.a1.src) {
insn->opnds.a1.src = new_vreg;
return;
};
break;
case iclass_branch:
if (replace_vreg == insn->opnds.br.src1) {
insn->opnds.br.src1 = new_vreg;
return;
};
if (replace_vreg == insn->opnds.br.src2) {
insn->opnds.br.src2 = new_vreg;
return;
};
break;
case iclass_branchi:
if (replace_vreg == insn->opnds.bri.src) {
insn->opnds.bri.src = new_vreg;
return;
};
break;
case iclass_jump_to_label:
break;
case iclass_jump_to_reg:
if (replace_vreg == insn->opnds.bri.src) {
insn->opnds.bri.src = new_vreg;
return;
};
break;
case iclass_jump_to_imm:
case iclass_special:
break;
case iclass_call:
break;
case iclass_push:
if ((short)insn->opnds.a1.src >= 0)
if (replace_vreg == insn->opnds.a1.src) {
insn->opnds.a1.src = new_vreg;
return;
};
break;
case iclass_pushi:
break;
case iclass_pushf:
break;
case iclass_nop:
break;
}
assert(0);
}
static int
insn_use_test(virtual_insn* insn, int vreg)
{
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
if (vreg == insn->opnds.a3.src1)
return 1;
if (vreg == insn->opnds.a3.src2)
return 1;
break;
case iclass_arith3i:
if (vreg == insn->opnds.a3i.src)
return 1;
break;
case iclass_arith2:
if (vreg == insn->opnds.a2.src)
return 1;
break;
case iclass_convert:
if (vreg == insn->opnds.a2.src)
return 1;
break;
case iclass_lea:
if (vreg == insn->opnds.a3i.src)
return 1;
break;
case iclass_loadstorei:
if (vreg == insn->opnds.a3i.src)
return 1;
if (insn->insn_code & 0x10) {
/* store */
if (vreg == insn->opnds.a3i.dest)
return 1;
}
break;
case iclass_loadstore:
if (vreg == insn->opnds.a3.src1)
return 1;
if (vreg == insn->opnds.a3.src2)
return 1;
if (insn->insn_code & 0x10) {
/* store */
if (vreg == insn->opnds.a3.dest)
return 1;
}
break;
case iclass_set:
break;
case iclass_setf:
break;
case iclass_mov:
if (vreg == insn->opnds.a2.src)
return 1;
break;
case iclass_reti:
break;
case iclass_ret:
if (vreg == insn->opnds.a1.src)
return 1;
break;
case iclass_branch:
if (vreg == insn->opnds.br.src1)
return 1;
if (vreg == insn->opnds.br.src2)
return 1;
break;
case iclass_branchi:
if (vreg == insn->opnds.bri.src)
return 1;
break;
case iclass_jump_to_label:
break;
case iclass_jump_to_reg:
if (vreg == insn->opnds.bri.src)
return 1;
break;
case iclass_jump_to_imm:
case iclass_special:
break;
case iclass_call: {
int reg = insn->insn_code & 0x10;
if (reg != 0) {
size_t imm = (size_t)insn->opnds.calli.imm_l;
int src1_vreg = (int)imm;
if (vreg == src1_vreg)
return 1;
}
break;
}
case iclass_push:
if ((short)insn->opnds.a1.src >= 0)
if (vreg == insn->opnds.a1.src)
return 1;
break;
case iclass_pushi:
break;
case iclass_pushf:
break;
case iclass_nop:
break;
}
return 0;
}
static void
free_bbs(virtual_mach_info vmi)
{
int i;
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
if (bb->pred_list)
free(bb->pred_list);
if (bb->succ_list)
free(bb->succ_list);
free(bb->regs_used);
free(bb->regs_defined);
free(bb->live_at_end);
if (bb->reg_assigns)
free(bb->reg_assigns);
}
if (vmi->bblist)
free(vmi->bblist);
vmi->bblist = NULL;
vmi->bbcount = 0;
}
static void
build_bb_body(dill_stream c, virtual_insn* insn, int i, virtual_insn* insns)
{
virtual_mach_info vmi = (virtual_mach_info)c->p->mach_info;
basic_block bb = &vmi->bblist[vmi->bbcount];
struct branch_table* t = &c->p->branch_table;
int j;
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
bb_uses(c, bb, insn->opnds.a3.src1);
bb_uses(c, bb, insn->opnds.a3.src2);
bb_defines(c, bb, insn->opnds.a3.dest);
break;
case iclass_arith3i:
bb_uses(c, bb, insn->opnds.a3i.src);
bb_defines(c, bb, insn->opnds.a3i.dest);
break;
case iclass_arith2:
bb_uses(c, bb, insn->opnds.a2.src);
bb_defines(c, bb, insn->opnds.a2.dest);
break;
case iclass_convert:
bb_uses(c, bb, insn->opnds.a2.src);
bb_defines(c, bb, insn->opnds.a2.dest);
break;
case iclass_lea:
bb_uses(c, bb, insn->opnds.a3i.src);
bb_defines(c, bb, insn->opnds.a3i.dest);
break;
case iclass_loadstorei:
bb_uses(c, bb, insn->opnds.a3i.src);
if (insn->insn_code & 0x10) {
/* store */
bb_uses(c, bb, insn->opnds.a3i.dest);
} else {
bb_defines(c, bb, insn->opnds.a3i.dest);
}
break;
case iclass_loadstore:
bb_uses(c, bb, insn->opnds.a3.src1);
bb_uses(c, bb, insn->opnds.a3.src2);
if (insn->insn_code & 0x10) {
/* store */
bb_uses(c, bb, insn->opnds.a3.dest);
} else {
bb_defines(c, bb, insn->opnds.a3.dest);
}
break;
case iclass_set:
bb_defines(c, bb, insn->opnds.a3i.dest);
break;
case iclass_setf:
bb_defines(c, bb, insn->opnds.sf.dest);
break;
case iclass_mov:
bb_uses(c, bb, insn->opnds.a2.src);
bb_defines(c, bb, insn->opnds.a2.dest);
break;
case iclass_reti:
break;
case iclass_ret:
bb_uses(c, bb, insn->opnds.a1.src);
break;
case iclass_branch:
bb_uses(c, bb, insn->opnds.br.src1);
bb_uses(c, bb, insn->opnds.br.src2);
end_bb(bb, insn->opnds.br.label, 1);
break;
case iclass_branchi:
bb_uses(c, bb, insn->opnds.bri.src);
end_bb(bb, insn->opnds.bri.label, 1);
break;
case iclass_jump_to_label:
end_bb(bb, insn->opnds.br.label, 0);
break;
case iclass_jump_to_reg:
bb_uses(c, bb, insn->opnds.br.src1);
end_bb(bb, -1, 0);
break;
case iclass_jump_to_imm:
end_bb(bb, -1, 0);
break;
case iclass_call: {
int typ = insn->insn_code & 0xf;
end_bb(bb, -1, 1);
/* put the return register definition in the next bb */
if (typ != DILL_V) {
bb_defines(c, bb, insn->opnds.calli.src);
}
break;
}
case iclass_push:
if ((short)insn->opnds.a1.src >= 0)
bb_uses(c, bb, insn->opnds.a1.src);
break;
case iclass_special:
break;
case iclass_pushi:
break;
case iclass_pushf:
break;
case iclass_nop:
case iclass_mark_label:
break;
}
for (j = 0; j < t->next_label; j++) {
if ((unsigned)t->label_locs[j] ==
((char*)insn - (char*)insns) + sizeof(virtual_insn)) {
int fall_through = 1;
switch (insns[i - 1].class_code) {
case iclass_ret:
case iclass_reti:
fall_through = 0;
default:
break;
}
if (bb->start != i) {
end_bb(bb, -1, fall_through);
}
bb->label = j;
}
}
}
static void
build_bbs(dill_stream c, void* vinsns, void* prefix_begin, void* code_end)
{
virtual_mach_info vmi = (virtual_mach_info)c->p->mach_info;
basic_block bb;
virtual_insn *insn, *insns = vinsns;
vmi->bbcount = 0;
vmi->bblist = malloc(sizeof(struct basic_block));
size_t i = 0;
bb = vmi->bblist;
bb->start = 0;
bb->label = -1;
bb->regs_used = new_bit_vec(c->p->vreg_count);
bb->regs_defined = new_bit_vec(c->p->vreg_count);
bb->reg_assigns = NULL;
bb->end_branch_label = -1;
bb->fall_through = 0;
bb->is_loop_start = 0;
bb->is_loop_end = 0;
if (prefix_begin < code_end) {
i = ((char*)prefix_begin - (char*)insns) / sizeof(virtual_insn);
bb->start = i;
while ((insn = &insns[i++]) < (virtual_insn*)code_end) {
build_bb_body(c, insn, (int)i, insns);
}
bb = &vmi->bblist[vmi->bbcount];
i -= 1;
end_bb(bb, -1, 1);
}
i = 0;
bb->start = i;
while ((insn = &insns[i++]) < (virtual_insn*)prefix_begin) {
build_bb_body(c, insn, (int)i, insns);
}
bb = &vmi->bblist[vmi->bbcount];
end_bb(bb, -1, 0);
free(bb->regs_used);
free(bb->regs_defined);
(bb - 1)->end--;
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
bb->pred_count = bb->succ_count = 0;
bb->succ_list = malloc(2 * sizeof(int));
bb->pred_list = malloc(sizeof(int));
bb->reg_assigns = NULL;
}
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
if (bb->fall_through) {
bb->succ_list[bb->succ_count] = (int)i + 1;
bb->succ_count++;
add_pred(&vmi->bblist[i + 1], (int)i);
}
if (bb->end_branch_label != -1) {
int j;
for (j = 0; j < vmi->bbcount; j++) {
if (vmi->bblist[j].label == bb->end_branch_label) {
bb->succ_list[bb->succ_count] = j;
bb->succ_count++;
add_pred(&vmi->bblist[j], (int)i);
j = vmi->bbcount;
}
}
}
}
build_live(c);
/* calculate_depth(c);*/
}
typedef void (*bv_func)(int bit, void* p1, void* p2);
static void
do_reg_assign(int bit, basic_block bb, dill_stream c)
{
/* no local preg for live registers */
int preg;
if ((c->p->vregs[bit].use_info.use_count == 0) &&
(c->p->vregs[bit].use_info.def_count == 0)) {
if (c->dill_debug)
printf("virtual reg %d optimized away\n", bit + 100);
return;
}
if (bit_vec_is_set(bb->live_at_end, bit)) {
c->p->vregs[bit].need_assign = 1;
return;
}
if (dill_raw_getreg(c, &preg, c->p->vregs[bit].typ, DILL_VAR) == 0) {
c->p->vregs[bit].need_assign = 1;
bb->reg_assigns[bit] = -1;
if (c->dill_debug)
printf("No more tmp regs for virtual reg %d\n", bit + 100);
} else {
bb->reg_assigns[bit] = preg;
if (c->dill_debug)
printf("virtual reg %d assigned to preg %d\n", bit + 100,
bb->reg_assigns[bit]);
}
}
static void
do_use_def_count(dill_stream c, basic_block bb, virtual_insn* insns, int loc)
{
virtual_insn* insn = &((virtual_insn*)insns)[loc];
switch (insn->class_code) {
case iclass_arith3:
case iclass_compare:
set_used(c, insn->opnds.a3.src1);
set_used(c, insn->opnds.a3.src2);
set_defined(c, insn->opnds.a3.dest);
break;
case iclass_arith3i:
set_used(c, insn->opnds.a3i.src);
set_defined(c, insn->opnds.a3i.dest);
break;
case iclass_arith2:
set_used(c, insn->opnds.a2.src);
set_defined(c, insn->opnds.a2.dest);
break;
case iclass_convert:
set_used(c, insn->opnds.a2.src);
set_defined(c, insn->opnds.a2.dest);
break;
case iclass_lea:
set_used(c, insn->opnds.a3i.src);
set_defined(c, insn->opnds.a3i.dest);
break;
case iclass_loadstorei:
set_used(c, insn->opnds.a3i.src);
if (insn->insn_code & 0x10) {
/* store */
set_used(c, insn->opnds.a3i.dest);
} else {
set_defined(c, insn->opnds.a3i.dest);
}
break;
case iclass_loadstore:
set_used(c, insn->opnds.a3.src1);
set_used(c, insn->opnds.a3.src2);
if (insn->insn_code & 0x10) {
/* store */
set_used(c, insn->opnds.a3.dest);
} else {
set_defined(c, insn->opnds.a3.dest);
}
break;
case iclass_set:
set_defined(c, insn->opnds.a3i.dest);
break;
case iclass_setf:
set_defined(c, insn->opnds.sf.dest);
break;
case iclass_mov:
set_used(c, insn->opnds.a2.src);
set_defined(c, insn->opnds.a2.dest);
break;
case iclass_reti:
break;
case iclass_ret:
set_used(c, insn->opnds.a1.src);
break;
case iclass_branch:
set_used(c, insn->opnds.br.src1);
set_used(c, insn->opnds.br.src2);
break;
case iclass_branchi:
set_used(c, insn->opnds.bri.src);
break;
case iclass_jump_to_label:
break;
case iclass_jump_to_reg:
set_used(c, insn->opnds.br.src1);
break;
case iclass_jump_to_imm:
break;
case iclass_special:
break;
case iclass_call: {
int reg = insn->insn_code & 0x10;
if ((insn->insn_code & 0xf) != DILL_V) {
set_defined(c, insn->opnds.calli.src);
}
if (reg != 0) {
size_t imm = (size_t)insn->opnds.calli.imm_l;
int src1_vreg = (int)imm;
set_used(c, src1_vreg);
}
break;
}
case iclass_push:
if ((short)insn->opnds.a1.src >= 0)
set_used(c, insn->opnds.a1.src);
break;
case iclass_pushi:
break;
case iclass_pushf:
break;
case iclass_nop:
break;
}
}
static void
reset_use_def_count(dill_stream c, virtual_insn* insns, virtual_mach_info vmi)
{
int i;
for (i = 0; i < c->p->vreg_count; i++) {
c->p->vregs[i].use_info.use_count = 0;
c->p->vregs[i].use_info.def_count = 0;
}
for (i = 0; i < c->p->c_param_count; i++) {
c->p->c_param_args[i].used = 0;
}
apply_to_each(c, insns, vmi, do_use_def_count);
}
void
foreach_bit(bit_vec v, bv_func func, void* p1, void* p2)
{
int i;
for (i = 0; i < v->len; i++) {
int j;
for (j = 0; j < 2; j++) {
unsigned char nibble = (v->vec[i] >> (j * 4)) & 0xf;
switch (nibble) {
case 0xf:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 2, p1, p2);
func(i * 8 + j * 4 + 1, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0xe:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 2, p1, p2);
func(i * 8 + j * 4 + 1, p1, p2);
break;
case 0xd:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 2, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0xc:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 2, p1, p2);
break;
case 0xb:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 1, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0xa:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 1, p1, p2);
break;
case 0x9:
func(i * 8 + j * 4 + 3, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0x8:
func(i * 8 + j * 4 + 3, p1, p2);
break;
case 0x7:
func(i * 8 + j * 4 + 2, p1, p2);
func(i * 8 + j * 4 + 1, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0x6:
func(i * 8 + j * 4 + 2, p1, p2);
func(i * 8 + j * 4 + 1, p1, p2);
break;
case 0x5:
func(i * 8 + j * 4 + 2, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0x4:
func(i * 8 + j * 4 + 2, p1, p2);
break;
case 0x3:
func(i * 8 + j * 4 + 1, p1, p2);
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0x2:
func(i * 8 + j * 4 + 1, p1, p2);
break;
case 0x1:
func(i * 8 + j * 4 + 0, p1, p2);
break;
case 0x0:
break;
}
}
}
}
static void
do_register_assign(dill_stream c,
void* insns,
void* code_end,
int vlp,
virtual_mach_info vmi)
{
int i;
int itmpa, itmpb, dtmpa, dtmpb;
if ((dill_raw_getreg(c, &itmpa, DILL_L, DILL_TEMP) == 0) ||
(dill_raw_getreg(c, &itmpb, DILL_L, DILL_TEMP) == 0)) {
fprintf(stderr, "Failure to get temporary regs in register assign\n");
}
dill_raw_getreg(c, &dtmpa, DILL_D, DILL_TEMP);
dill_raw_getreg(c, &dtmpb, DILL_D, DILL_TEMP);
for (i = 0; i < DILL_B; i++) {
switch (i) {
case DILL_D:
case DILL_F:
c->p->v_tmps[i][0] = dtmpa;
c->p->v_tmps[i][1] = dtmpb;
c->p->v_tmps[i][2] = dtmpa;
break;
default:
c->p->v_tmps[i][0] = itmpa;
c->p->v_tmps[i][1] = itmpb;
c->p->v_tmps[i][2] = c->p->machine_strr_tmp_reg;
break;
}
}
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
int j;
bb->reg_assigns = malloc(sizeof(short) * c->p->vreg_count);
memset(bb->reg_assigns, 0xff, sizeof(short) * c->p->vreg_count);
foreach_bit(bb->regs_defined, (bv_func)do_reg_assign, bb, c);
for (j = 0; j < c->p->vreg_count; j++) {
if (bb->reg_assigns[j] != -1) {
dill_raw_putreg(c, bb->reg_assigns[j], c->p->vregs[j].typ);
}
}
}
for (i = 0; i < c->p->vreg_count; i++) {
if (i == (vlp - 100)) {
c->p->vregs[i].preg = c->dill_local_pointer;
c->p->vregs[i].offset = 0;
} else if (c->p->vregs[i].typ == DILL_B) {
/* block, size stored in offset value */
int size = c->p->vregs[i].offset;
c->p->vregs[i].preg = -1;
c->p->vregs[i].offset = dill_localb(c, size);
} else {
c->p->vregs[i].preg = -1;
if (c->p->vregs[i].typ != DILL_V) {
c->p->vregs[i].offset = dill_local(c, c->p->vregs[i].typ);
} else {
printf("internal void register error\n");
}
}
}
}
static int
preg_of(dill_stream c, basic_block bb, int vreg)
{
if (vreg >= 100) {
if (bb->reg_assigns[vreg - 100] == -1) {
return c->p->vregs[vreg - 100].preg;
} else {
return bb->reg_assigns[vreg - 100];
}
} else {
/* parameter */;
if (c->p->c_param_args[vreg].is_register) {
return c->p->c_param_args[vreg].in_reg;
}
return -1;
}
}
static int
offset_of(dill_stream c, int vreg)
{
if (vreg >= 100) {
return c->p->vregs[vreg - 100].offset;
} else {
/* parameter */;
return c->p->c_param_args[vreg].offset;
}
}
extern void
dill_virtual_lea(dill_stream c, int dest, int src)
{
if (src < 100) {
printf("error, attempt to do dill_virtual_lea on non-virtual\n");
return;
}
if (dill_type_of(c, src) != DILL_B) {
printf(
"error, attempt to do dill_virtual_lea on variable of type other "
"than V_B\n");
return;
}
dill_lea(c, dest, src, 0);
}
static int
tmp_for_vreg(dill_stream c, int tmp_num, int vreg)
{
int typ = dill_type_of(c, vreg);
return c->p->v_tmps[typ][tmp_num];
}
static int
load_oprnd(dill_stream c, int tmp_num, int vreg)
{
int offset = offset_of(c, vreg);
int typ = dill_type_of(c, vreg);
int tmp = c->p->v_tmps[typ][tmp_num];
if (vreg >= 100) {
c->j->loadi(c, typ, 0, tmp, c->dill_local_pointer, offset);
} else {
c->j->loadi(c, typ, 0, tmp, c->dill_param_reg_pointer, offset);
}
return tmp;
}
static int
is_commutative(int insn_code)
{
switch (insn_code) {
case dill_jmp_addi:
case dill_jmp_addu:
case dill_jmp_addul:
case dill_jmp_addl:
case dill_jmp_addp:
case dill_jmp_addf:
case dill_jmp_addd:
return 1;
case dill_jmp_subi:
case dill_jmp_subu:
case dill_jmp_subul:
case dill_jmp_subl:
case dill_jmp_subp:
case dill_jmp_subf:
case dill_jmp_subd:
return 0;
case dill_jmp_muli:
case dill_jmp_mulu:
case dill_jmp_mulul:
case dill_jmp_mull:
case dill_jmp_mulf:
case dill_jmp_muld:
return 1;
case dill_jmp_divi:
case dill_jmp_divu:
case dill_jmp_divul:
case dill_jmp_divl:
case dill_jmp_divf:
case dill_jmp_divd:
case dill_jmp_modi:
case dill_jmp_modu:
case dill_jmp_modul:
case dill_jmp_modl:
return 0;
case dill_jmp_xori:
case dill_jmp_xoru:
case dill_jmp_xorul:
case dill_jmp_xorl:
case dill_jmp_andi:
case dill_jmp_andu:
case dill_jmp_andul:
case dill_jmp_andl:
case dill_jmp_ori:
case dill_jmp_oru:
case dill_jmp_orul:
case dill_jmp_orl:
return 1;
case dill_jmp_lshi:
case dill_jmp_lshu:
case dill_jmp_lshul:
case dill_jmp_lshl:
case dill_jmp_rshi:
case dill_jmp_rshu:
case dill_jmp_rshul:
case dill_jmp_rshl:
return 0;
default:
printf("Unknown opcode in is_commutative\n");
return 0;
}
}
static int
is_compare_commutative(int insn_code)
{
switch (insn_code) {
case dill_jmp_ceqi:
case dill_jmp_cequ:
case dill_jmp_cequl:
case dill_jmp_ceql:
case dill_jmp_ceqp:
case dill_jmp_ceqd:
case dill_jmp_ceqf:
return 1;
case dill_jmp_cgei:
case dill_jmp_cgeu:
case dill_jmp_cgeul:
case dill_jmp_cgel:
case dill_jmp_cgep:
case dill_jmp_cged:
case dill_jmp_cgef:
case dill_jmp_cgti:
case dill_jmp_cgtu:
case dill_jmp_cgtul:
case dill_jmp_cgtl:
case dill_jmp_cgtp:
case dill_jmp_cgtd:
case dill_jmp_cgtf:
case dill_jmp_clei:
case dill_jmp_cleu:
case dill_jmp_cleul:
case dill_jmp_clel:
case dill_jmp_clep:
case dill_jmp_cled:
case dill_jmp_clef:
case dill_jmp_clti:
case dill_jmp_cltu:
case dill_jmp_cltul:
case dill_jmp_cltl:
case dill_jmp_cltp:
case dill_jmp_cltd:
case dill_jmp_cltf:
return 0;
case dill_jmp_cnei:
case dill_jmp_cneu:
case dill_jmp_cneul:
case dill_jmp_cnel:
case dill_jmp_cnep:
case dill_jmp_cned:
case dill_jmp_cnef:
return 1;
default:
printf("Unknown opcode in is_compare_commutative\n");
return 0;
}
}
static int
store_oprnd(dill_stream c, int tmp_num, int vreg)
{
int offset = offset_of(c, vreg);
int typ = dill_type_of(c, vreg);
int tmp = c->p->v_tmps[typ][tmp_num];
if (vreg >= 100) {
c->j->storei(c, typ, 0, tmp, c->dill_local_pointer, offset);
} else {
c->j->storei(c, typ, 0, tmp, c->dill_param_reg_pointer, offset);
}
return tmp;
}
typedef struct label_translation {
int old_location;
int old_label;
int new_label;
} * label_translation_table;
static int
get_new_label(int old_label, label_translation_table ltable)
{
while (ltable->old_label != -1) {
if (ltable->old_label == old_label)
return ltable->new_label;
ltable++;
}
printf("New label not found\n");
return -1;
}
static void
emit_getreg(int bit, basic_block bb, dill_stream c)
{
if (bb->reg_assigns[bit] != -1) {
dill_dealloc_specific(c, bb->reg_assigns[bit], c->p->vregs[bit].typ,
DILL_VAR);
}
}
static void
emit_putreg(int bit, basic_block bb, dill_stream c)
{
if (bb->reg_assigns[bit] != -1) {
dill_raw_putreg(c, bb->reg_assigns[bit], c->p->vregs[bit].typ);
}
}
static int count_verbose = -1;
static void
emit_insns(dill_stream c,
void* insns,
label_translation_table ltable,
virtual_mach_info vmi)
{
int label_xlate = 0;
size_t i, j = 0;
virtual_insn* ip;
if (count_verbose == -1) {
count_verbose = (getenv("DILL_COUNTS") != NULL);
}
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
int last_dest_vreg = -1;
int last_store_loc = 0;
int insn_start = (int)((char*)c->p->cur_ip - (char*)c->p->code_base);
int insn_count = (int)(bb->end - bb->start);
foreach_bit(bb->regs_defined, (bv_func)emit_getreg, bb, c);
for (j = (size_t)bb->start; j <= (size_t)bb->end; j++) {
int loc;
ip = &((virtual_insn*)insns)[j];
loc = (int)((char*)ip - (char*)insns);
while ((loc != 0) && (ltable[label_xlate].old_location == loc)) {
dill_mark_label(c, ltable[label_xlate].new_label);
label_xlate++;
}
if (c->dill_debug) {
printf(" v ");
virtual_print_insn(c, NULL, ip);
printf("\n");
}
switch (ip->class_code) {
case iclass_arith3: {
/* arith 3 operand integer insns */
int dest_vreg = ip->opnds.a3.dest;
int src1_vreg = ip->opnds.a3.src1;
int src2_vreg = ip->opnds.a3.src2;
int dest_preg;
int src1_preg;
int src2_preg;
int insn_code = ip->insn_code;
if ((last_dest_vreg == src2_vreg) &&
is_commutative(insn_code)) {
/* we only optimize opnd1, switch them */
src1_vreg = ip->opnds.a3.src2;
src2_vreg = ip->opnds.a3.src1;
}
dest_preg = preg_of(c, bb, dest_vreg);
src1_preg = preg_of(c, bb, src1_vreg);
src2_preg = preg_of(c, bb, src2_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
if (src2_preg == -1) {
/* load src2 */
src2_preg = load_oprnd(c, 1, src2_vreg);
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->jmp_a3)[insn_code](c, c->j->a3_data[insn_code].data1,
c->j->a3_data[insn_code].data2,
dest_preg, src1_preg, src2_preg);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_compare: {
/* compare 3 operand insns */
int dest_vreg = ip->opnds.a3.dest;
int src1_vreg = ip->opnds.a3.src1;
int src2_vreg = ip->opnds.a3.src2;
int dest_preg;
int src1_preg;
int src2_preg;
int insn_code = ip->insn_code;
if ((last_dest_vreg == src2_vreg) &&
is_compare_commutative(insn_code)) {
/* we only optimize opnd1, switch them */
src1_vreg = ip->opnds.a3.src2;
src2_vreg = ip->opnds.a3.src1;
}
dest_preg = preg_of(c, bb, dest_vreg);
src1_preg = preg_of(c, bb, src1_vreg);
src2_preg = preg_of(c, bb, src2_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
if (src2_preg == -1) {
/* load src2 */
src2_preg = load_oprnd(c, 1, src2_vreg);
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->jmp_c)[insn_code](c, c->j->c_data[insn_code].data1,
c->j->c_data[insn_code].data2,
dest_preg, src1_preg, src2_preg);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_arith2: {
/* arith 2 operand integer insns */
int dest_vreg = ip->opnds.a2.dest;
int src_vreg = ip->opnds.a2.src;
int dest_preg = preg_of(c, bb, dest_vreg);
int src_preg = preg_of(c, bb, src_vreg);
int insn_code = ip->insn_code;
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->jmp_a2)[insn_code](c, c->j->a2_data[insn_code].data1,
c->j->a2_data[insn_code].data2,
dest_preg, src_preg);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_arith3i: {
/* arith 3 immediate operand integer insns */
int dest_vreg = ip->opnds.a3i.dest;
int src_vreg = ip->opnds.a3i.src;
intptr_t imm = ip->opnds.a3i.u.imm;
int dest_preg = preg_of(c, bb, dest_vreg);
int src_preg = preg_of(c, bb, src_vreg);
int insn_code = ip->insn_code;
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->jmp_a3i)[insn_code](c, c->j->a3i_data[insn_code].data1,
c->j->a3i_data[insn_code].data2,
dest_preg, src_preg, imm);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_ret: {
/* arith operand integer insns */
int src_vreg = ip->opnds.a1.src;
int src_preg = preg_of(c, bb, src_vreg);
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
(c->j->ret)(c, ip->insn_code, 0, src_preg);
last_dest_vreg = -1;
} break;
case iclass_convert: {
/* conversion insns */
int dest_vreg = ip->opnds.a2.dest;
int src_vreg = ip->opnds.a2.src;
int dest_preg = preg_of(c, bb, dest_vreg);
int src_preg = preg_of(c, bb, src_vreg);
int from_type = (ip->insn_code >> 4) & 0xf;
int to_type = ip->insn_code & 0xf;
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->convert)(c, from_type, to_type, dest_preg, src_preg);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_loadstore: {
/* load/store 3 operand integer insns */
int dest_vreg = ip->opnds.a3.dest;
int src1_vreg = ip->opnds.a3.src1;
int src2_vreg = ip->opnds.a3.src2;
int dest_preg;
int src1_preg;
int src2_preg;
int store = ((ip->insn_code & 0x10) == 0x10);
int bswap = ((ip->insn_code & 0x20) == 0x20);
int typ = ip->insn_code & 0xf;
if (last_dest_vreg == src2_vreg) {
/* we only optimize opnd1, switch them */
/* load store is commutative */
src1_vreg = ip->opnds.a3.src2;
src2_vreg = ip->opnds.a3.src1;
}
dest_preg = preg_of(c, bb, dest_vreg);
src1_preg = preg_of(c, bb, src1_vreg);
src2_preg = preg_of(c, bb, src2_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
if (src2_preg == -1) {
/* load src2 */
src2_preg = load_oprnd(c, 1, src2_vreg);
}
if (store == 0) {
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
if (bswap) {
(c->j->bsload)(c, typ, 0, dest_preg, src1_preg,
src2_preg);
} else {
(c->j->load)(c, typ, 0, dest_preg, src1_preg,
src2_preg);
}
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} else {
if (dest_preg == -1) {
dest_preg = load_oprnd(c, 2, dest_vreg);
}
(c->j->store)(c, typ, 0, dest_preg, src1_preg, src2_preg);
last_dest_vreg = -1;
}
} break;
case iclass_lea: {
/* load effective address */
int dest_vreg = ip->opnds.a3i.dest;
int src_vreg = ip->opnds.a3i.src;
intptr_t imm = ip->opnds.a3i.u.imm;
int dest_preg = preg_of(c, bb, dest_vreg);
int src_preg = preg_of(c, bb, src_vreg);
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->lea)(c, 0, 0, dest_preg, src_preg, imm);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_loadstorei: {
/* load store immediate operand integer insns */
int dest_vreg = ip->opnds.a3i.dest;
int src_vreg = ip->opnds.a3i.src;
intptr_t imm = ip->opnds.a3i.u.imm;
int dest_preg = preg_of(c, bb, dest_vreg);
int src_preg = preg_of(c, bb, src_vreg);
int store = ((ip->insn_code & 0x10) == 0x10);
int bswap = ((ip->insn_code & 0x20) == 0x20);
int typ = ip->insn_code & 0xf;
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
if (store == 0) {
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
if (bswap) {
(c->j->bsloadi)(c, typ, 0, dest_preg, src_preg, imm);
} else {
(c->j->loadi)(c, typ, 0, dest_preg, src_preg, imm);
}
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} else {
if (dest_preg == -1) {
dest_preg = load_oprnd(c, 1, dest_vreg);
}
/* a store, dest is the source of the store */
(c->j->storei)(c, typ, 0, dest_preg, src_preg, imm);
last_dest_vreg = -1;
}
} break;
case iclass_set: {
/* load store immediate operand integer insns */
int dest_vreg = ip->opnds.a3i.dest;
intptr_t imm = ip->opnds.a3i.u.imm;
int dest_preg = preg_of(c, bb, dest_vreg);
int typ = ip->insn_code & 0xf;
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->set)(c, typ, 0, dest_preg, imm);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_setf: {
/* load store immediate operand integer insns */
int dest_vreg = ip->opnds.sf.dest;
double imm = ip->opnds.sf.imm;
int dest_preg = preg_of(c, bb, dest_vreg);
int typ = ip->insn_code & 0xf;
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->setf)(c, typ, 0, dest_preg, imm);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_mov: {
/* mov insns */
int dest_vreg = ip->opnds.a2.dest;
int src_vreg = ip->opnds.a2.src;
int dest_preg = preg_of(c, bb, dest_vreg);
int src_preg = preg_of(c, bb, src_vreg);
int typ = ip->insn_code & 0xf;
if (src_preg == -1) {
/* load src */
if ((last_dest_vreg == src_vreg) &&
(tmp_for_vreg(c, 0, src_vreg) != -1)) {
if (has_single_def_use(c, src_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src_preg = tmp_for_vreg(c, 0, src_vreg);
} else {
src_preg = load_oprnd(c, 0, src_vreg);
}
}
if (dest_preg == -1) {
dest_preg = c->p->v_tmps[dill_type_of(c, dest_vreg)][0];
}
(c->j->mov)(c, typ, 0, dest_preg, src_preg);
if (preg_of(c, bb, dest_vreg) == -1) {
/* no dest reg, store result */
last_store_loc =
(int)((char*)c->p->cur_ip - (char*)c->p->code_base);
store_oprnd(c, 0, dest_vreg);
last_dest_vreg = dest_vreg;
} else {
last_dest_vreg = -1;
}
} break;
case iclass_reti: {
/* return immediate integer insns */
intptr_t imm = ip->opnds.a3i.u.imm;
int typ = ip->insn_code & 0xf;
(c->j->reti)(c, typ, 0, imm);
last_dest_vreg = -1;
} break;
case iclass_branch: {
/* branch */
int br_op = ip->insn_code;
int label = get_new_label(ip->opnds.br.label, ltable);
int src1_vreg = ip->opnds.br.src1;
int src2_vreg = ip->opnds.br.src2;
int src1_preg;
int src2_preg;
/* if (last_dest_vreg == src2_vreg) {
# we should do this is we reverse the sense of the
branch * src1_vreg = ip->opnds.br.src2; src2_vreg =
ip->opnds.br.src1;
}
*/
src1_preg = preg_of(c, bb, src1_vreg);
src2_preg = preg_of(c, bb, src2_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
if (src2_preg == -1) {
/* load src2 */
src2_preg = load_oprnd(c, 1, src2_vreg);
}
(c->j->jmp_b)[br_op](c, c->j->b_data[br_op].data1,
c->j->b_data[br_op].data2, src1_preg,
src2_preg, label);
last_dest_vreg = -1;
} break;
case iclass_branchi: {
/* branch immediate */
int br_op = ip->insn_code;
int label = get_new_label(ip->opnds.bri.label, ltable);
int src1_vreg = ip->opnds.bri.src;
intptr_t imm = ip->opnds.bri.imm_l;
int src1_preg = preg_of(c, bb, src1_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
(c->j->jmp_bi)[br_op](c, c->j->b_data[br_op].data1,
c->j->b_data[br_op].data2, src1_preg, imm,
label);
last_dest_vreg = -1;
} break;
case iclass_jump_to_label: {
/* branch immediate */
int label = get_new_label(ip->opnds.br.label, ltable);
dill_jv(c, label);
last_dest_vreg = -1;
} break;
case iclass_jump_to_reg: {
int src1_vreg = ip->opnds.br.src1;
int src1_preg = preg_of(c, bb, src1_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(" -- Eliminating previous store -- \n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
dill_jp(c, src1_preg);
last_dest_vreg = -1;
} break;
case iclass_jump_to_imm: {
void* imm = ip->opnds.bri.imm_a;
dill_jpi(c, imm);
last_dest_vreg = -1;
} break;
case iclass_special:
dill_special(c, ip->opnds.spec.type, ip->opnds.spec.param);
break;
case iclass_call: {
basic_block next_bb = &vmi->bblist[i + 1];
int dest_vreg = ip->opnds.calli.src;
int dest_preg = 0;
int reg = ip->insn_code & 0x10;
int typ = ip->insn_code & 0xf;
int rr;
if (typ != DILL_V)
dest_preg = preg_of(c, next_bb, dest_vreg);
if (reg != 0) {
intptr_t src1_vreg = ip->opnds.calli.imm_l;
int src1_preg = preg_of(c, bb, (int)src1_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, (int)src1_vreg) != -1)) {
if (has_single_def_use(c, (int)src1_vreg)) {
if (c->dill_debug) {
printf(
" -- Eliminating previous store -- "
"\n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, (int)src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, (int)src1_vreg);
}
}
rr = dill_pcallr(c, typ, src1_preg);
} else {
rr = dill_pcall(c, typ, ip->opnds.calli.imm_a,
ip->opnds.calli.xfer_name);
}
if (typ != DILL_V) {
if (preg_of(c, next_bb, dest_vreg) == -1) {
/* no dest reg, store result */
int offset = offset_of(c, dest_vreg);
int typ = dill_type_of(c, dest_vreg);
if (dest_vreg >= 100) {
c->j->storei(c, typ, 0, rr, c->dill_local_pointer,
offset);
} else {
c->j->storei(c, typ, 0, rr,
c->dill_param_reg_pointer, offset);
}
} else {
/* move return value to result */
c->j->mov(c, typ, 0, dest_preg, rr);
}
}
pushpop_inuse_regs(c, 1, ip);
last_dest_vreg = -1;
} break;
case iclass_push: {
int typ = ip->insn_code & 0xf;
int src1_vreg = ip->opnds.a1.src;
int src1_preg;
if ((short)ip->opnds.a1.src >= 0) {
/* neg 1 used to signal push init */
src1_preg = preg_of(c, bb, src1_vreg);
if (src1_preg == -1) {
/* load src1 */
if ((last_dest_vreg == src1_vreg) &&
(tmp_for_vreg(c, 0, src1_vreg) != -1)) {
if (has_single_def_use(c, src1_vreg)) {
if (c->dill_debug) {
printf(
" -- Eliminating previous store -- "
"\n");
}
c->p->cur_ip =
(char*)c->p->code_base + last_store_loc;
}
src1_preg = tmp_for_vreg(c, 0, src1_vreg);
} else {
src1_preg = load_oprnd(c, 0, src1_vreg);
}
}
} else {
pushpop_inuse_regs(c, 0, ip);
src1_preg = -1;
}
dill_push_arg(c, typ, src1_preg);
last_dest_vreg = -1;
} break;
case iclass_pushi: {
int typ = ip->insn_code & 0xf;
if (typ == DILL_P) {
void* imm = ip->opnds.a3i.u.imm_a;
dill_push_argpi(c, imm);
} else {
intptr_t imm = ip->opnds.a3i.u.imm;
dill_push_argii(c, imm);
}
last_dest_vreg = -1;
} break;
case iclass_pushf: {
int typ = ip->insn_code & 0xf;
double imm = ip->opnds.sf.imm;
c->j->pushfi(c, typ, imm);
last_dest_vreg = -1;
} break;
case iclass_nop:
break;
}
}
foreach_bit(bb->regs_defined, (bv_func)emit_putreg, bb, c);
if (count_verbose) {
int insn_end = (int)((char*)c->p->cur_ip - (char*)c->p->code_base);
printf(
"Basic Block %zd, %d virtual instructions, %d physical "
"instructions\n",
i, insn_count, c->j->count_insn(c, insn_start, insn_end));
}
}
if ((unsigned)ltable[label_xlate].old_location ==
j * sizeof(virtual_insn)) {
dill_mark_label(c, ltable[label_xlate].new_label);
label_xlate++;
}
if (ltable[label_xlate].old_location != -1) {
printf("Some labels (%d, old loc %d) not placed\n", label_xlate,
ltable[label_xlate].old_location);
}
}
static int
live_at_end(basic_block bb, int vreg)
{
if (vreg >= 100) {
return bit_vec_is_set(bb->live_at_end, vreg - 100);
}
return 1;
}
static int
get_tentative_assign(dill_stream c, int vreg, bit_vec vec)
{
int tmp;
dill_raw_getreg(c, &tmp, dill_type_of(c, vreg), DILL_VAR);
if (tmp != -1) {
bit_vec_set(vec, tmp);
}
return tmp;
}
static void
put_unless(int bit, dill_stream c, int preg_assigned)
{
int typ = preg_assigned >> 24;
if (bit != (preg_assigned & 0xffffff)) {
dill_raw_putreg(c, bit, typ);
}
}
static void
put_tentative_assigns(dill_stream c, int preg_assigned, bit_vec vec, int typ)
{
foreach_bit(
vec, (bv_func)put_unless, c,
(void*)(intptr_t)((preg_assigned & 0xffffff) | (intptr_t)typ << 24));
}
typedef struct reg_state {
dill_stream c;
basic_block bb;
preg_info* fpregs;
preg_info* ipregs;
int reg_count;
int ret_reg;
int ret_vreg;
vreg_info* param_info;
} reg_state;
static void
init_reg_state(reg_state* state, dill_stream c)
{
int i;
state->fpregs = malloc(sizeof(preg_info));
state->ipregs = malloc(sizeof(preg_info));
state->reg_count = 0;
state->ret_reg = -1;
state->ret_vreg = -1;
state->param_info = malloc(sizeof(vreg_info) * c->p->c_param_count);
for (i = 0; i < c->p->c_param_count; i++) {
if (c->p->c_param_args[i].is_register) {
state->param_info[i].update_in_reg = 0;
state->param_info[i].value_in_mem = 0;
state->param_info[i].in_reg = c->p->c_param_args[i].in_reg;
} else {
state->param_info[i].update_in_reg = 0;
state->param_info[i].value_in_mem = 1;
state->param_info[i].in_reg = -1;
}
}
}
static void
reset_reg_state(reg_state* state)
{
int i;
for (i = 0; i < state->reg_count; i++) {
state->fpregs[i].holds = state->ipregs[i].holds = -1;
}
}
static int
update_in_reg(reg_state* s, int vreg)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
return vregs[vreg - 100].update_in_reg;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
return s->param_info[vreg].update_in_reg;
}
}
return 0;
}
static void
set_update_in_reg(reg_state* s, int vreg, int value)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
vregs[vreg - 100].update_in_reg = value;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
s->param_info[vreg].update_in_reg = value;
}
}
}
static void
set_value_in_mem(reg_state* s, int vreg, int value)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
vregs[vreg - 100].value_in_mem = value;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
s->param_info[vreg].value_in_mem = value;
}
}
}
static int
value_in_mem(reg_state* s, int vreg)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
return vregs[vreg - 100].value_in_mem;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
return s->param_info[vreg].value_in_mem;
}
}
return 0;
}
static void
set_in_reg(reg_state* s, int vreg, int value)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
vregs[vreg - 100].in_reg = value;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
s->param_info[vreg].in_reg = value;
}
}
}
static int
get_in_reg(reg_state* s, int vreg)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
return vregs[vreg - 100].in_reg;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
return s->param_info[vreg].in_reg;
} else {
return s->c->p->c_param_args[vreg].in_reg;
}
}
}
static void
set_assign_loc(reg_state* s, int vreg, int value)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
vregs[vreg - 100].assign_loc = value;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
s->param_info[vreg].assign_loc = value;
}
}
}
static int
get_assign_loc(reg_state* s, int vreg)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
return vregs[vreg - 100].assign_loc;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
return s->param_info[vreg].assign_loc;
}
}
return 0;
}
static void
set_last_use(reg_state* s, int vreg, int value)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
vregs[vreg - 100].last_use = value;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
s->param_info[vreg].last_use = value;
}
}
}
static int
get_last_use(reg_state* s, int vreg)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
return vregs[vreg - 100].last_use;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
return s->param_info[vreg].last_use;
}
}
return 0;
}
static int
get_use_metric(reg_state* s, int vreg)
{
vreg_info* vregs = s->c->p->vregs;
if (vreg >= 100) {
return vregs[vreg - 100].use_metric;
} else {
if (!s->c->p->c_param_args[vreg].is_register) {
return s->param_info[vreg].use_metric;
}
}
return 0;
}
static void
spill_current_pregs(reg_state* state)
{
dill_stream c = state->c;
basic_block bb = state->bb;
preg_info* pregs = state->ipregs;
vreg_info* vregs = state->c->p->vregs;
int i;
int a;
for (a = 0; a < 2; a++) {
if (a == 1) {
pregs = state->fpregs;
}
for (i = 0; i < state->reg_count; i++) {
int vreg = pregs[i].holds;
if (vreg >= 100) {
if (update_in_reg(state, vreg) && live_at_end(bb, vreg)) {
int offset = offset_of(c, vreg);
int typ = dill_type_of(c, vreg);
if (offset == 0xdeadbeef) {
/* not previously spilled */
/* cannot be parameter */
offset = vregs[vreg - 100].offset = dill_local(c, typ);
}
/* spill vreg to memory */
if (vreg >= 100) {
c->j->storei(c, typ, 0, i, c->dill_local_pointer,
offset);
} else {
c->j->storei(c, typ, 0, i, c->dill_param_reg_pointer,
offset);
}
set_update_in_reg(state, vreg, 0);
set_value_in_mem(state, vreg, 1);
set_in_reg(state, vreg, -1);
}
}
}
}
}
static int
select_reg(reg_state* state, int vreg, int loc, int src)
{
static int reg_debug = -1;
int ret_reg = -1;
int old_vreg = -1;
vreg_info* vregs = state->c->p->vregs;
dill_stream c = state->c;
basic_block bb = state->bb;
preg_info* pregs;
preg_info* fpregs = state->fpregs;
preg_info* ipregs = state->ipregs;
switch (dill_type_of(c, vreg)) {
case DILL_F:
case DILL_D:
pregs = state->fpregs;
break;
default:
pregs = state->ipregs;
break;
}
if (reg_debug == -1) {
reg_debug = (getenv("REG_DEBUG") != NULL);
}
if (vreg < 100) {
/* parameter */
if (c->p->c_param_args[vreg].is_register) {
return c->p->c_param_args[vreg].in_reg;
}
}
if (vreg == 100) {
return dill_lp(c);
}
if (dill_type_of(c, vreg) == DILL_B) {
/* not really using this */
return -1;
}
if (get_in_reg(state, vreg) != -1) {
ret_reg = get_in_reg(state, vreg);
set_assign_loc(state, vreg, loc);
if (!src)
set_update_in_reg(state, vreg, 1);
return ret_reg;
} else {
int preg;
struct bitv tmp_assigns[6];
int tentative_assign = -1;
init_bit_vec(&tmp_assigns[0], sizeof(tmp_assigns));
if (reg_debug)
printf("Get assignment for vreg %d\n", vreg);
while ((preg = get_tentative_assign(c, vreg, &tmp_assigns[0])) != -1) {
int used_vreg;
if (reg_debug)
printf("checking preg %d\n", preg);
if (preg >= state->reg_count) {
int i;
fpregs = realloc(fpregs, sizeof(reg_state) * (preg + 1));
ipregs = realloc(ipregs, sizeof(reg_state) * (preg + 1));
state->fpregs = fpregs;
state->ipregs = ipregs;
for (i = state->reg_count; i <= preg; i++) {
ipregs[i].holds = fpregs[i].holds = -1;
}
switch (dill_type_of(c, vreg)) {
case DILL_F:
case DILL_D:
pregs = state->fpregs;
break;
default:
pregs = state->ipregs;
break;
}
state->reg_count = preg + 1;
}
used_vreg = pregs[preg].holds;
if (used_vreg == -1) {
ret_reg = preg;
if (reg_debug)
printf("preg %d empty, assigning to vreg %d\n", preg, vreg);
break;
}
if ((get_assign_loc(state, used_vreg) == loc) && src) {
if (reg_debug)
printf("preg %d assigned to vreg %d at this loc\n", preg,
used_vreg);
continue;
}
if ((get_last_use(state, used_vreg) < loc) ||
(!src && (get_last_use(state, used_vreg) == loc))) {
ret_reg = preg;
if (reg_debug)
printf(
"preg %d assigned to vreg %d, but that vreg is done, "
"assigning\n",
preg, used_vreg);
break;
}
if (tentative_assign == -1) {
tentative_assign = preg;
if (reg_debug)
printf("preg %d is new tentative assign\n", preg);
} else if (get_use_metric(state, pregs[tentative_assign].holds) >
get_use_metric(state, used_vreg)) {
if (reg_debug)
printf("preg %d is better tentative assign\n", preg);
tentative_assign = preg;
} else {
if (reg_debug)
printf("previous assign %d was better tentative assign\n",
tentative_assign);
}
}
if (ret_reg == -1)
ret_reg = tentative_assign;
put_tentative_assigns(c, -1, &tmp_assigns[0], dill_type_of(c, vreg));
}
if (ret_reg != -1)
old_vreg = pregs[ret_reg].holds;
if (old_vreg != -1) {
/* if this is not the same as the old assignment */
if (((get_last_use(state, old_vreg) > loc) ||
live_at_end(bb, old_vreg)) &&
update_in_reg(state, old_vreg)) {
int offset = offset_of(c, old_vreg);
int typ = dill_type_of(c, old_vreg);
set_value_in_mem(state, old_vreg, 1);
set_update_in_reg(state, old_vreg, 0);
if (offset == 0xdeadbeef) {
/* not previously spilled */
offset = vregs[old_vreg - 100].offset = dill_local(c, typ);
}
/* spill vreg to memory */
if (reg_debug)
printf("Spilling vreg %d to memory, new assignment is %d\n",
old_vreg, vreg);
if (old_vreg >= 100) {
c->j->storei(c, typ, 0, ret_reg, c->dill_local_pointer, offset);
} else {
c->j->storei(c, typ, 0, ret_reg, c->dill_param_reg_pointer,
offset);
}
}
set_in_reg(state, old_vreg, -1);
}
if (src && value_in_mem(state, vreg)) {
int offset = offset_of(c, vreg);
int typ = dill_type_of(c, vreg);
if (offset == 0xdeadbeef) {
/* not previously assigned */
printf(
"Virtual register %d used as source but not previously "
"assigned \n",
vreg);
offset = 0;
}
if (reg_debug)
printf("Loading vreg %d from offset %d into preg %d\n", vreg,
offset, ret_reg);
if (vreg >= 100) {
c->j->loadi(c, typ, 0, ret_reg, c->dill_local_pointer, offset);
} else {
c->j->loadi(c, typ, 0, ret_reg, c->dill_param_reg_pointer, offset);
}
} else {
set_update_in_reg(state, vreg, 1);
}
if (ret_reg != -1)
pregs[ret_reg].holds = vreg;
set_in_reg(state, vreg, ret_reg);
set_assign_loc(state, vreg, loc);
if (src && (ret_reg == -1) && !value_in_mem(state, vreg)) {
/* special x86 no float regs case */
int offset = offset_of(c, vreg);
int typ = dill_type_of(c, vreg);
if (reg_debug)
printf("Special x86 loading vreg %d from offset %d into preg %d\n",
vreg, offset, ret_reg);
if (vreg >= 100) {
c->j->loadi(c, typ, 0, ret_reg, c->dill_local_pointer, offset);
} else {
c->j->loadi(c, typ, 0, ret_reg, c->dill_param_reg_pointer, offset);
}
}
return ret_reg;
}
static void
update_vreg_info(reg_state* s, basic_block bb, virtual_insn* ip, int loc)
{
int i;
int used[4];
insn_uses(ip, &used[0]);
used[3] = insn_defines(ip);
for (i = 0; i < 4; i++) {
if (used[i] == -1)
continue;
if (i < 3) {
set_last_use(s, used[i], loc);
}
if (value_in_mem(s, used[i]) == -1) {
set_value_in_mem(s, used[i], loc); /* first use */
}
if (used[i] >= 100) {
s->c->p->vregs[used[i] - 100].use_metric++;
} else {
if (!s->c->p->c_param_args[used[i]].is_register) {
s->param_info[used[i]].use_metric++;
}
}
}
}
static void
new_emit_insns(dill_stream c,
void* insns,
label_translation_table ltable,
virtual_mach_info vmi)
{
int label_xlate = 0;
size_t i, j = 0;
reg_state state;
if (count_verbose == -1) {
count_verbose = (getenv("DILL_COUNTS") != NULL);
}
init_reg_state(&state, c);
state.c = c;
for (j = 0; j < c->p->vreg_count; j++) {
if (dill_type_of(c, 100 + j) == DILL_B) {
/* offset is really size, fix that */
c->p->vregs[j].offset = dill_localb(c, c->p->vregs[j].offset);
}
}
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
int insn_count = (int)(bb->end - bb->start);
int insn_start;
for (j = 0; j < c->p->vreg_count; j++) {
c->p->vregs[j].assign_loc = -1;
c->p->vregs[j].in_reg = -1;
c->p->vregs[j].last_use = -1;
c->p->vregs[j].use_metric = 0;
c->p->vregs[j].update_in_reg = 0;
c->p->vregs[j].value_in_mem = -1;
}
for (j = 0; j < c->p->c_param_count; j++) {
state.param_info[j].assign_loc = -1;
state.param_info[j].in_reg = -1;
state.param_info[j].last_use = -1;
state.param_info[j].use_metric = 0;
state.param_info[j].update_in_reg = 0;
state.param_info[j].value_in_mem = -1;
}
for (j = (size_t)bb->start; j <= (size_t)bb->end; j++) {
virtual_insn* ip = &((virtual_insn*)insns)[j];
update_vreg_info(&state, bb, ip, (int)j);
}
for (j = 0; j < c->p->vreg_count; j++) {
if (get_last_use(&state, (int)j + 100) == -1)
continue;
c->p->vregs[j].use_metric *= insn_count;
c->p->vregs[j].use_metric /=
(c->p->vregs[j].last_use - c->p->vregs[j].value_in_mem + 1);
c->p->vregs[j].value_in_mem = bit_vec_is_set(bb->regs_used, (int)j);
}
for (j = 0; j < c->p->c_param_count; j++) {
if (c->p->c_param_args[j].is_register) {
state.param_info[j].update_in_reg = 0;
state.param_info[j].value_in_mem = 0;
state.param_info[j].in_reg = c->p->c_param_args[j].in_reg;
} else {
state.param_info[j].update_in_reg = 0;
state.param_info[j].value_in_mem = 1;
state.param_info[j].in_reg = -1;
}
}
reset_reg_state(&state);
if (c->dill_debug) {
printf("============= Starting basic block %zd ===========\n", i);
dump_bb(c, bb, (int)i);
}
insn_start = (int)((char*)c->p->cur_ip - (char*)c->p->code_base);
for (j = (size_t)bb->start; j <= (size_t)bb->end; j++) {
virtual_insn* ip;
int vused[3];
int vdest;
int pused[3];
int pdest = -1;
int loc;
int i;
int insn_code;
state.bb = bb;
ip = &((virtual_insn*)insns)[j];
insn_code = ip->insn_code;
loc = (int)((char*)ip - (char*)insns);
while (ltable[label_xlate].old_location == loc) {
dill_mark_label(c, ltable[label_xlate].new_label);
label_xlate++;
}
if (c->dill_debug) {
printf(" v loc(%d) ", loc);
virtual_print_insn(c, NULL, ip);
printf("\n");
}
if (j == bb->end) {
/* in case we branch out of this puppy */
spill_current_pregs(&state);
}
insn_uses(ip, &vused[0]);
vdest = insn_defines(ip);
if (state.ret_vreg != -1) {
if (c->p->vregs[state.ret_vreg - 100].last_use == j) {
/* only used here, use the ret ret */
c->p->vregs[state.ret_vreg - 100].in_reg = state.ret_reg;
} else {
int tmp = select_reg(&state, state.ret_vreg, (int)j, 0);
(c->j->mov)(c, dill_type_of(c, state.ret_vreg), 0, tmp,
state.ret_reg);
}
state.ret_vreg = -1;
}
for (i = 0; (i < 3) && (vused[i] != -1); i++) {
pused[i] = select_reg(&state, vused[i], (int)j, 1 /*src*/);
}
if (vdest != -1) {
pdest = select_reg(&state, vdest, (int)j, 0 /*dest*/);
}
if (c->dill_debug && ((vdest != -1) || (vused[0] != -1))) {
printf("\tvregs\t\t");
if (vdest != -1) {
printf(" %c%d = ", OPND(vdest));
dill_dump_reg(c, dill_type_of(c, vdest), pdest);
printf("(%d) - ", pdest);
}
for (i = 0; (i < 3) && (vused[i] != -1); i++) {
printf(" %c%d = ", OPND(vused[i]));
dill_dump_reg(c, dill_type_of(c, vused[i]), pused[i]);
printf("(%d) - ", pused[i]);
}
printf("\n");
}
switch (ip->class_code) {
case iclass_arith3:
/* arith 3 operand integer insns */
(c->j->jmp_a3)[insn_code](c, c->j->a3_data[insn_code].data1,
c->j->a3_data[insn_code].data2, pdest,
pused[0], pused[1]);
break;
case iclass_compare:
(c->j->jmp_c)[insn_code](c, c->j->c_data[insn_code].data1,
c->j->c_data[insn_code].data2, pdest,
pused[0], pused[1]);
break;
case iclass_arith2:
(c->j->jmp_a2)[insn_code](c, c->j->a2_data[insn_code].data1,
c->j->a2_data[insn_code].data2, pdest,
pused[0]);
break;
case iclass_arith3i:
/* arith 3 immediate operand integer insns */
(c->j->jmp_a3i)[insn_code](c, c->j->a3i_data[insn_code].data1,
c->j->a3i_data[insn_code].data2,
pdest, pused[0],
ip->opnds.a3i.u.imm);
break;
case iclass_ret:
(c->j->ret)(c, ip->insn_code, 0, pused[0]);
break;
case iclass_convert:
/* conversion insns */
(c->j->convert)(c, (ip->insn_code >> 4) & 0xf,
ip->insn_code & 0xf, pdest, pused[0]);
break;
case iclass_loadstore: {
/* load/store 3 operand integer insns */
int store = ((ip->insn_code & 0x10) == 0x10);
int bswap = ((ip->insn_code & 0x20) == 0x20);
int typ = ip->insn_code & 0xf;
if (store == 0) {
if (bswap) {
(c->j->bsload)(c, typ, 0, pdest, pused[0], pused[1]);
} else {
(c->j->load)(c, typ, 0, pdest, pused[0], pused[1]);
}
} else {
(c->j->store)(c, typ, 0, pused[2], pused[0], pused[1]);
}
} break;
case iclass_lea: {
int offset = (int)ip->opnds.a3i.u.imm + offset_of(c, vused[0]);
int add_code = dill_jmp_addp;
if (offset == 0) {
c->j->mov(c, DILL_P, 0, pdest, dill_lp(c));
} else {
(c->j->jmp_a3i)[add_code](c, c->j->a3i_data[add_code].data1,
c->j->a3i_data[add_code].data2,
pdest, dill_lp(c), offset);
}
break;
}
case iclass_loadstorei:
/* load store immediate operand integer insns */
if ((ip->insn_code & 0x10) == 0) {
if ((ip->insn_code & 0x20) == 0x20) {
(c->j->bsloadi)(c, ip->insn_code & 0xf, 0, pdest,
pused[0], ip->opnds.a3i.u.imm);
} else {
(c->j->loadi)(c, ip->insn_code & 0xf, 0, pdest,
pused[0], ip->opnds.a3i.u.imm);
}
} else {
/* a store, dest is the source of the store */
(c->j->storei)(c, ip->insn_code & 0xf, 0, pused[1],
pused[0], ip->opnds.a3i.u.imm);
}
break;
case iclass_set:
/* load store immediate operand integer insns */
(c->j->set)(c, ip->insn_code & 0xf, 0, pdest,
ip->opnds.a3i.u.imm);
break;
case iclass_setf:
(c->j->setf)(c, ip->insn_code & 0xf, 0, pdest,
ip->opnds.sf.imm);
break;
case iclass_mov:
(c->j->mov)(c, ip->insn_code & 0xf, 0, pdest, pused[0]);
break;
case iclass_reti:
/* return immediate integer insns */
(c->j->reti)(c, ip->insn_code & 0xf, 0, ip->opnds.a3i.u.imm);
break;
case iclass_branch: {
/* branch */
int br_op = ip->insn_code;
int label = get_new_label(ip->opnds.br.label, ltable);
(c->j->jmp_b)[br_op](c, c->j->b_data[br_op].data1,
c->j->b_data[br_op].data2, pused[0],
pused[1], label);
} break;
case iclass_branchi: {
/* branch immediate */
int br_op = ip->insn_code;
int label = get_new_label(ip->opnds.bri.label, ltable);
intptr_t imm = ip->opnds.bri.imm_l;
(c->j->jmp_bi)[br_op](c, c->j->b_data[br_op].data1,
c->j->b_data[br_op].data2, pused[0], imm,
label);
} break;
case iclass_jump_to_label: {
/* branch immediate */
int label = get_new_label(ip->opnds.br.label, ltable);
dill_jv(c, label);
} break;
case iclass_jump_to_reg:
dill_jp(c, pused[0]);
break;
case iclass_jump_to_imm:
dill_jpi(c, ip->opnds.bri.imm_a);
break;
case iclass_special:
dill_special(c, ip->opnds.spec.type, ip->opnds.spec.param);
break;
case iclass_call: {
int reg = ip->insn_code & 0x10;
int typ = ip->insn_code & 0xf;
int rr;
if (reg != 0) {
rr = dill_pcallr(c, typ, pused[0]);
} else {
rr = dill_pcall(c, typ, ip->opnds.calli.imm_a,
ip->opnds.calli.xfer_name);
}
state.ret_reg = rr;
state.ret_vreg = vdest;
pushpop_inuse_regs(c, 1, ip);
} break;
case iclass_push: {
int typ = ip->insn_code & 0xf;
if ((short)ip->opnds.a1.src < 0) {
pushpop_inuse_regs(c, 0, ip);
dill_push_arg(c, typ, (short)ip->opnds.a1.src);
} else {
dill_push_arg(c, typ, pused[0]);
}
} break;
case iclass_pushi: {
int typ = ip->insn_code & 0xf;
if (typ == DILL_P) {
void* imm = ip->opnds.a3i.u.imm_a;
dill_push_argpi(c, imm);
} else {
intptr_t imm = ip->opnds.a3i.u.imm;
dill_push_argii(c, imm);
}
break;
}
case iclass_pushf:
c->j->pushfi(c, ip->insn_code & 0xf, ip->opnds.sf.imm);
break;
case iclass_nop:
break;
case iclass_mark_label:
break;
}
if ((pdest == -1) && (vdest != -1)) {
/* special x86 no float regs case */
int offset = offset_of(c, vdest);
int typ = dill_type_of(c, vdest);
set_value_in_mem(&state, vdest, 1);
set_update_in_reg(&state, vdest, 0);
if (offset == 0xdeadbeef) {
/* not previously spilled */
offset = c->p->vregs[vdest - 100].offset =
dill_local(c, typ);
}
/* spill vreg to memory */
if (vdest >= 100) {
c->j->storei(c, typ, 0, -1, c->dill_local_pointer, offset);
} else {
c->j->storei(c, typ, 0, -1, c->dill_param_reg_pointer,
offset);
}
set_in_reg(&state, vdest, -1);
state.ret_vreg = -1;
}
}
spill_current_pregs(&state);
if (count_verbose) {
int insn_end = (int)((char*)c->p->cur_ip - (char*)c->p->code_base);
printf(
"Basic Block %zd, %d virtual instructions, %d physical "
"instructions\n",
i, insn_count, c->j->count_insn(c, insn_start, insn_end));
}
}
if ((unsigned)ltable[label_xlate].old_location ==
j * sizeof(virtual_insn)) {
dill_mark_label(c, ltable[label_xlate].new_label);
label_xlate++;
}
if (ltable[label_xlate].old_location != -1) {
int loc = (int)((char*)&((virtual_insn*)insns)[j] - ((char*)insns));
while (ltable[label_xlate].old_location == loc) {
dill_mark_label(c, ltable[label_xlate].new_label);
label_xlate++;
}
if (ltable[label_xlate].old_location != -1) {
printf("Some labels2 (%d, old loc %d name \"%s\") not placed\n",
label_xlate, ltable[label_xlate].old_location,
c->p->branch_table
.label_name[ltable[label_xlate].old_location]);
}
}
free(state.fpregs);
free(state.ipregs);
free(state.param_info);
}
static void
apply_to_each(dill_stream c,
void* insns,
virtual_mach_info vmi,
apply_func func)
{
size_t i, j = 0;
for (i = 0; i < vmi->bbcount; i++) {
basic_block bb = &vmi->bblist[i];
for (j = (size_t)bb->start; j <= (size_t)bb->end; j++) {
(func)(c, bb, insns, (int)j);
}
}
}
static int
const_prop_ip(dill_stream c,
basic_block bb,
virtual_insn* ip,
virtual_insn* set_ip,
int one_only)
{
int set_vreg = set_ip->opnds.a3i.dest;
int set_typ = set_ip->insn_code & 0xf;
int found = 0;
union {
intptr_t imm;
char* imm_a;
} set;
set.imm = set_ip->opnds.a3i.u.imm;
set.imm_a = set_ip->opnds.a3i.u.imm_a;
switch (ip->class_code) {
case iclass_arith3: {
/* arith 3 operand integer insns */
int dest_vreg = ip->opnds.a3.dest;
int src1_vreg = ip->opnds.a3.src1;
int src2_vreg = ip->opnds.a3.src2;
int insn_code = ip->insn_code;
if ((src1_vreg == set_vreg) && is_commutative(insn_code)) {
src2_vreg = ip->opnds.a3.src1;
src1_vreg = ip->opnds.a3.src2;
}
if (src2_vreg == set_vreg) {
int typ = ip->insn_code & 0xf;
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_arith3i;
ip->opnds.a3i.dest = dest_vreg;
ip->opnds.a3i.src = src1_vreg;
if (typ != DILL_P) {
ip->opnds.a3i.u.imm = set.imm;
} else {
ip->opnds.a3i.u.imm_a = set.imm_a;
}
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_arith2: {
/* arith 2 operand integer insns */
int dest_vreg = ip->opnds.a2.dest;
int src_vreg = ip->opnds.a2.src;
int insn_code = ip->insn_code;
if (src_vreg == set_vreg) {
int typ = ip->insn_code & 0xf;
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_set;
ip->opnds.a3i.dest = dest_vreg;
switch (insn_code) {
case dill_jmp_negi:
case dill_jmp_negu:
case dill_jmp_negl:
case dill_jmp_negul:
set.imm = -set.imm;
break;
case dill_jmp_comi:
case dill_jmp_comu:
case dill_jmp_coml:
case dill_jmp_comul:
set.imm = ~set.imm;
break;
case dill_jmp_noti:
case dill_jmp_notu:
case dill_jmp_notl:
case dill_jmp_notul:
set.imm = !set.imm;
break;
default:
assert(0);
break;
}
if (typ != DILL_P) {
ip->opnds.a3i.u.imm = set.imm;
} else {
ip->opnds.a3i.u.imm_a = set.imm_a;
}
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
break;
}
case iclass_arith3i: {
/* arith 3 immediate operand integer insns */
int dest_vreg = ip->opnds.a3i.dest;
int src_vreg = ip->opnds.a3i.src;
int insn_code = ip->insn_code;
union {
intptr_t imm;
char* imm_a;
} u;
u.imm = ip->opnds.a3i.u.imm;
u.imm_a = ip->opnds.a3i.u.imm_a;
if (src_vreg == set_vreg) {
int typ = ip->insn_code & 0xf;
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
switch (insn_code) {
case dill_jmp_addi:
case dill_jmp_addu:
case dill_jmp_addul:
case dill_jmp_addl:
set.imm = set.imm + u.imm;
break;
case dill_jmp_addp:
set.imm_a = set.imm_a + u.imm;
typ = DILL_P;
break;
case dill_jmp_subi:
case dill_jmp_subu:
case dill_jmp_subul:
case dill_jmp_subl:
set.imm = set.imm - u.imm;
break;
case dill_jmp_subp:
set.imm_a = set.imm_a - u.imm;
typ = DILL_P;
break;
case dill_jmp_muli:
case dill_jmp_mulu:
case dill_jmp_mulul:
case dill_jmp_mull:
set.imm = set.imm * u.imm;
break;
case dill_jmp_divi:
case dill_jmp_divu:
case dill_jmp_divul:
case dill_jmp_divl:
set.imm = set.imm / u.imm;
break;
case dill_jmp_modi:
case dill_jmp_modu:
case dill_jmp_modul:
case dill_jmp_modl:
set.imm = set.imm % u.imm;
break;
case dill_jmp_xori:
case dill_jmp_xoru:
case dill_jmp_xorul:
case dill_jmp_xorl:
set.imm = set.imm ^ u.imm;
break;
case dill_jmp_andi:
case dill_jmp_andu:
case dill_jmp_andul:
case dill_jmp_andl:
set.imm = set.imm & u.imm;
break;
case dill_jmp_ori:
case dill_jmp_oru:
case dill_jmp_orul:
case dill_jmp_orl:
set.imm = set.imm | u.imm;
break;
case dill_jmp_lshi:
case dill_jmp_lshu:
case dill_jmp_lshul:
case dill_jmp_lshl:
set.imm = set.imm << u.imm;
break;
case dill_jmp_rshi:
case dill_jmp_rshu:
case dill_jmp_rshul:
case dill_jmp_rshl:
set.imm = set.imm >> u.imm;
break;
default:
assert(0);
}
ip->insn_code = typ;
ip->class_code = iclass_set;
ip->opnds.a3i.dest = dest_vreg;
if (typ != DILL_P) {
ip->opnds.a3i.u.imm = set.imm;
} else {
ip->opnds.a3i.u.imm_a = set.imm_a;
}
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_ret: {
/* arith operand integer insns */
int src_vreg = ip->opnds.a1.src;
if (src_vreg == set_vreg) {
int typ = ip->insn_code & 0xf;
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_reti;
ip->insn_code = set_typ;
if (typ != DILL_P) {
ip->opnds.a3i.u.imm = set.imm;
} else {
ip->opnds.a3i.u.imm_a = set.imm_a;
}
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_convert: {
/* conversion insns */
int dest_vreg = ip->opnds.a2.dest;
int src_vreg = ip->opnds.a2.src;
int from_type = (ip->insn_code >> 4) & 0xf;
int to_type = ip->insn_code & 0xf;
if (src_vreg == set_vreg) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_set;
ip->insn_code = to_type;
switch (to_type) {
case DILL_C:
ip->opnds.a3i.u.imm = (char)set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_S:
ip->opnds.a3i.u.imm = (short)set.imm;
ip->opnds.a3i.dest = dest_vreg;
case DILL_I:
case DILL_L:
ip->opnds.a3i.u.imm = set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_UC:
ip->opnds.a3i.u.imm = (unsigned char)set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_US:
ip->opnds.a3i.u.imm = (unsigned short)set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_U:
ip->opnds.a3i.u.imm = (unsigned)set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_UL:
ip->opnds.a3i.u.imm = (uintptr_t)set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_P:
ip->class_code = iclass_set;
ip->insn_code = DILL_P;
ip->opnds.a3i.u.imm_a = (void*)set.imm;
ip->opnds.a3i.dest = dest_vreg;
break;
case DILL_F:
case DILL_D:
ip->class_code = iclass_setf;
ip->insn_code = to_type;
ip->opnds.sf.dest = dest_vreg;
switch (from_type) {
case DILL_UC:
case DILL_US:
case DILL_U:
case DILL_UL:
ip->opnds.sf.imm = (double)(uintptr_t)set.imm;
break;
default:
ip->opnds.sf.imm = (double)set.imm;
break;
}
}
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_loadstore: {
/* load/store 3 operand integer insns */
int dest_vreg = ip->opnds.a3.dest;
int src1_vreg = ip->opnds.a3.src1;
int src2_vreg = ip->opnds.a3.src2;
if (set_vreg == src1_vreg) {
/* we only optimize src2_VREG, switch them */
/* load store is commutative */
src1_vreg = ip->opnds.a3.src2;
src2_vreg = ip->opnds.a3.src1;
}
if (src2_vreg == set_vreg) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_loadstorei;
ip->opnds.a3i.dest = dest_vreg;
ip->opnds.a3i.src = src1_vreg;
ip->opnds.a3i.u.imm = set.imm;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_loadstorei:
break;
case iclass_lea:
break;
case iclass_set:
break;
case iclass_setf:
break;
case iclass_mov: {
/* mov insns */
int dest_vreg = ip->opnds.a2.dest;
int src_vreg = ip->opnds.a2.src;
if (src_vreg == set_vreg) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_set;
ip->opnds.a3i.dest = dest_vreg;
ip->opnds.a3i.u.imm = set.imm;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_compare:
case iclass_reti:
break;
case iclass_branch: {
/* branch */
int label = ip->opnds.br.label;
int src1_vreg = ip->opnds.br.src1;
int src2_vreg = ip->opnds.br.src2;
/* int br_op = ip->insn_code;
if (last_dest_vreg == src2_vreg) {
# we should do this is we reverse the
sense of the branch * src1_vreg = ip->opnds.br.src2; src2_vreg =
ip->opnds.br.src1;
}
*/
if (src2_vreg == set_vreg) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_branchi;
ip->opnds.bri.src = src1_vreg;
ip->opnds.bri.label = label;
ip->opnds.bri.imm_l = set.imm;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_branchi:
break;
case iclass_jump_to_label:
break;
case iclass_jump_to_reg:
break;
case iclass_jump_to_imm:
break;
case iclass_special:
break;
case iclass_call:
break;
case iclass_push: {
int src1_vreg = ip->opnds.a1.src;
if (src1_vreg == set_vreg) {
int typ = ip->insn_code & 0xf;
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->class_code = iclass_pushi;
if (typ != DILL_P) {
ip->opnds.a3i.u.imm = set.imm;
} else {
ip->opnds.a3i.u.imm_a = set.imm_a;
}
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
found++;
}
} break;
case iclass_pushi:
break;
case iclass_pushf:
break;
case iclass_nop:
break;
case iclass_mark_label:
break;
}
if (found) {
if (set_vreg >= 100) {
c->p->vregs[set_vreg - 100].use_info.use_count--;
}
if (c->p->vregs[set_vreg - 100].use_info.use_count == 0) {
set_ip->class_code = iclass_nop;
set_unused(c, bb, set_vreg);
}
}
return found;
}
static int
is_convert_noop(int insn_code)
{
int from_type = (insn_code >> 4) & 0xf;
int to_type = insn_code & 0xf;
/* GSE -bug This test should be for *generated* target, not host */
if (sizeof(long) != sizeof(int)) {
return 0;
} else {
switch (from_type) {
case DILL_I:
case DILL_U:
case DILL_L:
case DILL_UL:
switch (to_type) {
case DILL_I:
case DILL_U:
case DILL_L:
case DILL_UL:
return 1;
}
}
}
return 0;
}
static void
do_const_prop(dill_stream c, basic_block bb, virtual_insn* insns, int loc)
{
virtual_insn* set_ip = &((virtual_insn*)insns)[loc];
if ((set_ip->class_code == iclass_set) &&
has_single_def_use(c, set_ip->opnds.a3i.dest)) {
int found = 0;
int k;
if (c->dill_debug) {
printf(" Forward propagating ");
virtual_print_insn(c, NULL, set_ip);
printf("\n");
}
for (k = loc + 1; ((k <= bb->end) && (!found)); k++) {
virtual_insn* ip = &((virtual_insn*)insns)[k];
found = const_prop_ip(c, bb, ip, set_ip, 1);
}
} else if (set_ip->class_code == iclass_set) {
int k;
int vdest = insn_defines(set_ip);
if (c->dill_debug) {
printf(" Forward propagating const ");
virtual_print_insn(c, NULL, set_ip);
printf("\n");
}
for (k = loc + 1; ((k <= bb->end) &&
(vdest != insn_defines(&((virtual_insn*)insns)[k])));
k++) {
virtual_insn* ip = &((virtual_insn*)insns)[k];
const_prop_ip(c, bb, ip, set_ip, 0);
}
if (k <= bb->end) {
/* if we ended in insn_defines, substitute the one that defines it
*/
const_prop_ip(c, bb, &((virtual_insn*)insns)[k], set_ip, 0);
}
} else if (((set_ip->class_code == iclass_mov) ||
((set_ip->class_code == iclass_convert) &&
is_convert_noop(set_ip->insn_code))) &&
has_single_def_use(c, set_ip->opnds.a2.src)) {
/* back propagate move */
int mov_src = set_ip->opnds.a2.src;
int mov_dest = set_ip->opnds.a2.dest;
int found = 0;
int k;
if (c->dill_debug) {
printf(" mov propagating ");
virtual_print_insn(c, NULL, set_ip);
printf("\n");
}
for (k = loc - 1; ((k > bb->start) && (!found)); k--) {
virtual_insn* ip = &((virtual_insn*)insns)[k];
switch (ip->class_code) {
case iclass_arith3: {
/* arith 3 operand integer insns */
int dest_vreg = ip->opnds.a3.dest;
if (dest_vreg == mov_src) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->opnds.a3i.dest = mov_dest;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
set_ip->class_code = iclass_nop;
set_unused(c, bb, mov_src);
found++;
}
} break;
case iclass_arith2: {
/* arith 2 operand integer insns */
int dest_vreg = ip->opnds.a2.dest;
if (dest_vreg == mov_src) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->opnds.a2.dest = mov_dest;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
set_ip->class_code = iclass_nop;
set_unused(c, bb, mov_src);
found++;
}
break;
}
case iclass_arith3i: {
/* arith 3 immediate operand integer insns */
int dest_vreg = ip->opnds.a3i.dest;
if (dest_vreg == mov_src) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->opnds.a3i.dest = mov_dest;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
set_ip->class_code = iclass_nop;
set_unused(c, bb, mov_src);
found++;
}
} break;
case iclass_ret:
break;
case iclass_convert: {
/* conversion insns */
int dest_vreg = ip->opnds.a2.dest;
if (dest_vreg == mov_src) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->opnds.a2.dest = mov_dest;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
set_ip->class_code = iclass_nop;
set_unused(c, bb, mov_src);
found++;
}
} break;
case iclass_loadstore: {
int store = ((ip->insn_code & 0x10) == 0x10);
/* load/store 3 operand integer insns */
int dest_vreg = ip->opnds.a3.dest;
if (!store && (dest_vreg == mov_src)) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->opnds.a3i.dest = mov_src;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
set_ip->class_code = iclass_nop;
set_unused(c, bb, mov_src);
found++;
}
} break;
case iclass_loadstorei:
break;
case iclass_lea:
break;
case iclass_set:
break;
case iclass_setf:
break;
case iclass_mov: {
/* mov insns */
int dest_vreg = ip->opnds.a2.dest;
if (dest_vreg == mov_src) {
if (c->dill_debug) {
printf(" Replacing ");
virtual_print_insn(c, NULL, ip);
printf(" with ");
}
ip->opnds.a2.dest = mov_dest;
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
set_ip->class_code = iclass_nop;
set_unused(c, bb, mov_src);
found++;
}
} break;
case iclass_reti:
case iclass_branch:
case iclass_branchi:
case iclass_compare:
case iclass_jump_to_label:
case iclass_jump_to_reg:
case iclass_jump_to_imm:
case iclass_special:
case iclass_call:
case iclass_push:
case iclass_pushi:
case iclass_pushf:
case iclass_nop:
case iclass_mark_label:
break;
}
}
}
}
static void
const_propagation(dill_stream c, void* insns, virtual_mach_info vmi)
{
apply_to_each(c, insns, vmi, do_const_prop);
}
static void
do_com_sub_exp(dill_stream c, basic_block bb, virtual_insn* insns, int loc)
{
virtual_insn* root_insn = &((virtual_insn*)insns)[loc];
int def_vreg = insn_defines(root_insn);
int do_ldi0_optim = 0;
int k;
int stop = 0;
int used_vregs[3];
int root_is_load;
if (def_vreg == -1)
return;
insn_uses(root_insn, &used_vregs[0]);
if (used_vregs[0] == -1)
return;
if ((root_insn->class_code == iclass_arith3) &&
(root_insn->insn_code == dill_jmp_addp))
do_ldi0_optim = 1;
if (def_vreg != -1) {
if ((used_vregs[0] == def_vreg) || (used_vregs[1] == def_vreg) ||
(used_vregs[2] == def_vreg))
return;
}
/*
* see if we can find an instruction just like (
* except for dest) this ahead
*/
if (c->dill_debug) {
printf("Try to replace %d ", loc);
virtual_print_insn(c, NULL, root_insn);
printf("\n");
}
root_is_load = (((root_insn->class_code == iclass_loadstorei) ||
(root_insn->class_code == iclass_loadstore)) &&
(((root_insn->insn_code & 0x10) == 0x10) == 0));
for (k = loc + 1; ((k <= bb->end) && (!stop)); k++) {
virtual_insn* ip = &((virtual_insn*)insns)[k];
int replace_vreg = insn_defines(ip);
int l, stop2, insn_is_store;
/* stop looking if old dest is wiped */
if (insn_define_test(ip, def_vreg))
stop++;
/* stop looking if srcs become different */
if (insn_define_test(ip, used_vregs[0]))
stop++;
if ((used_vregs[1] != -1) && insn_define_test(ip, used_vregs[1]))
stop++;
if ((used_vregs[2] != -1) && insn_define_test(ip, used_vregs[2]))
stop++;
/* stop looking if this is a load and we're about to pass a store */
insn_is_store = (((ip->class_code == iclass_loadstorei) ||
(ip->class_code == iclass_loadstore)) &&
((ip->insn_code & 0x10) == 0x10));
if (root_is_load && insn_is_store)
stop++;
if (do_ldi0_optim && (ip->class_code == iclass_loadstorei) &&
(ip->opnds.a3i.src == def_vreg) && (ip->opnds.a3i.u.imm == 0)) {
int use_target = 1;
/*
* we've found a load immediate with an imm of 0 and with
* a source that is the result of a prior add
* combine them.
*/
if (def_vreg == used_vregs[0])
use_target++;
if (def_vreg == used_vregs[1])
use_target++;
if ((use_target != 0) &&
(c->p->vregs[def_vreg - 100].use_info.use_count !=
use_target)) {
continue;
}
if (c->dill_debug) {
printf("load opt, changing - ");
virtual_print_insn(c, NULL, ip);
printf(" - to - ");
}
ip->class_code = iclass_loadstore;
ip->opnds.a3.dest = ip->opnds.a3i.dest;
ip->opnds.a3.src1 = used_vregs[0];
ip->opnds.a3.src2 = used_vregs[1];
if (c->dill_debug) {
virtual_print_insn(c, NULL, ip);
printf("\n");
}
if (def_vreg >= 100) {
c->p->vregs[def_vreg - 100].use_info.use_count--;
}
if (c->p->vregs[def_vreg - 100].use_info.use_count ==
(use_target - 1)) {
c->p->vregs[def_vreg - 100].use_info.def_count--;
if (c->dill_debug) {
printf("load opt eliminating - ");
virtual_print_insn(c, NULL, root_insn);
printf("\n");
}
root_insn->class_code = iclass_nop;
continue;
}
}
if (replace_vreg == -1)
continue;
if (insn_use_test(ip, def_vreg))
do_ldi0_optim = 0;
/*
* insn is the same except for dest, make it a noop
* and fixup uses of replace_vreg going forward
*/
if (!insn_same_except_dest(ip, root_insn))
continue;
if (live_at_end(bb, replace_vreg))
continue;
if (c->dill_debug) {
printf("eliminating - - %d - ", k);
virtual_print_insn(c, NULL, ip);
printf("\n");
}
if (ip->class_code == iclass_loadstore) {
if (k > loc + 1) {
virtual_insn* previous_ip = &((virtual_insn*)insns)[k - 1];
if ((previous_ip->class_code == iclass_special) &&
(previous_ip->opnds.spec.type == DILL_SEGMENTED_FOLLOWS)) {
/*
* We're eliminating a loadstore and previous was a
* special SEGMENTED_FOLLOWS, kill the special too.
*/
previous_ip->class_code = iclass_nop;
}
}
}
ip->class_code = iclass_nop;
stop2 = 0;
for (l = k + 1; ((l <= bb->end) && (!stop2)); l++) {
virtual_insn* sub_ip = &((virtual_insn*)insns)[l];
if (insn_define_test(sub_ip, replace_vreg)) {
stop2++;
}
if (!insn_use_test(sub_ip, replace_vreg))
continue;
if (c->dill_debug) {
printf(" Reg %d forward subst - Replacing %d ", def_vreg, l);
virtual_print_insn(c, NULL, sub_ip);
printf(" with ");
}
replace_insn_src(sub_ip, replace_vreg, def_vreg);
set_used(c, def_vreg);
if (c->dill_debug) {
virtual_print_insn(c, NULL, sub_ip);
printf("\n");
}
}
}
if (c->dill_debug) {
printf("stopped \n");
}
}
static void
CSE_elimination(dill_stream c, void* insns, virtual_mach_info vmi)
{
apply_to_each(c, insns, vmi, do_com_sub_exp);
}
static void
kill_dead(dill_stream c, basic_block bb, virtual_insn* insns, int loc)
{
virtual_insn* root_insn = &((virtual_insn*)insns)[loc];
int def_vreg = insn_defines(root_insn);
int k;
int stop = 0;
if (root_insn->class_code == iclass_call)
return;
if (def_vreg >= 100) {
if (c->p->vregs[def_vreg - 100].use_info.use_count == 0) {
root_insn->class_code = iclass_nop;
set_unused(c, bb, def_vreg);
}
}
for (k = loc + 1; ((k <= bb->end) && (!stop)); k++) {
virtual_insn* ip = &((virtual_insn*)insns)[k];
int used_vregs[3];
insn_uses(ip, &used_vregs[0]);
if ((def_vreg == used_vregs[0]) || (def_vreg == used_vregs[1]) ||
(def_vreg == used_vregs[2])) {
stop++;
} else {
if (insn_defines(ip) == def_vreg) {
/* got another define before a use, kill the first */
root_insn->class_code = iclass_nop;
stop++;
}
}
}
}
static void
kill_dead_regs(dill_stream c, void* insns, virtual_mach_info vmi)
{
apply_to_each(c, insns, vmi, kill_dead);
/* kill unused arguments */
while ((c->p->c_param_count > 0) &&
(c->p->c_param_args[c->p->c_param_count - 1].used == 0)) {
c->p->c_param_count--;
}
}
extern void
virtual_proc_start(dill_stream c,
char* subr_name,
int arg_count,
arg_info_list args,
dill_reg* arglist)
{
int i;
virtual_mach_info vmi = (virtual_mach_info)c->p->mach_info;
vmi->arg_info = args;
vmi->prefix_code_start = -1;
for (i = 0; i < arg_count; i++) {
c->p->c_param_args[i].in_reg = i;
}
}
extern void
dill_virtual_init(dill_stream c);
static void
fill_label_translation(dill_stream c, label_translation_table lt)
{
int i = 0;
while (lt[i].old_label != -1) {
lt[i].new_label = dill_alloc_label(c, NULL);
i++;
}
}
static label_translation_table
build_label_translation(dill_stream c)
{
int i;
int label_count = c->p->branch_table.next_label;
label_translation_table l =
malloc(sizeof(struct label_translation) * (label_count + 1));
for (i = 0; i < label_count; i++) {
l[i].old_label = i;
l[i].old_location = c->p->branch_table.label_locs[i];
}
/* Good old reliable insertion sort */
{
int i, curIdx;
struct label_translation tmp;
for (curIdx = 0; curIdx < label_count; curIdx++) {
for (i = curIdx + 1; i < label_count; i++) {
if (l[curIdx].old_location > l[i].old_location) {
/* swap them */
tmp = l[curIdx];
l[curIdx] = l[i];
l[i] = tmp;
}
}
}
}
l[label_count].old_location = -1;
l[label_count].old_label = -1;
l[label_count].new_label = -1;
return l;
}
static int
virtual_insn_count(dill_stream c)
{
virtual_insn* insn = (virtual_insn*)c->p->code_base;
int count = 0;
for (; insn < (virtual_insn*)c->p->cur_ip; insn++) {
if (insn->class_code != iclass_nop)
count++;
}
return count;
}
void
init_code_block(dill_stream s);
extern void
virtual_reti(dill_stream s, int type, int junk, IMM_TYPE imm);
extern void
dill_begin_prefix_code(dill_stream s)
{
virtual_mach_info vmi = (virtual_mach_info)s->p->mach_info;
/* have to be in virtual mode */
assert(s->j->proc_start == (dill_mach_proc_start)virtual_proc_start);
/* insert a return, so we don't fall into prefix code */
virtual_reti(s, DILL_I, 0, 0);
vmi->prefix_code_start =
(int)(s->p->cur_ip - s->p->code_base) / sizeof(virtual_insn);
}
static dill_foreign_cg_func dill_foreign_cg = NULL;
extern void
dill_set_foreign_cg(dill_foreign_cg_func foreign)
{
dill_foreign_cg = foreign;
}
static void
virtual_do_end(dill_stream s, int package)
{
static int no_optimize = -1;
static int dill_verbose = -1;
static int old_reg_alloc = -1;
static int do_emulation = -1;
virtual_mach_info vmi = (virtual_mach_info)s->p->mach_info;
void* insns = s->p->code_base;
void* code_end = s->p->cur_ip;
void* prefix_begin =
(char*)insns + (vmi->prefix_code_start * sizeof(virtual_insn));
;
label_translation_table ltable;
int virtual_local_pointer = s->dill_local_pointer;
if (dill_verbose == -1) {
dill_verbose = (getenv("DILL_VERBOSE") != NULL);
no_optimize = (getenv("DILL_NOOPTIMIZE") != NULL);
old_reg_alloc = (getenv("DILL_OLD_REGS") != NULL);
do_emulation = (getenv("DILL_DO_EMULATION") != NULL);
#ifdef EMULATION_ONLY
do_emulation = 1;
#endif
}
s->p->virtual.code_base = s->p->code_base;
if (vmi->prefix_code_start == -1)
prefix_begin = code_end;
build_bbs(s, insns, prefix_begin, code_end);
if (!no_optimize) {
if (count_verbose == -1) {
count_verbose = (getenv("DILL_COUNTS") != NULL);
}
if (count_verbose == 1) {
printf("Prior to optimization, %d non-null virtual insns\n",
virtual_insn_count(s));
}
const_propagation(s, insns, vmi);
if (count_verbose == 1) {
printf("After constant propagation, %d non-null virtual insns\n",
virtual_insn_count(s));
}
CSE_elimination(s, insns, vmi);
if (count_verbose == 1) {
printf(
"After duplicate instruction elimination (CSE-lite), %d "
"non-null virtual insns\n",
virtual_insn_count(s));
}
reset_use_def_count(s, insns, vmi);
kill_dead_regs(s, insns, vmi);
}
if (dill_verbose) {
dump_bbs(s);
s->dill_debug = 1;
}
s->p->virtual.mach_jump = s->j;
s->p->virtual.mach_reset = s->p->mach_reset;
s->p->virtual.mach_info = s->p->mach_info;
s->p->virtual.code_base = s->p->code_base;
s->p->virtual.cur_ip = s->p->cur_ip;
s->p->virtual.code_limit = s->p->code_limit;
if (do_emulation) {
#ifdef BUILD_EMULATOR
/* do a return, just in case it's missing */
if (vmi->prefix_code_start == -1) {
dill_retii(s, 0);
s->p->virtual.cur_ip = s->p->cur_ip;
}
setup_VM_proc(s);
#endif
free_bbs(vmi);
s->p->mach_reset = dill_virtual_init;
} else if (dill_foreign_cg) {
(dill_foreign_cg)(s, (virtual_insn*)s->p->code_base,
(virtual_insn*)s->p->cur_ip);
} else {
s->j = s->p->native.mach_jump;
s->p->mach_reset = s->p->native.mach_reset;
s->p->mach_info = s->p->native.mach_info;
s->p->code_base = s->p->native.code_base;
s->p->native.code_base = NULL;
s->p->native.mach_info = NULL;
if (s->p->code_base == NULL) {
init_code_block(s);
s->p->native.code_base = s->p->code_base;
s->p->native.code_limit = s->p->code_limit;
}
s->p->cur_ip = s->p->code_base;
s->p->code_limit = s->p->native.code_limit;
s->p->native_mach_reset(s);
ltable = build_label_translation(s);
(s->j->proc_start)(s, "no name", s->p->c_param_count, vmi->arg_info,
(void*)0);
fill_label_translation(s, ltable);
if (old_reg_alloc) {
do_register_assign(s, insns, code_end, virtual_local_pointer, vmi);
emit_insns(s, insns, ltable, vmi);
} else {
new_emit_insns(s, insns, ltable, vmi);
}
free_bbs(vmi);
free(ltable);
if (package) {
s->j->package_end(s);
} else {
dill_exec_handle h;
h = dill_finalize(s);
dill_free_handle(h);
}
s->j = s->p->native.mach_jump;
s->p->native.mach_reset = s->p->mach_reset;
s->p->native.mach_info = s->p->mach_info;
s->p->native.code_base = s->p->code_base;
s->p->native.cur_ip = s->p->cur_ip;
s->p->native.code_limit = s->p->code_limit;
if (!package)
s->p->code_base = NULL;
s->p->mach_info = NULL;
s->p->mach_reset = dill_virtual_init;
}
if (dill_verbose) {
dill_dump(s);
}
}
extern void
virtual_end(dill_stream c)
{
virtual_do_end(c, 0 /* package */);
}
extern void
virtual_package_end(dill_stream c)
{
virtual_do_end(c, 1 /* package */);
}
extern dill_exec_ctx
dill_get_exec_context(dill_stream c)
{
dill_exec_ctx ec = malloc(sizeof(struct dec));
int vreg_count = c->p->vreg_count + 1; /* always at least 1 */
int j;
memset(ec, 0, sizeof(struct dec));
ec->dc = c;
if (vreg_count < 1)
vreg_count = 1;
ec->r = malloc(sizeof(ec->r[0]) * vreg_count);
if (c->p->save_param_count >= 0) {
ec->p = malloc(sizeof(ec->p[0]) * c->p->save_param_count);
} else {
ec->p = malloc(1);
}
ec->client_data_count = 0;
ec->out_param_count = 0;
ec->out_params = NULL;
for (j = 0; j < c->p->vreg_count; j++) {
if (dill_type_of(c, 100 + j) == DILL_B) {
/* offset is really size, fix that */
if (c->p->vregs[j].offset > 0) {
/* this is only used for interpretation */
ec->r[j].u.p.p = malloc(c->p->vregs[j].offset);
}
/* GSE this is leaked!!!! must fix... !!!! */
}
}
return ec;
}
extern void
dill_free_exec_context(dill_exec_ctx ec)
{
if (ec->r)
free(ec->r);
if (ec->p)
free(ec->p);
if (ec->client_data)
free(ec->client_data);
if (ec->out_params)
free(ec->out_params);
free(ec);
}
extern void
dill_assoc_client_data(dill_exec_ctx ec, int key, IMM_TYPE value)
{
int i = 0;
for (i = 0; i < ec->client_data_count; i++) {
if (ec->client_data[i].key == key) {
ec->client_data[i].value = value;
return;
}
}
if (ec->client_data_count == 0) {
ec->client_data = malloc(sizeof(struct client_data_struct));
} else {
ec->client_data =
realloc(ec->client_data, sizeof(struct client_data_struct) *
(ec->client_data_count + 1));
}
ec->client_data[ec->client_data_count].key = key;
ec->client_data[ec->client_data_count++].value = value;
}
extern IMM_TYPE
dill_get_client_data(dill_exec_ctx ec, int key)
{
int i = 0;
for (i = 0; i < ec->client_data_count; i++) {
if (ec->client_data[i].key == key) {
return ec->client_data[i].value;
}
}
return -1;
}
|
812de5f551d2255854bb24273ce8993b4240e694
|
3a2071c34e3c35847b2bcc2a5d3b3a74114daa0f
|
/subversion/svn/similarity.c
|
0bcf0f559bf5080c4b2583421345d2659f727224
|
[
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-other-permissive",
"X11",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"HPND-Markus-Kuhn",
"LicenseRef-scancode-unicode",
"Apache-2.0",
"FSFAP"
] |
permissive
|
apache/subversion
|
18a9142afe63f060ffc0814fe0c758c91ad8bd31
|
dd957c4991e61bde23cc60d13449ea8b65f80c43
|
refs/heads/trunk
| 2023-09-04T15:22:36.755177
| 2023-08-29T19:55:03
| 2023-08-29T19:55:03
| 454,263
| 520
| 207
|
Apache-2.0
| 2023-08-26T14:17:30
| 2009-12-31T09:00:10
|
C
|
UTF-8
|
C
| false
| false
| 4,122
|
c
|
similarity.c
|
/*
* similarity.c: Utility functions for finding similar strings in lists
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*/
/* ==================================================================== */
/*** Includes. ***/
#include <stdlib.h>
#include "svn_string.h"
#include "cl.h"
#include "private/svn_string_private.h"
#include "svn_private_config.h"
/* Context for token similarity checking */
struct svn_cl__simcheck_context_t
{
svn_string_t key; /* The token we're comparing with */
svn_membuf_t buffer; /* Buffer for similarity testing */
};
/* Similarity test between two property names */
static APR_INLINE apr_size_t
simcheck_key_diff(const svn_string_t *key, const svn_string_t *ctx,
svn_membuf_t *buffer, apr_size_t *diff)
{
apr_size_t lcs;
const apr_size_t score = svn_string__similarity(key, ctx, buffer, &lcs);
if (key->len > ctx->len)
*diff = key->len - lcs;
else
*diff = ctx->len - lcs;
return score;
}
/* Key comparator for qsort for svn_cl__simcheck_t */
static int
simcheck_compare(const void *pkeya, const void *pkeyb)
{
svn_cl__simcheck_t *const keya = *(svn_cl__simcheck_t *const *)pkeya;
svn_cl__simcheck_t *const keyb = *(svn_cl__simcheck_t *const *)pkeyb;
svn_cl__simcheck_context_t *const context = keya->context;
if (keya->score == -1)
keya->score = simcheck_key_diff(&keya->token, &context->key,
&context->buffer, &keya->diff);
if (keyb->score == -1)
keyb->score = simcheck_key_diff(&keyb->token, &context->key,
&context->buffer, &keyb->diff);
return (keya->score < keyb->score ? 1
: (keya->score > keyb->score ? -1
: (keya->diff > keyb->diff ? 1
: (keya->diff < keyb->diff ? -1 : 0))));
}
apr_size_t
svn_cl__similarity_check(const char *key,
svn_cl__simcheck_t **tokens,
apr_size_t token_count,
apr_pool_t *scratch_pool)
{
apr_size_t result;
apr_size_t i;
svn_cl__simcheck_context_t context;
context.key.data = key;
context.key.len = strlen(key);
svn_membuf__create(&context.buffer, 0, scratch_pool);
/* Populate the score, diff and context members. */
for (i = 0; i < token_count; ++i)
{
svn_cl__simcheck_t *const token = tokens[i];
token->score = -1;
token->diff = 0;
token->context = &context;
}
/* Sort the tokens by similarity. */
qsort(tokens, token_count, sizeof(*tokens), simcheck_compare);
/* Remove references to the context, since it points to the stack,
and calculate the number of results that are at least two-thirds
similar to the key. */
for (i = 0, result = 1; i < token_count; ++i)
{
svn_cl__simcheck_t *const token = tokens[i];
token->context = NULL;
/* If you update this factor, consider updating
* ../libsvn_subr/cmdline.c:most_similar(). */
if (token->score >= (2 * SVN_STRING__SIM_RANGE_MAX + 1) / 3)
++result;
}
if (0 == tokens[0]->diff)
return 0; /* We found an exact match. */
return result;
}
|
e81a55f7bdf0b8628806ffa01d9415e719068a94
|
6e8226bff5369d52885ab75c95f78e155d6afb48
|
/test/test_fit_LSM.c
|
9e26234297d20aebfb4a6d28534c668ec554c1d2
|
[
"Apache-2.0"
] |
permissive
|
jingweizhanghuai/Morn
|
a26fc8747fd82c10a94003759a9adc44a60a8353
|
b9ee92c26190dec03a6726b9ac9d18fb570b7a70
|
refs/heads/master
| 2023-03-03T12:02:06.835741
| 2023-02-17T14:16:34
| 2023-02-17T14:16:34
| 187,427,750
| 257
| 64
| null | null | null | null |
UTF-8
|
C
| false
| false
| 3,583
|
c
|
test_fit_LSM.c
|
/*
Copyright (C) 2019 JingWeiZhangHuai
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// 编译:gcc -fopenmp -O2 test_fit_LSM.c -I ..\include\ -L ..\lib\x64\mingw\ -lmorn -o test_fit_LSM.exe
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "morn_image.h"
int main1()
{
float x[21]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21};
float y[21]={830,1287,1975,2744,4515,5974,7711,9692,11791,14380,17205,20438,24324,28018,31161,34546,37198,40171,42638,44653,59804};
float a[5];
mLinearFitLSM(x,y,20,a);
printf("linear fit result is y=(%f)*x+(%f)\n",a[0],a[1]);
mParabolaFitLSM(x,y,20,a);
printf("parabola fit result is y=(%f)*x^2+(%f)*x+(%f)\n",a[0],a[1],a[2]);
mPolyFitLSM(x,y,20,a,4);
printf("poly fit result is y=(%f)*x^4+(%f)*x^3+(%f)*x^2+(%f)*x+(%f)\n",a[0],a[1],a[2],a[3],a[4]);
mExpFitLSM(x,y,20,a,4);
printf("exp fit result is y=%f*exp(%f*x)\n",a[0],a[1]);
mLnFitLSM(x,y,20,a,4);
printf("ln fit result is y=%f*ln(x)+(%f)\n",a[0],a[1]);
mPowerFitLSM(x,y,20,a,4);
printf("power fit result is y=%f*x^(%f)\n",a[0],a[1]);
mPolyFitLSM(x,y,21,a,4);
printf("poly fit result is y=(%f)*x^4+(%f)*x^3+(%f)*x^2+(%f)*x+(%f)\n",a[0],a[1],a[2],a[3],a[4]);
mPolyFit(x,y,21,a,4);
printf("poly fit result is y=(%f)*x^4+(%f)*x^3+(%f)*x^2+(%f)*x+(%f)\n",a[0],a[1],a[2],a[3],a[4]);
float x1[24]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
float y1[24]={154,277,365,398,480,619,705,762,755,669,726,890,731,707,696,558,509,444,381,377,312,267,221,166};
float a1[4];
mPolyFitLSM(x1,y1,24,a1,3);
printf("fit result is y=(%f)*x^3+(%f)*x^2+(%f)*x+(%f)\n",a1[0],a1[1],a1[2],a1[3]);
}
// void mFitLSM(float *xin,float *yin,int n,float (*func)(float,float *),float *a,int k);
// int main2()
// {
// float x1[24]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
// float y1[24]={154,277,365,398,480,619,705,762,755,669,726,890,731,707,696,558,509,444,381,377,312,267,221,166};
// float a1[4];
// float func(float x,float *a) {return a[0]*x*x*x+a[1]*x*x+a[2]*x+a[3];}
// mFitLSM(x1,y1,24,func,a1,4);
// printf("fit result is y=(%f*x^3)+(%f*x^2)+(%f*x)+(%f)\n",a1[0],a1[1],a1[2],a1[3]);
// }
int main()
{
float x[1230];float y[1230];
FILE *f = fopen("./test/test17.csv","r");
MList *list = mListCreate(DFLT,NULL);
MImageCurve curve;curve.type=1;
char string[128];
for(int i=0;i<1230;i++)
{
fgets(string,128,f);
sscanf(string,"%f,%f,\n",y+i,x+i);
// y[i]-=1150;
float p[2];p[0]=y[i];p[1]=x[i];
mListWrite(list,DFLT,p,2*sizeof(float));
printf("%f,%f\n",x[i],y[i]);
}
float a[5];
mPolyFitLSM(x,y,1230,a,4);
printf("a is %f,%f,%f,%f\n",a[0],a[1],a[2],a[3],a[4]);
mPolyLSMFit(list,&curve,4);
printf("a is %f,%f,%f,%f\n",curve.para[1],curve.para[2],curve.para[3],curve.para[4],curve.para[5]);
mListRelease(list);
}
|
098e28f631c9ee7f959494bab75e23d55199659a
|
1577e1cf4e89584a125cffb855ca50a9654c6d55
|
/tcl/tcl/tcl/generic/tclFileName.c
|
847f954fd6ea55fac40a6f5f3396f5400bb31bf5
|
[
"TCL"
] |
permissive
|
apple-open-source/macos
|
a4188b5c2ef113d90281d03cd1b14e5ee52ebffb
|
2d2b15f13487673de33297e49f00ef94af743a9a
|
refs/heads/master
| 2023-08-01T11:03:26.870408
| 2023-03-27T00:00:00
| 2023-03-27T00:00:00
| 180,595,052
| 124
| 24
| null | 2022-12-27T14:54:09
| 2019-04-10T14:06:23
| null |
UTF-8
|
C
| false
| false
| 66,299
|
c
|
tclFileName.c
|
/*
* tclFileName.c --
*
* This file contains routines for converting file names betwen native
* and network form.
*
* Copyright (c) 1995-1998 Sun Microsystems, Inc.
* Copyright (c) 1998-1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclFileName.c,v 1.86.2.5 2010/05/21 12:18:17 nijtmans Exp $
*/
#include "tclInt.h"
#include "tclRegexp.h"
#include "tclFileSystem.h" /* For TclGetPathType() */
/*
* The following variable is set in the TclPlatformInit call to one of:
* TCL_PLATFORM_UNIX or TCL_PLATFORM_WINDOWS.
*/
TclPlatformType tclPlatform = TCL_PLATFORM_UNIX;
/*
* Prototypes for local procedures defined in this file:
*/
static const char * DoTildeSubst(Tcl_Interp *interp,
const char *user, Tcl_DString *resultPtr);
static const char * ExtractWinRoot(const char *path,
Tcl_DString *resultPtr, int offset,
Tcl_PathType *typePtr);
static int SkipToChar(char **stringPtr, int match);
static Tcl_Obj* SplitWinPath(const char *path);
static Tcl_Obj* SplitUnixPath(const char *path);
static int DoGlob(Tcl_Interp *interp, Tcl_Obj *resultPtr,
const char *separators, Tcl_Obj *pathPtr, int flags,
char *pattern, Tcl_GlobTypeData *types);
/*
*----------------------------------------------------------------------
*
* SetResultLength --
*
* Resets the result DString for ExtractWinRoot to accommodate
* any NT extended path prefixes.
*
* Results:
* None.
*
* Side effects:
* May modify the Tcl_DString.
*----------------------------------------------------------------------
*/
static void
SetResultLength(
Tcl_DString *resultPtr,
int offset,
int extended)
{
Tcl_DStringSetLength(resultPtr, offset);
if (extended == 2) {
Tcl_DStringAppend(resultPtr, "//?/UNC/", 8);
} else if (extended == 1) {
Tcl_DStringAppend(resultPtr, "//?/", 4);
}
}
/*
*----------------------------------------------------------------------
*
* ExtractWinRoot --
*
* Matches the root portion of a Windows path and appends it to the
* specified Tcl_DString.
*
* Results:
* Returns the position in the path immediately after the root including
* any trailing slashes. Appends a cleaned up version of the root to the
* Tcl_DString at the specified offest.
*
* Side effects:
* Modifies the specified Tcl_DString.
*
*----------------------------------------------------------------------
*/
static const char *
ExtractWinRoot(
const char *path, /* Path to parse. */
Tcl_DString *resultPtr, /* Buffer to hold result. */
int offset, /* Offset in buffer where result should be
* stored. */
Tcl_PathType *typePtr) /* Where to store pathType result */
{
int extended = 0;
if ( (path[0] == '/' || path[0] == '\\')
&& (path[1] == '/' || path[1] == '\\')
&& (path[2] == '?')
&& (path[3] == '/' || path[3] == '\\')) {
extended = 1;
path = path + 4;
if (path[0] == 'U' && path[1] == 'N' && path[2] == 'C'
&& (path[3] == '/' || path[3] == '\\')) {
extended = 2;
path = path + 4;
}
}
if (path[0] == '/' || path[0] == '\\') {
/*
* Might be a UNC or Vol-Relative path.
*/
const char *host, *share, *tail;
int hlen, slen;
if (path[1] != '/' && path[1] != '\\') {
SetResultLength(resultPtr, offset, extended);
*typePtr = TCL_PATH_VOLUME_RELATIVE;
Tcl_DStringAppend(resultPtr, "/", 1);
return &path[1];
}
host = &path[2];
/*
* Skip separators.
*/
while (host[0] == '/' || host[0] == '\\') {
host++;
}
for (hlen = 0; host[hlen];hlen++) {
if (host[hlen] == '/' || host[hlen] == '\\') {
break;
}
}
if (host[hlen] == 0 || host[hlen+1] == 0) {
/*
* The path given is simply of the form '/foo', '//foo',
* '/////foo' or the same with backslashes. If there is exactly
* one leading '/' the path is volume relative (see filename man
* page). If there are more than one, we are simply assuming they
* are superfluous and we trim them away. (An alternative
* interpretation would be that it is a host name, but we have
* been documented that that is not the case).
*/
*typePtr = TCL_PATH_VOLUME_RELATIVE;
Tcl_DStringAppend(resultPtr, "/", 1);
return &path[2];
}
SetResultLength(resultPtr, offset, extended);
share = &host[hlen];
/*
* Skip separators.
*/
while (share[0] == '/' || share[0] == '\\') {
share++;
}
for (slen=0; share[slen]; slen++) {
if (share[slen] == '/' || share[slen] == '\\') {
break;
}
}
Tcl_DStringAppend(resultPtr, "//", 2);
Tcl_DStringAppend(resultPtr, host, hlen);
Tcl_DStringAppend(resultPtr, "/", 1);
Tcl_DStringAppend(resultPtr, share, slen);
tail = &share[slen];
/*
* Skip separators.
*/
while (tail[0] == '/' || tail[0] == '\\') {
tail++;
}
*typePtr = TCL_PATH_ABSOLUTE;
return tail;
} else if (*path && path[1] == ':') {
/*
* Might be a drive separator.
*/
SetResultLength(resultPtr, offset, extended);
if (path[2] != '/' && path[2] != '\\') {
*typePtr = TCL_PATH_VOLUME_RELATIVE;
Tcl_DStringAppend(resultPtr, path, 2);
return &path[2];
} else {
char *tail = (char*)&path[3];
/*
* Skip separators.
*/
while (*tail && (tail[0] == '/' || tail[0] == '\\')) {
tail++;
}
*typePtr = TCL_PATH_ABSOLUTE;
Tcl_DStringAppend(resultPtr, path, 2);
Tcl_DStringAppend(resultPtr, "/", 1);
return tail;
}
} else {
int abs = 0;
/*
* Check for Windows devices.
*/
if ((path[0] == 'c' || path[0] == 'C')
&& (path[1] == 'o' || path[1] == 'O')) {
if ((path[2] == 'm' || path[2] == 'M')
&& path[3] >= '1' && path[3] <= '4') {
/*
* May have match for 'com[1-4]:?', which is a serial port.
*/
if (path[4] == '\0') {
abs = 4;
} else if (path [4] == ':' && path[5] == '\0') {
abs = 5;
}
} else if ((path[2] == 'n' || path[2] == 'N') && path[3] == '\0') {
/*
* Have match for 'con'.
*/
abs = 3;
}
} else if ((path[0] == 'l' || path[0] == 'L')
&& (path[1] == 'p' || path[1] == 'P')
&& (path[2] == 't' || path[2] == 'T')) {
if (path[3] >= '1' && path[3] <= '3') {
/*
* May have match for 'lpt[1-3]:?'
*/
if (path[4] == '\0') {
abs = 4;
} else if (path [4] == ':' && path[5] == '\0') {
abs = 5;
}
}
} else if ((path[0] == 'p' || path[0] == 'P')
&& (path[1] == 'r' || path[1] == 'R')
&& (path[2] == 'n' || path[2] == 'N')
&& path[3] == '\0') {
/*
* Have match for 'prn'.
*/
abs = 3;
} else if ((path[0] == 'n' || path[0] == 'N')
&& (path[1] == 'u' || path[1] == 'U')
&& (path[2] == 'l' || path[2] == 'L')
&& path[3] == '\0') {
/*
* Have match for 'nul'.
*/
abs = 3;
} else if ((path[0] == 'a' || path[0] == 'A')
&& (path[1] == 'u' || path[1] == 'U')
&& (path[2] == 'x' || path[2] == 'X')
&& path[3] == '\0') {
/*
* Have match for 'aux'.
*/
abs = 3;
}
if (abs != 0) {
*typePtr = TCL_PATH_ABSOLUTE;
SetResultLength(resultPtr, offset, extended);
Tcl_DStringAppend(resultPtr, path, abs);
return path + abs;
}
}
/*
* Anything else is treated as relative.
*/
*typePtr = TCL_PATH_RELATIVE;
return path;
}
/*
*----------------------------------------------------------------------
*
* Tcl_GetPathType --
*
* Determines whether a given path is relative to the current directory,
* relative to the current volume, or absolute.
*
* The objectified Tcl_FSGetPathType should be used in preference to this
* function (as you can see below, this is just a wrapper around that
* other function).
*
* Results:
* Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
* TCL_PATH_VOLUME_RELATIVE.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
Tcl_PathType
Tcl_GetPathType(
const char *path)
{
Tcl_PathType type;
Tcl_Obj *tempObj = Tcl_NewStringObj(path,-1);
Tcl_IncrRefCount(tempObj);
type = Tcl_FSGetPathType(tempObj);
Tcl_DecrRefCount(tempObj);
return type;
}
/*
*----------------------------------------------------------------------
*
* TclpGetNativePathType --
*
* Determines whether a given path is relative to the current directory,
* relative to the current volume, or absolute, but ONLY FOR THE NATIVE
* FILESYSTEM. This function is called from tclIOUtil.c (but needs to be
* here due to its dependence on static variables/functions in this
* file). The exported function Tcl_FSGetPathType should be used by
* extensions.
*
* Note that '~' paths are always considered TCL_PATH_ABSOLUTE, even
* though expanding the '~' could lead to any possible path type. This
* function should therefore be considered a low-level, string
* manipulation function only -- it doesn't actually do any expansion in
* making its determination.
*
* Results:
* Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
* TCL_PATH_VOLUME_RELATIVE.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
Tcl_PathType
TclpGetNativePathType(
Tcl_Obj *pathPtr, /* Native path of interest */
int *driveNameLengthPtr, /* Returns length of drive, if non-NULL and
* path was absolute */
Tcl_Obj **driveNameRef)
{
Tcl_PathType type = TCL_PATH_ABSOLUTE;
int pathLen;
char *path = Tcl_GetStringFromObj(pathPtr, &pathLen);
if (path[0] == '~') {
/*
* This case is common to all platforms. Paths that begin with ~ are
* absolute.
*/
if (driveNameLengthPtr != NULL) {
char *end = path + 1;
while ((*end != '\0') && (*end != '/')) {
end++;
}
*driveNameLengthPtr = end - path;
}
} else {
switch (tclPlatform) {
case TCL_PLATFORM_UNIX: {
char *origPath = path;
/*
* Paths that begin with / are absolute.
*/
#ifdef __QNX__
/*
* Check for QNX //<node id> prefix
*/
if (*path && (pathLen > 3) && (path[0] == '/')
&& (path[1] == '/') && isdigit(UCHAR(path[2]))) {
path += 3;
while (isdigit(UCHAR(*path))) {
++path;
}
}
#endif
if (path[0] == '/') {
if (driveNameLengthPtr != NULL) {
/*
* We need this addition in case the QNX code was used.
*/
*driveNameLengthPtr = (1 + path - origPath);
}
} else {
type = TCL_PATH_RELATIVE;
}
break;
}
case TCL_PLATFORM_WINDOWS: {
Tcl_DString ds;
const char *rootEnd;
Tcl_DStringInit(&ds);
rootEnd = ExtractWinRoot(path, &ds, 0, &type);
if ((rootEnd != path) && (driveNameLengthPtr != NULL)) {
*driveNameLengthPtr = rootEnd - path;
if (driveNameRef != NULL) {
*driveNameRef = Tcl_NewStringObj(Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds));
Tcl_IncrRefCount(*driveNameRef);
}
}
Tcl_DStringFree(&ds);
break;
}
}
}
return type;
}
/*
*---------------------------------------------------------------------------
*
* TclpNativeSplitPath --
*
* This function takes the given Tcl_Obj, which should be a valid path,
* and returns a Tcl List object containing each segment of that path as
* an element.
*
* Note this function currently calls the older Split(Plat)Path
* functions, which require more memory allocation than is desirable.
*
* Results:
* Returns list object with refCount of zero. If the passed in lenPtr is
* non-NULL, we use it to return the number of elements in the returned
* list.
*
* Side effects:
* None.
*
*---------------------------------------------------------------------------
*/
Tcl_Obj *
TclpNativeSplitPath(
Tcl_Obj *pathPtr, /* Path to split. */
int *lenPtr) /* int to store number of path elements. */
{
Tcl_Obj *resultPtr = NULL; /* Needed only to prevent gcc warnings. */
/*
* Perform platform specific splitting.
*/
switch (tclPlatform) {
case TCL_PLATFORM_UNIX:
resultPtr = SplitUnixPath(Tcl_GetString(pathPtr));
break;
case TCL_PLATFORM_WINDOWS:
resultPtr = SplitWinPath(Tcl_GetString(pathPtr));
break;
}
/*
* Compute the number of elements in the result.
*/
if (lenPtr != NULL) {
Tcl_ListObjLength(NULL, resultPtr, lenPtr);
}
return resultPtr;
}
/*
*----------------------------------------------------------------------
*
* Tcl_SplitPath --
*
* Split a path into a list of path components. The first element of the
* list will have the same path type as the original path.
*
* Results:
* Returns a standard Tcl result. The interpreter result contains a list
* of path components. *argvPtr will be filled in with the address of an
* array whose elements point to the elements of path, in order.
* *argcPtr will get filled in with the number of valid elements in the
* array. A single block of memory is dynamically allocated to hold both
* the argv array and a copy of the path elements. The caller must
* eventually free this memory by calling ckfree() on *argvPtr. Note:
* *argvPtr and *argcPtr are only modified if the procedure returns
* normally.
*
* Side effects:
* Allocates memory.
*
*----------------------------------------------------------------------
*/
void
Tcl_SplitPath(
const char *path, /* Pointer to string containing a path. */
int *argcPtr, /* Pointer to location to fill in with the
* number of elements in the path. */
const char ***argvPtr) /* Pointer to place to store pointer to array
* of pointers to path elements. */
{
Tcl_Obj *resultPtr = NULL; /* Needed only to prevent gcc warnings. */
Tcl_Obj *tmpPtr, *eltPtr;
int i, size, len;
char *p, *str;
/*
* Perform the splitting, using objectified, vfs-aware code.
*/
tmpPtr = Tcl_NewStringObj(path, -1);
Tcl_IncrRefCount(tmpPtr);
resultPtr = Tcl_FSSplitPath(tmpPtr, argcPtr);
Tcl_IncrRefCount(resultPtr);
Tcl_DecrRefCount(tmpPtr);
/*
* Calculate space required for the result.
*/
size = 1;
for (i = 0; i < *argcPtr; i++) {
Tcl_ListObjIndex(NULL, resultPtr, i, &eltPtr);
Tcl_GetStringFromObj(eltPtr, &len);
size += len + 1;
}
/*
* Allocate a buffer large enough to hold the contents of all of the list
* plus the argv pointers and the terminating NULL pointer.
*/
*argvPtr = (const char **) ckalloc((unsigned)
((((*argcPtr) + 1) * sizeof(char *)) + size));
/*
* Position p after the last argv pointer and copy the contents of the
* list in, piece by piece.
*/
p = (char *) &(*argvPtr)[(*argcPtr) + 1];
for (i = 0; i < *argcPtr; i++) {
Tcl_ListObjIndex(NULL, resultPtr, i, &eltPtr);
str = Tcl_GetStringFromObj(eltPtr, &len);
memcpy(p, str, (size_t) len+1);
p += len+1;
}
/*
* Now set up the argv pointers.
*/
p = (char *) &(*argvPtr)[(*argcPtr) + 1];
for (i = 0; i < *argcPtr; i++) {
(*argvPtr)[i] = p;
for (; *(p++)!='\0'; );
}
(*argvPtr)[i] = NULL;
/*
* Free the result ptr given to us by Tcl_FSSplitPath
*/
Tcl_DecrRefCount(resultPtr);
}
/*
*----------------------------------------------------------------------
*
* SplitUnixPath --
*
* This routine is used by Tcl_(FS)SplitPath to handle splitting Unix
* paths.
*
* Results:
* Returns a newly allocated Tcl list object.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static Tcl_Obj *
SplitUnixPath(
const char *path) /* Pointer to string containing a path. */
{
int length;
const char *p, *elementStart;
Tcl_Obj *result = Tcl_NewObj();
/*
* Deal with the root directory as a special case.
*/
#ifdef __QNX__
/*
* Check for QNX //<node id> prefix
*/
if ((path[0] == '/') && (path[1] == '/')
&& isdigit(UCHAR(path[2]))) { /* INTL: digit */
path += 3;
while (isdigit(UCHAR(*path))) { /* INTL: digit */
++path;
}
}
#endif
if (path[0] == '/') {
Tcl_ListObjAppendElement(NULL, result, Tcl_NewStringObj("/",1));
p = path+1;
} else {
p = path;
}
/*
* Split on slashes. Embedded elements that start with tilde will be
* prefixed with "./" so they are not affected by tilde substitution.
*/
for (;;) {
elementStart = p;
while ((*p != '\0') && (*p != '/')) {
p++;
}
length = p - elementStart;
if (length > 0) {
Tcl_Obj *nextElt;
if ((elementStart[0] == '~') && (elementStart != path)) {
TclNewLiteralStringObj(nextElt, "./");
Tcl_AppendToObj(nextElt, elementStart, length);
} else {
nextElt = Tcl_NewStringObj(elementStart, length);
}
Tcl_ListObjAppendElement(NULL, result, nextElt);
}
if (*p++ == '\0') {
break;
}
}
return result;
}
/*
*----------------------------------------------------------------------
*
* SplitWinPath --
*
* This routine is used by Tcl_(FS)SplitPath to handle splitting Windows
* paths.
*
* Results:
* Returns a newly allocated Tcl list object.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static Tcl_Obj *
SplitWinPath(
const char *path) /* Pointer to string containing a path. */
{
int length;
const char *p, *elementStart;
Tcl_PathType type = TCL_PATH_ABSOLUTE;
Tcl_DString buf;
Tcl_Obj *result = Tcl_NewObj();
Tcl_DStringInit(&buf);
p = ExtractWinRoot(path, &buf, 0, &type);
/*
* Terminate the root portion, if we matched something.
*/
if (p != path) {
Tcl_ListObjAppendElement(NULL, result, Tcl_NewStringObj(
Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)));
}
Tcl_DStringFree(&buf);
/*
* Split on slashes. Embedded elements that start with tilde or a drive
* letter will be prefixed with "./" so they are not affected by tilde
* substitution.
*/
do {
elementStart = p;
while ((*p != '\0') && (*p != '/') && (*p != '\\')) {
p++;
}
length = p - elementStart;
if (length > 0) {
Tcl_Obj *nextElt;
if ((elementStart != path) && ((elementStart[0] == '~')
|| (isalpha(UCHAR(elementStart[0]))
&& elementStart[1] == ':'))) {
TclNewLiteralStringObj(nextElt, "./");
Tcl_AppendToObj(nextElt, elementStart, length);
} else {
nextElt = Tcl_NewStringObj(elementStart, length);
}
Tcl_ListObjAppendElement(NULL, result, nextElt);
}
} while (*p++ != '\0');
return result;
}
/*
*---------------------------------------------------------------------------
*
* Tcl_FSJoinToPath --
*
* This function takes the given object, which should usually be a valid
* path or NULL, and joins onto it the array of paths segments given.
*
* The objects in the array given will temporarily have their refCount
* increased by one, and then decreased by one when this function exits
* (which means if they had zero refCount when we were called, they will
* be freed).
*
* Results:
* Returns object owned by the caller (which should increment its
* refCount) - typically an object with refCount of zero.
*
* Side effects:
* None.
*
*---------------------------------------------------------------------------
*/
Tcl_Obj *
Tcl_FSJoinToPath(
Tcl_Obj *pathPtr, /* Valid path or NULL. */
int objc, /* Number of array elements to join */
Tcl_Obj *const objv[]) /* Path elements to join. */
{
int i;
Tcl_Obj *lobj, *ret;
if (pathPtr == NULL) {
lobj = Tcl_NewListObj(0, NULL);
} else {
lobj = Tcl_NewListObj(1, &pathPtr);
}
for (i = 0; i<objc;i++) {
Tcl_ListObjAppendElement(NULL, lobj, objv[i]);
}
ret = Tcl_FSJoinPath(lobj, -1);
/*
* It is possible that 'ret' is just a member of the list and is therefore
* going to be freed here. Therefore we must adjust the refCount manually.
* (It would be better if we changed the documentation of this function
* and Tcl_FSJoinPath so that the returned object already has a refCount
* for the caller, hence avoiding these subtleties (and code ugliness)).
*/
Tcl_IncrRefCount(ret);
Tcl_DecrRefCount(lobj);
ret->refCount--;
return ret;
}
/*
*---------------------------------------------------------------------------
*
* TclpNativeJoinPath --
*
* 'prefix' is absolute, 'joining' is relative to prefix.
*
* Results:
* modifies prefix
*
* Side effects:
* None.
*
*---------------------------------------------------------------------------
*/
void
TclpNativeJoinPath(
Tcl_Obj *prefix,
char *joining)
{
int length, needsSep;
char *dest, *p, *start;
start = Tcl_GetStringFromObj(prefix, &length);
/*
* Remove the ./ from tilde prefixed elements, and drive-letter prefixed
* elements on Windows, unless it is the first component.
*/
p = joining;
if (length != 0) {
if ((p[0] == '.') && (p[1] == '/') && ((p[2] == '~')
|| (tclPlatform==TCL_PLATFORM_WINDOWS && isalpha(UCHAR(p[2]))
&& (p[3] == ':')))) {
p += 2;
}
}
if (*p == '\0') {
return;
}
switch (tclPlatform) {
case TCL_PLATFORM_UNIX:
/*
* Append a separator if needed.
*/
if (length > 0 && (start[length-1] != '/')) {
Tcl_AppendToObj(prefix, "/", 1);
length++;
}
needsSep = 0;
/*
* Append the element, eliminating duplicate and trailing slashes.
*/
Tcl_SetObjLength(prefix, length + (int) strlen(p));
dest = Tcl_GetString(prefix) + length;
for (; *p != '\0'; p++) {
if (*p == '/') {
while (p[1] == '/') {
p++;
}
if (p[1] != '\0' && needsSep) {
*dest++ = '/';
}
} else {
*dest++ = *p;
needsSep = 1;
}
}
length = dest - Tcl_GetString(prefix);
Tcl_SetObjLength(prefix, length);
break;
case TCL_PLATFORM_WINDOWS:
/*
* Check to see if we need to append a separator.
*/
if ((length > 0) &&
(start[length-1] != '/') && (start[length-1] != ':')) {
Tcl_AppendToObj(prefix, "/", 1);
length++;
}
needsSep = 0;
/*
* Append the element, eliminating duplicate and trailing slashes.
*/
Tcl_SetObjLength(prefix, length + (int) strlen(p));
dest = Tcl_GetString(prefix) + length;
for (; *p != '\0'; p++) {
if ((*p == '/') || (*p == '\\')) {
while ((p[1] == '/') || (p[1] == '\\')) {
p++;
}
if ((p[1] != '\0') && needsSep) {
*dest++ = '/';
}
} else {
*dest++ = *p;
needsSep = 1;
}
}
length = dest - Tcl_GetString(prefix);
Tcl_SetObjLength(prefix, length);
break;
}
return;
}
/*
*----------------------------------------------------------------------
*
* Tcl_JoinPath --
*
* Combine a list of paths in a platform specific manner. The function
* 'Tcl_FSJoinPath' should be used in preference where possible.
*
* Results:
* Appends the joined path to the end of the specified Tcl_DString
* returning a pointer to the resulting string. Note that the
* Tcl_DString must already be initialized.
*
* Side effects:
* Modifies the Tcl_DString.
*
*----------------------------------------------------------------------
*/
char *
Tcl_JoinPath(
int argc,
const char *const *argv,
Tcl_DString *resultPtr) /* Pointer to previously initialized DString */
{
int i, len;
Tcl_Obj *listObj = Tcl_NewObj();
Tcl_Obj *resultObj;
char *resultStr;
/*
* Build the list of paths.
*/
for (i = 0; i < argc; i++) {
Tcl_ListObjAppendElement(NULL, listObj,
Tcl_NewStringObj(argv[i], -1));
}
/*
* Ask the objectified code to join the paths.
*/
Tcl_IncrRefCount(listObj);
resultObj = Tcl_FSJoinPath(listObj, argc);
Tcl_IncrRefCount(resultObj);
Tcl_DecrRefCount(listObj);
/*
* Store the result.
*/
resultStr = Tcl_GetStringFromObj(resultObj, &len);
Tcl_DStringAppend(resultPtr, resultStr, len);
Tcl_DecrRefCount(resultObj);
/*
* Return a pointer to the result.
*/
return Tcl_DStringValue(resultPtr);
}
/*
*---------------------------------------------------------------------------
*
* Tcl_TranslateFileName --
*
* Converts a file name into a form usable by the native system
* interfaces. If the name starts with a tilde, it will produce a name
* where the tilde and following characters have been replaced by the
* home directory location for the named user.
*
* Results:
* The return value is a pointer to a string containing the name after
* tilde substitution. If there was no tilde substitution, the return
* value is a pointer to a copy of the original string. If there was an
* error in processing the name, then an error message is left in the
* interp's result (if interp was not NULL) and the return value is NULL.
* Space for the return value is allocated in bufferPtr; the caller must
* call Tcl_DStringFree() to free the space if the return value was not
* NULL.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
char *
Tcl_TranslateFileName(
Tcl_Interp *interp, /* Interpreter in which to store error message
* (if necessary). */
const char *name, /* File name, which may begin with "~" (to
* indicate current user's home directory) or
* "~<user>" (to indicate any user's home
* directory). */
Tcl_DString *bufferPtr) /* Uninitialized or free DString filled with
* name after tilde substitution. */
{
Tcl_Obj *path = Tcl_NewStringObj(name, -1);
Tcl_Obj *transPtr;
Tcl_IncrRefCount(path);
transPtr = Tcl_FSGetTranslatedPath(interp, path);
if (transPtr == NULL) {
Tcl_DecrRefCount(path);
return NULL;
}
Tcl_DStringInit(bufferPtr);
Tcl_DStringAppend(bufferPtr, Tcl_GetString(transPtr), -1);
Tcl_DecrRefCount(path);
Tcl_DecrRefCount(transPtr);
/*
* Convert forward slashes to backslashes in Windows paths because some
* system interfaces don't accept forward slashes.
*/
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
register char *p;
for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) {
if (*p == '/') {
*p = '\\';
}
}
}
return Tcl_DStringValue(bufferPtr);
}
/*
*----------------------------------------------------------------------
*
* TclGetExtension --
*
* This function returns a pointer to the beginning of the extension part
* of a file name.
*
* Results:
* Returns a pointer into name which indicates where the extension
* starts. If there is no extension, returns NULL.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
const char *
TclGetExtension(
const char *name) /* File name to parse. */
{
const char *p, *lastSep;
/*
* First find the last directory separator.
*/
lastSep = NULL; /* Needed only to prevent gcc warnings. */
switch (tclPlatform) {
case TCL_PLATFORM_UNIX:
lastSep = strrchr(name, '/');
break;
case TCL_PLATFORM_WINDOWS:
lastSep = NULL;
for (p = name; *p != '\0'; p++) {
if (strchr("/\\:", *p) != NULL) {
lastSep = p;
}
}
break;
}
p = strrchr(name, '.');
if ((p != NULL) && (lastSep != NULL) && (lastSep > p)) {
p = NULL;
}
/*
* In earlier versions, we used to back up to the first period in a series
* so that "foo..o" would be split into "foo" and "..o". This is a
* confusing and usually incorrect behavior, so now we split at the last
* period in the name.
*/
return p;
}
/*
*----------------------------------------------------------------------
*
* DoTildeSubst --
*
* Given a string following a tilde, this routine returns the
* corresponding home directory.
*
* Results:
* The result is a pointer to a static string containing the home
* directory in native format. If there was an error in processing the
* substitution, then an error message is left in the interp's result and
* the return value is NULL. On success, the results are appended to
* resultPtr, and the contents of resultPtr are returned.
*
* Side effects:
* Information may be left in resultPtr.
*
*----------------------------------------------------------------------
*/
static const char *
DoTildeSubst(
Tcl_Interp *interp, /* Interpreter in which to store error message
* (if necessary). */
const char *user, /* Name of user whose home directory should be
* substituted, or "" for current user. */
Tcl_DString *resultPtr) /* Initialized DString filled with name after
* tilde substitution. */
{
const char *dir;
if (*user == '\0') {
Tcl_DString dirString;
dir = TclGetEnv("HOME", &dirString);
if (dir == NULL) {
if (interp) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "couldn't find HOME environment "
"variable to expand path", NULL);
}
return NULL;
}
Tcl_JoinPath(1, &dir, resultPtr);
Tcl_DStringFree(&dirString);
} else if (TclpGetUserHome(user, resultPtr) == NULL) {
if (interp) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "user \"", user, "\" doesn't exist",
NULL);
}
return NULL;
}
return Tcl_DStringValue(resultPtr);
}
/*
*----------------------------------------------------------------------
*
* Tcl_GlobObjCmd --
*
* This procedure is invoked to process the "glob" Tcl command. See the
* user documentation for details on what it does.
*
* Results:
* A standard Tcl result.
*
* Side effects:
* See the user documentation.
*
*----------------------------------------------------------------------
*/
/* ARGSUSED */
int
Tcl_GlobObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int index, i, globFlags, length, join, dir, result;
char *string;
const char *separators;
Tcl_Obj *typePtr, *resultPtr, *look;
Tcl_Obj *pathOrDir = NULL;
Tcl_DString prefix;
static const char *options[] = {
"-directory", "-join", "-nocomplain", "-path", "-tails",
"-types", "--", NULL
};
enum options {
GLOB_DIR, GLOB_JOIN, GLOB_NOCOMPLAIN, GLOB_PATH, GLOB_TAILS,
GLOB_TYPE, GLOB_LAST
};
enum pathDirOptions {PATH_NONE = -1 , PATH_GENERAL = 0, PATH_DIR = 1};
Tcl_GlobTypeData *globTypes = NULL;
globFlags = 0;
join = 0;
dir = PATH_NONE;
typePtr = NULL;
for (i = 1; i < objc; i++) {
if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0,
&index) != TCL_OK) {
string = Tcl_GetStringFromObj(objv[i], &length);
if (string[0] == '-') {
/*
* It looks like the command contains an option so signal an
* error.
*/
return TCL_ERROR;
} else {
/*
* This clearly isn't an option; assume it's the first glob
* pattern. We must clear the error.
*/
Tcl_ResetResult(interp);
break;
}
}
switch (index) {
case GLOB_NOCOMPLAIN: /* -nocomplain */
globFlags |= TCL_GLOBMODE_NO_COMPLAIN;
break;
case GLOB_DIR: /* -dir */
if (i == (objc-1)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"missing argument to \"-directory\"", -1));
return TCL_ERROR;
}
if (dir != PATH_NONE) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"\"-directory\" cannot be used with \"-path\"", -1));
return TCL_ERROR;
}
dir = PATH_DIR;
globFlags |= TCL_GLOBMODE_DIR;
pathOrDir = objv[i+1];
i++;
break;
case GLOB_JOIN: /* -join */
join = 1;
break;
case GLOB_TAILS: /* -tails */
globFlags |= TCL_GLOBMODE_TAILS;
break;
case GLOB_PATH: /* -path */
if (i == (objc-1)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"missing argument to \"-path\"", -1));
return TCL_ERROR;
}
if (dir != PATH_NONE) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"\"-path\" cannot be used with \"-directory\"", -1));
return TCL_ERROR;
}
dir = PATH_GENERAL;
pathOrDir = objv[i+1];
i++;
break;
case GLOB_TYPE: /* -types */
if (i == (objc-1)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"missing argument to \"-types\"", -1));
return TCL_ERROR;
}
typePtr = objv[i+1];
if (Tcl_ListObjLength(interp, typePtr, &length) != TCL_OK) {
return TCL_ERROR;
}
i++;
break;
case GLOB_LAST: /* -- */
i++;
goto endOfForLoop;
}
}
endOfForLoop:
if (objc - i < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?switches? name ?name ...?");
return TCL_ERROR;
}
if ((globFlags & TCL_GLOBMODE_TAILS) && (pathOrDir == NULL)) {
Tcl_AppendResult(interp,
"\"-tails\" must be used with either "
"\"-directory\" or \"-path\"", NULL);
return TCL_ERROR;
}
separators = NULL; /* lint. */
switch (tclPlatform) {
case TCL_PLATFORM_UNIX:
separators = "/";
break;
case TCL_PLATFORM_WINDOWS:
separators = "/\\:";
break;
}
if (dir == PATH_GENERAL) {
int pathlength;
char *last;
char *first = Tcl_GetStringFromObj(pathOrDir,&pathlength);
/*
* Find the last path separator in the path
*/
last = first + pathlength;
for (; last != first; last--) {
if (strchr(separators, *(last-1)) != NULL) {
break;
}
}
if (last == first + pathlength) {
/*
* It's really a directory.
*/
dir = PATH_DIR;
} else {
Tcl_DString pref;
char *search, *find;
Tcl_DStringInit(&pref);
if (last == first) {
/*
* The whole thing is a prefix. This means we must remove any
* 'tails' flag too, since it is irrelevant now (the same
* effect will happen without it), but in particular its use
* in TclGlob requires a non-NULL pathOrDir.
*/
Tcl_DStringAppend(&pref, first, -1);
globFlags &= ~TCL_GLOBMODE_TAILS;
pathOrDir = NULL;
} else {
/*
* Have to split off the end.
*/
Tcl_DStringAppend(&pref, last, first+pathlength-last);
pathOrDir = Tcl_NewStringObj(first, last-first-1);
/*
* We must ensure that we haven't cut off too much, and turned
* a valid path like '/' or 'C:/' into an incorrect path like
* '' or 'C:'. The way we do this is to add a separator if
* there are none presently in the prefix.
*/
if (strpbrk(Tcl_GetString(pathOrDir), "\\/") == NULL) {
Tcl_AppendToObj(pathOrDir, last-1, 1);
}
}
/*
* Need to quote 'prefix'.
*/
Tcl_DStringInit(&prefix);
search = Tcl_DStringValue(&pref);
while ((find = (strpbrk(search, "\\[]*?{}"))) != NULL) {
Tcl_DStringAppend(&prefix, search, find-search);
Tcl_DStringAppend(&prefix, "\\", 1);
Tcl_DStringAppend(&prefix, find, 1);
search = find+1;
if (*search == '\0') {
break;
}
}
if (*search != '\0') {
Tcl_DStringAppend(&prefix, search, -1);
}
Tcl_DStringFree(&pref);
}
}
if (pathOrDir != NULL) {
Tcl_IncrRefCount(pathOrDir);
}
if (typePtr != NULL) {
/*
* The rest of the possible type arguments (except 'd') are platform
* specific. We don't complain when they are used on an incompatible
* platform.
*/
Tcl_ListObjLength(interp, typePtr, &length);
if (length <= 0) {
goto skipTypes;
}
globTypes = (Tcl_GlobTypeData*)
TclStackAlloc(interp,sizeof(Tcl_GlobTypeData));
globTypes->type = 0;
globTypes->perm = 0;
globTypes->macType = NULL;
globTypes->macCreator = NULL;
while (--length >= 0) {
int len;
char *str;
Tcl_ListObjIndex(interp, typePtr, length, &look);
str = Tcl_GetStringFromObj(look, &len);
if (strcmp("readonly", str) == 0) {
globTypes->perm |= TCL_GLOB_PERM_RONLY;
} else if (strcmp("hidden", str) == 0) {
globTypes->perm |= TCL_GLOB_PERM_HIDDEN;
} else if (len == 1) {
switch (str[0]) {
case 'r':
globTypes->perm |= TCL_GLOB_PERM_R;
break;
case 'w':
globTypes->perm |= TCL_GLOB_PERM_W;
break;
case 'x':
globTypes->perm |= TCL_GLOB_PERM_X;
break;
case 'b':
globTypes->type |= TCL_GLOB_TYPE_BLOCK;
break;
case 'c':
globTypes->type |= TCL_GLOB_TYPE_CHAR;
break;
case 'd':
globTypes->type |= TCL_GLOB_TYPE_DIR;
break;
case 'p':
globTypes->type |= TCL_GLOB_TYPE_PIPE;
break;
case 'f':
globTypes->type |= TCL_GLOB_TYPE_FILE;
break;
case 'l':
globTypes->type |= TCL_GLOB_TYPE_LINK;
break;
case 's':
globTypes->type |= TCL_GLOB_TYPE_SOCK;
break;
default:
goto badTypesArg;
}
} else if (len == 4) {
/*
* This is assumed to be a MacOS file type.
*/
if (globTypes->macType != NULL) {
goto badMacTypesArg;
}
globTypes->macType = look;
Tcl_IncrRefCount(look);
} else {
Tcl_Obj* item;
if ((Tcl_ListObjLength(NULL, look, &len) == TCL_OK) &&
(len == 3)) {
Tcl_ListObjIndex(interp, look, 0, &item);
if (!strcmp("macintosh", Tcl_GetString(item))) {
Tcl_ListObjIndex(interp, look, 1, &item);
if (!strcmp("type", Tcl_GetString(item))) {
Tcl_ListObjIndex(interp, look, 2, &item);
if (globTypes->macType != NULL) {
goto badMacTypesArg;
}
globTypes->macType = item;
Tcl_IncrRefCount(item);
continue;
} else if (!strcmp("creator", Tcl_GetString(item))) {
Tcl_ListObjIndex(interp, look, 2, &item);
if (globTypes->macCreator != NULL) {
goto badMacTypesArg;
}
globTypes->macCreator = item;
Tcl_IncrRefCount(item);
continue;
}
}
}
/*
* Error cases. We reset the 'join' flag to zero, since we
* haven't yet made use of it.
*/
badTypesArg:
TclNewObj(resultPtr);
Tcl_AppendToObj(resultPtr, "bad argument to \"-types\": ", -1);
Tcl_AppendObjToObj(resultPtr, look);
Tcl_SetObjResult(interp, resultPtr);
result = TCL_ERROR;
join = 0;
goto endOfGlob;
badMacTypesArg:
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"only one MacOS type or creator argument"
" to \"-types\" allowed", -1));
result = TCL_ERROR;
join = 0;
goto endOfGlob;
}
}
}
skipTypes:
/*
* Now we perform the actual glob below. This may involve joining together
* the pattern arguments, dealing with particular file types etc. We use a
* 'goto' to ensure we free any memory allocated along the way.
*/
objc -= i;
objv += i;
result = TCL_OK;
if (join) {
if (dir != PATH_GENERAL) {
Tcl_DStringInit(&prefix);
}
for (i = 0; i < objc; i++) {
string = Tcl_GetStringFromObj(objv[i], &length);
Tcl_DStringAppend(&prefix, string, length);
if (i != objc -1) {
Tcl_DStringAppend(&prefix, separators, 1);
}
}
if (TclGlob(interp, Tcl_DStringValue(&prefix), pathOrDir, globFlags,
globTypes) != TCL_OK) {
result = TCL_ERROR;
goto endOfGlob;
}
} else if (dir == PATH_GENERAL) {
Tcl_DString str;
for (i = 0; i < objc; i++) {
Tcl_DStringInit(&str);
if (dir == PATH_GENERAL) {
Tcl_DStringAppend(&str, Tcl_DStringValue(&prefix),
Tcl_DStringLength(&prefix));
}
string = Tcl_GetStringFromObj(objv[i], &length);
Tcl_DStringAppend(&str, string, length);
if (TclGlob(interp, Tcl_DStringValue(&str), pathOrDir, globFlags,
globTypes) != TCL_OK) {
result = TCL_ERROR;
Tcl_DStringFree(&str);
goto endOfGlob;
}
}
Tcl_DStringFree(&str);
} else {
for (i = 0; i < objc; i++) {
string = Tcl_GetString(objv[i]);
if (TclGlob(interp, string, pathOrDir, globFlags,
globTypes) != TCL_OK) {
result = TCL_ERROR;
goto endOfGlob;
}
}
}
if ((globFlags & TCL_GLOBMODE_NO_COMPLAIN) == 0) {
if (Tcl_ListObjLength(interp, Tcl_GetObjResult(interp),
&length) != TCL_OK) {
/*
* This should never happen. Maybe we should be more dramatic.
*/
result = TCL_ERROR;
goto endOfGlob;
}
if (length == 0) {
Tcl_AppendResult(interp, "no files matched glob pattern",
(join || (objc == 1)) ? " \"" : "s \"", NULL);
if (join) {
Tcl_AppendResult(interp, Tcl_DStringValue(&prefix), NULL);
} else {
const char *sep = "";
for (i = 0; i < objc; i++) {
string = Tcl_GetString(objv[i]);
Tcl_AppendResult(interp, sep, string, NULL);
sep = " ";
}
}
Tcl_AppendResult(interp, "\"", NULL);
result = TCL_ERROR;
}
}
endOfGlob:
if (join || (dir == PATH_GENERAL)) {
Tcl_DStringFree(&prefix);
}
if (pathOrDir != NULL) {
Tcl_DecrRefCount(pathOrDir);
}
if (globTypes != NULL) {
if (globTypes->macType != NULL) {
Tcl_DecrRefCount(globTypes->macType);
}
if (globTypes->macCreator != NULL) {
Tcl_DecrRefCount(globTypes->macCreator);
}
TclStackFree(interp, globTypes);
}
return result;
}
/*
*----------------------------------------------------------------------
*
* TclGlob --
*
* This procedure prepares arguments for the DoGlob call. It sets the
* separator string based on the platform, performs * tilde substitution,
* and calls DoGlob.
*
* The interpreter's result, on entry to this function, must be a valid
* Tcl list (e.g. it could be empty), since we will lappend any new
* results to that list. If it is not a valid list, this function will
* fail to do anything very meaningful.
*
* Note that if globFlags contains 'TCL_GLOBMODE_TAILS' then pathPrefix
* cannot be NULL (it is only allowed with -dir or -path).
*
* Results:
* The return value is a standard Tcl result indicating whether an error
* occurred in globbing. After a normal return the result in interp (set
* by DoGlob) holds all of the file names given by the pattern and
* pathPrefix arguments. After an error the result in interp will hold
* an error message.
*
* Side effects:
* The 'pattern' is written to.
*
*----------------------------------------------------------------------
*/
/* ARGSUSED */
int
TclGlob(
Tcl_Interp *interp, /* Interpreter for returning error message or
* appending list of matching file names. */
char *pattern, /* Glob pattern to match. Must not refer to a
* static string. */
Tcl_Obj *pathPrefix, /* Path prefix to glob pattern, if non-null,
* which is considered literally. */
int globFlags, /* Stores or'ed combination of flags */
Tcl_GlobTypeData *types) /* Struct containing acceptable types. May be
* NULL. */
{
const char *separators;
const char *head;
char *tail, *start;
int result;
Tcl_Obj *filenamesObj, *savedResultObj;
separators = NULL; /* lint. */
switch (tclPlatform) {
case TCL_PLATFORM_UNIX:
separators = "/";
break;
case TCL_PLATFORM_WINDOWS:
separators = "/\\:";
break;
}
if (pathPrefix == NULL) {
char c;
Tcl_DString buffer;
Tcl_DStringInit(&buffer);
start = pattern;
/*
* Perform tilde substitution, if needed.
*/
if (start[0] == '~') {
/*
* Find the first path separator after the tilde.
*/
for (tail = start; *tail != '\0'; tail++) {
if (*tail == '\\') {
if (strchr(separators, tail[1]) != NULL) {
break;
}
} else if (strchr(separators, *tail) != NULL) {
break;
}
}
/*
* Determine the home directory for the specified user.
*/
c = *tail;
*tail = '\0';
head = DoTildeSubst(interp, start+1, &buffer);
*tail = c;
if (head == NULL) {
return TCL_ERROR;
}
if (head != Tcl_DStringValue(&buffer)) {
Tcl_DStringAppend(&buffer, head, -1);
}
pathPrefix = Tcl_NewStringObj(Tcl_DStringValue(&buffer),
Tcl_DStringLength(&buffer));
Tcl_IncrRefCount(pathPrefix);
globFlags |= TCL_GLOBMODE_DIR;
if (c != '\0') {
tail++;
}
Tcl_DStringFree(&buffer);
} else {
tail = pattern;
}
} else {
Tcl_IncrRefCount(pathPrefix);
tail = pattern;
}
/*
* Handling empty path prefixes with glob patterns like 'C:' or
* 'c:////////' is a pain on Windows if we leave it too late, since these
* aren't really patterns at all! We therefore check the head of the
* pattern now for such cases, if we don't have an unquoted prefix yet.
*
* Similarly on Unix with '/' at the head of the pattern -- it just
* indicates the root volume, so we treat it as such.
*/
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
if (pathPrefix == NULL && tail[0] != '\0' && tail[1] == ':') {
char *p = tail + 1;
pathPrefix = Tcl_NewStringObj(tail, 1);
while (*p != '\0') {
char c = p[1];
if (*p == '\\') {
if (strchr(separators, c) != NULL) {
if (c == '\\') {
c = '/';
}
Tcl_AppendToObj(pathPrefix, &c, 1);
p++;
} else {
break;
}
} else if (strchr(separators, *p) != NULL) {
Tcl_AppendToObj(pathPrefix, p, 1);
} else {
break;
}
p++;
}
tail = p;
Tcl_IncrRefCount(pathPrefix);
} else if (pathPrefix == NULL && (tail[0] == '/'
|| (tail[0] == '\\' && tail[1] == '\\'))) {
int driveNameLen;
Tcl_Obj *driveName;
Tcl_Obj *temp = Tcl_NewStringObj(tail, -1);
Tcl_IncrRefCount(temp);
switch (TclGetPathType(temp, NULL, &driveNameLen, &driveName)) {
case TCL_PATH_VOLUME_RELATIVE: {
/*
* Volume relative path which is equivalent to a path in the
* root of the cwd's volume. We will actually return
* non-volume-relative paths here. i.e. 'glob /foo*' will
* return 'C:/foobar'. This is much the same as globbing for a
* path with '\\' will return one with '/' on Windows.
*/
Tcl_Obj *cwd = Tcl_FSGetCwd(interp);
if (cwd == NULL) {
Tcl_DecrRefCount(temp);
return TCL_ERROR;
}
pathPrefix = Tcl_NewStringObj(Tcl_GetString(cwd), 3);
Tcl_DecrRefCount(cwd);
if (tail[0] == '/') {
tail++;
} else {
tail+=2;
}
Tcl_IncrRefCount(pathPrefix);
break;
}
case TCL_PATH_ABSOLUTE:
/*
* Absolute, possibly network path //Machine/Share. Use that
* as the path prefix (it already has a refCount).
*/
pathPrefix = driveName;
tail += driveNameLen;
break;
case TCL_PATH_RELATIVE:
/* Do nothing */
break;
}
Tcl_DecrRefCount(temp);
}
/*
* ':' no longer needed as a separator. It is only relevant to the
* beginning of the path.
*/
separators = "/\\";
} else if (tclPlatform == TCL_PLATFORM_UNIX) {
if (pathPrefix == NULL && tail[0] == '/') {
pathPrefix = Tcl_NewStringObj(tail, 1);
tail++;
Tcl_IncrRefCount(pathPrefix);
}
}
/*
* Finally if we still haven't managed to generate a path prefix, check if
* the path starts with a current volume.
*/
if (pathPrefix == NULL) {
int driveNameLen;
Tcl_Obj *driveName;
if (TclFSNonnativePathType(tail, (int) strlen(tail), NULL,
&driveNameLen, &driveName) == TCL_PATH_ABSOLUTE) {
pathPrefix = driveName;
tail += driveNameLen;
}
}
/*
* To process a [glob] invokation, this function may be called multiple
* times. Each time, the previously discovered filenames are in the
* interpreter result. We stash that away here so the result is free for
* error messsages.
*/
savedResultObj = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(savedResultObj);
Tcl_ResetResult(interp);
TclNewObj(filenamesObj);
Tcl_IncrRefCount(filenamesObj);
/*
* Now we do the actual globbing, adding filenames as we go to buffer in
* filenamesObj
*/
if (*tail == '\0' && pathPrefix != NULL) {
/*
* An empty pattern. This means 'pathPrefix' is actually
* a full path of a file/directory we want to simply check
* for existence and type.
*/
if (types == NULL) {
/*
* We just want to check for existence. In this case we
* make it easy on Tcl_FSMatchInDirectory and its
* sub-implementations by not bothering them (even though
* they should support this situation) and we just use the
* simple existence check with Tcl_FSAccess.
*/
if (Tcl_FSAccess(pathPrefix, F_OK) == 0) {
Tcl_ListObjAppendElement(interp, filenamesObj, pathPrefix);
}
result = TCL_OK;
} else {
/*
* We want to check for the correct type. Tcl_FSMatchInDirectory
* is documented to do this for us, if we give it a NULL pattern.
*/
result = Tcl_FSMatchInDirectory(interp, filenamesObj, pathPrefix,
NULL, types);
}
} else {
result = DoGlob(interp, filenamesObj, separators, pathPrefix,
globFlags & TCL_GLOBMODE_DIR, tail, types);
}
/*
* Check for errors...
*/
if (result != TCL_OK) {
TclDecrRefCount(filenamesObj);
TclDecrRefCount(savedResultObj);
if (pathPrefix != NULL) {
Tcl_DecrRefCount(pathPrefix);
}
return result;
}
/*
* If we only want the tails, we must strip off the prefix now. It may
* seem more efficient to pass the tails flag down into DoGlob,
* Tcl_FSMatchInDirectory, but those functions are continually adjusting
* the prefix as the various pieces of the pattern are assimilated, so
* that would add a lot of complexity to the code. This way is a little
* slower (when the -tails flag is given), but much simpler to code.
*
* We do it by rewriting the result list in-place.
*/
if (globFlags & TCL_GLOBMODE_TAILS) {
int objc, i;
Tcl_Obj **objv;
int prefixLen;
const char *pre;
/*
* If this length has never been set, set it here.
*/
if (pathPrefix == NULL) {
Tcl_Panic("Called TclGlob with TCL_GLOBMODE_TAILS and pathPrefix==NULL");
}
pre = Tcl_GetStringFromObj(pathPrefix, &prefixLen);
if (prefixLen > 0
&& (strchr(separators, pre[prefixLen-1]) == NULL)) {
/*
* If we're on Windows and the prefix is a volume relative one
* like 'C:', then there won't be a path separator in between, so
* no need to skip it here.
*/
if ((tclPlatform != TCL_PLATFORM_WINDOWS) || (prefixLen != 2)
|| (pre[1] != ':')) {
prefixLen++;
}
}
Tcl_ListObjGetElements(NULL, filenamesObj, &objc, &objv);
for (i = 0; i< objc; i++) {
int len;
char *oldStr = Tcl_GetStringFromObj(objv[i], &len);
Tcl_Obj* elems[1];
if (len == prefixLen) {
if ((pattern[0] == '\0')
|| (strchr(separators, pattern[0]) == NULL)) {
TclNewLiteralStringObj(elems[0], ".");
} else {
TclNewLiteralStringObj(elems[0], "/");
}
} else {
elems[0] = Tcl_NewStringObj(oldStr+prefixLen, len-prefixLen);
}
Tcl_ListObjReplace(interp, filenamesObj, i, 1, 1, elems);
}
}
/*
* Now we have a list of discovered filenames in filenamesObj and a list
* of previously discovered (saved earlier from the interpreter result) in
* savedResultObj. Merge them and put them back in the interpreter result.
*/
if (Tcl_IsShared(savedResultObj)) {
TclDecrRefCount(savedResultObj);
savedResultObj = Tcl_DuplicateObj(savedResultObj);
Tcl_IncrRefCount(savedResultObj);
}
if (Tcl_ListObjAppendList(interp, savedResultObj, filenamesObj) != TCL_OK){
result = TCL_ERROR;
} else {
Tcl_SetObjResult(interp, savedResultObj);
}
TclDecrRefCount(savedResultObj);
TclDecrRefCount(filenamesObj);
if (pathPrefix != NULL) {
Tcl_DecrRefCount(pathPrefix);
}
return result;
}
/*
*----------------------------------------------------------------------
*
* SkipToChar --
*
* This function traverses a glob pattern looking for the next unquoted
* occurance of the specified character at the same braces nesting level.
*
* Results:
* Updates stringPtr to point to the matching character, or to the end of
* the string if nothing matched. The return value is 1 if a match was
* found at the top level, otherwise it is 0.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static int
SkipToChar(
char **stringPtr, /* Pointer string to check. */
int match) /* Character to find. */
{
int quoted, level;
register char *p;
quoted = 0;
level = 0;
for (p = *stringPtr; *p != '\0'; p++) {
if (quoted) {
quoted = 0;
continue;
}
if ((level == 0) && (*p == match)) {
*stringPtr = p;
return 1;
}
if (*p == '{') {
level++;
} else if (*p == '}') {
level--;
} else if (*p == '\\') {
quoted = 1;
}
}
*stringPtr = p;
return 0;
}
/*
*----------------------------------------------------------------------
*
* DoGlob --
*
* This recursive procedure forms the heart of the globbing code. It
* performs a depth-first traversal of the tree given by the path name to
* be globbed and the pattern. The directory and remainder are assumed to
* be native format paths. The prefix contained in 'pathPtr' is either a
* directory or path from which to start the search (or NULL). If pathPtr
* is NULL, then the pattern must not start with an absolute path
* specification (that case should be handled by moving the absolute path
* prefix into pathPtr before calling DoGlob).
*
* Results:
* The return value is a standard Tcl result indicating whether an error
* occurred in globbing. After a normal return the result in interp will
* be set to hold all of the file names given by the dir and remaining
* arguments. After an error the result in interp will hold an error
* message.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static int
DoGlob(
Tcl_Interp *interp, /* Interpreter to use for error reporting
* (e.g. unmatched brace). */
Tcl_Obj *matchesObj, /* Unshared list object in which to place all
* resulting filenames. Caller allocates and
* deallocates; DoGlob must not touch the
* refCount of this object. */
const char *separators, /* String containing separator characters that
* should be used to identify globbing
* boundaries. */
Tcl_Obj *pathPtr, /* Completely expanded prefix. */
int flags, /* If non-zero then pathPtr is a directory */
char *pattern, /* The pattern to match against. Must not be a
* pointer to a static string. */
Tcl_GlobTypeData *types) /* List object containing list of acceptable
* types. May be NULL. */
{
int baseLength, quoted, count;
int result = TCL_OK;
char *name, *p, *openBrace, *closeBrace, *firstSpecialChar;
Tcl_Obj *joinedPtr;
/*
* Consume any leading directory separators, leaving pattern pointing just
* past the last initial separator.
*/
count = 0;
name = pattern;
for (; *pattern != '\0'; pattern++) {
if (*pattern == '\\') {
/*
* If the first character is escaped, either we have a directory
* separator, or we have any other character. In the latter case
* the rest is a pattern, and we must break from the loop. This
* is particularly important on Windows where '\' is both the
* escaping character and a directory separator.
*/
if (strchr(separators, pattern[1]) != NULL) {
pattern++;
} else {
break;
}
} else if (strchr(separators, *pattern) == NULL) {
break;
}
count++;
}
/*
* This block of code is not exercised by the Tcl test suite as of Tcl
* 8.5a0. Simplifications to the calling paths suggest it may not be
* necessary any more, since path separators are handled elsewhere. It is
* left in place in case new bugs are reported.
*/
#if 0 /* PROBABLY_OBSOLETE */
/*
* Deal with path separators.
*/
if (pathPtr == NULL) {
/*
* Length used to be the length of the prefix, and lastChar the
* lastChar of the prefix. But, none of this is used any more.
*/
int length = 0;
char lastChar = 0;
switch (tclPlatform) {
case TCL_PLATFORM_WINDOWS:
/*
* If this is a drive relative path, add the colon and the
* trailing slash if needed. Otherwise add the slash if this is
* the first absolute element, or a later relative element. Add an
* extra slash if this is a UNC path.
*/
if (*name == ':') {
Tcl_DStringAppend(&append, ":", 1);
if (count > 1) {
Tcl_DStringAppend(&append, "/", 1);
}
} else if ((*pattern != '\0') && (((length > 0)
&& (strchr(separators, lastChar) == NULL))
|| ((length == 0) && (count > 0)))) {
Tcl_DStringAppend(&append, "/", 1);
if ((length == 0) && (count > 1)) {
Tcl_DStringAppend(&append, "/", 1);
}
}
break;
case TCL_PLATFORM_UNIX:
/*
* Add a separator if this is the first absolute element, or a
* later relative element.
*/
if ((*pattern != '\0') && (((length > 0)
&& (strchr(separators, lastChar) == NULL))
|| ((length == 0) && (count > 0)))) {
Tcl_DStringAppend(&append, "/", 1);
}
break;
}
}
#endif /* PROBABLY_OBSOLETE */
/*
* Look for the first matching pair of braces or the first directory
* separator that is not inside a pair of braces.
*/
openBrace = closeBrace = NULL;
quoted = 0;
for (p = pattern; *p != '\0'; p++) {
if (quoted) {
quoted = 0;
} else if (*p == '\\') {
quoted = 1;
if (strchr(separators, p[1]) != NULL) {
/*
* Quoted directory separator.
*/
break;
}
} else if (strchr(separators, *p) != NULL) {
/*
* Unquoted directory separator.
*/
break;
} else if (*p == '{') {
openBrace = p;
p++;
if (SkipToChar(&p, '}')) {
/*
* Balanced braces.
*/
closeBrace = p;
break;
}
Tcl_SetResult(interp, "unmatched open-brace in file name",
TCL_STATIC);
return TCL_ERROR;
} else if (*p == '}') {
Tcl_SetResult(interp, "unmatched close-brace in file name",
TCL_STATIC);
return TCL_ERROR;
}
}
/*
* Substitute the alternate patterns from the braces and recurse.
*/
if (openBrace != NULL) {
char *element;
Tcl_DString newName;
Tcl_DStringInit(&newName);
/*
* For each element within in the outermost pair of braces, append the
* element and the remainder to the fixed portion before the first
* brace and recursively call DoGlob.
*/
Tcl_DStringAppend(&newName, pattern, openBrace-pattern);
baseLength = Tcl_DStringLength(&newName);
*closeBrace = '\0';
for (p = openBrace; p != closeBrace; ) {
p++;
element = p;
SkipToChar(&p, ',');
Tcl_DStringSetLength(&newName, baseLength);
Tcl_DStringAppend(&newName, element, p-element);
Tcl_DStringAppend(&newName, closeBrace+1, -1);
result = DoGlob(interp, matchesObj, separators, pathPtr, flags,
Tcl_DStringValue(&newName), types);
if (result != TCL_OK) {
break;
}
}
*closeBrace = '}';
Tcl_DStringFree(&newName);
return result;
}
/*
* At this point, there are no more brace substitutions to perform on this
* path component. The variable p is pointing at a quoted or unquoted
* directory separator or the end of the string. So we need to check for
* special globbing characters in the current pattern. We avoid modifying
* pattern if p is pointing at the end of the string.
*
* If we find any globbing characters, then we must call
* Tcl_FSMatchInDirectory. If we're at the end of the string, then that's
* all we need to do. If we're not at the end of the string, then we must
* recurse, so we do that below.
*
* Alternatively, if there are no globbing characters then again there are
* two cases. If we're at the end of the string, we just need to check for
* the given path's existence and type. If we're not at the end of the
* string, we recurse.
*/
if (*p != '\0') {
/*
* Note that we are modifying the string in place. This won't work if
* the string is a static.
*/
char savedChar = *p;
*p = '\0';
firstSpecialChar = strpbrk(pattern, "*[]?\\");
*p = savedChar;
} else {
firstSpecialChar = strpbrk(pattern, "*[]?\\");
}
if (firstSpecialChar != NULL) {
/*
* Look for matching files in the given directory. The implementation
* of this function is filesystem specific. For each file that
* matches, it will add the match onto the resultPtr given.
*/
static Tcl_GlobTypeData dirOnly = {
TCL_GLOB_TYPE_DIR, 0, NULL, NULL
};
char save = *p;
Tcl_Obj* subdirsPtr;
if (*p == '\0') {
return Tcl_FSMatchInDirectory(interp, matchesObj, pathPtr,
pattern, types);
}
/*
* We do the recursion ourselves. This makes implementing
* Tcl_FSMatchInDirectory for each filesystem much easier.
*/
*p = '\0';
TclNewObj(subdirsPtr);
Tcl_IncrRefCount(subdirsPtr);
result = Tcl_FSMatchInDirectory(interp, subdirsPtr, pathPtr,
pattern, &dirOnly);
*p = save;
if (result == TCL_OK) {
int subdirc, i, repair = -1;
Tcl_Obj **subdirv;
result = Tcl_ListObjGetElements(interp, subdirsPtr,
&subdirc, &subdirv);
for (i=0; result==TCL_OK && i<subdirc; i++) {
Tcl_Obj *copy = NULL;
if (pathPtr == NULL && Tcl_GetString(subdirv[i])[0] == '~') {
Tcl_ListObjLength(NULL, matchesObj, &repair);
copy = subdirv[i];
subdirv[i] = Tcl_NewStringObj("./", 2);
Tcl_AppendObjToObj(subdirv[i], copy);
Tcl_IncrRefCount(subdirv[i]);
}
result = DoGlob(interp, matchesObj, separators, subdirv[i],
1, p+1, types);
if (copy) {
int end;
Tcl_DecrRefCount(subdirv[i]);
subdirv[i] = copy;
Tcl_ListObjLength(NULL, matchesObj, &end);
while (repair < end) {
const char *bytes;
int numBytes;
Tcl_Obj *fixme, *newObj;
Tcl_ListObjIndex(NULL, matchesObj, repair, &fixme);
bytes = Tcl_GetStringFromObj(fixme, &numBytes);
newObj = Tcl_NewStringObj(bytes+2, numBytes-2);
Tcl_ListObjReplace(NULL, matchesObj, repair, 1,
1, &newObj);
repair++;
}
repair = -1;
}
}
}
TclDecrRefCount(subdirsPtr);
return result;
}
/*
* We reach here with no pattern char in current section
*/
if (*p == '\0') {
/*
* This is the code path reached by a command like 'glob foo'.
*
* There are no more wildcards in the pattern and no more unprocessed
* characters in the pattern, so now we can construct the path, and
* pass it to Tcl_FSMatchInDirectory with an empty pattern to verify
* the existence of the file and check it is of the correct type (if a
* 'types' flag it given -- if no such flag was given, we could just
* use 'Tcl_FSLStat', but for simplicity we keep to a common
* approach).
*/
int length;
Tcl_DString append;
Tcl_DStringInit(&append);
Tcl_DStringAppend(&append, pattern, p-pattern);
if (pathPtr != NULL) {
(void) Tcl_GetStringFromObj(pathPtr, &length);
} else {
length = 0;
}
switch (tclPlatform) {
case TCL_PLATFORM_WINDOWS:
if (length == 0 && (Tcl_DStringLength(&append) == 0)) {
if (((*name == '\\') && (name[1] == '/' ||
name[1] == '\\')) || (*name == '/')) {
Tcl_DStringAppend(&append, "/", 1);
} else {
Tcl_DStringAppend(&append, ".", 1);
}
}
#if defined(__CYGWIN__) && defined(__WIN32__)
{
char winbuf[MAX_PATH+1];
cygwin_conv_to_win32_path(Tcl_DStringValue(&append), winbuf);
Tcl_DStringFree(&append);
Tcl_DStringAppend(&append, winbuf, -1);
}
#endif /* __CYGWIN__ && __WIN32__ */
break;
case TCL_PLATFORM_UNIX:
if (length == 0 && (Tcl_DStringLength(&append) == 0)) {
if ((*name == '\\' && name[1] == '/') || (*name == '/')) {
Tcl_DStringAppend(&append, "/", 1);
} else {
Tcl_DStringAppend(&append, ".", 1);
}
}
break;
}
/*
* Common for all platforms.
*/
if (pathPtr == NULL) {
joinedPtr = Tcl_NewStringObj(Tcl_DStringValue(&append),
Tcl_DStringLength(&append));
} else if (flags) {
joinedPtr = TclNewFSPathObj(pathPtr, Tcl_DStringValue(&append),
Tcl_DStringLength(&append));
} else {
joinedPtr = Tcl_DuplicateObj(pathPtr);
if (strchr(separators, Tcl_DStringValue(&append)[0]) == NULL) {
/*
* The current prefix must end in a separator.
*/
int len;
const char *joined = Tcl_GetStringFromObj(joinedPtr,&len);
if (strchr(separators, joined[len-1]) == NULL) {
Tcl_AppendToObj(joinedPtr, "/", 1);
}
}
Tcl_AppendToObj(joinedPtr, Tcl_DStringValue(&append),
Tcl_DStringLength(&append));
}
Tcl_IncrRefCount(joinedPtr);
Tcl_DStringFree(&append);
result = Tcl_FSMatchInDirectory(interp, matchesObj, joinedPtr, NULL,
types);
Tcl_DecrRefCount(joinedPtr);
return result;
}
/*
* If it's not the end of the string, we must recurse
*/
if (pathPtr == NULL) {
joinedPtr = Tcl_NewStringObj(pattern, p-pattern);
} else if (flags) {
joinedPtr = TclNewFSPathObj(pathPtr, pattern, p-pattern);
} else {
joinedPtr = Tcl_DuplicateObj(pathPtr);
if (strchr(separators, pattern[0]) == NULL) {
/*
* The current prefix must end in a separator, unless this is a
* volume-relative path. In particular globbing in Windows shares,
* when not using -dir or -path, e.g. 'glob [file join
* //machine/share/subdir *]' requires adding a separator here.
* This behaviour is not currently tested for in the test suite.
*/
int len;
const char *joined = Tcl_GetStringFromObj(joinedPtr,&len);
if (strchr(separators, joined[len-1]) == NULL) {
if (Tcl_FSGetPathType(pathPtr) != TCL_PATH_VOLUME_RELATIVE) {
Tcl_AppendToObj(joinedPtr, "/", 1);
}
}
}
Tcl_AppendToObj(joinedPtr, pattern, p-pattern);
}
Tcl_IncrRefCount(joinedPtr);
result = DoGlob(interp, matchesObj, separators, joinedPtr, 1, p, types);
Tcl_DecrRefCount(joinedPtr);
return result;
}
/*
*---------------------------------------------------------------------------
*
* Tcl_AllocStatBuf --
*
* This procedure allocates a Tcl_StatBuf on the heap. It exists so that
* extensions may be used unchanged on systems where largefile support is
* optional.
*
* Results:
* A pointer to a Tcl_StatBuf which may be deallocated by being passed to
* ckfree().
*
* Side effects:
* None.
*
*---------------------------------------------------------------------------
*/
Tcl_StatBuf *
Tcl_AllocStatBuf(void)
{
return (Tcl_StatBuf *) ckalloc(sizeof(Tcl_StatBuf));
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 4
* fill-column: 78
* End:
*/
|
c55d359c6097bf4e8dea0ec7c7b4c53048d51589
|
03666e5f961946fc1a0ac67781ac1425562ef0d7
|
/src/visitpy/visitpy/PyMachineProfile.C
|
45415bbd207d1067099471c7650e49a30ef72124
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
visit-dav/visit
|
e9f81b4d4b9b9930a0db9d5282cd1bcabf465e2e
|
601ae46e0bef2e18425b482a755d03490ade0493
|
refs/heads/develop
| 2023-09-06T08:19:38.397058
| 2023-09-05T21:29:32
| 2023-09-05T21:29:32
| 165,565,988
| 335
| 120
|
BSD-3-Clause
| 2023-09-14T00:53:37
| 2019-01-13T23:27:26
|
C
|
UTF-8
|
C
| false
| false
| 60,105
|
c
|
PyMachineProfile.C
|
// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers. See the top-level LICENSE file for dates and other
// details. No copyright assignment is required to contribute to VisIt.
#include <PyMachineProfile.h>
#include <ObserverToCallback.h>
#include <stdio.h>
#include <Py2and3Support.h>
#include <PyLaunchProfile.h>
// ****************************************************************************
// Module: PyMachineProfile
//
// Purpose:
// This class contains information about a host for a remote VisIt engine.
//
// Note: Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation: omitted
//
// ****************************************************************************
//
// This struct contains the Python type information and a MachineProfile.
//
struct MachineProfileObject
{
PyObject_HEAD
MachineProfile *data;
bool owns;
PyObject *parent;
};
//
// Internal prototypes
//
static PyObject *NewMachineProfile(int);
std::string
PyMachineProfile_ToString(const MachineProfile *atts, const char *prefix, const bool forLogging)
{
std::string str;
char tmpStr[1000];
snprintf(tmpStr, 1000, "%shost = \"%s\"\n", prefix, atts->GetHost().c_str());
str += tmpStr;
snprintf(tmpStr, 1000, "%suserName = \"%s\"\n", prefix, atts->GetUserName().c_str());
str += tmpStr;
snprintf(tmpStr, 1000, "%spassword = \"%s\"\n", prefix, atts->GetPassword().c_str());
str += tmpStr;
snprintf(tmpStr, 1000, "%shostAliases = \"%s\"\n", prefix, atts->GetHostAliases().c_str());
str += tmpStr;
snprintf(tmpStr, 1000, "%shostNickname = \"%s\"\n", prefix, atts->GetHostNickname().c_str());
str += tmpStr;
snprintf(tmpStr, 1000, "%sdirectory = \"%s\"\n", prefix, atts->GetDirectory().c_str());
str += tmpStr;
if(atts->GetShareOneBatchJob())
snprintf(tmpStr, 1000, "%sshareOneBatchJob = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%sshareOneBatchJob = 0\n", prefix);
str += tmpStr;
if(atts->GetSshPortSpecified())
snprintf(tmpStr, 1000, "%ssshPortSpecified = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%ssshPortSpecified = 0\n", prefix);
str += tmpStr;
snprintf(tmpStr, 1000, "%ssshPort = %d\n", prefix, atts->GetSshPort());
str += tmpStr;
if(atts->GetSshCommandSpecified())
snprintf(tmpStr, 1000, "%ssshCommandSpecified = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%ssshCommandSpecified = 0\n", prefix);
str += tmpStr;
{ const stringVector &sshCommand = atts->GetSshCommand();
snprintf(tmpStr, 1000, "%ssshCommand = (", prefix);
str += tmpStr;
for(size_t i = 0; i < sshCommand.size(); ++i)
{
snprintf(tmpStr, 1000, "\"%s\"", sshCommand[i].c_str());
str += tmpStr;
if(i < sshCommand.size() - 1)
{
snprintf(tmpStr, 1000, ", ");
str += tmpStr;
}
}
snprintf(tmpStr, 1000, ")\n");
str += tmpStr;
}
if(atts->GetUseGateway())
snprintf(tmpStr, 1000, "%suseGateway = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%suseGateway = 0\n", prefix);
str += tmpStr;
snprintf(tmpStr, 1000, "%sgatewayHost = \"%s\"\n", prefix, atts->GetGatewayHost().c_str());
str += tmpStr;
const char *clientHostDetermination_names = "MachineName, ManuallySpecified, ParsedFromSSHCLIENT";
switch (atts->GetClientHostDetermination())
{
case MachineProfile::MachineName:
snprintf(tmpStr, 1000, "%sclientHostDetermination = %sMachineName # %s\n", prefix, prefix, clientHostDetermination_names);
str += tmpStr;
break;
case MachineProfile::ManuallySpecified:
snprintf(tmpStr, 1000, "%sclientHostDetermination = %sManuallySpecified # %s\n", prefix, prefix, clientHostDetermination_names);
str += tmpStr;
break;
case MachineProfile::ParsedFromSSHCLIENT:
snprintf(tmpStr, 1000, "%sclientHostDetermination = %sParsedFromSSHCLIENT # %s\n", prefix, prefix, clientHostDetermination_names);
str += tmpStr;
break;
default:
break;
}
snprintf(tmpStr, 1000, "%smanualClientHostName = \"%s\"\n", prefix, atts->GetManualClientHostName().c_str());
str += tmpStr;
if(atts->GetTunnelSSH())
snprintf(tmpStr, 1000, "%stunnelSSH = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%stunnelSSH = 0\n", prefix);
str += tmpStr;
if(atts->GetMaximumNodesValid())
snprintf(tmpStr, 1000, "%smaximumNodesValid = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%smaximumNodesValid = 0\n", prefix);
str += tmpStr;
snprintf(tmpStr, 1000, "%smaximumNodes = %d\n", prefix, atts->GetMaximumNodes());
str += tmpStr;
if(atts->GetMaximumProcessorsValid())
snprintf(tmpStr, 1000, "%smaximumProcessorsValid = 1\n", prefix);
else
snprintf(tmpStr, 1000, "%smaximumProcessorsValid = 0\n", prefix);
str += tmpStr;
snprintf(tmpStr, 1000, "%smaximumProcessors = %d\n", prefix, atts->GetMaximumProcessors());
str += tmpStr;
{ // new scope
int index = 0;
// Create string representation of launchProfiles from atts.
for(AttributeGroupVector::const_iterator pos = atts->GetLaunchProfiles().begin(); pos != atts->GetLaunchProfiles().end(); ++pos, ++index)
{
const LaunchProfile *current = (const LaunchProfile *)(*pos);
snprintf(tmpStr, 1000, "GetLaunchProfiles(%d).", index);
std::string objPrefix(prefix + std::string(tmpStr));
str += PyLaunchProfile_ToString(current, objPrefix.c_str(), forLogging);
}
if(index == 0)
str += "#launchProfiles does not contain any LaunchProfile objects.\n";
}
snprintf(tmpStr, 1000, "%sactiveProfile = %d\n", prefix, atts->GetActiveProfile());
str += tmpStr;
return str;
}
static PyObject *
MachineProfile_Notify(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
obj->data->Notify();
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_SetHost(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the host in the object.
obj->data->SetHost(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetHost(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetHost().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetUserName(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the userName in the object.
obj->data->SetUserName(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetUserName(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetUserName().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetPassword(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the password in the object.
obj->data->SetPassword(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetPassword(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetPassword().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetHostAliases(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the hostAliases in the object.
obj->data->SetHostAliases(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetHostAliases(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetHostAliases().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetHostNickname(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the hostNickname in the object.
obj->data->SetHostNickname(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetHostNickname(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetHostNickname().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetDirectory(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the directory in the object.
obj->data->SetDirectory(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetDirectory(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetDirectory().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetShareOneBatchJob(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the shareOneBatchJob in the object.
obj->data->SetShareOneBatchJob(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetShareOneBatchJob(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetShareOneBatchJob()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetSshPortSpecified(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the sshPortSpecified in the object.
obj->data->SetSshPortSpecified(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetSshPortSpecified(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetSshPortSpecified()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetSshPort(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
int cval = int(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
}
Py_XDECREF(packaged_args);
// Set the sshPort in the object.
obj->data->SetSshPort(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetSshPort(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(long(obj->data->GetSshPort()));
return retval;
}
/*static*/ PyObject *
MachineProfile_SetSshCommandSpecified(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the sshCommandSpecified in the object.
obj->data->SetSshCommandSpecified(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetSshCommandSpecified(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetSshCommandSpecified()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetSshCommand(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
stringVector vec;
if (PyUnicode_Check(args))
{
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ string");
}
vec.resize(1);
vec[0] = cval;
}
else if (PySequence_Check(args))
{
vec.resize(PySequence_Size(args));
for (Py_ssize_t i = 0; i < PySequence_Size(args); i++)
{
PyObject *item = PySequence_GetItem(args, i);
if (!PyUnicode_Check(item))
{
Py_DECREF(item);
return PyErr_Format(PyExc_TypeError, "arg %d is not a unicode string", (int) i);
}
char const *val = PyUnicode_AsUTF8(item);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_DECREF(item);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg %d not interpretable as C++ string", (int) i);
}
Py_DECREF(item);
vec[i] = cval;
}
}
else
return PyErr_Format(PyExc_TypeError, "arg(s) must be one or more string(s)");
obj->data->GetSshCommand() = vec;
// Mark the sshCommand in the object as modified.
obj->data->SelectSshCommand();
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetSshCommand(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
// Allocate a tuple the with enough entries to hold the sshCommand.
const stringVector &sshCommand = obj->data->GetSshCommand();
PyObject *retval = PyTuple_New(sshCommand.size());
for(size_t i = 0; i < sshCommand.size(); ++i)
PyTuple_SET_ITEM(retval, i, PyString_FromString(sshCommand[i].c_str()));
return retval;
}
/*static*/ PyObject *
MachineProfile_SetUseGateway(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the useGateway in the object.
obj->data->SetUseGateway(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetUseGateway(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetUseGateway()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetGatewayHost(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the gatewayHost in the object.
obj->data->SetGatewayHost(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetGatewayHost(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetGatewayHost().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetClientHostDetermination(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
int cval = int(val);
if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
}
if (cval < 0 || cval >= 3)
{
std::stringstream ss;
ss << "An invalid clientHostDetermination value was given." << std::endl;
ss << "Valid values are in the range [0,2]." << std::endl;
ss << "You can also use the following symbolic names:";
ss << " MachineName";
ss << ", ManuallySpecified";
ss << ", ParsedFromSSHCLIENT";
return PyErr_Format(PyExc_ValueError, ss.str().c_str());
}
Py_XDECREF(packaged_args);
// Set the clientHostDetermination in the object.
obj->data->SetClientHostDetermination(MachineProfile::ClientHostDetermination(cval));
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetClientHostDetermination(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(long(obj->data->GetClientHostDetermination()));
return retval;
}
/*static*/ PyObject *
MachineProfile_SetManualClientHostName(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged as first member of a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyUnicode_Check(packaged_args))
args = packaged_args;
}
if (!PyUnicode_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a unicode string");
}
char const *val = PyUnicode_AsUTF8(args);
std::string cval = std::string(val);
if (val == 0 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as utf8 string");
}
Py_XDECREF(packaged_args);
// Set the manualClientHostName in the object.
obj->data->SetManualClientHostName(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetManualClientHostName(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyString_FromString(obj->data->GetManualClientHostName().c_str());
return retval;
}
/*static*/ PyObject *
MachineProfile_SetTunnelSSH(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the tunnelSSH in the object.
obj->data->SetTunnelSSH(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetTunnelSSH(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetTunnelSSH()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetMaximumNodesValid(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the maximumNodesValid in the object.
obj->data->SetMaximumNodesValid(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetMaximumNodesValid(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetMaximumNodesValid()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetMaximumNodes(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
int cval = int(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
}
Py_XDECREF(packaged_args);
// Set the maximumNodes in the object.
obj->data->SetMaximumNodes(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetMaximumNodes(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(long(obj->data->GetMaximumNodes()));
return retval;
}
/*static*/ PyObject *
MachineProfile_SetMaximumProcessorsValid(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
bool cval = bool(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
}
Py_XDECREF(packaged_args);
// Set the maximumProcessorsValid in the object.
obj->data->SetMaximumProcessorsValid(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetMaximumProcessorsValid(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetMaximumProcessorsValid()?1L:0L);
return retval;
}
/*static*/ PyObject *
MachineProfile_SetMaximumProcessors(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
int cval = int(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
}
Py_XDECREF(packaged_args);
// Set the maximumProcessors in the object.
obj->data->SetMaximumProcessors(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetMaximumProcessors(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(long(obj->data->GetMaximumProcessors()));
return retval;
}
/*static*/ PyObject *
MachineProfile_GetLaunchProfiles(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
int index = -1;
if (args == NULL)
return PyErr_Format(PyExc_NameError, "Use .GetLaunchProfiles(int index) to get a single entry");
if (!PyArg_ParseTuple(args, "i", &index))
return PyErr_Format(PyExc_TypeError, "arg must be a single integer index");
if (index < 0 || (size_t)index >= obj->data->GetLaunchProfiles().size())
return PyErr_Format(PyExc_ValueError, "index out of range");
// Since the new object will point to data owned by the this object,
// we need to increment the reference count.
Py_INCREF(self);
PyObject *retval = PyLaunchProfile_Wrap(&obj->data->GetLaunchProfiles(index));
// Set the object's parent so the reference to the parent can be decref'd
// when the child goes out of scope.
PyLaunchProfile_SetParent(retval, self);
return retval;
}
PyObject *
MachineProfile_GetNumLaunchProfiles(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
return PyInt_FromLong((long)obj->data->GetLaunchProfiles().size());
}
PyObject *
MachineProfile_AddLaunchProfiles(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *element = NULL;
if(!PyArg_ParseTuple(args, "O", &element))
return NULL;
if(!PyLaunchProfile_Check(element))
return PyErr_Format(PyExc_TypeError, "expected attr object of type LaunchProfile");
LaunchProfile *newData = PyLaunchProfile_FromPyObject(element);
obj->data->AddLaunchProfiles(*newData);
obj->data->SelectLaunchProfiles();
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
MachineProfile_Remove_One_LaunchProfiles(PyObject *self, int index)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
// Remove in the AttributeGroupVector instead of calling RemoveLaunchProfiles() because we don't want to delete the object; just remove it.
AttributeGroupVector &atts = obj->data->GetLaunchProfiles();
AttributeGroupVector::iterator pos = atts.begin();
// Iterate through the vector "index" times.
for(int i = 0; i < index; ++i)
++pos;
// If pos is still a valid iterator, remove that element.
if(pos != atts.end())
{
// NOTE: Leak the object since other Python objects may reference it. Ideally,
// we would put the object into some type of pool to be cleaned up later but
// this will do for now.
//
// delete *pos;
atts.erase(pos);
}
obj->data->SelectLaunchProfiles();
Py_INCREF(Py_None);
return Py_None;
}
PyObject *
MachineProfile_RemoveLaunchProfiles(PyObject *self, PyObject *args)
{
int index = -1;
if(!PyArg_ParseTuple(args, "i", &index))
return PyErr_Format(PyExc_TypeError, "Expecting integer index");
MachineProfileObject *obj = (MachineProfileObject *)self;
if(index < 0 || index >= obj->data->GetNumLaunchProfiles())
return PyErr_Format(PyExc_IndexError, "Index out of range");
return MachineProfile_Remove_One_LaunchProfiles(self, index);
}
PyObject *
MachineProfile_ClearLaunchProfiles(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
int n = obj->data->GetNumLaunchProfiles();
for(int i = 0; i < n; ++i)
{
MachineProfile_Remove_One_LaunchProfiles(self, 0);
Py_DECREF(Py_None);
}
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_SetActiveProfile(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *packaged_args = 0;
// Handle args packaged into a tuple of size one
// if we think the unpackaged args matches our needs
if (PySequence_Check(args) && PySequence_Size(args) == 1)
{
packaged_args = PySequence_GetItem(args, 0);
if (PyNumber_Check(packaged_args))
args = packaged_args;
}
if (PySequence_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
}
if (!PyNumber_Check(args))
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_TypeError, "arg is not a number type");
}
long val = PyLong_AsLong(args);
int cval = int(val);
if (val == -1 && PyErr_Occurred())
{
Py_XDECREF(packaged_args);
PyErr_Clear();
return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
}
if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
{
Py_XDECREF(packaged_args);
return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
}
Py_XDECREF(packaged_args);
// Set the activeProfile in the object.
obj->data->SetActiveProfile(cval);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
MachineProfile_GetActiveProfile(PyObject *self, PyObject *args)
{
MachineProfileObject *obj = (MachineProfileObject *)self;
PyObject *retval = PyInt_FromLong(long(obj->data->GetActiveProfile()));
return retval;
}
PyMethodDef PyMachineProfile_methods[MACHINEPROFILE_NMETH] = {
{"Notify", MachineProfile_Notify, METH_VARARGS},
{"SetHost", MachineProfile_SetHost, METH_VARARGS},
{"GetHost", MachineProfile_GetHost, METH_VARARGS},
{"SetUserName", MachineProfile_SetUserName, METH_VARARGS},
{"GetUserName", MachineProfile_GetUserName, METH_VARARGS},
{"SetPassword", MachineProfile_SetPassword, METH_VARARGS},
{"GetPassword", MachineProfile_GetPassword, METH_VARARGS},
{"SetHostAliases", MachineProfile_SetHostAliases, METH_VARARGS},
{"GetHostAliases", MachineProfile_GetHostAliases, METH_VARARGS},
{"SetHostNickname", MachineProfile_SetHostNickname, METH_VARARGS},
{"GetHostNickname", MachineProfile_GetHostNickname, METH_VARARGS},
{"SetDirectory", MachineProfile_SetDirectory, METH_VARARGS},
{"GetDirectory", MachineProfile_GetDirectory, METH_VARARGS},
{"SetShareOneBatchJob", MachineProfile_SetShareOneBatchJob, METH_VARARGS},
{"GetShareOneBatchJob", MachineProfile_GetShareOneBatchJob, METH_VARARGS},
{"SetSshPortSpecified", MachineProfile_SetSshPortSpecified, METH_VARARGS},
{"GetSshPortSpecified", MachineProfile_GetSshPortSpecified, METH_VARARGS},
{"SetSshPort", MachineProfile_SetSshPort, METH_VARARGS},
{"GetSshPort", MachineProfile_GetSshPort, METH_VARARGS},
{"SetSshCommandSpecified", MachineProfile_SetSshCommandSpecified, METH_VARARGS},
{"GetSshCommandSpecified", MachineProfile_GetSshCommandSpecified, METH_VARARGS},
{"SetSshCommand", MachineProfile_SetSshCommand, METH_VARARGS},
{"GetSshCommand", MachineProfile_GetSshCommand, METH_VARARGS},
{"SetUseGateway", MachineProfile_SetUseGateway, METH_VARARGS},
{"GetUseGateway", MachineProfile_GetUseGateway, METH_VARARGS},
{"SetGatewayHost", MachineProfile_SetGatewayHost, METH_VARARGS},
{"GetGatewayHost", MachineProfile_GetGatewayHost, METH_VARARGS},
{"SetClientHostDetermination", MachineProfile_SetClientHostDetermination, METH_VARARGS},
{"GetClientHostDetermination", MachineProfile_GetClientHostDetermination, METH_VARARGS},
{"SetManualClientHostName", MachineProfile_SetManualClientHostName, METH_VARARGS},
{"GetManualClientHostName", MachineProfile_GetManualClientHostName, METH_VARARGS},
{"SetTunnelSSH", MachineProfile_SetTunnelSSH, METH_VARARGS},
{"GetTunnelSSH", MachineProfile_GetTunnelSSH, METH_VARARGS},
{"SetMaximumNodesValid", MachineProfile_SetMaximumNodesValid, METH_VARARGS},
{"GetMaximumNodesValid", MachineProfile_GetMaximumNodesValid, METH_VARARGS},
{"SetMaximumNodes", MachineProfile_SetMaximumNodes, METH_VARARGS},
{"GetMaximumNodes", MachineProfile_GetMaximumNodes, METH_VARARGS},
{"SetMaximumProcessorsValid", MachineProfile_SetMaximumProcessorsValid, METH_VARARGS},
{"GetMaximumProcessorsValid", MachineProfile_GetMaximumProcessorsValid, METH_VARARGS},
{"SetMaximumProcessors", MachineProfile_SetMaximumProcessors, METH_VARARGS},
{"GetMaximumProcessors", MachineProfile_GetMaximumProcessors, METH_VARARGS},
{"GetLaunchProfiles", MachineProfile_GetLaunchProfiles, METH_VARARGS},
{"GetNumLaunchProfiles", MachineProfile_GetNumLaunchProfiles, METH_VARARGS},
{"AddLaunchProfiles", MachineProfile_AddLaunchProfiles, METH_VARARGS},
{"RemoveLaunchProfiles", MachineProfile_RemoveLaunchProfiles, METH_VARARGS},
{"ClearLaunchProfiles", MachineProfile_ClearLaunchProfiles, METH_VARARGS},
{"SetActiveProfile", MachineProfile_SetActiveProfile, METH_VARARGS},
{"GetActiveProfile", MachineProfile_GetActiveProfile, METH_VARARGS},
{NULL, NULL}
};
//
// Type functions
//
static void
MachineProfile_dealloc(PyObject *v)
{
MachineProfileObject *obj = (MachineProfileObject *)v;
if(obj->parent != 0)
Py_DECREF(obj->parent);
if(obj->owns)
delete obj->data;
}
static PyObject *MachineProfile_richcompare(PyObject *self, PyObject *other, int op);
PyObject *
PyMachineProfile_getattr(PyObject *self, char *name)
{
if(strcmp(name, "host") == 0)
return MachineProfile_GetHost(self, NULL);
if(strcmp(name, "userName") == 0)
return MachineProfile_GetUserName(self, NULL);
if(strcmp(name, "password") == 0)
return MachineProfile_GetPassword(self, NULL);
if(strcmp(name, "hostAliases") == 0)
return MachineProfile_GetHostAliases(self, NULL);
if(strcmp(name, "hostNickname") == 0)
return MachineProfile_GetHostNickname(self, NULL);
if(strcmp(name, "directory") == 0)
return MachineProfile_GetDirectory(self, NULL);
if(strcmp(name, "shareOneBatchJob") == 0)
return MachineProfile_GetShareOneBatchJob(self, NULL);
if(strcmp(name, "sshPortSpecified") == 0)
return MachineProfile_GetSshPortSpecified(self, NULL);
if(strcmp(name, "sshPort") == 0)
return MachineProfile_GetSshPort(self, NULL);
if(strcmp(name, "sshCommandSpecified") == 0)
return MachineProfile_GetSshCommandSpecified(self, NULL);
if(strcmp(name, "sshCommand") == 0)
return MachineProfile_GetSshCommand(self, NULL);
if(strcmp(name, "useGateway") == 0)
return MachineProfile_GetUseGateway(self, NULL);
if(strcmp(name, "gatewayHost") == 0)
return MachineProfile_GetGatewayHost(self, NULL);
if(strcmp(name, "clientHostDetermination") == 0)
return MachineProfile_GetClientHostDetermination(self, NULL);
if(strcmp(name, "MachineName") == 0)
return PyInt_FromLong(long(MachineProfile::MachineName));
if(strcmp(name, "ManuallySpecified") == 0)
return PyInt_FromLong(long(MachineProfile::ManuallySpecified));
if(strcmp(name, "ParsedFromSSHCLIENT") == 0)
return PyInt_FromLong(long(MachineProfile::ParsedFromSSHCLIENT));
if(strcmp(name, "manualClientHostName") == 0)
return MachineProfile_GetManualClientHostName(self, NULL);
if(strcmp(name, "tunnelSSH") == 0)
return MachineProfile_GetTunnelSSH(self, NULL);
if(strcmp(name, "maximumNodesValid") == 0)
return MachineProfile_GetMaximumNodesValid(self, NULL);
if(strcmp(name, "maximumNodes") == 0)
return MachineProfile_GetMaximumNodes(self, NULL);
if(strcmp(name, "maximumProcessorsValid") == 0)
return MachineProfile_GetMaximumProcessorsValid(self, NULL);
if(strcmp(name, "maximumProcessors") == 0)
return MachineProfile_GetMaximumProcessors(self, NULL);
if(strcmp(name, "launchProfiles") == 0)
return MachineProfile_GetLaunchProfiles(self, NULL);
if(strcmp(name, "activeProfile") == 0)
return MachineProfile_GetActiveProfile(self, NULL);
// Add a __dict__ answer so that dir() works
if (!strcmp(name, "__dict__"))
{
PyObject *result = PyDict_New();
for (int i = 0; PyMachineProfile_methods[i].ml_meth; i++)
PyDict_SetItem(result,
PyString_FromString(PyMachineProfile_methods[i].ml_name),
PyString_FromString(PyMachineProfile_methods[i].ml_name));
return result;
}
return Py_FindMethod(PyMachineProfile_methods, self, name);
}
int
PyMachineProfile_setattr(PyObject *self, char *name, PyObject *args)
{
PyObject NULL_PY_OBJ;
PyObject *obj = &NULL_PY_OBJ;
if(strcmp(name, "host") == 0)
obj = MachineProfile_SetHost(self, args);
else if(strcmp(name, "userName") == 0)
obj = MachineProfile_SetUserName(self, args);
else if(strcmp(name, "password") == 0)
obj = MachineProfile_SetPassword(self, args);
else if(strcmp(name, "hostAliases") == 0)
obj = MachineProfile_SetHostAliases(self, args);
else if(strcmp(name, "hostNickname") == 0)
obj = MachineProfile_SetHostNickname(self, args);
else if(strcmp(name, "directory") == 0)
obj = MachineProfile_SetDirectory(self, args);
else if(strcmp(name, "shareOneBatchJob") == 0)
obj = MachineProfile_SetShareOneBatchJob(self, args);
else if(strcmp(name, "sshPortSpecified") == 0)
obj = MachineProfile_SetSshPortSpecified(self, args);
else if(strcmp(name, "sshPort") == 0)
obj = MachineProfile_SetSshPort(self, args);
else if(strcmp(name, "sshCommandSpecified") == 0)
obj = MachineProfile_SetSshCommandSpecified(self, args);
else if(strcmp(name, "sshCommand") == 0)
obj = MachineProfile_SetSshCommand(self, args);
else if(strcmp(name, "useGateway") == 0)
obj = MachineProfile_SetUseGateway(self, args);
else if(strcmp(name, "gatewayHost") == 0)
obj = MachineProfile_SetGatewayHost(self, args);
else if(strcmp(name, "clientHostDetermination") == 0)
obj = MachineProfile_SetClientHostDetermination(self, args);
else if(strcmp(name, "manualClientHostName") == 0)
obj = MachineProfile_SetManualClientHostName(self, args);
else if(strcmp(name, "tunnelSSH") == 0)
obj = MachineProfile_SetTunnelSSH(self, args);
else if(strcmp(name, "maximumNodesValid") == 0)
obj = MachineProfile_SetMaximumNodesValid(self, args);
else if(strcmp(name, "maximumNodes") == 0)
obj = MachineProfile_SetMaximumNodes(self, args);
else if(strcmp(name, "maximumProcessorsValid") == 0)
obj = MachineProfile_SetMaximumProcessorsValid(self, args);
else if(strcmp(name, "maximumProcessors") == 0)
obj = MachineProfile_SetMaximumProcessors(self, args);
else if(strcmp(name, "activeProfile") == 0)
obj = MachineProfile_SetActiveProfile(self, args);
if (obj != NULL && obj != &NULL_PY_OBJ)
Py_DECREF(obj);
if (obj == &NULL_PY_OBJ)
{
obj = NULL;
PyErr_Format(PyExc_NameError, "name '%s' is not defined", name);
}
else if (obj == NULL && !PyErr_Occurred())
PyErr_Format(PyExc_RuntimeError, "unknown problem with '%s'", name);
return (obj != NULL) ? 0 : -1;
}
static int
MachineProfile_print(PyObject *v, FILE *fp, int flags)
{
MachineProfileObject *obj = (MachineProfileObject *)v;
fprintf(fp, "%s", PyMachineProfile_ToString(obj->data, "",false).c_str());
return 0;
}
PyObject *
MachineProfile_str(PyObject *v)
{
MachineProfileObject *obj = (MachineProfileObject *)v;
return PyString_FromString(PyMachineProfile_ToString(obj->data,"", false).c_str());
}
//
// The doc string for the class.
//
#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5)
static const char *MachineProfile_Purpose = "This class contains information about a host for a remote VisIt engine.";
#else
static char *MachineProfile_Purpose = "This class contains information about a host for a remote VisIt engine.";
#endif
//
// Python Type Struct Def Macro from Py2and3Support.h
//
// VISIT_PY_TYPE_OBJ( VPY_TYPE,
// VPY_NAME,
// VPY_OBJECT,
// VPY_DEALLOC,
// VPY_PRINT,
// VPY_GETATTR,
// VPY_SETATTR,
// VPY_STR,
// VPY_PURPOSE,
// VPY_RICHCOMP,
// VPY_AS_NUMBER)
//
// The type description structure
//
VISIT_PY_TYPE_OBJ(MachineProfileType, \
"MachineProfile", \
MachineProfileObject, \
MachineProfile_dealloc, \
MachineProfile_print, \
PyMachineProfile_getattr, \
PyMachineProfile_setattr, \
MachineProfile_str, \
MachineProfile_Purpose, \
MachineProfile_richcompare, \
0); /* as_number*/
//
// Helper function for comparing.
//
static PyObject *
MachineProfile_richcompare(PyObject *self, PyObject *other, int op)
{
// only compare against the same type
if ( Py_TYPE(self) != &MachineProfileType
|| Py_TYPE(other) != &MachineProfileType)
{
Py_INCREF(Py_NotImplemented);
return Py_NotImplemented;
}
PyObject *res = NULL;
MachineProfile *a = ((MachineProfileObject *)self)->data;
MachineProfile *b = ((MachineProfileObject *)other)->data;
switch (op)
{
case Py_EQ:
res = (*a == *b) ? Py_True : Py_False;
break;
case Py_NE:
res = (*a != *b) ? Py_True : Py_False;
break;
default:
res = Py_NotImplemented;
break;
}
Py_INCREF(res);
return res;
}
//
// Helper functions for object allocation.
//
static MachineProfile *defaultAtts = 0;
static MachineProfile *currentAtts = 0;
static PyObject *
NewMachineProfile(int useCurrent)
{
MachineProfileObject *newObject;
newObject = PyObject_NEW(MachineProfileObject, &MachineProfileType);
if(newObject == NULL)
return NULL;
if(useCurrent && currentAtts != 0)
newObject->data = new MachineProfile(*currentAtts);
else if(defaultAtts != 0)
newObject->data = new MachineProfile(*defaultAtts);
else
newObject->data = new MachineProfile;
newObject->owns = true;
newObject->parent = 0;
return (PyObject *)newObject;
}
static PyObject *
WrapMachineProfile(const MachineProfile *attr)
{
MachineProfileObject *newObject;
newObject = PyObject_NEW(MachineProfileObject, &MachineProfileType);
if(newObject == NULL)
return NULL;
newObject->data = (MachineProfile *)attr;
newObject->owns = false;
newObject->parent = 0;
return (PyObject *)newObject;
}
///////////////////////////////////////////////////////////////////////////////
//
// Interface that is exposed to the VisIt module.
//
///////////////////////////////////////////////////////////////////////////////
PyObject *
MachineProfile_new(PyObject *self, PyObject *args)
{
int useCurrent = 0;
if (!PyArg_ParseTuple(args, "i", &useCurrent))
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
else
PyErr_Clear();
}
return (PyObject *)NewMachineProfile(useCurrent);
}
//
// Plugin method table. These methods are added to the visitmodule's methods.
//
static PyMethodDef MachineProfileMethods[] = {
{"MachineProfile", MachineProfile_new, METH_VARARGS},
{NULL, NULL} /* Sentinel */
};
static Observer *MachineProfileObserver = 0;
std::string
PyMachineProfile_GetLogString()
{
std::string s("MachineProfile = MachineProfile()\n");
if(currentAtts != 0)
s += PyMachineProfile_ToString(currentAtts, "MachineProfile.", true);
return s;
}
static void
PyMachineProfile_CallLogRoutine(Subject *subj, void *data)
{
typedef void (*logCallback)(const std::string &);
logCallback cb = (logCallback)data;
if(cb != 0)
{
std::string s("MachineProfile = MachineProfile()\n");
s += PyMachineProfile_ToString(currentAtts, "MachineProfile.", true);
cb(s);
}
}
void
PyMachineProfile_StartUp(MachineProfile *subj, void *data)
{
if(subj == 0)
return;
currentAtts = subj;
PyMachineProfile_SetDefaults(subj);
//
// Create the observer that will be notified when the attributes change.
//
if(MachineProfileObserver == 0)
{
MachineProfileObserver = new ObserverToCallback(subj,
PyMachineProfile_CallLogRoutine, (void *)data);
}
}
void
PyMachineProfile_CloseDown()
{
delete defaultAtts;
defaultAtts = 0;
delete MachineProfileObserver;
MachineProfileObserver = 0;
}
PyMethodDef *
PyMachineProfile_GetMethodTable(int *nMethods)
{
*nMethods = 1;
return MachineProfileMethods;
}
bool
PyMachineProfile_Check(PyObject *obj)
{
return (obj->ob_type == &MachineProfileType);
}
MachineProfile *
PyMachineProfile_FromPyObject(PyObject *obj)
{
MachineProfileObject *obj2 = (MachineProfileObject *)obj;
return obj2->data;
}
PyObject *
PyMachineProfile_New()
{
return NewMachineProfile(0);
}
PyObject *
PyMachineProfile_Wrap(const MachineProfile *attr)
{
return WrapMachineProfile(attr);
}
void
PyMachineProfile_SetParent(PyObject *obj, PyObject *parent)
{
MachineProfileObject *obj2 = (MachineProfileObject *)obj;
obj2->parent = parent;
}
void
PyMachineProfile_SetDefaults(const MachineProfile *atts)
{
if(defaultAtts)
delete defaultAtts;
defaultAtts = new MachineProfile(*atts);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.