Sample details: 0e9faa7ef864ed57ecaef9cdadacef6b --

Hashes
MD5: 0e9faa7ef864ed57ecaef9cdadacef6b
SHA1: ccf6667a1e172381d7f4b56e6079f6b831006942
SHA256: 65876df23c8def106c07c6e93a4c74458bc3e7d2abc5743f0c39d62b5a39fe53
SSDEEP: 24576:IW92FVQTOJ48qZ3ICotkUCQ/GcljVGN+VoAk7QauZxHAXy:UFVQTI47ZjoWtQRljVGN+VoAY/8AX
Details
File Type: PE32+
Added: 2019-10-09 07:24:30
Yara Hits
YRP/Microsoft_Visual_Cpp_80_DLL | YRP/IsPE64 | YRP/IsConsole | YRP/IsBeyondImageSize | YRP/HasRichSignature | YRP/domain | YRP/IP | YRP/url | YRP/contentis_base64 | YRP/DebuggerCheck__QueryInfo | YRP/DebuggerException__SetConsoleCtrl | YRP/anti_dbg | YRP/network_udp_sock | YRP/network_tcp_listen | YRP/network_tcp_socket | YRP/network_dns | YRP/bitcoin | YRP/escalate_priv | YRP/keylogger | YRP/win_token | YRP/win_files_operation | YRP/Big_Numbers1 | YRP/RijnDael_AES_CHAR | YRP/RijnDael_AES_LONG | YRP/Str_Win32_Winsock2_Library |
Parent Files
8d0d62e0098593d4b25c3cf76b2fd950
Strings
		MZ23502
!This program cannot be run in DOS mode.
`.rdata
@.data
.pdata
@_TEXT_CN
`_TEXT_CN
`.rsrc
@.reloc
L$ SVWH
L$ SUVWH
@VWAVH
|$ AVH
|$ AVH
|$ AVAWL
|$ ATAVAWH
 A_A^A\
SVWATAVAWH
A_A^A\_^[
t$ AVH
t$ AVH
@SUVWH
@UWAVAWH
(A_A^_]
@SUVWH
\$ UVATH
@SVAUAVH
(A^A]^[
yxxxxxxxH
t$ WATAVH
 A^A\_
t$ WATAVH
 A^A\_
t$ ATAVAWH
 A_A^A\
L$ SUVWH
WAVAWH
 A_A^_
WATAUAVAWH
A_A^A]A\_
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
@USVWATAUAVAWH
A_A^A]A\_^[]
|$ AVH
@UVWATAUAVAWH
C@H98t%H
A_A^A]A\_^]
@UVWATAUAVAWH
C@H98t%H
A_A^A]A\_^]
VWATAVAWH
pA_A^A\_^
SVWATAUAVAWH
pA_A^A]A\_^[
t$ WATAWH
 A_A\_
@SVAUAVH
(A^A]^[
@SVAVAWH
(A_A^^[
WAVAWH
@UVAWH
L$ SVWH
upH;~ uj
UVWAVAWH
A_A^_^]
WAVAWH
@A_A^_
@SVWATAUAVAWH
yxxxxxxxI
xxxxxxx
yxxxxxxxH
`A_A^A]A\_^[
																									
																			
																												
																												
@SWAWH
UVWATAUAVAWH
t$XH;t$`
H;|$`L
A_A^A]A\_^]
{|?u]H
|$ AVH
9Q|uUH
|$8Hc{t
C$9C w
WATAVH
@A^A\_
@A^A\_
@A^A\_
@A^A\_
@A^A\_
@SVATAUAWH
@A_A]A\^[
@A_A]A\^[
@SVWAVAWH
PA_A^_^[
PA_A^_^[
|$ AVH
{x\uXH
Cx<fu	
Cx<au1
Cx<cuL
@VWAUAVAWH
 A_A^A]_^
WATAUAVAWH
A_A^A]A\_
WATAUAVAWH
 A_A^A]A\_
|$ AVI
l$ WAVAWH
 A_A^_
WAVAWH
 A_A^_
\$ UVWAUAWH
D;~ s^H
 A_A]_^]
t$`;F$
 A_A]_^]
VWATAVAWH
 A_A^A\_^
UATAUAVAWH
A_A^A]A\]
WATAUAVAWH
;o }EH
A_A^A]A\_
|$ AVH
UVWATAUAVAWH
A9v ~2L
tND8ew
L9}gtPL
A_A^A]A\_^]
|$ ATAVAWH
 A_A^A\
@UVWATAUAVAWH
A_A^A]A\_^]
l$ VWAWH
t$ WATAVH
 A^A\_
|$ AVH
UVWAVAWH
0A_A^_^]
0A_A^_^]
t$ WAVAWH
 A_A^_
@SUVAUAWH
UUUUUUU
 A_A]^][
@SVWATAUAVAWH
PA_A^A]A\_^[
K8H9w0t H
UUUUUUU
@SVWATAUAVAWH
`A_A^A]A\_^[
L$ SVWH
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
`A_A^A]A\_^]
w H;G 
w+H;G v
w(H;G v
^H;G v
|$ ATAUAVAWH
|$@A_A^A]A\
t$ WAVAWH
t$ WAVAWH
 A_A^_
K0L;G8u
K@L;GHu
KPL;GXu
K`L;Ghu
KpL;Gxu
u3L9P s
WATAUAVAWH
0A_A^A]A\_
t$ AWH
UUUUUUU
I9y }@I
I;y }5H
I9y s@I
I;y s5H
H9C }*H
TUUUUUU
H9C s*H
UATAUAVAWH
A_A^A]A\]
UVWATAUAVAWH
pA_A^A]A\_^]
@WAVAWH
0A_A^_
ffffff
)D$@I;
gfffffffH
@UWATAUAWH
 A_A]A\_]
@SUVAUAWH
gfffffffH
 A_A]^][
@UVAWH
t$ UWATAVAWH
A_A^A\_]
@UWAVAWH
(A_A^_]
L$ UVWAUAVH
0A^A]_^]
SUVWAUAVH
A^A]_^][
|$ AVH
@SUVWAVAWH
s(H3;H3s
A_A^_^][
@SUVWATAUAVAWH
A_A^A]A\_^][
k(H33H3k
(H3D$8M3
k(H33H3k
(H3D$8M3
k(H33H3k
(H3D$8M3
@SUVWAVAWH
s(H3;H3s
A_A^_^][
@SUVWATAUAVAWH
A_A^A]A\_^][
k(H33H3k
H3D$8M3
SUVWATAUAVAWH
KXH3KHH
CPH3C@H
A_A^A]A\_^][
SUVWATAUAVAWH
KXH3KHH
CPH3C@H
A_A^A]A\_^][
@SUVWH
@SUVWH
SUVWATAUAVAWH
KXH3KHH
CPH3C@H
A_A^A]A\_^][
SUVWATAUAVAWH
KXH3KHH
CPH3C@H
A_A^A]A\_^][
SUVWATAUAVAWH
KXH3KHH
CPH3C@H
A_A^A]A\_^][
@SUVWAVAWH
s(H3;H3s
A_A^_^][
@SUVWATAUAVAWH
A_A^A]A\_^][
k(H33H3k
(H3D$8M3
@SUVWAVAWH
{ H3;H
A_A^_^][
@SUVWATAUAVAWH
c L3#L
A_A^A]A\_^][
s H33H
s H33H
@SUVWAVAWH
{ H3;H
A_A^_^][
@SUVWATAUAVAWH
c L3#L
A_A^A]A\_^][
SUVWATAUAVAWH
KXH3KHH
CPH3C@H
A_A^A]A\_^][
B@H1|$ 
@UWAUAVH
(A^A]_]
WATAUAVAWH
0A_A^A]A\_
\$0t{H
)t$pfE
)D$PfD
C`H)G`
N L9cpt
oD9c@|'H
N L9cp
C`H)G`H
UVWAVAW
9T$0vIf
A_A^_^]
SUVWATAVAWH
)D$@wL
pA_A^A\_^][
RpH9sxu
\$ UVWATAUAVAWH
A_A^A]A\_^]
WAVAWH
 A_A^_
t$ WAVAW
|$ AVH
""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""
@USAUH
@SUVWAVH
`A^_^][
@WAVAWH
UVWATAUAVAWH
PA_A^A]A\_^]
UVWATAUAVAWH
E97u3I
t$0D9\$<v<
E97u3I
D9t$4t%
t$LE97
L$<;L$h
E97u2I
D9t$4t%
E97u2I
D9t$4t%
E97u2I
D9t$4D
E97u2I
D9t$4D
E97u2I
D9t$4D
D9t$4t
D9t$4t
D9t$4t
E97u2I
D9t$4D
A_A^A]A\_^]
A H;B r
B0H9A0r
J H9H r
J0H9H0sz
F@H9G 
L$ SUVWH
t$ ATAVAWH
 A_A^A\
 A_A^A\
@SUAVAWH
A_A^][
@UATAUH
PA]A\]
fF9$Au
fF9$Au
fD9$Ju
fD9$~u
fD9$Xu
PA]A\]
UVATAUAVH
A^A]A\^]
McZ D;
HcD$@H
A^A]A\^]
t3;{h|"
t H;Xpu
H9Zpu	L
taH9_`u
G`H9_xu
|$ AVH
VWATAUAWH
0A_A]A\_^H
0A_A]A\_^
0A_A]A\_^
|$ ATAVAWH
A_A^A\
WAVAWH
@A_A^_
:\u\fA
@SVWAWH
tBL9|$P
t$ AVH
SVWATAUAVAWH
`A_A^A]A\_^[
`A_A^A]A\_^[
`A_A^A]A\_^[
SVWATAUAVAWH
pA_A^A]A\_^[
pA_A^A]A\_^[
pA_A^A]A\_^[
pA_A^A]A\_^[
l$`uGH
t$ WATAUAVAW
A_A^A]A\_
WAVAWH
 A_A^_
WATAUAVAWH
 A_A^A]A\_
VWATAUAWH
A_A]A\_^
l$ AVH
WAVAWH
 A_A^_
 A_A^_
L$ VWAVH
l$ VWAVH
@USWAVAWH
A_A^_[]
WATAUAVAWH
uUH9-X
 A_A^A]A\_H
WATAUAVAWH
0A_A^A]A\_H
k VWAVH
\$ UVWH
UVWATAUAVAWH
|$@	L$DA
D9t$Hu
A_A^A]A\_^]
VWATAVAWH
 A_A^A\_^
UVWATAUAVAWH
PA_A^A]A\_^]
K UVWH
@SUVWH
KXH9oxt
D$\9D$Xu3H
KXH9ox
UVWATAUAVAWH
@A_A^A]A\_^]
|$ ATAVAWH
A_A^A\
UVATAUAVH
@A^A]A\^]
@A^A]A\^]
|$ UATAUAVAWH
A_A^A]A\]
@SUVATAUH
0A]A\^][
0A]A\^][
0A]A\^][
0A]A\^][
\$0t;H
@UWAWH
|$ AVH
ATAUAVH
PA^A]A\
\$ UWAUAVAWH
A_A^A]_]
SUVWAUH
@A]_^][
@A]_^][
WATAUAVAWH
0A_A^A]A\_
UVWATAUAVAWH
uqH9spt
A_A^A]A\_^]
L$4H9t$@uQ
t$ AVH
WAVAWH
 A_A^_
WAVAWH
@A_A^_
|$pu53
WAVAWH
 A_A^_
E8!u?H
E8#tJH
L$PL9b(
E8#t-L
t-L9f(u'H
WAVAWH
 A_A^_
t$ WAVAWH
0A_A^_
H;_Hu|H
{8H;G`
l$ VWATAVAWH
t,@8(t'L
H9k8t8H
C8H9h(tz@8
K8H9i`
0A_A^A\_^
9999999
9999999999
 !"#$%&'()9999999999999999999*+,9999999-./012345678M
|$ ATAVAWH
 A_A^A\
|$ AVH
l$ VWAVH
\$ UVWAVAWH
@A_A^_^]
9D$(}n
9FHtJH
x ATAVAWH
@A_A^A\
x ATAVAWH
0A_A^A\
@UAVAWH
H!T$0D
!T$(H!T$ 
@USVWATAUAVH
e0A^A]A\_^[]
WAVAWH
 A_A^_
SVWAVH
8A^_^[
WAVAWH
WAVAWH
0A_A^_
u0HcH<H
 H3E H3E
C(H;C0r
WATAVH
 A^A\_
@UAVAWH
UVWATAUAVAWH
H+D$XH+D$@3
A_A^A]A\_^]
{ ATAVAWH
A_A^A\
H3\$HH
UVWATAUAVAWH
 A_A^A]A\_^]
VWAUAVAWH
 A_A^A]_^
WATAUAVAWH
 D;=A~
A_A^A]A\_
UVWATAUAVAWH
J$A;H$A
 A_A^A]A\_^]
UVWATAUAVAWH
A,A9A(v&L
0A_A^A]A\_^]
WATAUAVAWH
O,D9O(vcH
0A_A^A]A\_
WATAUAVAWH
A;J$vdH
0A_A^A]A\_
UVWATAUAVAWH
@A_A^A]A\_^]
@VWAVH
SUVWATAUAVAWH
l$4E;C
;A$vTH
l*$D+l*,tDD+l*(
CM,;E(
l$PE;C
B$D+B,toD+B(
CJ(A;B,A
CB,E;B0E
hA_A^A]A\_^][
t$ WATAUAVAWH
C9|0$uA
0A_A^A]A\_
VWAUAVAWH
A`D9L8
;B$vUH
,t0D9J0v*L
0A_A^A]_^
t$ WATAUAVAWH
D8M@t^
+J$D8M@
0A_A^A]A\_
UVWATAUAVAWH
0A_A^A]A\_^]
t$ WATAUAVAWH
 A_A^A]A\_
UVWATAUAVAWH
 A_A^A]A\_^]
L$ UVWATAUAVAWH
0A_A^A]A\_^]
x ATAVAWH
0A_A^A\
@SUVWAVH
0A^_^][
9W$v8D
D9G$s5
l$ VWATAUAVAWE3
D9h(uiE
A(9B(D
@(D9i(
t(B;\ 
l$PA_A^A]A\_^
WATAUAVAWH
A_A^A]A\_
H9_ht0H
WATAUAVAWH
 A_A^A]A\_
x AVAWL
A$+A,t\3
|$0A_A^
WATAUAVAWH
0A_A^A]A\_
UVWATAUAVAWH
 A_A^A]A\_^]
x AVE3
UVWATAUAVAWH
 D;j0u
D;z,v	A
 A_A^A]A\_^]
D9Y$v+E
E8X@t8A
R0E8XAt
B0E8XAt
9_P~,E3
VWAUAVAWH
9WP~HM
uxHcOP
HcGl;Gh}
A_A^A]_^
t H9X8t]
t*H9p8u$@8
E;Bl}DM
J`E;Bh|
E+BhIcBhM
IcJPHc
|$ UATAUAVAWH
q(9qD~[E3
9{D~H3
A_A^A]A\]
x ATAVAWH
 A_A^A\
\$Pu-H
USVWATAUAVAWH
~(HcNDI
F8HcNDI
F0LcFDI
D9f@~2Ic
A_A^A]A\_^[]
|$ AVH
UVWATAUAVAWH
0A_A^A]A\_^]
C`D;Sh|
D+ShHcChM
C`D;Sh|
D+ShHcChM
W`;Ct~|H
;Ct~gH
x ATAVAWH
F`;Vh|
+VhHcFhM
C(9C u
C,9C$u
 A_A^A\
91~/E3
VWAUAVAWH
9WP~KM
uxHcOP
HcGl;Gh}
A_A^A]_^
WAVAWH
0A_A^_
WATAUAVAWH
A_A^A]A\_
yH;YXtl
KH;_XtW3
8H;^XtB
C`D;Sh|
D+ShHcChM
W0;Ct~ZH
;Ct~EH
A;6}#I
91~/E3
|$ AVH
WAVAWH
 A_A^_
9D$`t_
WAVAWH
WATAUAVAWH
A_A^A]A\_
x ATAVAWH
0A_A^A\
VWATAVAWH
0A_A^A\_^
x ATAVAWH
 A_A^A\
WAVAWH
 A_A^_
V HcGTL
H9J t1
UVWATAUAVAWH
 A9_ w
D9d$$u
uW8\$ t
4;D$@r	uAD;d$$u:
.8\$!t.9\
D;d$$u
D;d$$A
tG8\$ u08\$!t*E
`A_A^A]A\_^]
@VWAVH
UVWAVAWH
A_A^_^]
WAVAWH
 A_A^_
l$ VWAVH
u)!t$(H
C`D;Sh|
D+ShHcChM
;Ct~ZH
;Ct~EH
WAVAWH
 A_A^_
F(LcF I
9_P~+E3
VWAUAVAWH
9WP~KM
uxHcOP
HcGl;Gh}
A_A^A]_^
WAVAWH
 A_A^_
Hc;HcK
x UAVAWH
UVWATAVH
@A^A\_^]
UAVAWH
SUVWATAUAVAWH
8A_A^A]A\_^][
l$ VWATAVAWH
 A_A^A\_^
u!!D$(H
t$ WATAUAVAWH
A_A^A]A\_
9_P~+E3
C`D;Sh|
D+ShHcChM
;Ct~ZH
;Ct~EH
WAVAWH
9_P~OE3
 A_A^_
K4A+H 
VWAUAVAWH
9WP~GM
uxHcOP
HcGl;Gh}
A_A^A]_^
VWAUAVAWH
9WP~KM
uxHcOP
HcGl;Gh}
A_A^A]_^
u%!D$@H
WAVAWH
K 9N v@H
0A_A^_
t$ WAVAWH
 A_A^_
l$ VWAVH
UAVAWH
C`D;Sh|
D+ShHcChM
;Ct~ZH
;Ct~EH
UVWATAUAVAWH
8D$ u+H
A_A^A]A\_^]
C4D+@ H
UVWATAUAVAWH
0A_A^A]A\_^]
WAVAWH
 A_A^_
~`D8I!t-
SVWAVAWH
H#T$0H
`A_A^_^[
D$0f;VPu
u!!D$(H
ATAVAWH
0A_A^A\
WAVAWH
0A_A^_
ATAVAWH
0A_A^A\
H#|$0tB
@USVWATAUAVAWH
H+G H=
A_A^A]A\_^[]
@SUVWATAUAVAWH
H+C H=
A_A^A]A\_^][
WATAUAVAWH
0A_A^A]A\_
WATAUAVAWH
0A_A^A]A\_
WATAUAVAWH
A_A^A]A\_
x ATAVAWH
 A_A^A\
WATAWH
 A_A\_
UAVAWH
@A_A^]
UAVAWH
@A_A^]
t.8\$P
VWATAVAWH
 A_A^A\_^
UVWATAUAVAWH
@A_A^A]A\_^]
H;xXu5
A:8ueI
t&A88t
WATAUAVAWH
A_A^A]A\_
fffffff
t<ffff
VWATAUAVAWL
|$XHcU
D$8HcJ
H;D$Pu
l$HA_A^A]A\_^
x AVHcA
SUVWATAUAVAWH
H9D$PuCI
A_A^A]A\_^][
WATAUAVAWH
A_A^A]A\_
AUAVAWH
;I9}(tiH
0A_A^A]
VWATAVAWH
A_A^A\_^
UVWATAUAVAWH
C0Hc	H
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
ri9O vdH
@SVWATAUAVAWH
L!|$(L!
D$0HcH
pA_A^A]A\_^[
B(I9A(u
SVWATAUAVAWH
0A_A^A]A\_^[
WATAUAVAWH
 A_A^A]A\_
WATAUAVAWH
 A_A^A]A\_
L$ VWAVH
@USVWATAVAWH
D8d$Xt
A_A^A\_^[]
@USVWATAVAWH
D8d$Xt
A_A^A\_^[]
@USVWATAVAWH
D8d$Xt
A_A^A\_^[]
D8t$8t
D$@H;G
|$ AVH
D$0H;G
CA< t(<#t
CA< t(<#t
CA< t(<#t
<htl<jt\<lt4<tt$<wt
!,X< w
<htl<jt\<lt4<tt$<wt
!,X< w
t$ WAVAWH
<Ct-<D
<StW@:
<g~{<itd<ntY<ot7<pt
<utT@:
D<P0@:
k4+kP+
0A_A^_
t$ WAVAWH
<Ct-<D
<StW@:
<g~{<itd<ntY<ot7<pt
<utT@:
D<P0@:
k(+sPL
0A_A^_
t$ WATAUAVAWH
s(+kPH
A_A^A]A\_
yBgt	3
WAVAWH
 A_A^_
WAVAWH
 A_A^_
WAVAWH
 A_A^_
x ATAVAWH
 A_A^A\
t$ WATAUAVAWH
 A_A^A]A\_
;D$Xs;
` UAVAWH
@A_A^]
VWATAVAWH
?D8d$8t
D8d$8t
t'D8d$8t
%D8d$8t
A_A^A\_^
L$ UVWATAUAVAWH
0A_A^A]A\_^]
T$ D)s
w`HcE H
Hc;9E0t
HcE H+
u"8Z(t
uF8Z(t
vC8_(t
ATAVAWH
 A_A^A\
ATAVAWH
0A_A^A\
D8t$8t
WATAUAVAWH
 A_A^A]A\_
\$ UVWATAUAVAWH
0A_A^A]A\_^]
@SUVWATAUAVAWH
8A_A^A]A\_^][
x ATAVAWH
0A_A^A\
AUAVAWH
 A_A^A]
UVWATAUAVAWH
@8t$HtsL
`A_A^A]A\_^]
UVWATAUAVAWH
D8T8>t
A_A^A]A\_^]
VWATAVAW
A_A^A\_^
WATAUAVAWH
 A_A^A]A\_
\$ UVWATAUAVAWH
H!D$ H
`A_A^A]A\_^]
@USVWATAVAWH
A_A^A\_^[]
ATAUAVH
L$ fff
L$ |+L;
A^A]A\
fD9	t(L
D$@H=@W
t$ UWAUAVAWH
A_A^A]_]
|$ AVH
8\$8t(H
8\$8t(H
8\$8t(H
s WATAUAVAWH
D$h9t$P
A_A^A]A\_
SUVWATAVAWH
A_A^A\_^][
fffffff
fffffff
fffffff
fffffff
ffffff
fffffff
fffffff
fffffff
fffffff
ffffff
ffffff
ffffff
u"8Z(t
fA9	t	I
u3HcH<H
x ATAVAWH
< t=<	t9
 A_A^A\
UVWAVAWH
0A_A^_^]
WAVAWH
0A_A^_
t$ WAVAWH
 A_A^_
WAVAWH
 A_A^_
WAVAWH
fE98t'
0A_A^_
@USVWATAUAVAWH
?Cu3f9O
fD9<Xu
f9M`t|H
fD9<^u
A_A^A]A\_^[]
fD9?t"
L$ SUVWH
WATAUAVAWH
0A_A^A]A\_
\$ UVWATAUAVAWH
fD9,Au
A_A^A]A\_^]
\$ UVWATAUAVAWH
f9t$bu
A_A^A]A\_^]
H9L$Ht?H
ffffff
>ffffff
ffffff
D$0H9D$8
fD9t$b
WATAUAVAWH
 A_A^A]A\_
@8l$Ht
L$ UVWH
WATAUAVAWH
gfffffffH
D8l$ht
A_A^A]A\_
UVWATAUAVAWH
 A_A^A]A\_^]
t$ WATAUAVAW
A_A^A]A\_
u1!D$0H
UVWATAUAVAWH
0A_A^A]A\_^]
p WATAUAVAWH
A_A^A]A\_
T$xD;D$x
UVWAUAVH
0A^A]_^]
@USVWH
U(t	Ak
9u0u	H
\$ VWATAUAVH
D!l$xA
@A^A]A\_^
WATAUAVAWH
 A_A^A]A\_
UVWATAUAVAWH
@A_A^A]A\_^]
u9!\$0
UWATAVAWH
D8&t4H
A_A^A\_]
ATAVAWH
D8d$8t
@A_A^A\
<at <rt
@UAVAWH
e0A_A^]
@SUVWATAVAWH
A_A^A\_^][
@UATAUAVAWH
e0A_A^A]A\]
@UATAUAVAWH
H!T$0D
ue!T$(H!T$ 
A_A^A]A\]
@8l$8t
u"8Z(t
uF8Z(t
vB8_(t
UVWATAUAVAWH
`A_A^A]A\_^]
WATAUAVAWH
0A_A^A]A\_
H97u+A
\$ UVWATAUAVAWH
@8|$Ht
@8|$Ht
@8|$Ht
D$XD9x
@8|$ht
@8|$ht
@8|$ht
A_A^A]A\_^]
UVWATAUAVAWH
L$&8\$&t,8Y
@A_A^A]A\_^]
fD94Fu
UVWATAUAVAWH
xWI96tRI
0A_A^A]A\_^]
UATAUAVAWH
A_A^A]A\]
WATAUAVAWH
A_A^A]A\_
UATAUAVAWH
A_A^A]A\]
fB9<Hu
fB9<@u
fB9<Bu
fB9,Nu
fB9,Nu
fB9,Nu
fA9,Au
f9)u:H
fB94Ou
x ATAVAWH
 A_A^A\
x ATAVAWH
fG9$Ou
0A_A^A\
fB9<Hu
fB9<@u
fB9<Bu
fD94Au
fD94iu
tSf91tNH
tU;\$0tH
WAVAWH
 A_A^_
@USVWATAVAWH
tyfD9 tsH
tQfD9 tK
fD9$Hu
@A_A^A\_^[]
USVWAVH
A^_^[]
USVWAVH
A^_^[]
x AVAWE3
|$0A_A^
@USVWATAUAVAWH
D+d$8H
#D8d$`t
A_A^A]A\_^[]
@USVWATAUAVAWH
e8A_A^A]A\_^[]
UVWAVAWH
@A_A^_^]
s WAVAWH
0A_A^_
u~9t$Xt
UATAUAVAWH
A_A^A]A\]
UAVAWH
D8}?t	H
WAVAWH
D8|$`t
 A_A^_
ffffff
fffffff
x ATAVAWH
 A_A^A\
LcA<E3
u HcA<H
UVWATAUAVAWH
L;d$Xs
D$pHcH
D$pHcH
D$pHcH
D$pHcH
D$pHcH
D$pHcH
D$pHcH
D$pHcH
A_A^A]A\_^]
@USVWATAUAVAWH
A_A^A]A\_^[]
@UVWAVAWH
A_A^_^]
UWATAVAWH
A_A^A\_]
D$0H9S
WATAUAVAWH
tOH9\$8t
@A_A^A]A\_
WATAUAVAWH
yxxxxxxxH
A_A^A]A\_
@UVWATAUAVAWH
CPH9CHu
C8H+C0H
0A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
@USVWAVH
pA^_^[]
@UVWATAUAVAWH
A_A^A]A\_^]
USVWATAUAVAWH
A_A^A]A\_^[]
WATAUAVAWH
UVWATAUAVAWH
D$@HcH
D$@HcH
D$0HcH
D$0HcH
D$0HcH
D$0HcH
A_A^A]A\_^]
@UVWATAUAVAWH
A_A^A]A\_^]
@USVWATAUAVAWH
A_A^A]A\_^[]
@UVWATAUAVAWH
A_A^A]A\_^]
UAVAWH
@UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
@UVWATAUAVAWH
D$HH9D$Pt
D;d$8s
A_A^A]A\_^]
WAVAWH
@A_A^_
D$@H9Q
@UVWATAUAVAWH
PA_A^A]A\_^]
|$ ATAVAWH
 A_A^A\
VAVAWH
 A_A^^
 A_A^^
@UVWATAUAVAWH
pA_A^A]A\_^]
@UVAWH
@UVWAVH
(A^_^]
(A^_^]
B(8A(uW
B*8A*uN
B,9A,uF
A8L;B8u
GHL;CHu
GXL;CXu
GhL;Ch
GxL;Cx
@UVWATAUAVAWH
uND8G(tHH
uND8w(tHH
PA_A^A]A\_^]
D$0H9V
@SUVWAVH
PA^_^][
@WAVAWH
D8{*uHD8{(tBL9{@t
tfD8{*uTD8{(tNL9{@t
@A_A^_
AUAVAWH
@A_A^A]
D$0H9W@t
\$ VWAVH
 A^_^H
 A^_^H
 A^_^H
 A^_^H
|$ AVH
UATAUAVAWH
A_A^A]A\]
WATAUAVAWH
0A_A^A]A\_
SUVWATAVH
8A^A\_^][
UWATAVAWH
A_A^A\_]
L$ SVWH
@WAVAWH
0A_A^_
t$ WATAUAVAWH
H3Y(H3YxL
L3A0L3
L3AXL3
H3QHH3
H3QpH3
L3Q8L3
L3Y@L3
H3YPH3
L3Q`L3
L3YhL3
H1A(H1APH1AxH1
L$ H1A
H1A0H1AXH1
H1A8I3
H1A`H1
l$8H1QhH1
L1AHL1A L1ApL1
A_A^A]A\_
@SUVWH
SUVAVH
L$ SUVWAVH
 A^_^][
L$ SUVWAVAWH
(A_A^_^][
UVWATAUAVAWH
pA_A^A]A\_^]
@VWAVH
UATAUAVAWH
L+t$PL
A_A^A]A\]
@WAVAWH
@A_A^_
@VWAVH
UATAUAVAWH
A_A^A]A\]
UAVAWH
@VWAVH
@UWATAUAVH
 A^A]A\_]
 A^A]A\_]
@UVWATAUAVAWH
D8d$0t>
A_A^A]A\_^]
UATAUAVAWH
H;S }?H
A_A^A]A\]
@VWAVH
H;K s?H
C0H+C(H
WAVAWH
\$Pfff
0A_A^_
V8H+V0H
V8H9V@t
USVWATAUAVAWH
xA_A^A]A\_^[]
@UVWATAUAVAWH
H9\$ tE
`A_A^A]A\_^]
@SUVWAVH
A^_^][
@UVWATAUAVAWH
A_A^A]A\_^]
@VWAVH
|$ AVH
UVWATAUAVAWH
`A_A^A]A\_^]
|$ AVH
WAVAWH
SUVWATAVAWH
@A_A^A\_^][
@UVWATAUAVAWH
A_A^A]A\_^]
@VWAVH
WATAUAVAWH
A_A^A]A\_
VWATAVAWH
A_A^A\_^
@VWAVH
\$ WATAWH
 A_A\_
UATAUAVAWH
A_A^A]A\]
UVWAVAWH
)|$ ff
@A_A^_^]
@SUVWATAVAWH
@A_A^A\_^][
SUVWATAUAVAWH
hA_A^A]A\_^][
WATAUAVAWH
H95)[	
A_A^A]A\_
UAVAWH
WAVAWH
@A_A^_
D$@HcH
D$@HcH
D$@HcH
D$@HcH
D$@HcH
L$@HcQ
@USVWH
H9=JF	
@SUVWAVH
A^_^][
WAVAWH
 A_A^_
|$ ATAVAW
G<A_A^A\
|$ UATAUAVAWH
A,5Dsp
A4D3I0A3
3Y0D3a4
A_A^A]A\]
t$ WATAWH
 A_A\_
UVWATAUAVAWH
O3<(I#
UUUUUUUUI
33333333I
M348H#
M#0O34
J3,/H3
`A_A^A]A\_^]
VWATAUAWH
A_A]A\_^
SUVWATAUAVAWH
H3T$ I
L3l$ H
H3D$ H
A_A^A]A\_^][
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UAVAWH
ot$PfD
o|$PfD
o|$pfD
ot$PfD
o|$`fD
oD$pfD
oT$`fA
oL$pfA
od$PfA
oL$@fE
oT$ fE
od$PfE
o\$PfD
oL$0fD
oT$`fE
oL$PfA
ol$0fD
ot$0fD
od$`fD
o|$ fD
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UAVAWH
ot$PfD
o|$PfD
o|$pfD
ot$PfD
o|$`fD
oD$pfD
oT$`fA
oL$pfA
od$PfA
oL$@fE
oT$ fE
od$PfE
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
UVWATAUAVAWH
A_A^A]A\_^]
@SUVWAVH
A^_^][
@VATAUAVAWH
A_A^A]A\^
t$ WATAUAVAWH
 A_A^A]A\_H
t$ WAVAWH
@A_A^_H
VWATAUAVAW
A_A^A]A\_^
|$ ATAVAW
A_A^A\
\$ UVWH
@SWATAVH
(A^A\_[
t$ WAVAWH
@A_A^_H
t$ WAVAWH
@A_A^_H
t$ WAVAWH
@A_A^_H
t$ WAVAWH
@A_A^_H
UVWATAUAVAWH
L$XH;M
A_A^A]A\_^]
@UVWATAUAVAWH
A_A^A]A\_^]
@UVWAVAWH
`A_A^_^]
UATAUAVAWH
D$ H95
A_A^A]A\]
@UVWATAUAVAWH
pA_A^A]A\_^]
UATAVH
\$ UVWH
u"HcMHH
bad allocation
regex_error(error_collate): The expression contained an invalid collating element name.
regex_error(error_ctype): The expression contained an invalid character class name.
regex_error(error_escape): The expression contained an invalid escaped character, or a trailing escape.
regex_error(error_backref): The expression contained an invalid back reference.
regex_error(error_brack): The expression contained mismatched [ and ].
regex_error(error_paren): The expression contained mismatched ( and ).
regex_error(error_brace): The expression contained mismatched { and }.
regex_error(error_badbrace): The expression contained an invalid range in a { expression }.
regex_error(error_range): The expression contained an invalid character range, such as [b-a] in most encodings.
regex_error(error_space): There was insufficient memory to convert the expression into a finite state machine.
regex_error(error_badrepeat): One of *?+{ was not preceded by a valid regular expression.
regex_error(error_complexity): The complexity of an attempted match against a regular expression exceeded a pre-set level.
regex_error(error_stack): There was insufficient memory to determine whether the regular expression could match the specified character sequence.
regex_error(error_parse)
regex_error(error_syntax)
regex_error
address in use
already connected
argument out of domain
bad address
bad message
connection aborted
connection reset
cross device link
device or resource busy
executable format error
file exists
filename too long
function not supported
host unreachable
identifier removed
illegal byte sequence
inappropriate io control operation
interrupted
io error
is a directory
message size
network down
network reset
network unreachable
no buffer space
no child process
no link
no lock available
no message available
no message
no protocol option
no space on device
no stream resources
not a socket
not a stream
not connected
not supported
operation in progress
operation not supported
operation would block
owner dead
read only file system
resource deadlock would occur
resource unavailable try again
result out of range
state not recoverable
stream timeout
text file busy
timed out
too many files open in system
too many files open
too many symbolic link levels
value too large
wrong protocol type
FlsAlloc
FlsFree
FlsGetValue
FlsSetValue
InitializeCriticalSectionEx
InitOnceExecuteOnce
CreateEventExW
CreateSemaphoreW
CreateSemaphoreExW
CreateThreadpoolTimer
SetThreadpoolTimer
WaitForThreadpoolTimerCallbacks
CloseThreadpoolTimer
CreateThreadpoolWait
SetThreadpoolWait
CloseThreadpoolWait
FlushProcessWriteBuffers
FreeLibraryWhenCallbackReturns
GetCurrentProcessorNumber
CreateSymbolicLinkW
GetCurrentPackageId
GetTickCount64
GetFileInformationByHandleEx
SetFileInformationByHandle
GetSystemTimePreciseAsFileTime
InitializeConditionVariable
WakeConditionVariable
WakeAllConditionVariable
SleepConditionVariableCS
InitializeSRWLock
AcquireSRWLockExclusive
TryAcquireSRWLockExclusive
ReleaseSRWLockExclusive
SleepConditionVariableSRW
CreateThreadpoolWork
SubmitThreadpoolWork
CloseThreadpoolWork
CompareStringEx
GetLocaleInfoEx
LCMapStringEx
0123456789abcdefghijklmnopqrstuvwxyz
0123456789abcdefghijklmnopqrstuvwxyz
bad array new length
pEvents
Lock already taken
SetThreadGroupAffinity
GetThreadGroupAffinity
GetCurrentProcessorNumberEx
GetLogicalProcessorInformationEx
pScheduler
version
eventObject
ppVirtualProcessorRoots
SchedulerKind
MaxConcurrency
MinConcurrency
TargetOversubscriptionFactor
LocalContextCacheSize
ContextStackSize
ContextPriority
SchedulingProtocol
DynamicProgressFeedback
WinRTInitialization
MaxPolicyElementKey
Mbp?333333
pContext
pExecutionResource
CreateRemoteThreadEx
CreateUmsCompletionList
CreateUmsThreadContext
DeleteProcThreadAttributeList
DeleteUmsCompletionList
DeleteUmsThreadContext
DequeueUmsCompletionListItems
EnterUmsSchedulingMode
ExecuteUmsThread
GetCurrentUmsThread
GetNextUmsListItem
GetUmsCompletionListEvent
InitializeProcThreadAttributeList
QueryUmsThreadInformation
SetUmsThreadInformation
UmsThreadYield
UpdateProcThreadAttribute
RoInitialize
RoUninitialize
RegisterTraceGuidsW
UnregisterTraceGuids
TraceEvent
GetTraceLoggerHandle
GetTraceEnableLevel
GetTraceEnableFlags
pThreadProxy
switchState
Access violation - no RTTI data!
Bad dynamic_cast!
bad exception
__based(
__cdecl
__pascal
__stdcall
__thiscall
__fastcall
__vectorcall
__clrcall
__eabi
__swift_1
__swift_2
__ptr64
__restrict
__unaligned
restrict(
 delete
operator
`vftable'
`vbtable'
`vcall'
`typeof'
`local static guard'
`string'
`vbase destructor'
`vector deleting destructor'
`default constructor closure'
`scalar deleting destructor'
`vector constructor iterator'
`vector destructor iterator'
`vector vbase constructor iterator'
`virtual displacement map'
`eh vector constructor iterator'
`eh vector destructor iterator'
`eh vector vbase constructor iterator'
`copy constructor closure'
`udt returning'
`local vftable'
`local vftable constructor closure'
 new[]
 delete[]
`omni callsig'
`placement delete closure'
`placement delete[] closure'
`managed vector constructor iterator'
`managed vector destructor iterator'
`eh vector copy constructor iterator'
`eh vector vbase copy constructor iterator'
`dynamic initializer for '
`dynamic atexit destructor for '
`vector copy constructor iterator'
`vector vbase copy constructor iterator'
`managed vector copy constructor iterator'
`local static thread guard'
operator "" 
operator co_await
 Type Descriptor'
 Base Class Descriptor at (
 Base Class Array'
 Class Hierarchy Descriptor'
 Complete Object Locator'
`h````
xpxxxx
`h`hhh
xwpwpp
(null)
Visual C++ CRT: Not enough memory to complete call to strerror.
 !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~
[aOni*{
~ $s%r
@b;zO]
v2!L.2
UUUUUU
UUUUUU
"e?<<<<<<l?
Il?333333c?
.i?0@I
d?000000`?
)|B?d!
L?UUUUUUU?
&?PPPPPPP?
0X8b?~
%GoU?*
(T?j?Y
Zod(^?
D W?{W
qS>g?h3
c?FA@s}
UUUUUU
UUUUUU
UUUUUU
?UUUUUU
?kxG2)
?TY,>5
?!5WOo
?E=$% B
?49HoKC
CorExitProcess
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
?UUUUUU
?UUUUUU
?UUUUUU
?UUUUUU
AreFileApisANSI
CompareStringEx
EnumSystemLocalesEx
FlsAlloc
FlsFree
FlsGetValue
FlsSetValue
GetDateFormatEx
GetLocaleInfoEx
GetSystemTimePreciseAsFileTime
GetTimeFormatEx
GetUserDefaultLocaleName
InitializeCriticalSectionEx
IsValidLocaleName
LCMapStringEx
LCIDToLocaleName
LocaleNameToLCID
RoInitialize
RoUninitialize
AppPolicyGetProcessTerminationMethod
AppPolicyGetThreadInitializationType
NAN(SNAN)
nan(snan)
NAN(IND)
nan(ind)
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
January
February
August
September
October
November
December
MM/dd/yy
dddd, MMMM dd, yyyy
HH:mm:ss
_hypot
_nextafter
No error
Operation not permitted
No such file or directory
No such process
Interrupted function call
Input/output error
No such device or address
Arg list too long
Exec format error
Bad file descriptor
No child processes
Resource temporarily unavailable
Not enough space
Permission denied
Bad address
Unknown error
Resource device
File exists
Improper link
No such device
Not a directory
Is a directory
Invalid argument
Too many open files in system
Too many open files
Inappropriate I/O control operation
File too large
No space left on device
Invalid seek
Read-only file system
Too many links
Broken pipe
Domain error
Result too large
Resource deadlock avoided
Filename too long
No locks available
Function not implemented
Directory not empty
Illegal byte sequence
UTF-16LEUNICODE
A03>A|
Q5rHg,>
j>>A?1
.>PJ;I:qE>
:>t6k'
])6M>&
CWD>~3
:>)*	v
_oD>Kg
N>O=I9
F>qUxv
/2GG>!B
zY;>u:m	
P>q_Y~
0><[cZUg^>
Y>kX>M
H[><y5
[*ncd>0
S>$hkDh$h>[2
UA>N0Wl
9>powf
?8bunz8
?@En[vP
?UUUUUU
?7zQ6$
1#QNAN
1#SNAN
UUUUUU
UUUUUU
=imb;D
1<.	/>:
/>58d%
>jtm}S
)>6{1n
r	Vr.>T
+f)>0'
;H9>&X
*StO9>T
n03>Pu
K~Je#>!
bp(=>?g
BC?>6t9^	c:>
K&>.yC
.xJ>Hf
y\PD>!
|b=})>
c [1>H'
uzKs@>
3>N;kU
	kE>fvw
V6E>`"(5
Unknown exception
bad locale name
generic
iostream
iostream stream error
ios_base::badbit set
ios_base::failbit set
ios_base::eofbit set
ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
-DITERATIONS=%u -DMASK=%u -DWORKSIZE=%zu -DSTRIDED_INDEX=%d -DMEM_CHUNK_EXPONENT=%d -DCOMP_MODE=%d -DMEMORY=%zu -DALGO=%d -DUNROLL_FACTOR=%d -DOPENCL_DRIVER_MAJOR=%d -DWORKSIZE_GPU=%zu -cl-fp32-correctly-rounded-divide-sqrt
[1;37m#%zu
[1;33mcompiling...
GPU #%zu compiling...
Build log:
GPU #%zu compilation completed, elapsed time %.3fs
[1;37m#%zu
[1;32mcompilation completed
[0m, elapsed time 
[1;37m%.3fs
Try to delete file %s
Try to delete file %s
\xmrig\.cache\
No devices found.
gfx902
gfx804
Baffin
gfx901
gfx904
gfx900
gfx903
gfx905
,ROT_BITS-r
=rotate(r
CryptonightR: clCreateProgramWithSource returned error %s
CryptonightR: clBuildProgram returned error %s
Build log:
CryptonightR: wait_build returned error %s
#ifndef WOLF_AES_CL
#define WOLF_AES_CL
#ifdef cl_amd_media_ops2
#   pragma OPENCL EXTENSION cl_amd_media_ops2 : enable
#   define xmrig_amd_bfe(src0, src1, src2) amd_bfe(src0, src1, src2)
/* taken from: https://www.khronos.org/registry/OpenCL/extensions/amd/cl_amd_media_ops2.txt
 *     Built-in Function:
 *     uintn amd_bfe (uintn src0, uintn src1, uintn src2)
 *   Description
 *     NOTE: operator >> below represent logical right shift
 *     offset = src1.s0 & 31;
 *     width = src2.s0 & 31;
 *     if width = 0
 *         dst.s0 = 0;
 *     else if (offset + width) < 32
 *         dst.s0 = (src0.s0 << (32 - offset - width)) >> (32 - width);
 *     else
 *         dst.s0 = src0.s0 >> offset;
 *     similar operation applied to other components of the vectors
inline int xmrig_amd_bfe(const uint src0, const uint offset, const uint width)
    /* casts are removed because we can implement everything as uint
     * int offset = src1;
     * int width = src2;
     * remove check for edge case, this function is always called with
     * `width==8`
     * @code
     *   if ( width == 0 )
     *      return 0;
     * @endcode
     */
    if ((offset + width) < 32u) {
        return (src0 << (32u - offset - width)) >> (32u - width);
    return src0 >> offset;
#endif
// AES table - the other three are generated on the fly
static const __constant uint AES0_C[256] =
    0xA56363C6U, 0x847C7CF8U, 0x997777EEU, 0x8D7B7BF6U,
    0x0DF2F2FFU, 0xBD6B6BD6U, 0xB16F6FDEU, 0x54C5C591U,
    0x50303060U, 0x03010102U, 0xA96767CEU, 0x7D2B2B56U,
    0x19FEFEE7U, 0x62D7D7B5U, 0xE6ABAB4DU, 0x9A7676ECU,
    0x45CACA8FU, 0x9D82821FU, 0x40C9C989U, 0x877D7DFAU,
    0x15FAFAEFU, 0xEB5959B2U, 0xC947478EU, 0x0BF0F0FBU,
    0xECADAD41U, 0x67D4D4B3U, 0xFDA2A25FU, 0xEAAFAF45U,
    0xBF9C9C23U, 0xF7A4A453U, 0x967272E4U, 0x5BC0C09BU,
    0xC2B7B775U, 0x1CFDFDE1U, 0xAE93933DU, 0x6A26264CU,
    0x5A36366CU, 0x413F3F7EU, 0x02F7F7F5U, 0x4FCCCC83U,
    0x5C343468U, 0xF4A5A551U, 0x34E5E5D1U, 0x08F1F1F9U,
    0x937171E2U, 0x73D8D8ABU, 0x53313162U, 0x3F15152AU,
    0x0C040408U, 0x52C7C795U, 0x65232346U, 0x5EC3C39DU,
    0x28181830U, 0xA1969637U, 0x0F05050AU, 0xB59A9A2FU,
    0x0907070EU, 0x36121224U, 0x9B80801BU, 0x3DE2E2DFU,
    0x26EBEBCDU, 0x6927274EU, 0xCDB2B27FU, 0x9F7575EAU,
    0x1B090912U, 0x9E83831DU, 0x742C2C58U, 0x2E1A1A34U,
    0x2D1B1B36U, 0xB26E6EDCU, 0xEE5A5AB4U, 0xFBA0A05BU,
    0xF65252A4U, 0x4D3B3B76U, 0x61D6D6B7U, 0xCEB3B37DU,
    0x7B292952U, 0x3EE3E3DDU, 0x712F2F5EU, 0x97848413U,
    0xF55353A6U, 0x68D1D1B9U, 0x00000000U, 0x2CEDEDC1U,
    0x60202040U, 0x1FFCFCE3U, 0xC8B1B179U, 0xED5B5BB6U,
    0xBE6A6AD4U, 0x46CBCB8DU, 0xD9BEBE67U, 0x4B393972U,
    0xDE4A4A94U, 0xD44C4C98U, 0xE85858B0U, 0x4ACFCF85U,
    0x6BD0D0BBU, 0x2AEFEFC5U, 0xE5AAAA4FU, 0x16FBFBEDU,
    0xC5434386U, 0xD74D4D9AU, 0x55333366U, 0x94858511U,
    0xCF45458AU, 0x10F9F9E9U, 0x06020204U, 0x817F7FFEU,
    0xF05050A0U, 0x443C3C78U, 0xBA9F9F25U, 0xE3A8A84BU,
    0xF35151A2U, 0xFEA3A35DU, 0xC0404080U, 0x8A8F8F05U,
    0xAD92923FU, 0xBC9D9D21U, 0x48383870U, 0x04F5F5F1U,
    0xDFBCBC63U, 0xC1B6B677U, 0x75DADAAFU, 0x63212142U,
    0x30101020U, 0x1AFFFFE5U, 0x0EF3F3FDU, 0x6DD2D2BFU,
    0x4CCDCD81U, 0x140C0C18U, 0x35131326U, 0x2FECECC3U,
    0xE15F5FBEU, 0xA2979735U, 0xCC444488U, 0x3917172EU,
    0x57C4C493U, 0xF2A7A755U, 0x827E7EFCU, 0x473D3D7AU,
    0xAC6464C8U, 0xE75D5DBAU, 0x2B191932U, 0x957373E6U,
    0xA06060C0U, 0x98818119U, 0xD14F4F9EU, 0x7FDCDCA3U,
    0x66222244U, 0x7E2A2A54U, 0xAB90903BU, 0x8388880BU,
    0xCA46468CU, 0x29EEEEC7U, 0xD3B8B86BU, 0x3C141428U,
    0x79DEDEA7U, 0xE25E5EBCU, 0x1D0B0B16U, 0x76DBDBADU,
    0x3BE0E0DBU, 0x56323264U, 0x4E3A3A74U, 0x1E0A0A14U,
    0xDB494992U, 0x0A06060CU, 0x6C242448U, 0xE45C5CB8U,
    0x5DC2C29FU, 0x6ED3D3BDU, 0xEFACAC43U, 0xA66262C4U,
    0xA8919139U, 0xA4959531U, 0x37E4E4D3U, 0x8B7979F2U,
    0x32E7E7D5U, 0x43C8C88BU, 0x5937376EU, 0xB76D6DDAU,
    0x8C8D8D01U, 0x64D5D5B1U, 0xD24E4E9CU, 0xE0A9A949U,
    0xB46C6CD8U, 0xFA5656ACU, 0x07F4F4F3U, 0x25EAEACFU,
    0xAF6565CAU, 0x8E7A7AF4U, 0xE9AEAE47U, 0x18080810U,
    0xD5BABA6FU, 0x887878F0U, 0x6F25254AU, 0x722E2E5CU,
    0x241C1C38U, 0xF1A6A657U, 0xC7B4B473U, 0x51C6C697U,
    0x23E8E8CBU, 0x7CDDDDA1U, 0x9C7474E8U, 0x211F1F3EU,
    0xDD4B4B96U, 0xDCBDBD61U, 0x868B8B0DU, 0x858A8A0FU,
    0x907070E0U, 0x423E3E7CU, 0xC4B5B571U, 0xAA6666CCU,
    0xD8484890U, 0x05030306U, 0x01F6F6F7U, 0x120E0E1CU,
    0xA36161C2U, 0x5F35356AU, 0xF95757AEU, 0xD0B9B969U,
    0x91868617U, 0x58C1C199U, 0x271D1D3AU, 0xB99E9E27U,
    0x38E1E1D9U, 0x13F8F8EBU, 0xB398982BU, 0x33111122U,
    0xBB6969D2U, 0x70D9D9A9U, 0x898E8E07U, 0xA7949433U,
    0xB69B9B2DU, 0x221E1E3CU, 0x92878715U, 0x20E9E9C9U,
    0x49CECE87U, 0xFF5555AAU, 0x78282850U, 0x7ADFDFA5U,
    0x8F8C8C03U, 0xF8A1A159U, 0x80898909U, 0x170D0D1AU,
    0xDABFBF65U, 0x31E6E6D7U, 0xC6424284U, 0xB86868D0U,
    0xC3414182U, 0xB0999929U, 0x772D2D5AU, 0x110F0F1EU,
    0xCBB0B07BU, 0xFC5454A8U, 0xD6BBBB6DU, 0x3A16162CU
#define BYTE(x, y) (xmrig_amd_bfe((x), (y) << 3U, 8U))
inline uint4 AES_Round_bittube2(const __local uint *AES0, const __local uint *AES1, uint4 x, uint4 k)
    x = ~x;
    k.s0 ^= AES0[BYTE(x.s0, 0)] ^ AES1[BYTE(x.s1, 1)] ^ rotate(AES0[BYTE(x.s2, 2)] ^ AES1[BYTE(x.s3, 3)], 16U);
    x.s0 ^= k.s0;
    k.s1 ^= AES0[BYTE(x.s1, 0)] ^ AES1[BYTE(x.s2, 1)] ^ rotate(AES0[BYTE(x.s3, 2)] ^ AES1[BYTE(x.s0, 3)], 16U);
    x.s1 ^= k.s1;
    k.s2 ^= AES0[BYTE(x.s2, 0)] ^ AES1[BYTE(x.s3, 1)] ^ rotate(AES0[BYTE(x.s0, 2)] ^ AES1[BYTE(x.s1, 3)], 16U);
    x.s2 ^= k.s2;
    k.s3 ^= AES0[BYTE(x.s3, 0)] ^ AES1[BYTE(x.s0, 1)] ^ rotate(AES0[BYTE(x.s1, 2)] ^ AES1[BYTE(x.s2, 3)], 16U);
    return k;
uint4 AES_Round(const __local uint *AES0, const __local uint *AES1, const __local uint *AES2, const __local uint *AES3, const uint4 X, uint4 key)
    key.s0 ^= AES0[BYTE(X.s0, 0)] ^ AES1[BYTE(X.s1, 1)] ^ AES2[BYTE(X.s2, 2)] ^ AES3[BYTE(X.s3, 3)];
    key.s1 ^= AES0[BYTE(X.s1, 0)] ^ AES1[BYTE(X.s2, 1)] ^ AES2[BYTE(X.s3, 2)] ^ AES3[BYTE(X.s0, 3)];
    key.s2 ^= AES0[BYTE(X.s2, 0)] ^ AES1[BYTE(X.s3, 1)] ^ AES2[BYTE(X.s0, 2)] ^ AES3[BYTE(X.s1, 3)];
    key.s3 ^= AES0[BYTE(X.s3, 0)] ^ AES1[BYTE(X.s0, 1)] ^ AES2[BYTE(X.s1, 2)] ^ AES3[BYTE(X.s2, 3)];
    return key;
uint4 AES_Round_Two_Tables(const __local uint *AES0, const __local uint *AES1, const uint4 X, uint4 key)
    key.s0 ^= AES0[BYTE(X.s0, 0)] ^ AES1[BYTE(X.s1, 1)] ^ rotate(AES0[BYTE(X.s2, 2)] ^ AES1[BYTE(X.s3, 3)], 16U);
    key.s1 ^= AES0[BYTE(X.s1, 0)] ^ AES1[BYTE(X.s2, 1)] ^ rotate(AES0[BYTE(X.s3, 2)] ^ AES1[BYTE(X.s0, 3)], 16U);
    key.s2 ^= AES0[BYTE(X.s2, 0)] ^ AES1[BYTE(X.s3, 1)] ^ rotate(AES0[BYTE(X.s0, 2)] ^ AES1[BYTE(X.s1, 3)], 16U);
    key.s3 ^= AES0[BYTE(X.s3, 0)] ^ AES1[BYTE(X.s0, 1)] ^ rotate(AES0[BYTE(X.s1, 2)] ^ AES1[BYTE(X.s2, 3)], 16U);
    return key;
#endif
#ifdef __NV_CL_C_VERSION
#	define SCRATCHPAD_CHUNK(N) (*(__local uint4*)((__local uchar*)(scratchpad_line) + (idx1 ^ (N << 4))))
#	if (STRIDED_INDEX == 0)
#		define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (idx ^ (N << 4))))
#	elif (STRIDED_INDEX == 1)
#		define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + mul24(as_uint(idx ^ (N << 4)), Threads)))
#	elif (STRIDED_INDEX == 2)
#		define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (((idx ^ (N << 4)) % (MEM_CHUNK << 4)) + ((idx ^ (N << 4)) / (MEM_CHUNK << 4)) * WORKSIZE * (MEM_CHUNK << 4))))
#	endif
#endif
#define ROT_BITS 32
#define VARIANT_WOW 12
#define VARIANT_4  13
#define MEM_CHUNK (1 << MEM_CHUNK_EXPONENT)
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_cryptonight_r_N(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
	ulong a[2], b[4];
	__local uint AES0[256], AES1[256], AES2[256], AES3[256];
	const ulong gIdx = get_global_id(0) - get_global_offset(0);
	for(int i = get_local_id(0); i < 256; i += WORKSIZE)
		const uint tmp = AES0_C[i];
		AES0[i] = tmp;
		AES1[i] = rotate(tmp, 8U);
		AES2[i] = rotate(tmp, 16U);
		AES3[i] = rotate(tmp, 24U);
	barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
	// do not use early return here
	if (gIdx < Threads)
#   endif
		states += 25 * gIdx;
#		if defined(__NV_CL_C_VERSION)
			Scratchpad += gIdx * (ITERATIONS >> 2);
#		else
#			if (STRIDED_INDEX == 0)
				Scratchpad += gIdx * (MEMORY >> 4);
#			elif (STRIDED_INDEX == 1)
				Scratchpad += gIdx;
#			elif (STRIDED_INDEX == 2)
				Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#			endif
#		endif
		a[0] = states[0] ^ states[4];
		a[1] = states[1] ^ states[5];
		b[0] = states[2] ^ states[6];
		b[1] = states[3] ^ states[7];
		b[2] = states[8] ^ states[10];
		b[3] = states[9] ^ states[11];
	ulong2 bx0 = ((ulong2 *)b)[0];
	ulong2 bx1 = ((ulong2 *)b)[1];
	mem_fence(CLK_LOCAL_MEM_FENCE);
#	ifdef __NV_CL_C_VERSION
	__local uint16 scratchpad_line_buf[WORKSIZE];
	__local uint16* scratchpad_line = scratchpad_line_buf + get_local_id(0);
#	endif
#	if (COMP_MODE == 1)
	// do not use early return here
	if (gIdx < Threads)
#	endif
	uint r0 = as_uint2(states[12]).s0;
	uint r1 = as_uint2(states[12]).s1;
	uint r2 = as_uint2(states[13]).s0;
	uint r3 = as_uint2(states[13]).s1;
	#pragma unroll UNROLL_FACTOR
	for(int i = 0; i < ITERATIONS; ++i)
#		ifdef __NV_CL_C_VERSION
			uint idx  = a[0] & 0x1FFFC0;
			uint idx1 = a[0] & 0x30;
			*scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#		else
			uint idx = a[0] & MASK;
#		endif
		uint4 c = SCRATCHPAD_CHUNK(0);
		c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
			const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1));
			const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
			const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
#if (VARIANT == VARIANT_4)
			c ^= as_uint4(chunk1) ^ as_uint4(chunk2) ^ as_uint4(chunk3);
#endif
			SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
			SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
			SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
		SCRATCHPAD_CHUNK(0) = as_uint4(bx0) ^ c;
#		ifdef __NV_CL_C_VERSION
			*(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
			idx = as_ulong2(c).s0 & 0x1FFFC0;
			idx1 = as_ulong2(c).s0 & 0x30;
			*scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#		else
			idx = as_ulong2(c).s0 & MASK;
#		endif
		uint4 tmp = SCRATCHPAD_CHUNK(0);
		tmp.s0 ^= r0 + r1;
		tmp.s1 ^= r2 + r3;
		const uint r4 = as_uint2(a[0]).s0;
		const uint r5 = as_uint2(a[1]).s0;
		const uint r6 = as_uint4(bx0).s0;
		const uint r7 = as_uint4(bx1).s0;
#if (VARIANT == VARIANT_4)
		const uint r8 = as_uint4(bx1).s2;
#endif
	XMRIG_INCLUDE_RANDOM_MATH
#if (VARIANT == VARIANT_4)
		const uint2 al = (uint2)(as_uint2(a[0]).s0 ^ r2, as_uint2(a[0]).s1 ^ r3);
		const uint2 ah = (uint2)(as_uint2(a[1]).s0 ^ r0, as_uint2(a[1]).s1 ^ r1);
#endif
		ulong2 t;
		t.s0 = mul_hi(as_ulong2(c).s0, as_ulong2(tmp).s0);
		t.s1 = as_ulong2(c).s0 * as_ulong2(tmp).s0;
			const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1))
#if (VARIANT == VARIANT_WOW)
			^ t
#endif
			const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
#if (VARIANT == VARIANT_WOW)
			t ^= chunk2;
#endif
			const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
#if (VARIANT == VARIANT_4)
			c ^= as_uint4(chunk1) ^ as_uint4(chunk2) ^ as_uint4(chunk3);
#endif
			SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
			SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
			SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
#if (VARIANT == VARIANT_4)
		a[1] = as_ulong(ah) + t.s1;
		a[0] = as_ulong(al) + t.s0;
		a[1] += t.s1;
		a[0] += t.s0;
#endif
		SCRATCHPAD_CHUNK(0) = ((uint4 *)a)[0];
#		ifdef __NV_CL_C_VERSION
			*(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
#		endif
		((uint4 *)a)[0] ^= tmp;
		bx1 = bx0;
		bx0 = as_ulong2(c);
	mem_fence(CLK_GLOBAL_MEM_FENCE);
XMRIG_INCLUDE_RANDOM_MATH
CryptonightR_get_program: XMRIG_INCLUDE_RANDOM_MATH not found in cryptonight_r.cl
CryptonightR_get_program: invalid variant %d
cn1_cryptonight_r_N
 -DVARIANT=%d
 -DRANDOM_MATH_64_BIT
#%02d, GPU #%02zu (%s), i:%zu (%zu/%zu), si:%d/%d, u:%d, cu:%d
             %1.2f/%1.2f/%1.0f GB
Error %s when calling clSetKernelArg for kernel %d, argument %d.
             
[0;36m%1.2f/%1.2f/%1.0f
[0m GB
Error %s when calling clCreateBuffer to create output buffer.
[1;37m#%02d
[0m, GPU 
[1;37m#%02zu
[1;32m%s
[0m, i:
[1;37m%zu
[1;30m(%zu/%zu)
[0m, si:
[1;37m%d/%d
[0m, u:
[1;37m%d
[0m, cu:
[1;37m%d
Groestl
[1;37m#%02d
[0m, GPU 
[1;37m#%02zu
[1;32m%s
[1;36m%s
[0m), i:
[1;37m%zu
[1;30m(%zu/%zu)
[0m, si:
[1;37m%d/%d
[0m, u:
[1;37m%d
[0m, cu:
[1;37m%d
#%02d, GPU #%02zu %s (%s), i:%zu (%zu/%zu), si:%d/%d, u:%d, cu:%d
NVIDIA
Error %s when calling clCreateBuffer to create input buffer.
Error %s when calling clCreateBuffer to create hash scratchpads buffer.
Error %s when calling clCreateBuffer to create hash states buffer.
cn1_msr
Error %s when calling clCreateBuffer to create Branch 0 buffer.
Error %s when calling clCreateBuffer to create Branch 1 buffer.
Error %s when calling clCreateBuffer to create Branch 2 buffer.
Error %s when calling clCreateBuffer to create Branch 3 buffer.
cn1_monero
cn1_xao
cn1_tube
NVIDIA
cn1_v2_monero
cn1_v2_half
cn0_cn_gpu
cn00_cn_gpu
cn1_cn_gpu
cn2_cn_gpu
cn1_v2_rwz
cn1_v2_zls
cn1_v2_double
found %s platform index: %d, name: %s
[1;32mfound 
[1;37m%s
[0m platform index: 
[1;37m%d
[0m, name: 
[1;37m%s
--help
[1;32mfound
[0m OpenCL GPU: 
[1;32m%s
[0m, cu: 
[1;37m%d
found OpenCL GPU: %s, cu:
[1;32mfound
[0m OpenCL GPU: 
[1;32m%s
[1;36m%s
[0m), cu: 
[1;37m%d
found OpenCL GPU: %s (%s), cu:
Advanced Micro Devices
#%zu: %s
rig-id
Error %s when calling clGetDeviceIDs for number of devices.
Selected OpenCL device index %lu doesn't exist.
XMRIG_INCLUDE_WOLF_AES
Error %s when calling clGetDeviceIDs for device ID information.
  * 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
  * 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 <http://www.gnu.org/licenses/>.
/* For Mesa clover support */
#ifdef cl_clang_storage_class_specifiers
#   pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable
#endif
//#include "opencl/wolf-aes.cl"
XMRIG_INCLUDE_WOLF_AES
//#include "opencl/wolf-skein.cl"
XMRIG_INCLUDE_WOLF_SKEIN
//#include "opencl/jh.cl"
XMRIG_INCLUDE_JH
//#include "opencl/blake256.cl"
XMRIG_INCLUDE_BLAKE256
//#include "opencl/groestl256.cl"
XMRIG_INCLUDE_GROESTL256
//#include "fast_int_math_v2.cl"
XMRIG_INCLUDE_FAST_INT_MATH_V2
//#include "fast_div_heavy.cl"
XMRIG_INCLUDE_FAST_DIV_HEAVY
#define VARIANT_0    0  // Original CryptoNight or CryptoNight-Heavy
#define VARIANT_1    1  // CryptoNight variant 1 also known as Monero7 and CryptoNightV7
#define VARIANT_TUBE 2  // Modified CryptoNight Lite variant 1 with XOR (IPBC/TUBE only)
#define VARIANT_XTL  3  // Modified CryptoNight variant 1 (Stellite only)
#define VARIANT_MSR  4  // Modified CryptoNight variant 1 (Masari only)
#define VARIANT_XHV  5  // Modified CryptoNight-Heavy (Haven Protocol only)
#define VARIANT_XAO  6  // Modified CryptoNight variant 0 (Alloy only)
#define VARIANT_RTO  7  // Modified CryptoNight variant 1 (Arto only)
#define VARIANT_2    8  // CryptoNight variant 2
#define VARIANT_HALF 9  // CryptoNight variant 2 with half iterations (Masari/Stellite)
#define VARIANT_TRTL 10 // CryptoNight Turtle (TRTL)
#define VARIANT_GPU  11 // CryptoNight-GPU (Ryo)
#define CRYPTONIGHT       0 /* CryptoNight (2 MB) */
#define CRYPTONIGHT_LITE  1 /* CryptoNight (1 MB) */
#define CRYPTONIGHT_HEAVY 2 /* CryptoNight (4 MB) */
#define CRYPTONIGHT_PICO  3 /* CryptoNight (256 KB) */
#if defined(__NV_CL_C_VERSION) && STRIDED_INDEX != 0
#   undef STRIDED_INDEX
#   define STRIDED_INDEX 0
#endif
static const __constant ulong keccakf_rndc[24] =
    0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
    0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
    0x8000000080008081, 0x8000000000008009, 0x000000000000008a,
    0x0000000000000088, 0x0000000080008009, 0x000000008000000a,
    0x000000008000808b, 0x800000000000008b, 0x8000000000008089,
    0x8000000000008003, 0x8000000000008002, 0x8000000000000080,
    0x000000000000800a, 0x800000008000000a, 0x8000000080008081,
    0x8000000000008080, 0x0000000080000001, 0x8000000080008008
static const __constant uchar sbox[256] =
    0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
    0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0,
    0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
    0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75,
    0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
    0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
    0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8,
    0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
    0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
    0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
    0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79,
    0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
    0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A,
    0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E,
    0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
    0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16
void keccakf1600(ulong *s)
    for(int i = 0; i < 24; ++i)
        ulong bc[5], tmp1, tmp2;
        bc[0] = s[0] ^ s[5] ^ s[10] ^ s[15] ^ s[20] ^ rotate(s[2] ^ s[7] ^ s[12] ^ s[17] ^ s[22], 1UL);
        bc[1] = s[1] ^ s[6] ^ s[11] ^ s[16] ^ s[21] ^ rotate(s[3] ^ s[8] ^ s[13] ^ s[18] ^ s[23], 1UL);
        bc[2] = s[2] ^ s[7] ^ s[12] ^ s[17] ^ s[22] ^ rotate(s[4] ^ s[9] ^ s[14] ^ s[19] ^ s[24], 1UL);
        bc[3] = s[3] ^ s[8] ^ s[13] ^ s[18] ^ s[23] ^ rotate(s[0] ^ s[5] ^ s[10] ^ s[15] ^ s[20], 1UL);
        bc[4] = s[4] ^ s[9] ^ s[14] ^ s[19] ^ s[24] ^ rotate(s[1] ^ s[6] ^ s[11] ^ s[16] ^ s[21], 1UL);
        tmp1 = s[1] ^ bc[0];
        s[0] ^= bc[4];
        s[1] = rotate(s[6] ^ bc[0], 44UL);
        s[6] = rotate(s[9] ^ bc[3], 20UL);
        s[9] = rotate(s[22] ^ bc[1], 61UL);
        s[22] = rotate(s[14] ^ bc[3], 39UL);
        s[14] = rotate(s[20] ^ bc[4], 18UL);
        s[20] = rotate(s[2] ^ bc[1], 62UL);
        s[2] = rotate(s[12] ^ bc[1], 43UL);
        s[12] = rotate(s[13] ^ bc[2], 25UL);
        s[13] = rotate(s[19] ^ bc[3], 8UL);
        s[19] = rotate(s[23] ^ bc[2], 56UL);
        s[23] = rotate(s[15] ^ bc[4], 41UL);
        s[15] = rotate(s[4] ^ bc[3], 27UL);
        s[4] = rotate(s[24] ^ bc[3], 14UL);
        s[24] = rotate(s[21] ^ bc[0], 2UL);
        s[21] = rotate(s[8] ^ bc[2], 55UL);
        s[8] = rotate(s[16] ^ bc[0], 35UL);
        s[16] = rotate(s[5] ^ bc[4], 36UL);
        s[5] = rotate(s[3] ^ bc[2], 28UL);
        s[3] = rotate(s[18] ^ bc[2], 21UL);
        s[18] = rotate(s[17] ^ bc[1], 15UL);
        s[17] = rotate(s[11] ^ bc[0], 10UL);
        s[11] = rotate(s[7] ^ bc[1], 6UL);
        s[7] = rotate(s[10] ^ bc[4], 3UL);
        s[10] = rotate(tmp1, 1UL);
        tmp1 = s[0]; tmp2 = s[1]; s[0] = bitselect(s[0] ^ s[2], s[0], s[1]); s[1] = bitselect(s[1] ^ s[3], s[1], s[2]); s[2] = bitselect(s[2] ^ s[4], s[2], s[3]); s[3] = bitselect(s[3] ^ tmp1, s[3], s[4]); s[4] = bitselect(s[4] ^ tmp2, s[4], tmp1);
        tmp1 = s[5]; tmp2 = s[6]; s[5] = bitselect(s[5] ^ s[7], s[5], s[6]); s[6] = bitselect(s[6] ^ s[8], s[6], s[7]); s[7] = bitselect(s[7] ^ s[9], s[7], s[8]); s[8] = bitselect(s[8] ^ tmp1, s[8], s[9]); s[9] = bitselect(s[9] ^ tmp2, s[9], tmp1);
        tmp1 = s[10]; tmp2 = s[11]; s[10] = bitselect(s[10] ^ s[12], s[10], s[11]); s[11] = bitselect(s[11] ^ s[13], s[11], s[12]); s[12] = bitselect(s[12] ^ s[14], s[12], s[13]); s[13] = bitselect(s[13] ^ tmp1, s[13], s[14]); s[14] = bitselect(s[14] ^ tmp2, s[14], tmp1);
        tmp1 = s[15]; tmp2 = s[16]; s[15] = bitselect(s[15] ^ s[17], s[15], s[16]); s[16] = bitselect(s[16] ^ s[18], s[16], s[17]); s[17] = bitselect(s[17] ^ s[19], s[17], s[18]); s[18] = bitselect(s[18] ^ tmp1, s[18], s[19]); s[19] = bitselect(s[19] ^ tmp2, s[19], tmp1);
        tmp1 = s[20]; tmp2 = s[21]; s[20] = bitselect(s[20] ^ s[22], s[20], s[21]); s[21] = bitselect(s[21] ^ s[23], s[21], s[22]); s[22] = bitselect(s[22] ^ s[24], s[22], s[23]); s[23] = bitselect(s[23] ^ tmp1, s[23], s[24]); s[24] = bitselect(s[24] ^ tmp2, s[24], tmp1);
        s[0] ^= keccakf_rndc[i];
static const __constant uint keccakf_rotc[24] =
    1,  3,  6,  10, 15, 21, 28, 36, 45, 55, 2,  14,
    27, 41, 56, 8,  25, 43, 62, 18, 39, 61, 20, 44
static const __constant uint keccakf_piln[24] =
    10, 7,  11, 17, 18, 3, 5,  16, 8,  21, 24, 4,
    15, 23, 19, 13, 12, 2, 20, 14, 22, 9,  6,  1
void keccakf1600_1(ulong *st)
    int i, round;
    ulong t, bc[5];
    #pragma unroll 1
    for(round = 0; round < 24; ++round)
        // Theta
        bc[0] = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20];
        bc[1] = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21];
        bc[2] = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22];
        bc[3] = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23];
        bc[4] = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24];
        #pragma unroll 1
        for (i = 0; i < 5; ++i) {
            t = bc[(i + 4) % 5] ^ rotate(bc[(i + 1) % 5], 1UL);
            st[i     ] ^= t;
            st[i +  5] ^= t;
            st[i + 10] ^= t;
            st[i + 15] ^= t;
            st[i + 20] ^= t;
        }
        // Rho Pi
        t = st[1];
        #pragma unroll
        for (i = 0; i < 24; ++i) {
            bc[0] = st[keccakf_piln[i]];
            st[keccakf_piln[i]] = rotate(t, (ulong)keccakf_rotc[i]);
            t = bc[0];
        }
        #pragma unroll 1
        for(int i = 0; i < 25; i += 5)
        {
            ulong tmp[5];
            #pragma unroll 1
            for(int x = 0; x < 5; ++x)
                tmp[x] = bitselect(st[i + x] ^ st[i + ((x + 2) % 5)], st[i + x], st[i + ((x + 1) % 5)]);
            #pragma unroll 1
            for(int x = 0; x < 5; ++x) st[i + x] = tmp[x];
        }
        //  Iota
        st[0] ^= keccakf_rndc[round];
void keccakf1600_2(__local ulong *st)
    int i, round;
    ulong t, bc[5];
    #pragma unroll 1
    for (round = 0; round < 24; ++round)
        bc[0] = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20] ^ rotate(st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22], 1UL);
        bc[1] = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21] ^ rotate(st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23], 1UL);
        bc[2] = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22] ^ rotate(st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24], 1UL);
        bc[3] = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23] ^ rotate(st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20], 1UL);
        bc[4] = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24] ^ rotate(st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21], 1UL);
        st[0] ^= bc[4];
        st[5] ^= bc[4];
        st[10] ^= bc[4];
        st[15] ^= bc[4];
        st[20] ^= bc[4];
        st[1] ^= bc[0];
        st[6] ^= bc[0];
        st[11] ^= bc[0];
        st[16] ^= bc[0];
        st[21] ^= bc[0];
        st[2] ^= bc[1];
        st[7] ^= bc[1];
        st[12] ^= bc[1];
        st[17] ^= bc[1];
        st[22] ^= bc[1];
        st[3] ^= bc[2];
        st[8] ^= bc[2];
        st[13] ^= bc[2];
        st[18] ^= bc[2];
        st[23] ^= bc[2];
        st[4] ^= bc[3];
        st[9] ^= bc[3];
        st[14] ^= bc[3];
        st[19] ^= bc[3];
        st[24] ^= bc[3];
        // Rho Pi
        t = st[1];
        #pragma unroll
        for (i = 0; i < 24; ++i) {
            bc[0] = st[keccakf_piln[i]];
            st[keccakf_piln[i]] = rotate(t, (ulong)keccakf_rotc[i]);
            t = bc[0];
        }
        #pragma unroll
        for(int i = 0; i < 25; i += 5)
        {
            ulong tmp1 = st[i], tmp2 = st[i + 1];
            st[i] = bitselect(st[i] ^ st[i + 2], st[i], st[i + 1]);
            st[i + 1] = bitselect(st[i + 1] ^ st[i + 3], st[i + 1], st[i + 2]);
            st[i + 2] = bitselect(st[i + 2] ^ st[i + 4], st[i + 2], st[i + 3]);
            st[i + 3] = bitselect(st[i + 3] ^ tmp1, st[i + 3], st[i + 4]);
            st[i + 4] = bitselect(st[i + 4] ^ tmp2, st[i + 4], tmp1);
        }
        //  Iota
        st[0] ^= keccakf_rndc[round];
void CNKeccak(ulong *output, ulong *input)
    ulong st[25];
    // Copy 72 bytes
    for(int i = 0; i < 9; ++i) st[i] = input[i];
    // Last four and '1' bit for padding
    //st[9] = as_ulong((uint2)(((uint *)input)[18], 0x00000001U));
    st[9] = (input[9] & 0x00000000FFFFFFFFUL) | 0x0000000100000000UL;
    for(int i = 10; i < 25; ++i) st[i] = 0x00UL;
    // Last bit of padding
    st[16] = 0x8000000000000000UL;
    keccakf1600_1(st);
    for(int i = 0; i < 25; ++i) output[i] = st[i];
static const __constant uchar rcon[8] = { 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40 };
#define SubWord(inw)        ((sbox[BYTE(inw, 3)] << 24) | (sbox[BYTE(inw, 2)] << 16) | (sbox[BYTE(inw, 1)] << 8) | sbox[BYTE(inw, 0)])
void AESExpandKey256(uint *keybuf)
    //#pragma unroll 4
    for(uint c = 8, i = 1; c < 40; ++c)
        // For 256-bit keys, an sbox permutation is done every other 4th uint generated, AND every 8th
        uint t = ((!(c & 7)) || ((c & 7) == 4)) ? SubWord(keybuf[c - 1]) : keybuf[c - 1];
        // If the uint we're generating has an index that is a multiple of 8, rotate and XOR with the round constant,
        // then XOR this with previously generated uint. If it's 4 after a multiple of 8, only the sbox permutation
        // is done, followed by the XOR. If neither are true, only the XOR with the previously generated uint is done.
        keybuf[c] = keybuf[c - 8] ^ ((!(c & 7)) ? rotate(t, 24U) ^ as_uint((uchar4)(rcon[i++], 0U, 0U, 0U)) : t);
#define MEM_CHUNK (1 << MEM_CHUNK_EXPONENT)
#if (STRIDED_INDEX == 0)
#   define IDX(x)   (x)
#elif (STRIDED_INDEX == 1)
#   if (ALGO == CRYPTONIGHT_HEAVY)
#       define IDX(x)   ((x) * WORKSIZE)
#   else
#       define IDX(x)   mul24((x), Threads)
#   endif
#elif (STRIDED_INDEX == 2)
#   define IDX(x)   (((x) % MEM_CHUNK) + ((x) / MEM_CHUNK) * WORKSIZE * MEM_CHUNK)
#endif
inline ulong getIdx()
#   if (STRIDED_INDEX == 0 || STRIDED_INDEX == 1 || STRIDED_INDEX == 2)
    return get_global_id(0) - get_global_offset(0);
#   endif
//#include "opencl/cryptonight_gpu.cl"
XMRIG_INCLUDE_CN_GPU
#define mix_and_propagate(xin) (xin)[(get_local_id(1)) % 8][get_local_id(0)] ^ (xin)[(get_local_id(1) + 1) % 8][get_local_id(0)]
__attribute__((reqd_work_group_size(8, 8, 1)))
__kernel void cn0(__global ulong *input, __global uint4 *Scratchpad, __global ulong *states, uint Threads)
    uint ExpandedKey1[40];
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    uint4 text;
    const uint gIdx = getIdx();
    for (int i = get_local_id(1) * 8 + get_local_id(0); i < 256; i += 8 * 8) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
    __local ulong State_buf[8 * 25];
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += (gIdx / WORKSIZE) * (MEMORY >> 4) * WORKSIZE + (gIdx % WORKSIZE);
#       else
            Scratchpad += gIdx;
#       endif
#       elif (STRIDED_INDEX == 2)
        Scratchpad += (gIdx / WORKSIZE) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * (gIdx % WORKSIZE);
#       endif
        if (get_local_id(1) == 0)
        {
            __local ulong* State = State_buf + get_local_id(0) * 25;
            ((__local ulong8 *)State)[0] = vload8(0, input);
            State[8]  = input[8];
            State[9]  = input[9];
            State[10] = input[10];
            State[11] = input[11];
            State[12] = input[12];
            State[13] = input[13];
            State[14] = input[14];
            State[15] = input[15];
            ((__local uint *)State)[9]  &= 0x00FFFFFFU;
            ((__local uint *)State)[9]  |= (((uint)get_global_id(0)) & 0xFF) << 24;
            ((__local uint *)State)[10] &= 0xFF000000U;
            /* explicit cast to `uint` is required because some OpenCL implementations (e.g. NVIDIA)
             * handle get_global_id and get_global_offset as signed long long int and add
             * 0xFFFFFFFF... to `get_global_id` if we set on host side a 32bit offset where the first bit is `1`
             * (even if it is correct casted to unsigned on the host)
             */
            ((__local uint *)State)[10] |= (((uint)get_global_id(0) >> 8));
            // Last bit of padding
            State[16] = 0x8000000000000000UL;
            for (int i = 17; i < 25; ++i) {
                State[i] = 0x00UL;
            }
            keccakf1600_2(State);
            #pragma unroll
            for (int i = 0; i < 25; ++i) {
                states[i] = State[i];
            }
        }
    barrier(CLK_GLOBAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        text = vload4(get_local_id(1) + 4, (__global uint *)(states));
        #pragma unroll
        for (int i = 0; i < 4; ++i) {
            ((ulong *)ExpandedKey1)[i] = states[i];
        }
        AESExpandKey256(ExpandedKey1);
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   if (ALGO == CRYPTONIGHT_HEAVY)
        __local uint4 xin[8][8];
        /* Also left over threads perform this loop.
         * The left over thread results will be ignored
         */
        #pragma unroll 16
        for (size_t i = 0; i < 16; i++) {
            #pragma unroll 10
            for (int j = 0; j < 10; ++j) {
                uint4 t = ((uint4 *)ExpandedKey1)[j];
                t.s0 ^= AES0[BYTE(text.s0, 0)] ^ AES1[BYTE(text.s1, 1)] ^ AES2[BYTE(text.s2, 2)] ^ AES3[BYTE(text.s3, 3)];
                t.s1 ^= AES0[BYTE(text.s1, 0)] ^ AES1[BYTE(text.s2, 1)] ^ AES2[BYTE(text.s3, 2)] ^ AES3[BYTE(text.s0, 3)];
                t.s2 ^= AES0[BYTE(text.s2, 0)] ^ AES1[BYTE(text.s3, 1)] ^ AES2[BYTE(text.s0, 2)] ^ AES3[BYTE(text.s1, 3)];
                t.s3 ^= AES0[BYTE(text.s3, 0)] ^ AES1[BYTE(text.s0, 1)] ^ AES2[BYTE(text.s1, 2)] ^ AES3[BYTE(text.s2, 3)];
                text = t;
            }
            barrier(CLK_LOCAL_MEM_FENCE);
            xin[get_local_id(1)][get_local_id(0)] = text;
            barrier(CLK_LOCAL_MEM_FENCE);
            text = mix_and_propagate(xin);
        }
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        const uint local_id1 = get_local_id(1);
        #pragma unroll 2
        for(uint i = 0; i < (MEMORY >> 4); i += 8) {
            #pragma unroll 10
            for (uint j = 0; j < 10; ++j) {
                uint4 t = ((uint4 *)ExpandedKey1)[j];
                t.s0 ^= AES0[BYTE(text.s0, 0)] ^ AES1[BYTE(text.s1, 1)] ^ AES2[BYTE(text.s2, 2)] ^ AES3[BYTE(text.s3, 3)];
                t.s1 ^= AES0[BYTE(text.s1, 0)] ^ AES1[BYTE(text.s2, 1)] ^ AES2[BYTE(text.s3, 2)] ^ AES3[BYTE(text.s0, 3)];
                t.s2 ^= AES0[BYTE(text.s2, 0)] ^ AES1[BYTE(text.s3, 1)] ^ AES2[BYTE(text.s0, 2)] ^ AES3[BYTE(text.s1, 3)];
                t.s3 ^= AES0[BYTE(text.s3, 0)] ^ AES1[BYTE(text.s0, 1)] ^ AES2[BYTE(text.s1, 2)] ^ AES3[BYTE(text.s2, 3)];
                text = t;
            }
            Scratchpad[IDX(i + local_id1)] = text;
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#define VARIANT1_1(p) \
        uint table = 0x75310U; \
        uint index = (((p).s2 >> 26) & 12) | (((p).s2 >> 23) & 2); \
        (p).s2 ^= ((table >> index) & 0x30U) << 24
#define VARIANT1_1_XTL(p) \
        uint table  = 0x75310U; \
        uint offset = variant == VARIANT_XTL ? 27 : 26; \
        uint index  = (((p).s2 >> offset) & 12) | (((p).s2 >> 23) & 2); \
        (p).s2 ^= ((table >> index) & 0x30U) << 24
#define VARIANT1_2(p) ((uint2 *)&(p))[0] ^= tweak1_2_0
#define VARIANT1_INIT() \
        tweak1_2 = as_uint2(input[4]); \
        tweak1_2.s0 >>= 24; \
        tweak1_2.s0 |= tweak1_2.s1 << 8; \
        tweak1_2.s1 = (uint) get_global_id(0); \
        tweak1_2 ^= as_uint2(states[24])
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_monero(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
    ulong a[2], b[2];
    __local uint AES0[256], AES1[256];
    const ulong gIdx = getIdx();
    for (int i = get_local_id(0); i < 256; i += WORKSIZE) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
    barrier(CLK_LOCAL_MEM_FENCE);
    uint2 tweak1_2;
    uint4 b_x;
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += (gIdx / WORKSIZE) * (MEMORY >> 4) * WORKSIZE + (gIdx % WORKSIZE);
#       else
            Scratchpad += gIdx;
#       endif
#       elif (STRIDED_INDEX == 2)
        Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#       endif
        a[0] = states[0] ^ states[4];
        b[0] = states[2] ^ states[6];
        a[1] = states[1] ^ states[5];
        b[1] = states[3] ^ states[7];
        b_x = ((uint4 *)b)[0];
        VARIANT1_INIT();
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        #pragma unroll UNROLL_FACTOR
        for (int i = 0; i < ITERATIONS; ++i) {
            ulong c[2];
            ((uint4 *)c)[0] = Scratchpad[IDX((as_uint2(a[0]).s0 & MASK) >> 4)];
            ((uint4 *)c)[0] = AES_Round_Two_Tables(AES0, AES1, ((uint4 *)c)[0], ((uint4 *)a)[0]);
            b_x ^= ((uint4 *)c)[0];
            VARIANT1_1_XTL(b_x);
            Scratchpad[IDX((as_uint2(a[0]).s0 & MASK) >> 4)] = b_x;
            uint4 tmp;
            tmp = Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)];
            a[1] += c[0] * as_ulong2(tmp).s0;
            a[0] += mul_hi(c[0], as_ulong2(tmp).s0);
            uint2 tweak1_2_0 = tweak1_2;
            if (variant == VARIANT_RTO) {
                tweak1_2_0 ^= ((uint2 *)&(a[0]))[0];
            }
            VARIANT1_2(a[1]);
            Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)] = ((uint4 *)a)[0];
            VARIANT1_2(a[1]);
            ((uint4 *)a)[0] ^= tmp;
            b_x = ((uint4 *)c)[0];
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_v2_monero(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT || ALGO == CRYPTONIGHT_PICO)
    ulong a[2], b[4];
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    const ulong gIdx = getIdx();
    for(int i = get_local_id(0); i < 256; i += WORKSIZE)
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if defined(__NV_CL_C_VERSION)
            Scratchpad += gIdx * (ITERATIONS >> 2);
#       else
#           if (STRIDED_INDEX == 0)
                Scratchpad += gIdx * (MEMORY >> 4);
#           elif (STRIDED_INDEX == 1)
                Scratchpad += gIdx;
#           elif (STRIDED_INDEX == 2)
                Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#           endif
#       endif
        a[0] = states[0] ^ states[4];
        a[1] = states[1] ^ states[5];
        b[0] = states[2] ^ states[6];
        b[1] = states[3] ^ states[7];
        b[2] = states[8] ^ states[10];
        b[3] = states[9] ^ states[11];
    ulong2 bx0 = ((ulong2 *)b)[0];
    ulong2 bx1 = ((ulong2 *)b)[1];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   ifdef __NV_CL_C_VERSION
        __local uint16 scratchpad_line_buf[WORKSIZE];
        __local uint16* scratchpad_line = scratchpad_line_buf + get_local_id(0);
#       define SCRATCHPAD_CHUNK(N) (*(__local uint4*)((__local uchar*)(scratchpad_line) + (idx1 ^ (N << 4))))
#   else
#       if (STRIDED_INDEX == 0)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (idx ^ (N << 4))))
#       elif (STRIDED_INDEX == 1)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + mul24(as_uint(idx ^ (N << 4)), Threads)))
#       elif (STRIDED_INDEX == 2)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (((idx ^ (N << 4)) % (MEM_CHUNK << 4)) + ((idx ^ (N << 4)) / (MEM_CHUNK << 4)) * WORKSIZE * (MEM_CHUNK << 4))))
#       endif
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
    uint2 division_result = as_uint2(states[12]);
    uint sqrt_result = as_uint2(states[13]).s0;
    #pragma unroll UNROLL_FACTOR
    for(int i = 0; i < ITERATIONS; ++i)
#       ifdef __NV_CL_C_VERSION
            uint idx  = a[0] & 0x1FFFC0;
            uint idx1 = a[0] & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            uint idx = a[0] & MASK;
#       endif
        uint4 c = SCRATCHPAD_CHUNK(0);
        c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1));
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        SCRATCHPAD_CHUNK(0) = as_uint4(bx0) ^ c;
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
            idx = as_ulong2(c).s0 & 0x1FFFC0;
            idx1 = as_ulong2(c).s0 & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            idx = as_ulong2(c).s0 & MASK;
#       endif
        uint4 tmp = SCRATCHPAD_CHUNK(0);
        {
            tmp.s0 ^= division_result.s0;
            tmp.s1 ^= division_result.s1 ^ sqrt_result;
            division_result = fast_div_v2(as_ulong2(c).s1, (c.s0 + (sqrt_result << 1)) | 0x80000001UL);
            sqrt_result = fast_sqrt_v2(as_ulong2(c).s0 + as_ulong(division_result));
        }
        ulong2 t;
        t.s0 = mul_hi(as_ulong2(c).s0, as_ulong2(tmp).s0);
        t.s1 = as_ulong2(c).s0 * as_ulong2(tmp).s0;
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1)) ^ t;
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            t ^= chunk2;
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        a[1] += t.s1;
        a[0] += t.s0;
        SCRATCHPAD_CHUNK(0) = ((uint4 *)a)[0];
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
#       endif
        ((uint4 *)a)[0] ^= tmp;
        bx1 = bx0;
        bx0 = as_ulong2(c);
#   undef SCRATCHPAD_CHUNK
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_v2_half(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT)
    ulong a[2], b[4];
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    const ulong gIdx = getIdx();
    for(int i = get_local_id(0); i < 256; i += WORKSIZE)
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if defined(__NV_CL_C_VERSION)
            Scratchpad += gIdx * (0x40000 >> 2);
#       else
#           if (STRIDED_INDEX == 0)
                Scratchpad += gIdx * (MEMORY >> 4);
#           elif (STRIDED_INDEX == 1)
                Scratchpad += gIdx;
#           elif (STRIDED_INDEX == 2)
                Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#           endif
#       endif
        a[0] = states[0] ^ states[4];
        a[1] = states[1] ^ states[5];
        b[0] = states[2] ^ states[6];
        b[1] = states[3] ^ states[7];
        b[2] = states[8] ^ states[10];
        b[3] = states[9] ^ states[11];
    ulong2 bx0 = ((ulong2 *)b)[0];
    ulong2 bx1 = ((ulong2 *)b)[1];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   ifdef __NV_CL_C_VERSION
        __local uint16 scratchpad_line_buf[WORKSIZE];
        __local uint16* scratchpad_line = scratchpad_line_buf + get_local_id(0);
#       define SCRATCHPAD_CHUNK(N) (*(__local uint4*)((__local uchar*)(scratchpad_line) + (idx1 ^ (N << 4))))
#   else
#       if (STRIDED_INDEX == 0)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (idx ^ (N << 4))))
#       elif (STRIDED_INDEX == 1)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + mul24(as_uint(idx ^ (N << 4)), Threads)))
#       elif (STRIDED_INDEX == 2)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (((idx ^ (N << 4)) % (MEM_CHUNK << 4)) + ((idx ^ (N << 4)) / (MEM_CHUNK << 4)) * WORKSIZE * (MEM_CHUNK << 4))))
#       endif
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
    uint2 division_result = as_uint2(states[12]);
    uint sqrt_result = as_uint2(states[13]).s0;
    #pragma unroll UNROLL_FACTOR
    for(int i = 0; i < 0x40000; ++i)
#       ifdef __NV_CL_C_VERSION
            uint idx  = a[0] & 0x1FFFC0;
            uint idx1 = a[0] & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            uint idx = a[0] & MASK;
#       endif
        uint4 c = SCRATCHPAD_CHUNK(0);
        c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1));
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        SCRATCHPAD_CHUNK(0) = as_uint4(bx0) ^ c;
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
            idx = as_ulong2(c).s0 & 0x1FFFC0;
            idx1 = as_ulong2(c).s0 & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            idx = as_ulong2(c).s0 & MASK;
#       endif
        uint4 tmp = SCRATCHPAD_CHUNK(0);
        {
            tmp.s0 ^= division_result.s0;
            tmp.s1 ^= division_result.s1 ^ sqrt_result;
            division_result = fast_div_v2(as_ulong2(c).s1, (c.s0 + (sqrt_result << 1)) | 0x80000001UL);
            sqrt_result = fast_sqrt_v2(as_ulong2(c).s0 + as_ulong(division_result));
        }
        ulong2 t;
        t.s0 = mul_hi(as_ulong2(c).s0, as_ulong2(tmp).s0);
        t.s1 = as_ulong2(c).s0 * as_ulong2(tmp).s0;
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1)) ^ t;
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            t ^= chunk2;
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        a[1] += t.s1;
        a[0] += t.s0;
        SCRATCHPAD_CHUNK(0) = ((uint4 *)a)[0];
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
#       endif
        ((uint4 *)a)[0] ^= tmp;
        bx1 = bx0;
        bx0 = as_ulong2(c);
#   undef SCRATCHPAD_CHUNK
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_msr(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT)
    ulong a[2], b[2];
    __local uint AES0[256], AES1[256];
    const ulong gIdx = getIdx();
    for (int i = get_local_id(0); i < 256; i += WORKSIZE) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
    barrier(CLK_LOCAL_MEM_FENCE);
    uint2 tweak1_2;
    uint4 b_x;
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + get_local_id(0);
#       else
            Scratchpad += gIdx;
#       endif
#       elif (STRIDED_INDEX == 2)
        Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#       endif
        a[0] = states[0] ^ states[4];
        b[0] = states[2] ^ states[6];
        a[1] = states[1] ^ states[5];
        b[1] = states[3] ^ states[7];
        b_x = ((uint4 *)b)[0];
        VARIANT1_INIT();
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        #pragma unroll 8
        for (int i = 0; i < 0x40000; ++i) {
            ulong c[2];
            ((uint4 *)c)[0] = Scratchpad[IDX((as_uint2(a[0]).s0 & MASK) >> 4)];
            ((uint4 *)c)[0] = AES_Round_Two_Tables(AES0, AES1, ((uint4 *)c)[0], ((uint4 *)a)[0]);
            b_x ^= ((uint4 *)c)[0];
            VARIANT1_1(b_x);
            Scratchpad[IDX((as_uint2(a[0]).s0 & MASK) >> 4)] = b_x;
            uint4 tmp;
            tmp = Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)];
            a[1] += c[0] * as_ulong2(tmp).s0;
            a[0] += mul_hi(c[0], as_ulong2(tmp).s0);
            uint2 tweak1_2_0 = tweak1_2;
            VARIANT1_2(a[1]);
            Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)] = ((uint4 *)a)[0];
            VARIANT1_2(a[1]);
            ((uint4 *)a)[0] ^= tmp;
            b_x = ((uint4 *)c)[0];
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_tube(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT_HEAVY)
    ulong a[2], b[2];
    __local uint AES0[256], AES1[256];
    const ulong gIdx = getIdx();
    for (int i = get_local_id(0); i < 256; i += WORKSIZE) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
    barrier(CLK_LOCAL_MEM_FENCE);
    uint2 tweak1_2;
    uint4 b_x;
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + get_local_id(0);
#       else
            Scratchpad += gIdx;
#       endif
#       elif (STRIDED_INDEX == 2)
        Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#       endif
        a[0] = states[0] ^ states[4];
        b[0] = states[2] ^ states[6];
        a[1] = states[1] ^ states[5];
        b[1] = states[3] ^ states[7];
        b_x = ((uint4 *)b)[0];
        VARIANT1_INIT();
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        uint idx0 = a[0];
        #pragma unroll UNROLL_FACTOR
        for (int i = 0; i < ITERATIONS; ++i) {
            ulong c[2];
            ((uint4 *)c)[0] = Scratchpad[IDX((idx0 & MASK) >> 4)];
            ((uint4 *)c)[0] = AES_Round_bittube2(AES0, AES1, ((uint4 *)c)[0], ((uint4 *)a)[0]);
            b_x ^= ((uint4 *)c)[0];
            VARIANT1_1(b_x);
            Scratchpad[IDX((idx0 & MASK) >> 4)] = b_x;
            uint4 tmp;
            tmp = Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)];
            a[1] += c[0] * as_ulong2(tmp).s0;
            a[0] += mul_hi(c[0], as_ulong2(tmp).s0);
            uint2 tweak1_2_0 = tweak1_2;
            tweak1_2_0 ^= ((uint2 *)&(a[0]))[0];
            VARIANT1_2(a[1]);
            Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)] = ((uint4 *)a)[0];
            VARIANT1_2(a[1]);
            ((uint4 *)a)[0] ^= tmp;
            idx0 = a[0];
            b_x = ((uint4 *)c)[0];
            {
                long n = *((__global long*)(Scratchpad + (IDX((idx0 & MASK) >> 4))));
                int d  = ((__global int*)(Scratchpad + (IDX((idx0 & MASK) >> 4))))[2];
                long q = fast_div_heavy(n, d | 0x5);
                *((__global long*)(Scratchpad + (IDX((idx0 & MASK) >> 4)))) = n ^ q;
                idx0 = d ^ q;
            }
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
    ulong a[2], b[2];
    __local uint AES0[256], AES1[256];
    const ulong gIdx = getIdx();
    for (int i = get_local_id(0); i < 256; i += WORKSIZE) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
    barrier(CLK_LOCAL_MEM_FENCE);
    uint4 b_x;
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + get_local_id(0);
#       else
            Scratchpad += gIdx;
#       endif
#       elif(STRIDED_INDEX == 2)
        Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#       endif
        a[0] = states[0] ^ states[4];
        b[0] = states[2] ^ states[6];
        a[1] = states[1] ^ states[5];
        b[1] = states[3] ^ states[7];
        b_x = ((uint4 *)b)[0];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        uint idx0 = a[0];
        #pragma unroll UNROLL_FACTOR
        for (int i = 0; i < ITERATIONS; ++i) {
            ulong c[2];
            ((uint4 *)c)[0] = Scratchpad[IDX((idx0 & MASK) >> 4)];
            ((uint4 *)c)[0] = AES_Round_Two_Tables(AES0, AES1, ((uint4 *)c)[0], ((uint4 *)a)[0]);
            Scratchpad[IDX((idx0 & MASK) >> 4)] = b_x ^ ((uint4 *)c)[0];
            uint4 tmp;
            tmp = Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)];
            a[1] += c[0] * as_ulong2(tmp).s0;
            a[0] += mul_hi(c[0], as_ulong2(tmp).s0);
            Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)] = ((uint4 *)a)[0];
            ((uint4 *)a)[0] ^= tmp;
            idx0 = a[0];
            b_x = ((uint4 *)c)[0];
#           if (ALGO == CRYPTONIGHT_HEAVY)
            {
                const long2 n = *((__global long2*)(Scratchpad + (IDX((idx0 & MASK) >> 4))));
                long q = fast_div_heavy(n.s0, as_int4(n).s2 | 0x5);
                *((__global long*)(Scratchpad + (IDX((idx0 & MASK) >> 4)))) = n.s0 ^ q;
                if (variant == VARIANT_XHV) {
                    idx0 = (~as_int4(n).s2) ^ q;
                } else {
                    idx0 = as_int4(n).s2 ^ q;
                }
            }
#           endif
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_xao(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT)
    ulong a[2], b[2];
    __local uint AES0[256], AES1[256];
    const ulong gIdx = getIdx();
    for (int i = get_local_id(0); i < 256; i += WORKSIZE) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
    barrier(CLK_LOCAL_MEM_FENCE);
    uint4 b_x;
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + get_local_id(0);
#       else
            Scratchpad += gIdx;
#       endif
#       elif(STRIDED_INDEX == 2)
        Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#       endif
        a[0] = states[0] ^ states[4];
        b[0] = states[2] ^ states[6];
        a[1] = states[1] ^ states[5];
        b[1] = states[3] ^ states[7];
        b_x = ((uint4 *)b)[0];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        uint idx0 = a[0];
        #pragma unroll 8
        for (int i = 0; i < 0x100000; ++i) {
            ulong c[2];
            ((uint4 *)c)[0] = Scratchpad[IDX((idx0 & MASK) >> 4)];
            ((uint4 *)c)[0] = AES_Round_Two_Tables(AES0, AES1, ((uint4 *)c)[0], ((uint4 *)a)[0]);
            Scratchpad[IDX((idx0 & MASK) >> 4)] = b_x ^ ((uint4 *)c)[0];
            uint4 tmp;
            tmp = Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)];
            a[1] += c[0] * as_ulong2(tmp).s0;
            a[0] += mul_hi(c[0], as_ulong2(tmp).s0);
            Scratchpad[IDX((as_uint2(c[0]).s0 & MASK) >> 4)] = ((uint4 *)a)[0];
            ((uint4 *)a)[0] ^= tmp;
            idx0 = a[0];
            b_x = ((uint4 *)c)[0];
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(8, 8, 1)))
__kernel void cn2(__global uint4 *Scratchpad, __global ulong *states, __global uint *Branch0, __global uint *Branch1, __global uint *Branch2, __global uint *Branch3, uint Threads)
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    uint ExpandedKey2[40];
    uint4 text;
    const ulong gIdx = getIdx();
    for (int i = get_local_id(1) * 8 + get_local_id(0); i < 256; i += 8 * 8) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if (STRIDED_INDEX == 0)
        Scratchpad += gIdx * (MEMORY >> 4);
#       elif (STRIDED_INDEX == 1)
#       if (ALGO == CRYPTONIGHT_HEAVY)
            Scratchpad += (gIdx / WORKSIZE) * (MEMORY >> 4) * WORKSIZE + (gIdx % WORKSIZE);
#       else
            Scratchpad += gIdx;
#       endif
#       elif (STRIDED_INDEX == 2)
        Scratchpad += (gIdx / WORKSIZE) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * (gIdx % WORKSIZE);
#       endif
        #if defined(__Tahiti__) || defined(__Pitcairn__)
        for(int i = 0; i < 4; ++i) ((ulong *)ExpandedKey2)[i] = states[i + 4];
        text = vload4(get_local_id(1) + 4, (__global uint *)states);
        #else
        text = vload4(get_local_id(1) + 4, (__global uint *)states);
        ((uint8 *)ExpandedKey2)[0] = vload8(1, (__global uint *)states);
        #endif
        AESExpandKey256(ExpandedKey2);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (ALGO == CRYPTONIGHT_HEAVY)
    __local uint4 xin1[8][8];
    __local uint4 xin2[8][8];
    __local uint4* xin1_store = &xin1[get_local_id(1)][get_local_id(0)];
    __local uint4* xin1_load = &xin1[(get_local_id(1) + 1) % 8][get_local_id(0)];
    __local uint4* xin2_store = &xin2[get_local_id(1)][get_local_id(0)];
    __local uint4* xin2_load = &xin2[(get_local_id(1) + 1) % 8][get_local_id(0)];
    *xin2_store = (uint4)(0, 0, 0, 0);
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
#       if (ALGO == CRYPTONIGHT_HEAVY)
        #pragma unroll 2
        for(int i = 0, i1 = get_local_id(1); i < (MEMORY >> 7); ++i, i1 = (i1 + 16) % (MEMORY >> 4))
        {
            text ^= Scratchpad[IDX(i1)];
            barrier(CLK_LOCAL_MEM_FENCE);
            text ^= *xin2_load;
            #pragma unroll 10
            for(int j = 0; j < 10; ++j)
                text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
            *xin1_store = text;
            text ^= Scratchpad[IDX(i1 + 8)];
            barrier(CLK_LOCAL_MEM_FENCE);
            text ^= *xin1_load;
            #pragma unroll 10
            for(int j = 0; j < 10; ++j)
                text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
            *xin2_store = text;
        }
        barrier(CLK_LOCAL_MEM_FENCE);
        text ^= *xin2_load;
#       else
        const uint local_id1 = get_local_id(1);
        #pragma unroll 2
        for (uint i = 0; i < (MEMORY >> 7); ++i) {
            text ^= Scratchpad[IDX((i << 3) + local_id1)];
            #pragma unroll 10
            for(uint j = 0; j < 10; ++j)
                text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
        }
#       endif
#   if (ALGO == CRYPTONIGHT_HEAVY)
    /* Also left over threads performe this loop.
     * The left over thread results will be ignored
     */
    #pragma unroll 16
    for(size_t i = 0; i < 16; i++)
        #pragma unroll 10
        for (int j = 0; j < 10; ++j) {
            text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
        }
        barrier(CLK_LOCAL_MEM_FENCE);
        *xin1_store = text;
        barrier(CLK_LOCAL_MEM_FENCE);
        text ^= *xin1_load;
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        vstore2(as_ulong2(text), get_local_id(1) + 4, states);
    barrier(CLK_GLOBAL_MEM_FENCE);
    __local ulong State_buf[8 * 25];
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        if(!get_local_id(1))
        {
            __local ulong* State = State_buf + get_local_id(0) * 25;
            for(int i = 0; i < 25; ++i) State[i] = states[i];
            keccakf1600_2(State);
            for(int i = 0; i < 25; ++i) states[i] = State[i];
            uint StateSwitch = State[0] & 3;
            __global uint *destinationBranch1 = StateSwitch == 0 ? Branch0 : Branch1;
            __global uint *destinationBranch2 = StateSwitch == 2 ? Branch2 : Branch3;
            __global uint *destinationBranch = StateSwitch < 2 ? destinationBranch1 : destinationBranch2;
            destinationBranch[atomic_inc(destinationBranch + Threads)] = gIdx;
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#define VSWAP8(x)   (((x) >> 56) | (((x) >> 40) & 0x000000000000FF00UL) | (((x) >> 24) & 0x0000000000FF0000UL) \
          | (((x) >>  8) & 0x00000000FF000000UL) | (((x) <<  8) & 0x000000FF00000000UL) \
          | (((x) << 24) & 0x0000FF0000000000UL) | (((x) << 40) & 0x00FF000000000000UL) | (((x) << 56) & 0xFF00000000000000UL))
#define VSWAP4(x)   ((((x) >> 24) & 0xFFU) | (((x) >> 8) & 0xFF00U) | (((x) << 8) & 0xFF0000U) | (((x) << 24) & 0xFF000000U))
__kernel void Skein(__global ulong *states, __global uint *BranchBuf, __global uint *output, ulong Target, uint Threads)
    const uint idx = get_global_id(0) - get_global_offset(0);
    // do not use early return here
    if(idx < Threads)
        states += 25 * BranchBuf[idx];
        // skein
        ulong8 h = vload8(0, SKEIN512_256_IV);
        // Type field begins with final bit, first bit, then six bits of type; the last 96
        // bits are input processed (including in the block to be processed with that tweak)
        // The output transform is only one run of UBI, since we need only 256 bits of output
        // The tweak for the output transform is Type = Output with the Final bit set
        // T[0] for the output is 8, and I don't know why - should be message size...
        ulong t[3] = { 0x00UL, 0x7000000000000000UL, 0x00UL };
        ulong8 p, m;
        #pragma unroll 1
        for (uint i = 0; i < 4; ++i)
        {
            t[0] += i < 3 ? 0x40UL : 0x08UL;
            t[2] = t[0] ^ t[1];
            m = (i < 3) ? vload8(i, states) : (ulong8)(states[24], 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL);
            const ulong h8 = h.s0 ^ h.s1 ^ h.s2 ^ h.s3 ^ h.s4 ^ h.s5 ^ h.s6 ^ h.s7 ^ SKEIN_KS_PARITY;
            p = Skein512Block(m, h, h8, t);
            h = m ^ p;
            t[1] = i < 2 ? 0x3000000000000000UL : 0xB000000000000000UL;
        }
        t[0] = 0x08UL;
        t[1] = 0xFF00000000000000UL;
        t[2] = t[0] ^ t[1];
        p = (ulong8)(0);
        const ulong h8 = h.s0 ^ h.s1 ^ h.s2 ^ h.s3 ^ h.s4 ^ h.s5 ^ h.s6 ^ h.s7 ^ SKEIN_KS_PARITY;
        p = Skein512Block(p, h, h8, t);
        // Note that comparison is equivalent to subtraction - we can't just compare 8 32-bit values
        // and expect an accurate result for target > 32-bit without implementing carries
        if (p.s3 <= Target) {
            ulong outIdx = atomic_inc(output + 0xFF);
            if (outIdx < 0xFF) {
                output[outIdx] = BranchBuf[idx] + (uint) get_global_offset(0);
            }
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#define SWAP8(x)    as_ulong(as_uchar8(x).s76543210)
#define JHXOR \
    h0h ^= input[0]; \
    h0l ^= input[1]; \
    h1h ^= input[2]; \
    h1l ^= input[3]; \
    h2h ^= input[4]; \
    h2l ^= input[5]; \
    h3h ^= input[6]; \
    h3l ^= input[7]; \
    E8; \
    h4h ^= input[0]; \
    h4l ^= input[1]; \
    h5h ^= input[2]; \
    h5l ^= input[3]; \
    h6h ^= input[4]; \
    h6l ^= input[5]; \
    h7h ^= input[6]; \
    h7l ^= input[7]
__kernel void JH(__global ulong *states, __global uint *BranchBuf, __global uint *output, ulong Target, uint Threads)
    const uint idx = get_global_id(0) - get_global_offset(0);
    // do not use early return here
    if(idx < Threads)
        states += 25 * BranchBuf[idx];
        sph_u64 h0h = 0xEBD3202C41A398EBUL, h0l = 0xC145B29C7BBECD92UL, h1h = 0xFAC7D4609151931CUL, h1l = 0x038A507ED6820026UL, h2h = 0x45B92677269E23A4UL, h2l = 0x77941AD4481AFBE0UL, h3h = 0x7A176B0226ABB5CDUL, h3l = 0xA82FFF0F4224F056UL;
        sph_u64 h4h = 0x754D2E7F8996A371UL, h4l = 0x62E27DF70849141DUL, h5h = 0x948F2476F7957627UL, h5l = 0x6C29804757B6D587UL, h6h = 0x6C0D8EAC2D275E5CUL, h6l = 0x0F7A0557C6508451UL, h7h = 0xEA12247067D3E47BUL, h7l = 0x69D71CD313ABE389UL;
        sph_u64 tmp;
        for (uint i = 0; i < 3; ++i) {
            ulong input[8];
            const int shifted = i << 3;
            for (uint x = 0; x < 8; ++x) {
                input[x] = (states[shifted + x]);
            }
            JHXOR;
        }
        {
            ulong input[8] = { (states[24]), 0x80UL, 0x00UL, 0x00UL, 0x00UL, 0x00UL, 0x00UL, 0x00UL };
            JHXOR;
        }
        {
            ulong input[8] = { 0x00UL, 0x00UL, 0x00UL, 0x00UL, 0x00UL, 0x00UL, 0x00UL, 0x4006000000000000UL };
            JHXOR;
        }
        // Note that comparison is equivalent to subtraction - we can't just compare 8 32-bit values
        // and expect an accurate result for target > 32-bit without implementing carries
        if (h7l <= Target) {
            ulong outIdx = atomic_inc(output + 0xFF);
            if (outIdx < 0xFF) {
                output[outIdx] = BranchBuf[idx] + (uint) get_global_offset(0);
            }
        }
#define SWAP4(x)    as_uint(as_uchar4(x).s3210)
__kernel void Blake(__global ulong *states, __global uint *BranchBuf, __global uint *output, ulong Target, uint Threads)
    const uint idx = get_global_id(0) - get_global_offset(0);
    // do not use early return here
    if (idx < Threads)
        states += 25 * BranchBuf[idx];
        unsigned int m[16];
        unsigned int v[16];
        uint h[8];
        uint bitlen = 0;
        ((uint8 *)h)[0] = vload8(0U, c_IV256);
        for (uint i = 0; i < 3; ++i) {
            ((uint16 *)m)[0] = vload16(i, (__global uint *)states);
            for (uint x = 0; x < 16; ++x) {
                m[x] = SWAP4(m[x]);
            }
            bitlen += 512;
            ((uint16 *)v)[0].lo = ((uint8 *)h)[0];
            ((uint16 *)v)[0].hi = vload8(0U, c_u256);
            v[12] ^= bitlen;
            v[13] ^= bitlen;
            for (uint r = 0; r < 14; r++) {
                GS(0, 4, 0x8, 0xC, 0x0);
                GS(1, 5, 0x9, 0xD, 0x2);
                GS(2, 6, 0xA, 0xE, 0x4);
                GS(3, 7, 0xB, 0xF, 0x6);
                GS(0, 5, 0xA, 0xF, 0x8);
                GS(1, 6, 0xB, 0xC, 0xA);
                GS(2, 7, 0x8, 0xD, 0xC);
                GS(3, 4, 0x9, 0xE, 0xE);
            }
            ((uint8 *)h)[0] ^= ((uint8 *)v)[0] ^ ((uint8 *)v)[1];
        }
        m[0]  = SWAP4(((__global uint *)states)[48]);
        m[1]  = SWAP4(((__global uint *)states)[49]);
        m[2]  = 0x80000000U;
        m[3]  = 0x00U;
        m[4]  = 0x00U;
        m[5]  = 0x00U;
        m[6]  = 0x00U;
        m[7]  = 0x00U;
        m[8]  = 0x00U;
        m[9]  = 0x00U;
        m[10] = 0x00U;
        m[11] = 0x00U;
        m[12] = 0x00U;
        m[13] = 1U;
        m[14] = 0U;
        m[15] = 0x640;
        bitlen += 64;
        ((uint16 *)v)[0].lo = ((uint8 *)h)[0];
        ((uint16 *)v)[0].hi = vload8(0U, c_u256);
        v[12] ^= bitlen;
        v[13] ^= bitlen;
        for (uint r = 0; r < 14; r++) {
            GS(0, 4, 0x8, 0xC, 0x0);
            GS(1, 5, 0x9, 0xD, 0x2);
            GS(2, 6, 0xA, 0xE, 0x4);
            GS(3, 7, 0xB, 0xF, 0x6);
            GS(0, 5, 0xA, 0xF, 0x8);
            GS(1, 6, 0xB, 0xC, 0xA);
            GS(2, 7, 0x8, 0xD, 0xC);
            GS(3, 4, 0x9, 0xE, 0xE);
        }
        ((uint8 *)h)[0] ^= ((uint8 *)v)[0] ^ ((uint8 *)v)[1];
        for (uint i = 0; i < 8; ++i) {
            h[i] = SWAP4(h[i]);
        }
        // Note that comparison is equivalent to subtraction - we can't just compare 8 32-bit values
        // and expect an accurate result for target > 32-bit without implementing carries
        uint2 t = (uint2)(h[6],h[7]);
        if (as_ulong(t) <= Target) {
            ulong outIdx = atomic_inc(output + 0xFF);
            if (outIdx < 0xFF) {
                output[outIdx] = BranchBuf[idx] + (uint) get_global_offset(0);
            }
        }
#undef SWAP4
__kernel void Groestl(__global ulong *states, __global uint *BranchBuf, __global uint *output, ulong Target, uint Threads)
    const uint idx = get_global_id(0) - get_global_offset(0);
    // do not use early return here
    if (idx < Threads)
        states += 25 * BranchBuf[idx];
        ulong State[8] = { 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0x0001000000000000UL };
        ulong H[8], M[8];
        // BUG: AMD driver 19.7.X crashs if this is written as loop
        // Thx AMD for so bad software
        {
            ((ulong8 *)M)[0] = vload8(0, states);
            for (uint x = 0; x < 8; ++x) {
                H[x] = M[x] ^ State[x];
            }
            PERM_SMALL_P(H);
            PERM_SMALL_Q(M);
            for (uint x = 0; x < 8; ++x) {
                State[x] ^= H[x] ^ M[x];
            }
        }
        {
            ((ulong8 *)M)[0] = vload8(1, states);
            for (uint x = 0; x < 8; ++x) {
                H[x] = M[x] ^ State[x];
            }
            PERM_SMALL_P(H);
            PERM_SMALL_Q(M);
            for (uint x = 0; x < 8; ++x) {
                State[x] ^= H[x] ^ M[x];
            }
        }
        {
            ((ulong8 *)M)[0] = vload8(2, states);
            for (uint x = 0; x < 8; ++x) {
                H[x] = M[x] ^ State[x];
            }
            PERM_SMALL_P(H);
            PERM_SMALL_Q(M);
            for (uint x = 0; x < 8; ++x) {
                State[x] ^= H[x] ^ M[x];
            }
        }
        M[0] = states[24];
        M[1] = 0x80UL;
        M[2] = 0UL;
        M[3] = 0UL;
        M[4] = 0UL;
        M[5] = 0UL;
        M[6] = 0UL;
        M[7] = 0x0400000000000000UL;
        for (uint x = 0; x < 8; ++x) {
            H[x] = M[x] ^ State[x];
        }
        PERM_SMALL_P(H);
        PERM_SMALL_Q(M);
        ulong tmp[8];
        for (uint i = 0; i < 8; ++i) {
            tmp[i] = State[i] ^= H[i] ^ M[i];
        }
        PERM_SMALL_P(State);
        for (uint i = 0; i < 8; ++i) {
            State[i] ^= tmp[i];
        }
        // Note that comparison is equivalent to subtraction - we can't just compare 8 32-bit values
        // and expect an accurate result for target > 32-bit without implementing carries
        if (State[7] <= Target) {
            ulong outIdx = atomic_inc(output + 0xFF);
            if (outIdx < 0xFF) {
                output[outIdx] = BranchBuf[idx] + (uint) get_global_offset(0);
            }
        }
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_v2_rwz(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT)
    ulong a[2], b[4];
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    const ulong gIdx = getIdx();
    for(int i = get_local_id(0); i < 256; i += WORKSIZE)
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if defined(__NV_CL_C_VERSION)
            Scratchpad += gIdx * (0x40000 >> 2);
#       else
#           if (STRIDED_INDEX == 0)
                Scratchpad += gIdx * (MEMORY >> 4);
#           elif (STRIDED_INDEX == 1)
                Scratchpad += gIdx;
#           elif (STRIDED_INDEX == 2)
                Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#           endif
#       endif
        a[0] = states[0] ^ states[4];
        a[1] = states[1] ^ states[5];
        b[0] = states[2] ^ states[6];
        b[1] = states[3] ^ states[7];
        b[2] = states[8] ^ states[10];
        b[3] = states[9] ^ states[11];
    ulong2 bx0 = ((ulong2 *)b)[0];
    ulong2 bx1 = ((ulong2 *)b)[1];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   ifdef __NV_CL_C_VERSION
        __local uint16 scratchpad_line_buf[WORKSIZE];
        __local uint16* scratchpad_line = scratchpad_line_buf + get_local_id(0);
#       define SCRATCHPAD_CHUNK(N) (*(__local uint4*)((__local uchar*)(scratchpad_line) + (idx1 ^ (N << 4))))
#   else
#       if (STRIDED_INDEX == 0)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (idx ^ (N << 4))))
#       elif (STRIDED_INDEX == 1)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + mul24(as_uint(idx ^ (N << 4)), Threads)))
#       elif (STRIDED_INDEX == 2)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (((idx ^ (N << 4)) % (MEM_CHUNK << 4)) + ((idx ^ (N << 4)) / (MEM_CHUNK << 4)) * WORKSIZE * (MEM_CHUNK << 4))))
#       endif
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
    uint2 division_result = as_uint2(states[12]);
    uint sqrt_result = as_uint2(states[13]).s0;
    #pragma unroll UNROLL_FACTOR
    for(int i = 0; i < 0x60000; ++i)
#       ifdef __NV_CL_C_VERSION
            uint idx  = a[0] & 0x1FFFC0;
            uint idx1 = a[0] & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            uint idx = a[0] & MASK;
#       endif
        uint4 c = SCRATCHPAD_CHUNK(0);
        c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(3));
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(1));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        SCRATCHPAD_CHUNK(0) = as_uint4(bx0) ^ c;
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
            idx = as_ulong2(c).s0 & 0x1FFFC0;
            idx1 = as_ulong2(c).s0 & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            idx = as_ulong2(c).s0 & MASK;
#       endif
        uint4 tmp = SCRATCHPAD_CHUNK(0);
        {
            tmp.s0 ^= division_result.s0;
            tmp.s1 ^= division_result.s1 ^ sqrt_result;
            division_result = fast_div_v2(as_ulong2(c).s1, (c.s0 + (sqrt_result << 1)) | 0x80000001UL);
            sqrt_result = fast_sqrt_v2(as_ulong2(c).s0 + as_ulong(division_result));
        }
        ulong2 t;
        t.s0 = mul_hi(as_ulong2(c).s0, as_ulong2(tmp).s0);
        t.s1 = as_ulong2(c).s0 * as_ulong2(tmp).s0;
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1)) ^ t;
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            t ^= chunk2;
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk1 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk3 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        a[1] += t.s1;
        a[0] += t.s0;
        SCRATCHPAD_CHUNK(0) = ((uint4 *)a)[0];
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
#       endif
        ((uint4 *)a)[0] ^= tmp;
        bx1 = bx0;
        bx0 = as_ulong2(c);
#   undef SCRATCHPAD_CHUNK
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_v2_zls(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT)
    ulong a[2], b[4];
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    const ulong gIdx = getIdx();
    for(int i = get_local_id(0); i < 256; i += WORKSIZE)
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if defined(__NV_CL_C_VERSION)
            Scratchpad += gIdx * (0x60000 >> 2);
#       else
#           if (STRIDED_INDEX == 0)
                Scratchpad += gIdx * (MEMORY >> 4);
#           elif (STRIDED_INDEX == 1)
                Scratchpad += gIdx;
#           elif (STRIDED_INDEX == 2)
                Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#           endif
#       endif
        a[0] = states[0] ^ states[4];
        a[1] = states[1] ^ states[5];
        b[0] = states[2] ^ states[6];
        b[1] = states[3] ^ states[7];
        b[2] = states[8] ^ states[10];
        b[3] = states[9] ^ states[11];
    ulong2 bx0 = ((ulong2 *)b)[0];
    ulong2 bx1 = ((ulong2 *)b)[1];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   ifdef __NV_CL_C_VERSION
        __local uint16 scratchpad_line_buf[WORKSIZE];
        __local uint16* scratchpad_line = scratchpad_line_buf + get_local_id(0);
#       define SCRATCHPAD_CHUNK(N) (*(__local uint4*)((__local uchar*)(scratchpad_line) + (idx1 ^ (N << 4))))
#   else
#       if (STRIDED_INDEX == 0)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (idx ^ (N << 4))))
#       elif (STRIDED_INDEX == 1)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + mul24(as_uint(idx ^ (N << 4)), Threads)))
#       elif (STRIDED_INDEX == 2)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (((idx ^ (N << 4)) % (MEM_CHUNK << 4)) + ((idx ^ (N << 4)) / (MEM_CHUNK << 4)) * WORKSIZE * (MEM_CHUNK << 4))))
#       endif
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
    uint2 division_result = as_uint2(states[12]);
    uint sqrt_result = as_uint2(states[13]).s0;
    #pragma unroll UNROLL_FACTOR
    for(int i = 0; i < 0x60000; ++i)
#       ifdef __NV_CL_C_VERSION
            uint idx  = a[0] & 0x1FFFC0;
            uint idx1 = a[0] & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            uint idx = a[0] & MASK;
#       endif
        uint4 c = SCRATCHPAD_CHUNK(0);
        c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1));
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        SCRATCHPAD_CHUNK(0) = as_uint4(bx0) ^ c;
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
            idx = as_ulong2(c).s0 & 0x1FFFC0;
            idx1 = as_ulong2(c).s0 & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            idx = as_ulong2(c).s0 & MASK;
#       endif
        uint4 tmp = SCRATCHPAD_CHUNK(0);
        {
            tmp.s0 ^= division_result.s0;
            tmp.s1 ^= division_result.s1 ^ sqrt_result;
            division_result = fast_div_v2(as_ulong2(c).s1, (c.s0 + (sqrt_result << 1)) | 0x80000001UL);
            sqrt_result = fast_sqrt_v2(as_ulong2(c).s0 + as_ulong(division_result));
        }
        ulong2 t;
        t.s0 = mul_hi(as_ulong2(c).s0, as_ulong2(tmp).s0);
        t.s1 = as_ulong2(c).s0 * as_ulong2(tmp).s0;
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1)) ^ t;
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            t ^= chunk2;
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        a[1] += t.s1;
        a[0] += t.s0;
        SCRATCHPAD_CHUNK(0) = ((uint4 *)a)[0];
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
#       endif
        ((uint4 *)a)[0] ^= tmp;
        bx1 = bx0;
        bx0 = as_ulong2(c);
#   undef SCRATCHPAD_CHUNK
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
__attribute__((reqd_work_group_size(WORKSIZE, 1, 1)))
__kernel void cn1_v2_double(__global uint4 *Scratchpad, __global ulong *states, uint variant, __global ulong *input, uint Threads)
#   if (ALGO == CRYPTONIGHT)
    ulong a[2], b[4];
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    const ulong gIdx = getIdx();
    for(int i = get_local_id(0); i < 256; i += WORKSIZE)
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        states += 25 * gIdx;
#       if defined(__NV_CL_C_VERSION)
            Scratchpad += gIdx * (0x100000 >> 2);
#       else
#           if (STRIDED_INDEX == 0)
                Scratchpad += gIdx * (MEMORY >> 4);
#           elif (STRIDED_INDEX == 1)
                Scratchpad += gIdx;
#           elif (STRIDED_INDEX == 2)
                Scratchpad += get_group_id(0) * (MEMORY >> 4) * WORKSIZE + MEM_CHUNK * get_local_id(0);
#           endif
#       endif
        a[0] = states[0] ^ states[4];
        a[1] = states[1] ^ states[5];
        b[0] = states[2] ^ states[6];
        b[1] = states[3] ^ states[7];
        b[2] = states[8] ^ states[10];
        b[3] = states[9] ^ states[11];
    ulong2 bx0 = ((ulong2 *)b)[0];
    ulong2 bx1 = ((ulong2 *)b)[1];
    mem_fence(CLK_LOCAL_MEM_FENCE);
#   ifdef __NV_CL_C_VERSION
        __local uint16 scratchpad_line_buf[WORKSIZE];
        __local uint16* scratchpad_line = scratchpad_line_buf + get_local_id(0);
#       define SCRATCHPAD_CHUNK(N) (*(__local uint4*)((__local uchar*)(scratchpad_line) + (idx1 ^ (N << 4))))
#   else
#       if (STRIDED_INDEX == 0)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (idx ^ (N << 4))))
#       elif (STRIDED_INDEX == 1)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + mul24(as_uint(idx ^ (N << 4)), Threads)))
#       elif (STRIDED_INDEX == 2)
#           define SCRATCHPAD_CHUNK(N) (*(__global uint4*)((__global uchar*)(Scratchpad) + (((idx ^ (N << 4)) % (MEM_CHUNK << 4)) + ((idx ^ (N << 4)) / (MEM_CHUNK << 4)) * WORKSIZE * (MEM_CHUNK << 4))))
#       endif
#   endif
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
    uint2 division_result = as_uint2(states[12]);
    uint sqrt_result = as_uint2(states[13]).s0;
    #pragma unroll UNROLL_FACTOR
    for(int i = 0; i < 0x100000; ++i)
#       ifdef __NV_CL_C_VERSION
            uint idx  = a[0] & 0x1FFFC0;
            uint idx1 = a[0] & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            uint idx = a[0] & MASK;
#       endif
        uint4 c = SCRATCHPAD_CHUNK(0);
        c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1));
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        SCRATCHPAD_CHUNK(0) = as_uint4(bx0) ^ c;
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
            idx = as_ulong2(c).s0 & 0x1FFFC0;
            idx1 = as_ulong2(c).s0 & 0x30;
            *scratchpad_line = *(__global uint16*)((__global uchar*)(Scratchpad) + idx);
#       else
            idx = as_ulong2(c).s0 & MASK;
#       endif
        uint4 tmp = SCRATCHPAD_CHUNK(0);
        {
            tmp.s0 ^= division_result.s0;
            tmp.s1 ^= division_result.s1 ^ sqrt_result;
            division_result = fast_div_v2(as_ulong2(c).s1, (c.s0 + (sqrt_result << 1)) | 0x80000001UL);
            sqrt_result = fast_sqrt_v2(as_ulong2(c).s0 + as_ulong(division_result));
        }
        ulong2 t;
        t.s0 = mul_hi(as_ulong2(c).s0, as_ulong2(tmp).s0);
        t.s1 = as_ulong2(c).s0 * as_ulong2(tmp).s0;
        {
            const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1)) ^ t;
            const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
            t ^= chunk2;
            const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
            SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
            SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
            SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
        }
        a[1] += t.s1;
        a[0] += t.s0;
        SCRATCHPAD_CHUNK(0) = ((uint4 *)a)[0];
#       ifdef __NV_CL_C_VERSION
            *(__global uint16*)((__global uchar*)(Scratchpad) + idx) = *scratchpad_line;
#       endif
        ((uint4 *)a)[0] ^= tmp;
        bx1 = bx0;
        bx0 = as_ulong2(c);
#   undef SCRATCHPAD_CHUNK
    mem_fence(CLK_GLOBAL_MEM_FENCE);
#   endif
XMRIG_INCLUDE_JH
* blake256 kernel implementation.
* ==========================(LICENSE BEGIN)============================
* Copyright (c) 2014 djm34
* Copyright (c) 2014 tpruvot
* 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.
* ===========================(LICENSE END)=============================
* @author   djm34
__constant static const int sigma[16][16] = {
		{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
		{ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 },
		{ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 },
		{ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 },
		{ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 },
		{ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 },
		{ 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 },
		{ 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 },
		{ 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 },
		{ 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 },
		{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
		{ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 },
		{ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 },
		{ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 },
		{ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 },
		{ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 }
__constant static const sph_u32  c_IV256[8] = {
	0x6A09E667, 0xBB67AE85,
	0x3C6EF372, 0xA54FF53A,
	0x510E527F, 0x9B05688C,
	0x1F83D9AB, 0x5BE0CD19
/* Second part (64-80) msg never change, store it */
__constant static const sph_u32  c_Padding[16] = {
	0, 0, 0, 0,
	0x80000000, 0, 0, 0,
	0, 0, 0, 0,
	0, 1, 0, 640,
__constant static const sph_u32  c_u256[16] = {
	0x243F6A88, 0x85A308D3,
	0x13198A2E, 0x03707344,
	0xA4093822, 0x299F31D0,
	0x082EFA98, 0xEC4E6C89,
	0x452821E6, 0x38D01377,
	0xBE5466CF, 0x34E90C6C,
	0xC0AC29B7, 0xC97C50DD,
	0x3F84D5B5, 0xB5470917
#define GS(a,b,c,d,x) { \
	const sph_u32 idx1 = sigma[r][x]; \
	const sph_u32 idx2 = sigma[r][x+1]; \
	v[a] += (m[idx1] ^ c_u256[idx2]) + v[b]; \
	v[d] ^= v[a]; \
    v[d] = rotate(v[d], 16U); \
	v[c] += v[d]; \
    v[b] ^= v[c]; \
	v[b] = rotate(v[b], 20U); \
	v[a] += (m[idx2] ^ c_u256[idx1]) + v[b]; \
    v[d] ^= v[a]; \
	v[d] = rotate(v[d], 24U); \
	v[c] += v[d]; \
    v[b] ^= v[c]; \
	v[b] = rotate(v[b], 25U); \
XMRIG_INCLUDE_BLAKE256
/* $Id: groestl.c 260 2011-07-21 01:02:38Z tp $ */
 * Groestl256
 * ==========================(LICENSE BEGIN)============================
 * Copyright (c) 2014 djm34
 * Copyright (c) 2007-2010  Projet RNRT SAPHIR
 * 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.
 * ===========================(LICENSE END)=============================
 * @author   Thomas Pornin <thomas.pornin@cryptolog.com>
#define SPH_C64(x)	x
#define SPH_ROTL64(x, y)	rotate((x), (ulong)(y))
#define C64e(x)     ((SPH_C64(x) >> 56) \
                    | ((SPH_C64(x) >> 40) & SPH_C64(0x000000000000FF00)) \
                    | ((SPH_C64(x) >> 24) & SPH_C64(0x0000000000FF0000)) \
                    | ((SPH_C64(x) >>  8) & SPH_C64(0x00000000FF000000)) \
                    | ((SPH_C64(x) <<  8) & SPH_C64(0x000000FF00000000)) \
                    | ((SPH_C64(x) << 24) & SPH_C64(0x0000FF0000000000)) \
                    | ((SPH_C64(x) << 40) & SPH_C64(0x00FF000000000000)) \
                    | ((SPH_C64(x) << 56) & SPH_C64(0xFF00000000000000)))
#define B64_0(x)    ((x) & 0xFF)
#define B64_1(x)    (((x) >> 8) & 0xFF)
#define B64_2(x)    (((x) >> 16) & 0xFF)
#define B64_3(x)    (((x) >> 24) & 0xFF)
#define B64_4(x)    (((x) >> 32) & 0xFF)
#define B64_5(x)    (((x) >> 40) & 0xFF)
#define B64_6(x)    (((x) >> 48) & 0xFF)
#define B64_7(x)    ((x) >> 56)
#define R64         SPH_ROTL64
#define PC64(j, r)  ((sph_u64)((j) + (r)))
#define QC64(j, r)  (((sph_u64)(r) << 56) ^ (~((sph_u64)(j) << 56)))
static const __constant ulong T0_G[] =
	0xc6a597f4a5f432c6UL, 0xf884eb9784976ff8UL, 0xee99c7b099b05eeeUL, 0xf68df78c8d8c7af6UL, 
	0xff0de5170d17e8ffUL, 0xd6bdb7dcbddc0ad6UL, 0xdeb1a7c8b1c816deUL, 0x915439fc54fc6d91UL, 
	0x6050c0f050f09060UL, 0x0203040503050702UL, 0xcea987e0a9e02eceUL, 0x567dac877d87d156UL, 
	0xe719d52b192bcce7UL, 0xb56271a662a613b5UL, 0x4de69a31e6317c4dUL, 0xec9ac3b59ab559ecUL, 
	0x8f4505cf45cf408fUL, 0x1f9d3ebc9dbca31fUL, 0x894009c040c04989UL, 0xfa87ef92879268faUL, 
	0xef15c53f153fd0efUL, 0xb2eb7f26eb2694b2UL, 0x8ec90740c940ce8eUL, 0xfb0bed1d0b1de6fbUL, 
	0x41ec822fec2f6e41UL, 0xb3677da967a91ab3UL, 0x5ffdbe1cfd1c435fUL, 0x45ea8a25ea256045UL, 
	0x23bf46dabfdaf923UL, 0x53f7a602f7025153UL, 0xe496d3a196a145e4UL, 0x9b5b2ded5bed769bUL, 
	0x75c2ea5dc25d2875UL, 0xe11cd9241c24c5e1UL, 0x3dae7ae9aee9d43dUL, 0x4c6a98be6abef24cUL, 
	0x6c5ad8ee5aee826cUL, 0x7e41fcc341c3bd7eUL, 0xf502f1060206f3f5UL, 0x834f1dd14fd15283UL, 
	0x685cd0e45ce48c68UL, 0x51f4a207f4075651UL, 0xd134b95c345c8dd1UL, 0xf908e9180818e1f9UL, 
	0xe293dfae93ae4ce2UL, 0xab734d9573953eabUL, 0x6253c4f553f59762UL, 0x2a3f54413f416b2aUL, 
	0x080c10140c141c08UL, 0x955231f652f66395UL, 0x46658caf65afe946UL, 0x9d5e21e25ee27f9dUL, 
	0x3028607828784830UL, 0x37a16ef8a1f8cf37UL, 0x0a0f14110f111b0aUL, 0x2fb55ec4b5c4eb2fUL, 
	0x0e091c1b091b150eUL, 0x2436485a365a7e24UL, 0x1b9b36b69bb6ad1bUL, 0xdf3da5473d4798dfUL, 
	0xcd26816a266aa7cdUL, 0x4e699cbb69bbf54eUL, 0x7fcdfe4ccd4c337fUL, 0xea9fcfba9fba50eaUL, 
	0x121b242d1b2d3f12UL, 0x1d9e3ab99eb9a41dUL, 0x5874b09c749cc458UL, 0x342e68722e724634UL, 
	0x362d6c772d774136UL, 0xdcb2a3cdb2cd11dcUL, 0xb4ee7329ee299db4UL, 0x5bfbb616fb164d5bUL, 
	0xa4f65301f601a5a4UL, 0x764decd74dd7a176UL, 0xb76175a361a314b7UL, 0x7dcefa49ce49347dUL, 
	0x527ba48d7b8ddf52UL, 0xdd3ea1423e429fddUL, 0x5e71bc937193cd5eUL, 0x139726a297a2b113UL, 
	0xa6f55704f504a2a6UL, 0xb96869b868b801b9UL, 0x0000000000000000UL, 0xc12c99742c74b5c1UL, 
	0x406080a060a0e040UL, 0xe31fdd211f21c2e3UL, 0x79c8f243c8433a79UL, 0xb6ed772ced2c9ab6UL, 
	0xd4beb3d9bed90dd4UL, 0x8d4601ca46ca478dUL, 0x67d9ce70d9701767UL, 0x724be4dd4bddaf72UL, 
	0x94de3379de79ed94UL, 0x98d42b67d467ff98UL, 0xb0e87b23e82393b0UL, 0x854a11de4ade5b85UL, 
	0xbb6b6dbd6bbd06bbUL, 0xc52a917e2a7ebbc5UL, 0x4fe59e34e5347b4fUL, 0xed16c13a163ad7edUL, 
	0x86c51754c554d286UL, 0x9ad72f62d762f89aUL, 0x6655ccff55ff9966UL, 0x119422a794a7b611UL, 
	0x8acf0f4acf4ac08aUL, 0xe910c9301030d9e9UL, 0x0406080a060a0e04UL, 0xfe81e798819866feUL, 
	0xa0f05b0bf00baba0UL, 0x7844f0cc44ccb478UL, 0x25ba4ad5bad5f025UL, 0x4be3963ee33e754bUL, 
	0xa2f35f0ef30eaca2UL, 0x5dfeba19fe19445dUL, 0x80c01b5bc05bdb80UL, 0x058a0a858a858005UL, 
	0x3fad7eecadecd33fUL, 0x21bc42dfbcdffe21UL, 0x7048e0d848d8a870UL, 0xf104f90c040cfdf1UL, 
	0x63dfc67adf7a1963UL, 0x77c1ee58c1582f77UL, 0xaf75459f759f30afUL, 0x426384a563a5e742UL, 
	0x2030405030507020UL, 0xe51ad12e1a2ecbe5UL, 0xfd0ee1120e12effdUL, 0xbf6d65b76db708bfUL, 
	0x814c19d44cd45581UL, 0x1814303c143c2418UL, 0x26354c5f355f7926UL, 0xc32f9d712f71b2c3UL, 
	0xbee16738e13886beUL, 0x35a26afda2fdc835UL, 0x88cc0b4fcc4fc788UL, 0x2e395c4b394b652eUL, 
	0x93573df957f96a93UL, 0x55f2aa0df20d5855UL, 0xfc82e39d829d61fcUL, 0x7a47f4c947c9b37aUL, 
	0xc8ac8befacef27c8UL, 0xbae76f32e73288baUL, 0x322b647d2b7d4f32UL, 0xe695d7a495a442e6UL, 
	0xc0a09bfba0fb3bc0UL, 0x199832b398b3aa19UL, 0x9ed12768d168f69eUL, 0xa37f5d817f8122a3UL, 
	0x446688aa66aaee44UL, 0x547ea8827e82d654UL, 0x3bab76e6abe6dd3bUL, 0x0b83169e839e950bUL, 
	0x8cca0345ca45c98cUL, 0xc729957b297bbcc7UL, 0x6bd3d66ed36e056bUL, 0x283c50443c446c28UL, 
	0xa779558b798b2ca7UL, 0xbce2633de23d81bcUL, 0x161d2c271d273116UL, 0xad76419a769a37adUL, 
	0xdb3bad4d3b4d96dbUL, 0x6456c8fa56fa9e64UL, 0x744ee8d24ed2a674UL, 0x141e28221e223614UL, 
	0x92db3f76db76e492UL, 0x0c0a181e0a1e120cUL, 0x486c90b46cb4fc48UL, 0xb8e46b37e4378fb8UL, 
	0x9f5d25e75de7789fUL, 0xbd6e61b26eb20fbdUL, 0x43ef862aef2a6943UL, 0xc4a693f1a6f135c4UL, 
	0x39a872e3a8e3da39UL, 0x31a462f7a4f7c631UL, 0xd337bd5937598ad3UL, 0xf28bff868b8674f2UL, 
	0xd532b156325683d5UL, 0x8b430dc543c54e8bUL, 0x6e59dceb59eb856eUL, 0xdab7afc2b7c218daUL, 
	0x018c028f8c8f8e01UL, 0xb16479ac64ac1db1UL, 0x9cd2236dd26df19cUL, 0x49e0923be03b7249UL, 
	0xd8b4abc7b4c71fd8UL, 0xacfa4315fa15b9acUL, 0xf307fd090709faf3UL, 0xcf25856f256fa0cfUL, 
	0xcaaf8feaafea20caUL, 0xf48ef3898e897df4UL, 0x47e98e20e9206747UL, 0x1018202818283810UL, 
	0x6fd5de64d5640b6fUL, 0xf088fb83888373f0UL, 0x4a6f94b16fb1fb4aUL, 0x5c72b8967296ca5cUL, 
	0x3824706c246c5438UL, 0x57f1ae08f1085f57UL, 0x73c7e652c7522173UL, 0x975135f351f36497UL, 
	0xcb238d652365aecbUL, 0xa17c59847c8425a1UL, 0xe89ccbbf9cbf57e8UL, 0x3e217c6321635d3eUL, 
	0x96dd377cdd7cea96UL, 0x61dcc27fdc7f1e61UL, 0x0d861a9186919c0dUL, 0x0f851e9485949b0fUL, 
	0xe090dbab90ab4be0UL, 0x7c42f8c642c6ba7cUL, 0x71c4e257c4572671UL, 0xccaa83e5aae529ccUL, 
	0x90d83b73d873e390UL, 0x06050c0f050f0906UL, 0xf701f5030103f4f7UL, 0x1c12383612362a1cUL, 
	0xc2a39ffea3fe3cc2UL, 0x6a5fd4e15fe18b6aUL, 0xaef94710f910beaeUL, 0x69d0d26bd06b0269UL, 
	0x17912ea891a8bf17UL, 0x995829e858e87199UL, 0x3a2774692769533aUL, 0x27b94ed0b9d0f727UL, 
	0xd938a948384891d9UL, 0xeb13cd351335deebUL, 0x2bb356ceb3cee52bUL, 0x2233445533557722UL, 
	0xd2bbbfd6bbd604d2UL, 0xa9704990709039a9UL, 0x07890e8089808707UL, 0x33a766f2a7f2c133UL, 
	0x2db65ac1b6c1ec2dUL, 0x3c22786622665a3cUL, 0x15922aad92adb815UL, 0xc92089602060a9c9UL, 
	0x874915db49db5c87UL, 0xaaff4f1aff1ab0aaUL, 0x5078a0887888d850UL, 0xa57a518e7a8e2ba5UL, 
	0x038f068a8f8a8903UL, 0x59f8b213f8134a59UL, 0x0980129b809b9209UL, 0x1a1734391739231aUL, 
	0x65daca75da751065UL, 0xd731b553315384d7UL, 0x84c61351c651d584UL, 0xd0b8bbd3b8d303d0UL, 
	0x82c31f5ec35edc82UL, 0x29b052cbb0cbe229UL, 0x5a77b4997799c35aUL, 0x1e113c3311332d1eUL, 
	0x7bcbf646cb463d7bUL, 0xa8fc4b1ffc1fb7a8UL, 0x6dd6da61d6610c6dUL, 0x2c3a584e3a4e622cUL
static const __constant ulong T4_G[] =
	0xA5F432C6C6A597F4UL, 0x84976FF8F884EB97UL, 0x99B05EEEEE99C7B0UL, 0x8D8C7AF6F68DF78CUL, 
	0x0D17E8FFFF0DE517UL, 0xBDDC0AD6D6BDB7DCUL, 0xB1C816DEDEB1A7C8UL, 0x54FC6D91915439FCUL, 
	0x50F090606050C0F0UL, 0x0305070202030405UL, 0xA9E02ECECEA987E0UL, 0x7D87D156567DAC87UL, 
	0x192BCCE7E719D52BUL, 0x62A613B5B56271A6UL, 0xE6317C4D4DE69A31UL, 0x9AB559ECEC9AC3B5UL, 
	0x45CF408F8F4505CFUL, 0x9DBCA31F1F9D3EBCUL, 0x40C04989894009C0UL, 0x879268FAFA87EF92UL, 
	0x153FD0EFEF15C53FUL, 0xEB2694B2B2EB7F26UL, 0xC940CE8E8EC90740UL, 0x0B1DE6FBFB0BED1DUL, 
	0xEC2F6E4141EC822FUL, 0x67A91AB3B3677DA9UL, 0xFD1C435F5FFDBE1CUL, 0xEA25604545EA8A25UL, 
	0xBFDAF92323BF46DAUL, 0xF702515353F7A602UL, 0x96A145E4E496D3A1UL, 0x5BED769B9B5B2DEDUL, 
	0xC25D287575C2EA5DUL, 0x1C24C5E1E11CD924UL, 0xAEE9D43D3DAE7AE9UL, 0x6ABEF24C4C6A98BEUL, 
	0x5AEE826C6C5AD8EEUL, 0x41C3BD7E7E41FCC3UL, 0x0206F3F5F502F106UL, 0x4FD15283834F1DD1UL, 
	0x5CE48C68685CD0E4UL, 0xF407565151F4A207UL, 0x345C8DD1D134B95CUL, 0x0818E1F9F908E918UL, 
	0x93AE4CE2E293DFAEUL, 0x73953EABAB734D95UL, 0x53F597626253C4F5UL, 0x3F416B2A2A3F5441UL, 
	0x0C141C08080C1014UL, 0x52F66395955231F6UL, 0x65AFE94646658CAFUL, 0x5EE27F9D9D5E21E2UL, 
	0x2878483030286078UL, 0xA1F8CF3737A16EF8UL, 0x0F111B0A0A0F1411UL, 0xB5C4EB2F2FB55EC4UL, 
	0x091B150E0E091C1BUL, 0x365A7E242436485AUL, 0x9BB6AD1B1B9B36B6UL, 0x3D4798DFDF3DA547UL, 
	0x266AA7CDCD26816AUL, 0x69BBF54E4E699CBBUL, 0xCD4C337F7FCDFE4CUL, 0x9FBA50EAEA9FCFBAUL, 
	0x1B2D3F12121B242DUL, 0x9EB9A41D1D9E3AB9UL, 0x749CC4585874B09CUL, 0x2E724634342E6872UL, 
	0x2D774136362D6C77UL, 0xB2CD11DCDCB2A3CDUL, 0xEE299DB4B4EE7329UL, 0xFB164D5B5BFBB616UL, 
	0xF601A5A4A4F65301UL, 0x4DD7A176764DECD7UL, 0x61A314B7B76175A3UL, 0xCE49347D7DCEFA49UL, 
	0x7B8DDF52527BA48DUL, 0x3E429FDDDD3EA142UL, 0x7193CD5E5E71BC93UL, 0x97A2B113139726A2UL, 
	0xF504A2A6A6F55704UL, 0x68B801B9B96869B8UL, 0x0000000000000000UL, 0x2C74B5C1C12C9974UL, 
	0x60A0E040406080A0UL, 0x1F21C2E3E31FDD21UL, 0xC8433A7979C8F243UL, 0xED2C9AB6B6ED772CUL, 
	0xBED90DD4D4BEB3D9UL, 0x46CA478D8D4601CAUL, 0xD970176767D9CE70UL, 0x4BDDAF72724BE4DDUL, 
	0xDE79ED9494DE3379UL, 0xD467FF9898D42B67UL, 0xE82393B0B0E87B23UL, 0x4ADE5B85854A11DEUL, 
	0x6BBD06BBBB6B6DBDUL, 0x2A7EBBC5C52A917EUL, 0xE5347B4F4FE59E34UL, 0x163AD7EDED16C13AUL, 
	0xC554D28686C51754UL, 0xD762F89A9AD72F62UL, 0x55FF99666655CCFFUL, 0x94A7B611119422A7UL, 
	0xCF4AC08A8ACF0F4AUL, 0x1030D9E9E910C930UL, 0x060A0E040406080AUL, 0x819866FEFE81E798UL, 
	0xF00BABA0A0F05B0BUL, 0x44CCB4787844F0CCUL, 0xBAD5F02525BA4AD5UL, 0xE33E754B4BE3963EUL, 
	0xF30EACA2A2F35F0EUL, 0xFE19445D5DFEBA19UL, 0xC05BDB8080C01B5BUL, 0x8A858005058A0A85UL, 
	0xADECD33F3FAD7EECUL, 0xBCDFFE2121BC42DFUL, 0x48D8A8707048E0D8UL, 0x040CFDF1F104F90CUL, 
	0xDF7A196363DFC67AUL, 0xC1582F7777C1EE58UL, 0x759F30AFAF75459FUL, 0x63A5E742426384A5UL, 
	0x3050702020304050UL, 0x1A2ECBE5E51AD12EUL, 0x0E12EFFDFD0EE112UL, 0x6DB708BFBF6D65B7UL, 
	0x4CD45581814C19D4UL, 0x143C24181814303CUL, 0x355F792626354C5FUL, 0x2F71B2C3C32F9D71UL, 
	0xE13886BEBEE16738UL, 0xA2FDC83535A26AFDUL, 0xCC4FC78888CC0B4FUL, 0x394B652E2E395C4BUL, 
	0x57F96A9393573DF9UL, 0xF20D585555F2AA0DUL, 0x829D61FCFC82E39DUL, 0x47C9B37A7A47F4C9UL, 
	0xACEF27C8C8AC8BEFUL, 0xE73288BABAE76F32UL, 0x2B7D4F32322B647DUL, 0x95A442E6E695D7A4UL, 
	0xA0FB3BC0C0A09BFBUL, 0x98B3AA19199832B3UL, 0xD168F69E9ED12768UL, 0x7F8122A3A37F5D81UL, 
	0x66AAEE44446688AAUL, 0x7E82D654547EA882UL, 0xABE6DD3B3BAB76E6UL, 0x839E950B0B83169EUL, 
	0xCA45C98C8CCA0345UL, 0x297BBCC7C729957BUL, 0xD36E056B6BD3D66EUL, 0x3C446C28283C5044UL, 
	0x798B2CA7A779558BUL, 0xE23D81BCBCE2633DUL, 0x1D273116161D2C27UL, 0x769A37ADAD76419AUL, 
	0x3B4D96DBDB3BAD4DUL, 0x56FA9E646456C8FAUL, 0x4ED2A674744EE8D2UL, 0x1E223614141E2822UL, 
	0xDB76E49292DB3F76UL, 0x0A1E120C0C0A181EUL, 0x6CB4FC48486C90B4UL, 0xE4378FB8B8E46B37UL, 
	0x5DE7789F9F5D25E7UL, 0x6EB20FBDBD6E61B2UL, 0xEF2A694343EF862AUL, 0xA6F135C4C4A693F1UL, 
	0xA8E3DA3939A872E3UL, 0xA4F7C63131A462F7UL, 0x37598AD3D337BD59UL, 0x8B8674F2F28BFF86UL, 
	0x325683D5D532B156UL, 0x43C54E8B8B430DC5UL, 0x59EB856E6E59DCEBUL, 0xB7C218DADAB7AFC2UL, 
	0x8C8F8E01018C028FUL, 0x64AC1DB1B16479ACUL, 0xD26DF19C9CD2236DUL, 0xE03B724949E0923BUL, 
	0xB4C71FD8D8B4ABC7UL, 0xFA15B9ACACFA4315UL, 0x0709FAF3F307FD09UL, 0x256FA0CFCF25856FUL, 
	0xAFEA20CACAAF8FEAUL, 0x8E897DF4F48EF389UL, 0xE920674747E98E20UL, 0x1828381010182028UL, 
	0xD5640B6F6FD5DE64UL, 0x888373F0F088FB83UL, 0x6FB1FB4A4A6F94B1UL, 0x7296CA5C5C72B896UL, 
	0x246C54383824706CUL, 0xF1085F5757F1AE08UL, 0xC752217373C7E652UL, 0x51F36497975135F3UL, 
	0x2365AECBCB238D65UL, 0x7C8425A1A17C5984UL, 0x9CBF57E8E89CCBBFUL, 0x21635D3E3E217C63UL, 
	0xDD7CEA9696DD377CUL, 0xDC7F1E6161DCC27FUL, 0x86919C0D0D861A91UL, 0x85949B0F0F851E94UL, 
	0x90AB4BE0E090DBABUL, 0x42C6BA7C7C42F8C6UL, 0xC457267171C4E257UL, 0xAAE529CCCCAA83E5UL, 
	0xD873E39090D83B73UL, 0x050F090606050C0FUL, 0x0103F4F7F701F503UL, 0x12362A1C1C123836UL, 
	0xA3FE3CC2C2A39FFEUL, 0x5FE18B6A6A5FD4E1UL, 0xF910BEAEAEF94710UL, 0xD06B026969D0D26BUL, 
	0x91A8BF1717912EA8UL, 0x58E87199995829E8UL, 0x2769533A3A277469UL, 0xB9D0F72727B94ED0UL, 
	0x384891D9D938A948UL, 0x1335DEEBEB13CD35UL, 0xB3CEE52B2BB356CEUL, 0x3355772222334455UL, 
	0xBBD604D2D2BBBFD6UL, 0x709039A9A9704990UL, 0x8980870707890E80UL, 0xA7F2C13333A766F2UL, 
	0xB6C1EC2D2DB65AC1UL, 0x22665A3C3C227866UL, 0x92ADB81515922AADUL, 0x2060A9C9C9208960UL, 
	0x49DB5C87874915DBUL, 0xFF1AB0AAAAFF4F1AUL, 0x7888D8505078A088UL, 0x7A8E2BA5A57A518EUL, 
	0x8F8A8903038F068AUL, 0xF8134A5959F8B213UL, 0x809B92090980129BUL, 0x1739231A1A173439UL, 
	0xDA75106565DACA75UL, 0x315384D7D731B553UL, 0xC651D58484C61351UL, 0xB8D303D0D0B8BBD3UL, 
	0xC35EDC8282C31F5EUL, 0xB0CBE22929B052CBUL, 0x7799C35A5A77B499UL, 0x11332D1E1E113C33UL, 
	0xCB463D7B7BCBF646UL, 0xFC1FB7A8A8FC4B1FUL, 0xD6610C6D6DD6DA61UL, 0x3A4E622C2C3A584EUL
#define RSTT(d, a, b0, b1, b2, b3, b4, b5, b6, b7)   do { \
		t[d] = T0_G[B64_0(a[b0])] \
			^ R64(T0_G[B64_1(a[b1])],  8) \
			^ R64(T0_G[B64_2(a[b2])], 16) \
			^ R64(T0_G[B64_3(a[b3])], 24) \
			^ T4_G[B64_4(a[b4])] \
			^ R64(T4_G[B64_5(a[b5])],  8) \
			^ R64(T4_G[B64_6(a[b6])], 16) \
			^ R64(T4_G[B64_7(a[b7])], 24); \
		} while (0)
#define ROUND_SMALL_P(a, r)   do { \
		ulong t[8]; \
		a[0] ^= PC64(0x00, r); \
		a[1] ^= PC64(0x10, r); \
		a[2] ^= PC64(0x20, r); \
		a[3] ^= PC64(0x30, r); \
		a[4] ^= PC64(0x40, r); \
		a[5] ^= PC64(0x50, r); \
		a[6] ^= PC64(0x60, r); \
		a[7] ^= PC64(0x70, r); \
		RSTT(0, a, 0, 1, 2, 3, 4, 5, 6, 7); \
		RSTT(1, a, 1, 2, 3, 4, 5, 6, 7, 0); \
		RSTT(2, a, 2, 3, 4, 5, 6, 7, 0, 1); \
		RSTT(3, a, 3, 4, 5, 6, 7, 0, 1, 2); \
		RSTT(4, a, 4, 5, 6, 7, 0, 1, 2, 3); \
		RSTT(5, a, 5, 6, 7, 0, 1, 2, 3, 4); \
		RSTT(6, a, 6, 7, 0, 1, 2, 3, 4, 5); \
		RSTT(7, a, 7, 0, 1, 2, 3, 4, 5, 6); \
		a[0] = t[0]; \
		a[1] = t[1]; \
		a[2] = t[2]; \
		a[3] = t[3]; \
		a[4] = t[4]; \
		a[5] = t[5]; \
		a[6] = t[6]; \
		a[7] = t[7]; \
		} while (0)
#define ROUND_SMALL_Pf(a,r)   do { \
		a[0] ^= PC64(0x00, r); \
		a[1] ^= PC64(0x10, r); \
		a[2] ^= PC64(0x20, r); \
		a[3] ^= PC64(0x30, r); \
		a[4] ^= PC64(0x40, r); \
		a[5] ^= PC64(0x50, r); \
		a[6] ^= PC64(0x60, r); \
		a[7] ^= PC64(0x70, r); \
		RSTT(7, a, 7, 0, 1, 2, 3, 4, 5, 6); \
		a[7] = t[7]; \
			} while (0)
#define ROUND_SMALL_Q(a, r)   do { \
		ulong t[8]; \
		a[0] ^= QC64(0x00, r); \
		a[1] ^= QC64(0x10, r); \
		a[2] ^= QC64(0x20, r); \
		a[3] ^= QC64(0x30, r); \
		a[4] ^= QC64(0x40, r); \
		a[5] ^= QC64(0x50, r); \
		a[6] ^= QC64(0x60, r); \
		a[7] ^= QC64(0x70, r); \
		RSTT(0, a, 1, 3, 5, 7, 0, 2, 4, 6); \
		RSTT(1, a, 2, 4, 6, 0, 1, 3, 5, 7); \
		RSTT(2, a, 3, 5, 7, 1, 2, 4, 6, 0); \
		RSTT(3, a, 4, 6, 0, 2, 3, 5, 7, 1); \
		RSTT(4, a, 5, 7, 1, 3, 4, 6, 0, 2); \
		RSTT(5, a, 6, 0, 2, 4, 5, 7, 1, 3); \
		RSTT(6, a, 7, 1, 3, 5, 6, 0, 2, 4); \
		RSTT(7, a, 0, 2, 4, 6, 7, 1, 3, 5); \
		a[0] = t[0]; \
		a[1] = t[1]; \
		a[2] = t[2]; \
		a[3] = t[3]; \
		a[4] = t[4]; \
		a[5] = t[5]; \
		a[6] = t[6]; \
		a[7] = t[7]; \
		} while (0)
#define PERM_SMALL_P(a)   do { \
		for (int r = 0; r < 10; r ++) \
			ROUND_SMALL_P(a, r); \
		} while (0)
#define PERM_SMALL_Pf(a)   do { \
		for (int r = 0; r < 9; r ++) { \
			ROUND_SMALL_P(a, r);} \
            ROUND_SMALL_Pf(a,9); \
			} while (0)
#define PERM_SMALL_Q(a)   do { \
		for (int r = 0; r < 10; r ++) \
			ROUND_SMALL_Q(a, r); \
		} while (0)
/* $Id: jh.c 255 2011-06-07 19:50:20Z tp $ */
 * JH implementation.
 * ==========================(LICENSE BEGIN)============================
 * Copyright (c) 2007-2010  Projet RNRT SAPHIR
 * 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.
 * ===========================(LICENSE END)=============================
 * @author   Thomas Pornin <thomas.pornin@cryptolog.com>
#define SPH_JH_64   1
#define SPH_LITTLE_ENDIAN 1
#define SPH_C32(x)	x
#define SPH_C64(x)	x
typedef uint sph_u32;
typedef ulong sph_u64;
 * The internal bitslice representation may use either big-endian or
 * little-endian (true bitslice operations do not care about the bit
 * ordering, and the bit-swapping linear operations in JH happen to
 * be invariant through endianness-swapping). The constants must be
 * defined according to the chosen endianness; we use some
 * byte-swapping macros for that.
#if SPH_LITTLE_ENDIAN
#define C32e(x)     ((SPH_C32(x) >> 24) \
          | ((SPH_C32(x) >>  8) & SPH_C32(0x0000FF00)) \
          | ((SPH_C32(x) <<  8) & SPH_C32(0x00FF0000)) \
          | ((SPH_C32(x) << 24) & SPH_C32(0xFF000000)))
#define dec32e_aligned   sph_dec32le_aligned
#define enc32e           sph_enc32le
#define C64e(x)     ((SPH_C64(x) >> 56) \
          | ((SPH_C64(x) >> 40) & SPH_C64(0x000000000000FF00)) \
          | ((SPH_C64(x) >> 24) & SPH_C64(0x0000000000FF0000)) \
          | ((SPH_C64(x) >>  8) & SPH_C64(0x00000000FF000000)) \
          | ((SPH_C64(x) <<  8) & SPH_C64(0x000000FF00000000)) \
          | ((SPH_C64(x) << 24) & SPH_C64(0x0000FF0000000000)) \
          | ((SPH_C64(x) << 40) & SPH_C64(0x00FF000000000000)) \
          | ((SPH_C64(x) << 56) & SPH_C64(0xFF00000000000000)))
#define dec64e_aligned   sph_dec64le_aligned
#define enc64e           sph_enc64le
#define C32e(x)     SPH_C32(x)
#define dec32e_aligned   sph_dec32be_aligned
#define enc32e           sph_enc32be
#define C64e(x)     SPH_C64(x)
#define dec64e_aligned   sph_dec64be_aligned
#define enc64e           sph_enc64be
#endif
#define Sb(x0, x1, x2, x3, c)   do { \
    x3 = ~x3; \
    x0 ^= (c) & ~x2; \
    tmp = (c) ^ (x0 & x1); \
    x0 ^= x2 & x3; \
    x3 ^= ~x1 & x2; \
    x1 ^= x0 & x2; \
    x2 ^= x0 & ~x3; \
    x0 ^= x1 | x3; \
    x3 ^= x1 & x2; \
    x1 ^= tmp & x0; \
    x2 ^= tmp; \
  } while (0)
#define Lb(x0, x1, x2, x3, x4, x5, x6, x7)   do { \
    x4 ^= x1; \
    x5 ^= x2; \
    x6 ^= x3 ^ x0; \
    x7 ^= x0; \
    x0 ^= x5; \
    x1 ^= x6; \
    x2 ^= x7 ^ x4; \
    x3 ^= x4; \
  } while (0)
static const __constant ulong C[] =
	0x67F815DFA2DED572UL, 0x571523B70A15847BUL, 0xF6875A4D90D6AB81UL, 0x402BD1C3C54F9F4EUL, 
	0x9CFA455CE03A98EAUL, 0x9A99B26699D2C503UL, 0x8A53BBF2B4960266UL, 0x31A2DB881A1456B5UL, 
	0xDB0E199A5C5AA303UL, 0x1044C1870AB23F40UL, 0x1D959E848019051CUL, 0xDCCDE75EADEB336FUL, 
	0x416BBF029213BA10UL, 0xD027BBF7156578DCUL, 0x5078AA3739812C0AUL, 0xD3910041D2BF1A3FUL, 
	0x907ECCF60D5A2D42UL, 0xCE97C0929C9F62DDUL, 0xAC442BC70BA75C18UL, 0x23FCC663D665DFD1UL, 
	0x1AB8E09E036C6E97UL, 0xA8EC6C447E450521UL, 0xFA618E5DBB03F1EEUL, 0x97818394B29796FDUL, 
	0x2F3003DB37858E4AUL, 0x956A9FFB2D8D672AUL, 0x6C69B8F88173FE8AUL, 0x14427FC04672C78AUL, 
	0xC45EC7BD8F15F4C5UL, 0x80BB118FA76F4475UL, 0xBC88E4AEB775DE52UL, 0xF4A3A6981E00B882UL, 
	0x1563A3A9338FF48EUL, 0x89F9B7D524565FAAUL, 0xFDE05A7C20EDF1B6UL, 0x362C42065AE9CA36UL, 
	0x3D98FE4E433529CEUL, 0xA74B9A7374F93A53UL, 0x86814E6F591FF5D0UL, 0x9F5AD8AF81AD9D0EUL, 
	0x6A6234EE670605A7UL, 0x2717B96EBE280B8BUL, 0x3F1080C626077447UL, 0x7B487EC66F7EA0E0UL, 
	0xC0A4F84AA50A550DUL, 0x9EF18E979FE7E391UL, 0xD48D605081727686UL, 0x62B0E5F3415A9E7EUL, 
	0x7A205440EC1F9FFCUL, 0x84C9F4CE001AE4E3UL, 0xD895FA9DF594D74FUL, 0xA554C324117E2E55UL, 
	0x286EFEBD2872DF5BUL, 0xB2C4A50FE27FF578UL, 0x2ED349EEEF7C8905UL, 0x7F5928EB85937E44UL, 
	0x4A3124B337695F70UL, 0x65E4D61DF128865EUL, 0xE720B95104771BC7UL, 0x8A87D423E843FE74UL, 
	0xF2947692A3E8297DUL, 0xC1D9309B097ACBDDUL, 0xE01BDC5BFB301B1DUL, 0xBF829CF24F4924DAUL, 
	0xFFBF70B431BAE7A4UL, 0x48BCF8DE0544320DUL, 0x39D3BB5332FCAE3BUL, 0xA08B29E0C1C39F45UL, 
	0x0F09AEF7FD05C9E5UL, 0x34F1904212347094UL, 0x95ED44E301B771A2UL, 0x4A982F4F368E3BE9UL, 
	0x15F66CA0631D4088UL, 0xFFAF52874B44C147UL, 0x30C60AE2F14ABB7EUL, 0xE68C6ECCC5B67046UL, 
	0x00CA4FBD56A4D5A4UL, 0xAE183EC84B849DDAUL, 0xADD1643045CE5773UL, 0x67255C1468CEA6E8UL, 
	0x16E10ECBF28CDAA3UL, 0x9A99949A5806E933UL, 0x7B846FC220B2601FUL, 0x1885D1A07FACCED1UL, 
	0xD319DD8DA15B5932UL, 0x46B4A5AAC01C9A50UL, 0xBA6B04E467633D9FUL, 0x7EEE560BAB19CAF6UL, 
	0x742128A9EA79B11FUL, 0xEE51363B35F7BDE9UL, 0x76D350755AAC571DUL, 0x01707DA3FEC2463AUL, 
	0x42D8A498AFC135F7UL, 0x79676B9E20ECED78UL, 0xA8DB3AEA15638341UL, 0x832C83324D3BC3FAUL, 
	0xF347271C1F3B40A7UL, 0x9A762DB734F04059UL, 0xFD4F21D26C4E3EE7UL, 0xEF5957DC398DFDB8UL, 
	0xDAEB492B490C9B8DUL, 0x0D70F36849D7A25BUL, 0x84558D7AD0AE3B7DUL, 0x658EF8E4F0E9A5F5UL, 
	0x533B1036F4A2B8A0UL, 0x5AEC3E759E07A80CUL, 0x4F88E85692946891UL, 0x4CBCBAF8555CB05BUL, 
	0x7B9487F3993BBBE3UL, 0x5D1C6B72D6F4DA75UL, 0x6DB334DC28ACAE64UL, 0x71DB28B850A5346CUL, 
	0x2A518D10F2E261F8UL, 0xFC75DD593364DBE3UL, 0xA23FCE43F1BCAC1CUL, 0xB043E8023CD1BB67UL, 
	0x75A12988CA5B0A33UL, 0x5C5316B44D19347FUL, 0x1E4D790EC3943B92UL, 0x3FAFEEB6D7757479UL, 
	0x21391ABEF7D4A8EAUL, 0x5127234C097EF45CUL, 0xD23C32BA5324A326UL, 0xADD5A66D4A17A344UL, 
	0x08C9F2AFA63E1DB5UL, 0x563C6B91983D5983UL, 0x4D608672A17CF84CUL, 0xF6C76E08CC3EE246UL, 
	0x5E76BCB1B333982FUL, 0x2AE6C4EFA566D62BUL, 0x36D4C1BEE8B6F406UL, 0x6321EFBC1582EE74UL, 
	0x69C953F40D4EC1FDUL, 0x26585806C45A7DA7UL, 0x16FAE0061614C17EUL, 0x3F9D63283DAF907EUL, 
	0x0CD29B00E3F2C9D2UL, 0x300CD4B730CEAA5FUL, 0x9832E0F216512A74UL, 0x9AF8CEE3D830EB0DUL, 
	0x9279F1B57B9EC54BUL, 0xD36886046EE651FFUL, 0x316796E6574D239BUL, 0x05750A17F3A6E6CCUL, 
	0xCE6C3213D98176B1UL, 0x62A205F88452173CUL, 0x47154778B3CB2BF4UL, 0x486A9323825446FFUL, 
	0x65655E4E0758DF38UL, 0x8E5086FC897CFCF2UL, 0x86CA0BD0442E7031UL, 0x4E477830A20940F0UL, 
	0x8338F7D139EEA065UL, 0xBD3A2CE437E95EF7UL, 0x6FF8130126B29721UL, 0xE7DE9FEFD1ED44A3UL, 
	0xD992257615DFA08BUL, 0xBE42DC12F6F7853CUL, 0x7EB027AB7CECA7D8UL, 0xDEA83EAADA7D8D53UL, 
	0xD86902BD93CE25AAUL, 0xF908731AFD43F65AUL, 0xA5194A17DAEF5FC0UL, 0x6A21FD4C33664D97UL, 
	0x701541DB3198B435UL, 0x9B54CDEDBB0F1EEAUL, 0x72409751A163D09AUL, 0xE26F4791BF9D75F6UL
#define Ceven_hi(r)   (C[((r) << 2) + 0])
#define Ceven_lo(r)   (C[((r) << 2) + 1])
#define Codd_hi(r)    (C[((r) << 2) + 2])
#define Codd_lo(r)    (C[((r) << 2) + 3])
#define S(x0, x1, x2, x3, cb, r)   do { \
    Sb(x0 ## h, x1 ## h, x2 ## h, x3 ## h, cb ## hi(r)); \
    Sb(x0 ## l, x1 ## l, x2 ## l, x3 ## l, cb ## lo(r)); \
  } while (0)
#define L(x0, x1, x2, x3, x4, x5, x6, x7)   do { \
    Lb(x0 ## h, x1 ## h, x2 ## h, x3 ## h, \
      x4 ## h, x5 ## h, x6 ## h, x7 ## h); \
    Lb(x0 ## l, x1 ## l, x2 ## l, x3 ## l, \
      x4 ## l, x5 ## l, x6 ## l, x7 ## l); \
  } while (0)
#define Wz(x, c, n)   do { \
    sph_u64 t = (x ## h & (c)) << (n); \
    x ## h = ((x ## h >> (n)) & (c)) | t; \
    t = (x ## l & (c)) << (n); \
    x ## l = ((x ## l >> (n)) & (c)) | t; \
  } while (0)
#define W0(x)   Wz(x, SPH_C64(0x5555555555555555),  1)
#define W1(x)   Wz(x, SPH_C64(0x3333333333333333),  2)
#define W2(x)   Wz(x, SPH_C64(0x0F0F0F0F0F0F0F0F),  4)
#define W3(x)   Wz(x, SPH_C64(0x00FF00FF00FF00FF),  8)
#define W4(x)   Wz(x, SPH_C64(0x0000FFFF0000FFFF), 16)
#define W5(x)   Wz(x, SPH_C64(0x00000000FFFFFFFF), 32)
#define W6(x)   do { \
    sph_u64 t = x ## h; \
    x ## h = x ## l; \
    x ## l = t; \
  } while (0)
#define SL(ro)   SLu(r + ro, ro)
#define SLu(r, ro)   do { \
    S(h0, h2, h4, h6, Ceven_, r); \
    S(h1, h3, h5, h7, Codd_, r); \
    L(h0, h2, h4, h6, h1, h3, h5, h7); \
    W ## ro(h1); \
    W ## ro(h3); \
    W ## ro(h5); \
    W ## ro(h7); \
  } while (0)
#if SPH_SMALL_FOOTPRINT_JH
 * The "small footprint" 64-bit version just uses a partially unrolled
 * loop.
#define E8   do { \
    unsigned r; \
    for (r = 0; r < 42; r += 7) { \
      SL(0); \
      SL(1); \
      SL(2); \
      SL(3); \
      SL(4); \
      SL(5); \
      SL(6); \
    } \
  } while (0)
 * On a "true 64-bit" architecture, we can unroll at will.
#define E8   do { \
    SLu( 0, 0); \
    SLu( 1, 1); \
    SLu( 2, 2); \
    SLu( 3, 3); \
    SLu( 4, 4); \
    SLu( 5, 5); \
    SLu( 6, 6); \
    SLu( 7, 0); \
    SLu( 8, 1); \
    SLu( 9, 2); \
    SLu(10, 3); \
    SLu(11, 4); \
    SLu(12, 5); \
    SLu(13, 6); \
    SLu(14, 0); \
    SLu(15, 1); \
    SLu(16, 2); \
    SLu(17, 3); \
    SLu(18, 4); \
    SLu(19, 5); \
    SLu(20, 6); \
    SLu(21, 0); \
    SLu(22, 1); \
    SLu(23, 2); \
    SLu(24, 3); \
    SLu(25, 4); \
    SLu(26, 5); \
    SLu(27, 6); \
    SLu(28, 0); \
    SLu(29, 1); \
    SLu(30, 2); \
    SLu(31, 3); \
    SLu(32, 4); \
    SLu(33, 5); \
    SLu(34, 6); \
    SLu(35, 0); \
    SLu(36, 1); \
    SLu(37, 2); \
    SLu(38, 3); \
    SLu(39, 4); \
    SLu(40, 5); \
    SLu(41, 6); \
  } while (0)
#endif
#ifndef WOLF_AES_CL
#define WOLF_AES_CL
#ifdef cl_amd_media_ops2
#   pragma OPENCL EXTENSION cl_amd_media_ops2 : enable
#   define xmrig_amd_bfe(src0, src1, src2) amd_bfe(src0, src1, src2)
/* taken from: https://www.khronos.org/registry/OpenCL/extensions/amd/cl_amd_media_ops2.txt
 *     Built-in Function:
 *     uintn amd_bfe (uintn src0, uintn src1, uintn src2)
 *   Description
 *     NOTE: operator >> below represent logical right shift
 *     offset = src1.s0 & 31;
 *     width = src2.s0 & 31;
 *     if width = 0
 *         dst.s0 = 0;
 *     else if (offset + width) < 32
 *         dst.s0 = (src0.s0 << (32 - offset - width)) >> (32 - width);
 *     else
 *         dst.s0 = src0.s0 >> offset;
 *     similar operation applied to other components of the vectors
inline int xmrig_amd_bfe(const uint src0, const uint offset, const uint width)
    /* casts are removed because we can implement everything as uint
     * int offset = src1;
     * int width = src2;
     * remove check for edge case, this function is always called with
     * `width==8`
     * @code
     *   if ( width == 0 )
     *      return 0;
     * @endcode
     */
    if ((offset + width) < 32u) {
        return (src0 << (32u - offset - width)) >> (32u - width);
    return src0 >> offset;
#endif
// AES table - the other three are generated on the fly
static const __constant uint AES0_C[256] =
    0xA56363C6U, 0x847C7CF8U, 0x997777EEU, 0x8D7B7BF6U,
    0x0DF2F2FFU, 0xBD6B6BD6U, 0xB16F6FDEU, 0x54C5C591U,
    0x50303060U, 0x03010102U, 0xA96767CEU, 0x7D2B2B56U,
    0x19FEFEE7U, 0x62D7D7B5U, 0xE6ABAB4DU, 0x9A7676ECU,
    0x45CACA8FU, 0x9D82821FU, 0x40C9C989U, 0x877D7DFAU,
    0x15FAFAEFU, 0xEB5959B2U, 0xC947478EU, 0x0BF0F0FBU,
    0xECADAD41U, 0x67D4D4B3U, 0xFDA2A25FU, 0xEAAFAF45U,
    0xBF9C9C23U, 0xF7A4A453U, 0x967272E4U, 0x5BC0C09BU,
    0xC2B7B775U, 0x1CFDFDE1U, 0xAE93933DU, 0x6A26264CU,
    0x5A36366CU, 0x413F3F7EU, 0x02F7F7F5U, 0x4FCCCC83U,
    0x5C343468U, 0xF4A5A551U, 0x34E5E5D1U, 0x08F1F1F9U,
    0x937171E2U, 0x73D8D8ABU, 0x53313162U, 0x3F15152AU,
    0x0C040408U, 0x52C7C795U, 0x65232346U, 0x5EC3C39DU,
    0x28181830U, 0xA1969637U, 0x0F05050AU, 0xB59A9A2FU,
    0x0907070EU, 0x36121224U, 0x9B80801BU, 0x3DE2E2DFU,
    0x26EBEBCDU, 0x6927274EU, 0xCDB2B27FU, 0x9F7575EAU,
    0x1B090912U, 0x9E83831DU, 0x742C2C58U, 0x2E1A1A34U,
    0x2D1B1B36U, 0xB26E6EDCU, 0xEE5A5AB4U, 0xFBA0A05BU,
    0xF65252A4U, 0x4D3B3B76U, 0x61D6D6B7U, 0xCEB3B37DU,
    0x7B292952U, 0x3EE3E3DDU, 0x712F2F5EU, 0x97848413U,
    0xF55353A6U, 0x68D1D1B9U, 0x00000000U, 0x2CEDEDC1U,
    0x60202040U, 0x1FFCFCE3U, 0xC8B1B179U, 0xED5B5BB6U,
    0xBE6A6AD4U, 0x46CBCB8DU, 0xD9BEBE67U, 0x4B393972U,
    0xDE4A4A94U, 0xD44C4C98U, 0xE85858B0U, 0x4ACFCF85U,
    0x6BD0D0BBU, 0x2AEFEFC5U, 0xE5AAAA4FU, 0x16FBFBEDU,
    0xC5434386U, 0xD74D4D9AU, 0x55333366U, 0x94858511U,
    0xCF45458AU, 0x10F9F9E9U, 0x06020204U, 0x817F7FFEU,
    0xF05050A0U, 0x443C3C78U, 0xBA9F9F25U, 0xE3A8A84BU,
    0xF35151A2U, 0xFEA3A35DU, 0xC0404080U, 0x8A8F8F05U,
    0xAD92923FU, 0xBC9D9D21U, 0x48383870U, 0x04F5F5F1U,
    0xDFBCBC63U, 0xC1B6B677U, 0x75DADAAFU, 0x63212142U,
    0x30101020U, 0x1AFFFFE5U, 0x0EF3F3FDU, 0x6DD2D2BFU,
    0x4CCDCD81U, 0x140C0C18U, 0x35131326U, 0x2FECECC3U,
    0xE15F5FBEU, 0xA2979735U, 0xCC444488U, 0x3917172EU,
    0x57C4C493U, 0xF2A7A755U, 0x827E7EFCU, 0x473D3D7AU,
    0xAC6464C8U, 0xE75D5DBAU, 0x2B191932U, 0x957373E6U,
    0xA06060C0U, 0x98818119U, 0xD14F4F9EU, 0x7FDCDCA3U,
    0x66222244U, 0x7E2A2A54U, 0xAB90903BU, 0x8388880BU,
    0xCA46468CU, 0x29EEEEC7U, 0xD3B8B86BU, 0x3C141428U,
    0x79DEDEA7U, 0xE25E5EBCU, 0x1D0B0B16U, 0x76DBDBADU,
    0x3BE0E0DBU, 0x56323264U, 0x4E3A3A74U, 0x1E0A0A14U,
    0xDB494992U, 0x0A06060CU, 0x6C242448U, 0xE45C5CB8U,
    0x5DC2C29FU, 0x6ED3D3BDU, 0xEFACAC43U, 0xA66262C4U,
    0xA8919139U, 0xA4959531U, 0x37E4E4D3U, 0x8B7979F2U,
    0x32E7E7D5U, 0x43C8C88BU, 0x5937376EU, 0xB76D6DDAU,
    0x8C8D8D01U, 0x64D5D5B1U, 0xD24E4E9CU, 0xE0A9A949U,
    0xB46C6CD8U, 0xFA5656ACU, 0x07F4F4F3U, 0x25EAEACFU,
    0xAF6565CAU, 0x8E7A7AF4U, 0xE9AEAE47U, 0x18080810U,
    0xD5BABA6FU, 0x887878F0U, 0x6F25254AU, 0x722E2E5CU,
    0x241C1C38U, 0xF1A6A657U, 0xC7B4B473U, 0x51C6C697U,
    0x23E8E8CBU, 0x7CDDDDA1U, 0x9C7474E8U, 0x211F1F3EU,
    0xDD4B4B96U, 0xDCBDBD61U, 0x868B8B0DU, 0x858A8A0FU,
    0x907070E0U, 0x423E3E7CU, 0xC4B5B571U, 0xAA6666CCU,
    0xD8484890U, 0x05030306U, 0x01F6F6F7U, 0x120E0E1CU,
    0xA36161C2U, 0x5F35356AU, 0xF95757AEU, 0xD0B9B969U,
    0x91868617U, 0x58C1C199U, 0x271D1D3AU, 0xB99E9E27U,
    0x38E1E1D9U, 0x13F8F8EBU, 0xB398982BU, 0x33111122U,
    0xBB6969D2U, 0x70D9D9A9U, 0x898E8E07U, 0xA7949433U,
    0xB69B9B2DU, 0x221E1E3CU, 0x92878715U, 0x20E9E9C9U,
    0x49CECE87U, 0xFF5555AAU, 0x78282850U, 0x7ADFDFA5U,
    0x8F8C8C03U, 0xF8A1A159U, 0x80898909U, 0x170D0D1AU,
    0xDABFBF65U, 0x31E6E6D7U, 0xC6424284U, 0xB86868D0U,
    0xC3414182U, 0xB0999929U, 0x772D2D5AU, 0x110F0F1EU,
    0xCBB0B07BU, 0xFC5454A8U, 0xD6BBBB6DU, 0x3A16162CU
#define BYTE(x, y) (xmrig_amd_bfe((x), (y) << 3U, 8U))
inline uint4 AES_Round_bittube2(const __local uint *AES0, const __local uint *AES1, uint4 x, uint4 k)
    x = ~x;
    k.s0 ^= AES0[BYTE(x.s0, 0)] ^ AES1[BYTE(x.s1, 1)] ^ rotate(AES0[BYTE(x.s2, 2)] ^ AES1[BYTE(x.s3, 3)], 16U);
    x.s0 ^= k.s0;
    k.s1 ^= AES0[BYTE(x.s1, 0)] ^ AES1[BYTE(x.s2, 1)] ^ rotate(AES0[BYTE(x.s3, 2)] ^ AES1[BYTE(x.s0, 3)], 16U);
    x.s1 ^= k.s1;
    k.s2 ^= AES0[BYTE(x.s2, 0)] ^ AES1[BYTE(x.s3, 1)] ^ rotate(AES0[BYTE(x.s0, 2)] ^ AES1[BYTE(x.s1, 3)], 16U);
    x.s2 ^= k.s2;
    k.s3 ^= AES0[BYTE(x.s3, 0)] ^ AES1[BYTE(x.s0, 1)] ^ rotate(AES0[BYTE(x.s1, 2)] ^ AES1[BYTE(x.s2, 3)], 16U);
    return k;
uint4 AES_Round(const __local uint *AES0, const __local uint *AES1, const __local uint *AES2, const __local uint *AES3, const uint4 X, uint4 key)
    key.s0 ^= AES0[BYTE(X.s0, 0)] ^ AES1[BYTE(X.s1, 1)] ^ AES2[BYTE(X.s2, 2)] ^ AES3[BYTE(X.s3, 3)];
    key.s1 ^= AES0[BYTE(X.s1, 0)] ^ AES1[BYTE(X.s2, 1)] ^ AES2[BYTE(X.s3, 2)] ^ AES3[BYTE(X.s0, 3)];
    key.s2 ^= AES0[BYTE(X.s2, 0)] ^ AES1[BYTE(X.s3, 1)] ^ AES2[BYTE(X.s0, 2)] ^ AES3[BYTE(X.s1, 3)];
    key.s3 ^= AES0[BYTE(X.s3, 0)] ^ AES1[BYTE(X.s0, 1)] ^ AES2[BYTE(X.s1, 2)] ^ AES3[BYTE(X.s2, 3)];
    return key;
uint4 AES_Round_Two_Tables(const __local uint *AES0, const __local uint *AES1, const uint4 X, uint4 key)
    key.s0 ^= AES0[BYTE(X.s0, 0)] ^ AES1[BYTE(X.s1, 1)] ^ rotate(AES0[BYTE(X.s2, 2)] ^ AES1[BYTE(X.s3, 3)], 16U);
    key.s1 ^= AES0[BYTE(X.s1, 0)] ^ AES1[BYTE(X.s2, 1)] ^ rotate(AES0[BYTE(X.s3, 2)] ^ AES1[BYTE(X.s0, 3)], 16U);
    key.s2 ^= AES0[BYTE(X.s2, 0)] ^ AES1[BYTE(X.s3, 1)] ^ rotate(AES0[BYTE(X.s0, 2)] ^ AES1[BYTE(X.s1, 3)], 16U);
    key.s3 ^= AES0[BYTE(X.s3, 0)] ^ AES1[BYTE(X.s0, 1)] ^ rotate(AES0[BYTE(X.s1, 2)] ^ AES1[BYTE(X.s2, 3)], 16U);
    return key;
#endif
XMRIG_INCLUDE_FAST_INT_MATH_V2
XMRIG_INCLUDE_CN_GPU
#ifndef WOLF_SKEIN_CL
#define WOLF_SKEIN_CL
#ifdef cl_amd_media_ops
#   pragma OPENCL EXTENSION cl_amd_media_ops : enable
#   define xmrig_amd_bitalign(src0, src1, src2) amd_bitalign(src0, src1, src2)
/* taken from https://www.khronos.org/registry/OpenCL/extensions/amd/cl_amd_media_ops.txt
 * Build-in Function
 *     uintn  amd_bitalign (uintn src0, uintn src1, uintn src2)
 *   Description
 *     dst.s0 =  (uint) (((((long)src0.s0) << 32) | (long)src1.s0) >> (src2.s0 & 31))
 *     similar operation applied to other components of the vectors.
 * The implemented function is modified because the last is in our case always a scalar.
 * We can ignore the bitwise AND operation.
inline uint2 xmrig_amd_bitalign(const uint2 src0, const uint2 src1, const uint src2)
    uint2 result;
    result.s0 = (uint) (((((long)src0.s0) << 32) | (long)src1.s0) >> (src2));
    result.s1 = (uint) (((((long)src0.s1) << 32) | (long)src1.s1) >> (src2));
    return result;
#endif
// Vectorized Skein implementation macros and functions by Wolf
#define SKEIN_KS_PARITY 0x1BD11BDAA9FC1A22
static const __constant ulong SKEIN256_IV[8] =
    0xCCD044A12FDB3E13UL, 0xE83590301A79A9EBUL,
    0x55AEA0614F816E6FUL, 0x2A2767A4AE9B94DBUL,
    0xEC06025E74DD7683UL, 0xE7A436CDC4746251UL,
    0xC36FBAF9393AD185UL, 0x3EEDBA1833EDFC13UL
static const __constant ulong SKEIN512_256_IV[8] =
    0xCCD044A12FDB3E13UL, 0xE83590301A79A9EBUL,
    0x55AEA0614F816E6FUL, 0x2A2767A4AE9B94DBUL,
    0xEC06025E74DD7683UL, 0xE7A436CDC4746251UL,
    0xC36FBAF9393AD185UL, 0x3EEDBA1833EDFC13UL
#define SKEIN_INJECT_KEY(p, s)  do { \
    p += h; \
    p.s5 += t[s % 3]; \
    p.s6 += t[(s + 1) % 3]; \
    p.s7 += s; \
} while(0)
ulong SKEIN_ROT(const uint2 x, const uint y)
    if (y < 32) {
        return(as_ulong(xmrig_amd_bitalign(x, x.s10, 32 - y)));
    else {
        return(as_ulong(xmrig_amd_bitalign(x.s10, x, 32 - (y - 32))));
void SkeinMix8(ulong4 *pv0, ulong4 *pv1, const uint rc0, const uint rc1, const uint rc2, const uint rc3)
    *pv0 += *pv1;
    (*pv1).s0 = SKEIN_ROT(as_uint2((*pv1).s0), rc0);
    (*pv1).s1 = SKEIN_ROT(as_uint2((*pv1).s1), rc1);
    (*pv1).s2 = SKEIN_ROT(as_uint2((*pv1).s2), rc2);
    (*pv1).s3 = SKEIN_ROT(as_uint2((*pv1).s3), rc3);
    *pv1 ^= *pv0;
ulong8 SkeinEvenRound(ulong8 p, const ulong8 h, const ulong *t, const uint s)
    SKEIN_INJECT_KEY(p, s);
    ulong4 pv0 = p.even, pv1 = p.odd;
    SkeinMix8(&pv0, &pv1, 46, 36, 19, 37);
    pv0 = shuffle(pv0, (ulong4)(1, 2, 3, 0));
    pv1 = shuffle(pv1, (ulong4)(0, 3, 2, 1));
    SkeinMix8(&pv0, &pv1, 33, 27, 14, 42);
    pv0 = shuffle(pv0, (ulong4)(1, 2, 3, 0));
    pv1 = shuffle(pv1, (ulong4)(0, 3, 2, 1));
    SkeinMix8(&pv0, &pv1, 17, 49, 36, 39);
    pv0 = shuffle(pv0, (ulong4)(1, 2, 3, 0));
    pv1 = shuffle(pv1, (ulong4)(0, 3, 2, 1));
    SkeinMix8(&pv0, &pv1, 44, 9, 54, 56);
    return(shuffle2(pv0, pv1, (ulong8)(1, 4, 2, 7, 3, 6, 0, 5)));
ulong8 SkeinOddRound(ulong8 p, const ulong8 h, const ulong *t, const uint s)
    SKEIN_INJECT_KEY(p, s);
    ulong4 pv0 = p.even, pv1 = p.odd;
    SkeinMix8(&pv0, &pv1, 39, 30, 34, 24);
    pv0 = shuffle(pv0, (ulong4)(1, 2, 3, 0));
    pv1 = shuffle(pv1, (ulong4)(0, 3, 2, 1));
    SkeinMix8(&pv0, &pv1, 13, 50, 10, 17);
    pv0 = shuffle(pv0, (ulong4)(1, 2, 3, 0));
    pv1 = shuffle(pv1, (ulong4)(0, 3, 2, 1));
    SkeinMix8(&pv0, &pv1, 25, 29, 39, 43);
    pv0 = shuffle(pv0, (ulong4)(1, 2, 3, 0));
    pv1 = shuffle(pv1, (ulong4)(0, 3, 2, 1));
    SkeinMix8(&pv0, &pv1, 8, 35, 56, 22);
    return(shuffle2(pv0, pv1, (ulong8)(1, 4, 2, 7, 3, 6, 0, 5)));
ulong8 Skein512Block(ulong8 p, ulong8 h, ulong h8, const ulong *t)
    #pragma unroll
    for(int i = 0; i < 18; ++i)
        p = SkeinEvenRound(p, h, t, i);
        ++i;
        ulong tmp = h.s0;
        h = shuffle(h, (ulong8)(1, 2, 3, 4, 5, 6, 7, 0));
        h.s7 = h8;
        h8 = tmp;
        p = SkeinOddRound(p, h, t, i);
        tmp = h.s0;
        h = shuffle(h, (ulong8)(1, 2, 3, 4, 5, 6, 7, 0));
        h.s7 = h8;
        h8 = tmp;
    SKEIN_INJECT_KEY(p, 18);
    return(p);
#endif
 * @author SChernykh
inline uint get_reciprocal(uint a)
    const float a_hi = as_float((a >> 8) + ((126U + 31U) << 23));
    const float a_lo = convert_float_rte(a & 0xFF);
    const float r = native_recip(a_hi);
    const float r_scaled = as_float(as_uint(r) + (64U << 23));
    const float h = fma(a_lo, r, fma(a_hi, r, -1.0f));
    return (as_uint(r) << 9) - convert_int_rte(h * r_scaled);
inline uint2 fast_div_v2(ulong a, uint b)
    const uint r = get_reciprocal(b);
    const ulong k = mul_hi(as_uint2(a).s0, r) + ((ulong)(r) * as_uint2(a).s1) + a;
    const uint q = as_uint2(k).s1;
    long tmp = a - ((ulong)(q) * b);
    ((int*)&tmp)[1] -= (as_uint2(k).s1 < as_uint2(a).s1) ? b : 0;
    const int overshoot = ((int*)&tmp)[1] >> 31;
    const int undershoot = as_int2(as_uint(b - 1) - tmp).s1 >> 31;
    return (uint2)(q + overshoot - undershoot, as_uint2(tmp).s0 + (as_uint(overshoot) & b) - (as_uint(undershoot) & b));
inline uint fast_sqrt_v2(const ulong n1)
    float x = as_float((as_uint2(n1).s1 >> 9) + ((64U + 127U) << 23));
    float x1 = native_rsqrt(x);
    x = native_sqrt(x);
    // The following line does x1 *= 4294967296.0f;
    x1 = as_float(as_uint(x1) + (32U << 23));
    const uint x0 = as_uint(x) - (158U << 23);
    const long delta0 = n1 - (as_ulong((uint2)(mul24(x0, x0), mul_hi(x0, x0))) << 18);
    const float delta = convert_float_rte(as_int2(delta0).s1) * x1;
    uint result = (x0 << 10) + convert_int_rte(delta);
    const uint s = result >> 1;
    const uint b = result & 1;
    const ulong x2 = (ulong)(s) * (s + b) + ((ulong)(result) << 32) - n1;
    if ((long)(x2 + as_int(b - 1)) >= 0) --result;
    if ((long)(x2 + 0x100000000UL + s) < 0) ++result;
    return result;
cn1_cryptonight_r_%d
#ifndef FAST_DIV_HEAVY_CL
#define FAST_DIV_HEAVY_CL
inline long fast_div_heavy(long _a, int _b)
	long a = abs(_a);
	int b = abs(_b);
	float rcp = native_recip(convert_float_rte(b));
	float rcp2 = as_float(as_uint(rcp) + (32U << 23));
	ulong q1 = convert_ulong(convert_float_rte(as_int2(a).s1) * rcp2);
	a -= q1 * as_uint(b);
	float q2f = convert_float_rte(as_int2(a >> 12).s0) * rcp;
	q2f = as_float(as_uint(q2f) + (12U << 23));
	long q2 = convert_long_rte(q2f);
	int a2 = as_int2(a).s0 - as_int2(q2).s0 * b;
	int q3 = convert_int_rte(convert_float_rte(a2) * rcp);
	q3 += (a2 - q3 * b) >> 31;
	const long q = q1 + q2 + q3;
	return ((as_int2(_a).s1 ^ _b) < 0) ? -q : q;
#endif
XMRIG_INCLUDE_FAST_DIV_HEAVY
CryptonightR: clCreateKernel returned error %s
inline float4 _mm_add_ps(float4 a, float4 b)
    return a + b;
inline float4 _mm_sub_ps(float4 a, float4 b)
    return a - b;
inline float4 _mm_mul_ps(float4 a, float4 b)
    return a * b;
inline float4 _mm_div_ps(float4 a, float4 b)
    return a / b;
inline float4 _mm_and_ps(float4 a, int b)
    return as_float4(as_int4(a) & (int4)(b));
inline float4 _mm_or_ps(float4 a, int b)
    return as_float4(as_int4(a) | (int4)(b));
inline float4 _mm_fmod_ps(float4 v, float dc)
    float4 d = (float4)(dc);
    float4 c = _mm_div_ps(v, d);
    c = trunc(c);
    c = _mm_mul_ps(c, d);
    return _mm_sub_ps(v, c);
inline int4 _mm_xor_si128(int4 a, int4 b)
    return a ^ b;
inline float4 _mm_xor_ps(float4 a, int b)
    return as_float4(as_int4(a) ^ (int4)(b));
inline int4 _mm_alignr_epi8(int4 a, const uint rot)
    const uint right = 8 * rot;
    const uint left = (32 - 8 * rot);
    return (int4)(
        ((uint)a.x >> right) | ( a.y << left ),
        ((uint)a.y >> right) | ( a.z << left ),
        ((uint)a.z >> right) | ( a.w << left ),
        ((uint)a.w >> right) | ( a.x << left )
    );
inline global int4* scratchpad_ptr(uint idx, uint n, __global int *lpad) { return (__global int4*)((__global char*)lpad + (idx & 0x1FFFC0) + n * 16); }
inline float4 fma_break(float4 x)
    // Break the dependency chain by setitng the exp to ?????01
    x = _mm_and_ps(x, 0xFEFFFFFF);
    return _mm_or_ps(x, 0x00800000);
inline void sub_round(float4 n0, float4 n1, float4 n2, float4 n3, float4 rnd_c, float4* n, float4* d, float4* c)
    n1 = _mm_add_ps(n1, *c);
    float4 nn = _mm_mul_ps(n0, *c);
    nn = _mm_mul_ps(n1, _mm_mul_ps(nn,nn));
    nn = fma_break(nn);
    *n = _mm_add_ps(*n, nn);
    n3 = _mm_sub_ps(n3, *c);
    float4 dd = _mm_mul_ps(n2, *c);
    dd = _mm_mul_ps(n3, _mm_mul_ps(dd,dd));
    dd = fma_break(dd);
    *d = _mm_add_ps(*d, dd);
    //Constant feedback
    *c = _mm_add_ps(*c, rnd_c);
    *c = _mm_add_ps(*c, (float4)(0.734375f));
    float4 r = _mm_add_ps(nn, dd);
    r = _mm_and_ps(r, 0x807FFFFF);
    r = _mm_or_ps(r, 0x40000000);
    *c = _mm_add_ps(*c, r);
// 9*8 + 2 = 74
inline void round_compute(float4 n0, float4 n1, float4 n2, float4 n3, float4 rnd_c, float4* c, float4* r)
    float4 n = (float4)(0.0f);
    float4 d = (float4)(0.0f);
    sub_round(n0, n1, n2, n3, rnd_c, &n, &d, c);
    sub_round(n1, n2, n3, n0, rnd_c, &n, &d, c);
    sub_round(n2, n3, n0, n1, rnd_c, &n, &d, c);
    sub_round(n3, n0, n1, n2, rnd_c, &n, &d, c);
    sub_round(n3, n2, n1, n0, rnd_c, &n, &d, c);
    sub_round(n2, n1, n0, n3, rnd_c, &n, &d, c);
    sub_round(n1, n0, n3, n2, rnd_c, &n, &d, c);
    sub_round(n0, n3, n2, n1, rnd_c, &n, &d, c);
    // Make sure abs(d) > 2.0 - this prevents division by zero and accidental overflows by division by < 1.0
    d = _mm_and_ps(d, 0xFF7FFFFF);
    d = _mm_or_ps(d, 0x40000000);
    *r =_mm_add_ps(*r, _mm_div_ps(n,d));
inline int4 single_comupte(float4 n0, float4 n1, float4 n2, float4 n3, float cnt, float4 rnd_c, __local float4* sum)
    float4 c= (float4)(cnt);
    // 35 maths calls follow (140 FLOPS)
    float4 r = (float4)(0.0f);
    for(int i = 0; i < 4; ++i)
        round_compute(n0, n1, n2, n3, rnd_c, &c, &r);
    // do a quick fmod by setting exp to 2
    r = _mm_and_ps(r, 0x807FFFFF);
    r = _mm_or_ps(r, 0x40000000);
    *sum = r; // 34
    float4 x = (float4)(536870880.0f);
    r = _mm_mul_ps(r, x); // 35
    return convert_int4_rte(r);
inline void single_comupte_wrap(const uint rot, int4 v0, int4 v1, int4 v2, int4 v3, float cnt, float4 rnd_c, __local float4* sum, __local int4* out)
    float4 n0 = convert_float4_rte(v0);
    float4 n1 = convert_float4_rte(v1);
    float4 n2 = convert_float4_rte(v2);
    float4 n3 = convert_float4_rte(v3);
    int4 r = single_comupte(n0, n1, n2, n3, cnt, rnd_c, sum);
    *out = rot == 0 ? r : _mm_alignr_epi8(r, rot);
static const __constant uint look[16][4] = {
    {0, 1, 2, 3},
    {0, 2, 3, 1},
    {0, 3, 1, 2},
    {0, 3, 2, 1},
    {1, 0, 2, 3},
    {1, 2, 3, 0},
    {1, 3, 0, 2},
    {1, 3, 2, 0},
    {2, 1, 0, 3},
    {2, 0, 3, 1},
    {2, 3, 1, 0},
    {2, 3, 0, 1},
    {3, 1, 2, 0},
    {3, 2, 0, 1},
    {3, 0, 1, 2},
    {3, 0, 2, 1}
static const __constant float ccnt[16] = {
    1.34375f,
    1.28125f,
    1.359375f,
    1.3671875f,
    1.4296875f,
    1.3984375f,
    1.3828125f,
    1.3046875f,
    1.4140625f,
    1.2734375f,
    1.2578125f,
    1.2890625f,
    1.3203125f,
    1.3515625f,
    1.3359375f,
    1.4609375f
struct SharedMemChunk
    int4 out[16];
    float4 va[16];
__attribute__((reqd_work_group_size(WORKSIZE_GPU * 16, 1, 1)))
__kernel void cn1_cn_gpu(__global int *lpad_in, __global int *spad, uint numThreads)
    const uint gIdx = getIdx();
#   if (COMP_MODE==1)
    if (gIdx / 16 >= numThreads) {
        return;
#   endif
    uint chunk = get_local_id(0) / 16;
    __global int* lpad = (__global int*)((__global char*)lpad_in + MEMORY * (gIdx/16));
    __local struct SharedMemChunk smem_in[WORKSIZE_GPU];
    __local struct SharedMemChunk* smem = smem_in + chunk;
    uint tid = get_local_id(0) % 16;
    uint idxHash = gIdx/16;
    uint s = ((__global uint*)spad)[idxHash * 50] >> 8;
    float4 vs = (float4)(0);
    // tid divided
    const uint tidd = tid / 4;
    // tid modulo
    const uint tidm = tid % 4;
    const uint block = tidd * 16 + tidm;
    #pragma unroll 1
    for(size_t i = 0; i < 0xC000; i++)
        mem_fence(CLK_LOCAL_MEM_FENCE);
        int tmp = ((__global int*)scratchpad_ptr(s, tidd, lpad))[tidm];
        ((__local int*)(smem->out))[tid] = tmp;
        mem_fence(CLK_LOCAL_MEM_FENCE);
        {
            single_comupte_wrap(
                tidm,
                *(smem->out + look[tid][0]),
                *(smem->out + look[tid][1]),
                *(smem->out + look[tid][2]),
                *(smem->out + look[tid][3]),
                ccnt[tid], vs, smem->va + tid,
                smem->out + tid
            );
        }
        mem_fence(CLK_LOCAL_MEM_FENCE);
        int outXor = ((__local int*)smem->out)[block];
        for(uint dd = block + 4; dd < (tidd + 1) * 16; dd += 4)
            outXor ^= ((__local int*)smem->out)[dd];
        ((__global int*)scratchpad_ptr(s, tidd, lpad))[tidm] = outXor ^ tmp;
        ((__local int*)smem->out)[tid] = outXor;
        float va_tmp1 = ((__local float*)smem->va)[block] + ((__local float*)smem->va)[block + 4];
        float va_tmp2 = ((__local float*)smem->va)[block+ 8] + ((__local float*)smem->va)[block + 12];
        ((__local float*)smem->va)[tid] = va_tmp1 + va_tmp2;
        mem_fence(CLK_LOCAL_MEM_FENCE);
        int out2 = ((__local int*)smem->out)[tid] ^ ((__local int*)smem->out)[tid + 4 ] ^ ((__local int*)smem->out)[tid + 8] ^ ((__local int*)smem->out)[tid + 12];
        va_tmp1 = ((__local float*)smem->va)[block] + ((__local float*)smem->va)[block + 4];
        va_tmp2 = ((__local float*)smem->va)[block + 8] + ((__local float*)smem->va)[block + 12];
        va_tmp1 = va_tmp1 + va_tmp2;
        va_tmp1 = fabs(va_tmp1);
        float xx = va_tmp1 * 16777216.0f;
        int xx_int = (int)xx;
        ((__local int*)smem->out)[tid] = out2 ^ xx_int;
        ((__local float*)smem->va)[tid] = va_tmp1 / 64.0f;
        mem_fence(CLK_LOCAL_MEM_FENCE);
        vs = smem->va[0];
        s = smem->out[0].x ^ smem->out[0].y ^ smem->out[0].z ^ smem->out[0].w;
static const __constant uint skip[3] = {
    20,22,22
inline void generate_512(uint idx, __local ulong* in, __global ulong* out)
    ulong hash[25];
    hash[0] = in[0] ^ idx;
    for(int i = 1; i < 25; ++i)
        hash[i] = in[i];
    for(int a = 0; a < 3;++a)
        keccakf1600_1(hash);
        for(int i = 0; i < skip[a]; ++i)
            out[i] = hash[i];
        out+=skip[a];
__attribute__((reqd_work_group_size(8, 8, 1)))
__kernel void cn0_cn_gpu(__global ulong *input, __global int *Scratchpad, __global ulong *states, uint Threads)
    const uint gIdx = getIdx();
    __local ulong State_buf[8 * 25];
    __local ulong* State = State_buf + get_local_id(0) * 25;
#   if (COMP_MODE==1)
    // do not use early return here
    if(gIdx < Threads)
#   endif
        states += 25 * gIdx;
        Scratchpad = (__global int*)((__global char*)Scratchpad + MEMORY * gIdx);
        if (get_local_id(1) == 0)
        {
// NVIDIA
#ifdef __NV_CL_C_VERSION
            for(uint i = 0; i < 8; ++i)
                State[i] = input[i];
            ((__local ulong8 *)State)[0] = vload8(0, input);
#endif
            State[8]  = input[8];
            State[9]  = input[9];
            State[10] = input[10];
            ((__local uint *)State)[9]  &= 0x00FFFFFFU;
            ((__local uint *)State)[9]  |= (((uint)get_global_id(0)) & 0xFF) << 24;
            ((__local uint *)State)[10] &= 0xFF000000U;
            /* explicit cast to `uint` is required because some OpenCL implementations (e.g. NVIDIA)
             * handle get_global_id and get_global_offset as signed long long int and add
             * 0xFFFFFFFF... to `get_global_id` if we set on host side a 32bit offset where the first bit is `1`
             * (even if it is correct casted to unsigned on the host)
             */
            ((__local uint *)State)[10] |= (((uint)get_global_id(0) >> 8));
            for (int i = 11; i < 25; ++i) {
                State[i] = 0x00UL;
            }
            // Last bit of padding
            State[16] = 0x8000000000000000UL;
            keccakf1600_2(State);
            #pragma unroll
            for (int i = 0; i < 25; ++i) {
                states[i] = State[i];
            }
        }
__attribute__((reqd_work_group_size(64, 1, 1)))
__kernel void cn00_cn_gpu(__global int *Scratchpad, __global ulong *states)
    const uint gIdx = getIdx() / 64;
    __local ulong State[25];
    states += 25 * gIdx;
    Scratchpad = (__global int*)((__global char*)Scratchpad + MEMORY * gIdx);
    for(int i = get_local_id(0); i < 25; i+=get_local_size(0))
        State[i] = states[i];
    barrier(CLK_LOCAL_MEM_FENCE);
    for(uint i = get_local_id(0); i < MEMORY / 512; i += get_local_size(0))
        generate_512(i, State, (__global ulong*)((__global uchar*)Scratchpad + i*512));
__attribute__((reqd_work_group_size(8, 8, 1)))
__kernel void cn2_cn_gpu(__global uint4 *Scratchpad, __global ulong *states, __global uint *output, ulong Target, uint Threads)
    __local uint AES0[256], AES1[256], AES2[256], AES3[256];
    uint ExpandedKey2[40];
    uint4 text;
    const uint gIdx = getIdx();
    for (int i = get_local_id(1) * 8 + get_local_id(0); i < 256; i += 8 * 8) {
        const uint tmp = AES0_C[i];
        AES0[i] = tmp;
        AES1[i] = rotate(tmp, 8U);
        AES2[i] = rotate(tmp, 16U);
        AES3[i] = rotate(tmp, 24U);
    barrier(CLK_LOCAL_MEM_FENCE);
    __local uint4 xin1[8][8];
    __local uint4 xin2[8][8];
#   if (COMP_MODE==1)
    // do not use early return here
    if(gIdx < Threads)
#   endif
        states += 25 * gIdx;
        Scratchpad += gIdx * (MEMORY >> 4);
        #if defined(__Tahiti__) || defined(__Pitcairn__)
        for(int i = 0; i < 4; ++i) ((ulong *)ExpandedKey2)[i] = states[i + 4];
        text = vload4(get_local_id(1) + 4, (__global uint *)states);
        #else
        text = vload4(get_local_id(1) + 4, (__global uint *)states);
        ((uint8 *)ExpandedKey2)[0] = vload8(1, (__global uint *)states);
        #endif
        AESExpandKey256(ExpandedKey2);
    barrier(CLK_LOCAL_MEM_FENCE);
    __local uint4* xin1_store = &xin1[get_local_id(1)][get_local_id(0)];
    __local uint4* xin1_load = &xin1[(get_local_id(1) + 1) % 8][get_local_id(0)];
    __local uint4* xin2_store = &xin2[get_local_id(1)][get_local_id(0)];
    __local uint4* xin2_load = &xin2[(get_local_id(1) + 1) % 8][get_local_id(0)];
    *xin2_store = (uint4)(0, 0, 0, 0);
#   if (COMP_MODE == 1)
    // do not use early return here
    if (gIdx < Threads)
#   endif
        #pragma unroll 2
        for(int i = 0, i1 = get_local_id(1); i < (MEMORY >> 7); ++i, i1 = (i1 + 16) % (MEMORY >> 4))
        {
            text ^= Scratchpad[(uint)i1];
            barrier(CLK_LOCAL_MEM_FENCE);
            text ^= *xin2_load;
            #pragma unroll 10
            for(int j = 0; j < 10; ++j)
                text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
            *xin1_store = text;
            text ^= Scratchpad[(uint)i1 + 8u];
            barrier(CLK_LOCAL_MEM_FENCE);
            text ^= *xin1_load;
            #pragma unroll 10
            for(int j = 0; j < 10; ++j)
                text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
            *xin2_store = text;
        }
        barrier(CLK_LOCAL_MEM_FENCE);
        text ^= *xin2_load;
    /* Also left over threads performe this loop.
     * The left over thread results will be ignored
     */
    #pragma unroll 16
    for(size_t i = 0; i < 16; i++)
        #pragma unroll 10
        for (int j = 0; j < 10; ++j) {
            text = AES_Round(AES0, AES1, AES2, AES3, text, ((uint4 *)ExpandedKey2)[j]);
        }
        barrier(CLK_LOCAL_MEM_FENCE);
        *xin1_store = text;
        barrier(CLK_LOCAL_MEM_FENCE);
        text ^= *xin1_load;
    __local ulong State_buf[8 * 25];
#   if (COMP_MODE==1)
    // do not use early return here
    if(gIdx < Threads)
#   endif
        vstore2(as_ulong2(text), get_local_id(1) + 4, states);
    barrier(CLK_GLOBAL_MEM_FENCE);
#   if (COMP_MODE==1)
    // do not use early return here
    if(gIdx < Threads)
#   endif
        if(!get_local_id(1))
        {
            __local ulong* State = State_buf + get_local_id(0) * 25;
            for(int i = 0; i < 25; ++i) State[i] = states[i];
            keccakf1600_2(State);
            if(State[3] <= Target)
            {
                ulong outIdx = atomic_inc(output + 0xFF);
                if(outIdx < 0xFF)
                    output[outIdx] = get_global_id(0);
            }
        }
    mem_fence(CLK_GLOBAL_MEM_FENCE);
XMRIG_INCLUDE_WOLF_SKEIN
XMRIG_INCLUDE_GROESTL256
AMD GPU #%zu: intensity is not a multiple of 'worksize', auto reduce intensity to %zu
clBuildProgram
clCreateCommandQueue
Error %s when calling clEnqueueWriteBuffer to fill input buffer.
Error %s when calling clEnqueueWriteBuffer to fetch results.
clCreateBuffer
clCreateCommandQueueWithProperties
Error %s when calling clEnqueueWriteBuffer to zero branch buffer counter %d.
Error %s when calling clEnqueueNDRangeKernel for kernel %d.
Error %s when calling clEnqueueNDRangeKernel for kernel %d.
Error %s when calling clEnqueueNDRangeKernel for kernel %d.
Error %s when calling clEnqueueNDRangeKernel for kernel %d.
Error %s when calling clEnqueueNDRangeKernel for kernel %d.
Error %s when calling %s.
2.14.6
clCreateContext
clCreateKernel
clCreateProgramWithBinary
clCreateProgramWithSource
clEnqueueNDRangeKernel
clEnqueueReadBuffer
clEnqueueWriteBuffer
clFinish
api-id
clGetDeviceIDs
clGetDeviceInfo
clGetKernelInfo
clGetPlatformIDs
config
clGetPlatformInfo
syslog
clGetProgramBuildInfo
clGetProgramInfo
rig-id
clReleaseCommandQueue
clReleaseContext
colors
clReleaseKernel
clReleaseMemObject
clReleaseProgram
syslog
clSetKernelArg
Failed to load OpenCL runtime: %s
cn/xtl
Error %s when calling %s, param 0x%04x
Error %s when calling clCreateKernel for kernel %s.
Error %s when calling clGetPlatformIDs for number of platforms.
No OpenCL platform found.
cn/msr
Advanced Micro Devices
"%s" hash self-test failed.
Failed to set system timer resolution.
Failed to start threads.
cn/xao
[01;33mpaused
[0m, press 
[01;35mr
[0m to resume
cn/rto
paused, press 'r' to resume
[01;32mresumed
resumed
Ctrl+C received, exiting
cn/wow
SIGHUP received, exiting
cn/rwz
SIGTERM received, exiting
cn/zls
SIGINT received, exiting
cn/gpu
XMRig-AMD 2.14.6
 built on Aug 31 2019 with MSVC
 features: 64-bit AES
libuv/%s
microhttpd/%s
--version
Usage: xmrig-amd [OPTIONS]
Options:
  -a, --algo=ALGO              specify the algorithm to use
                                 cryptonight
                                 cryptonight-lite
                                 cryptonight-heavy
  -o, --url=URL                URL of mining server
  -O, --userpass=U:P           username:password pair for mining server
  -u, --user=USERNAME          username for mining server
  -p, --pass=PASSWORD          password for mining server
      --rig-id=ID              rig identifier for pool-side statistics (needs pool support)
  -k, --keepalive              send keepalived for prevent timeout (needs pool support)
      --nicehash               enable nicehash.com support
      --tls                    enable SSL/TLS support (needs pool support)
      --tls-fingerprint=F      pool TLS certificate fingerprint, if set enable strict certificate pinning
  -r, --retries=N              number of times to retry before switch to backup server (default: 5)
  -R, --retry-pause=N          time to pause between retries (default: 5)
      --opencl-devices=N       list of OpenCL devices to use.
      --opencl-launch=IxW      list of launch config, intensity and worksize
      --opencl-strided-index=N list of strided_index option values for each thread
      --opencl-mem-chunk=N     list of mem_chunk option values for each thread
      --opencl-comp-mode=N     list of comp_mode option values for each thread
      --opencl-affinity=N      list of affinity GPU threads to a CPU
      --opencl-platform=N      OpenCL platform index
      --opencl-loader=N        path to OpenCL-ICD-Loader (OpenCL.dll or libOpenCL.so)
      --print-platforms        print available OpenCL platforms and exit
      --no-cache               disable OpenCL cache
      --no-color               disable colored output
      --variant                algorithm PoW variant
      --donate-level=N         donate level, default 5%% (5 minutes in 100 minutes)
      --user-agent             set custom user-agent string for pool
  -B, --background             run the miner in the background
  -c, --config=FILE            load a JSON-format configuration file
  -l, --log-file=FILE          log all output to a file
      --print-time=N           print hashrate report every N seconds
      --api-port=N             port for the miner API
      --api-access-token=T     access token for API
      --api-worker-id=ID       custom worker-id for API
      --api-id=ID              custom instance ID for API
      --api-ipv6               enable IPv6 support for API
      --api-no-restricted      enable full remote access (only if API token set)
      --dry-run                test configuration and exit
  -h, --help                   display this help and exit
  -V, --version                output version information and exit
enabled
tls-fingerprint
keepalive
double
nicehash
variant
stratum+tcp://
stratum+ssl://
.nicehash.com
cryptonight.
cryptonightv7.
cryptonightheavy.
cryptonightv8.
.minergate.com
xmr.pool.
aeon.pool.
[1;32m * 
[1;37mPOOL #%-7zu
[1;%dm%s
[0m variant 
[1;37m%s
 * POOL #%-7zu%s%s variant=%s %s
0.0.0.0
API BIND
[1;32m * 
[1;37m%-13s
[0;36m%s:
[1;36m%d
 * %-13s%s:%d
MSVC/%d
XMRig-AMD
[1;32m * 
[1;37m%-13s
[1;36m%s/%s
[1;37m %s
 * %-13s%s/%s %s
submit
OpenCL/%s 
microhttpd/%s 
[1;32m * 
[1;37m%-13slibuv/%s %s
method
 * %-13slibuv/%s %s
configuration saved to: "%s"
POSIXLY_CORRECT
api-access-token
job_id
api-port
result
api-worker-id
api-ipv6
params
api-no-restricted
job_id
background
donate-level
dry-run
keepalive
target
log-file
height
nicehash
height
no-color
method
no-watch
params
variant
print-time
retries
retry-pause
result
user-agent
userpass
params
tls-fingerprint
opencl-affinity
opencl-devices
opencl-launch
opencl-platform
opencl-strided-index
opencl-mem-chunk
method
opencl-unroll-factor
opencl-unroll
opencl-comp-mode
NVIDIA
no-cache
colors
print-platforms
opencl-loader
background
donate-level
dry-run
log-file
syslog
print-time
retries
retry-pause
user-agent
opencl-platform
opencl-loader
autosave
manual
access-token
worker-id
restricted
%s: unsupported non-option argument '%s'
config.json
No valid algorithm specified. Exiting.
No valid configuration found. Exiting.
%s<offset:%zu>: "%s"
unable to open "%s".
ambiguous option -- %.*s
%03.1f
option doesn't take an argument -- %.*s
unknown option -- %c
option requires an argument -- %s
unroll
unknown option -- %s
option requires an argument -- %c
a:c:khBp:Px:r:R:s:T:o:u:O:Vl:S
reloading failed
"%s" was changed, reloading configuration
GenuineIntel
AuthenticAMD
cryptonight
cryptonight/0
cryptonight/1
cryptonight/xtl
cryptonight/msr
cryptonight/xao
cryptonight/rto
cryptonight/2
cn/half
cryptonight/half
/xmrig
cn/xtlv9
cryptonight/xtlv9
cryptonight/wow
cryptonight/r
cryptonight/rwz
cryptonight/zls
cn/double
2.14.6
cryptonight/double
cn-lite
cryptonight-lite
cn-light
uptime
cryptonight-light
2.14.6
cn-lite/0
cryptonight-lite/0
cn-lite/1
cryptonight-lite/1
cn-heavy
cryptonight-heavy
cn-heavy/0
cryptonight-heavy/0
cn-heavy/xhv
cryptonight-heavy/xhv
cn-heavy/tube
cryptonight-heavy/tube
cn-pico/trtl
cryptonight-pico/trtl
cn-pico
cryptonight-pico
cn-trtl
cryptonight-turtle
cn-ultralite
cryptonight-ultralite
cn_turtle
cryptonight_turtle
cryptonight/gpu
invalid
[%d-%02d-%02d %02d:%02d:%02d]%s %s%s
[%d-%02d-%02d %02d:%02d:%02d]%s %s%s
[%d-%02d-%02d %02d:%02d:%02d]%s %s%s
[0;31m
[1;37m
[0;33m
[1;30m
jsonrpc
Unauthenticated
IP Address currently banned
your IP is banned
variant
variant
[%s] duplicate job received, reconnect
extensions
extensions
Unknown/unsupported algorithm detected, reconnect
m@Incompatible algorithm "%s" detected, reconnect
[%s] send failed: "send buffer overflow: %zu > %zu"
[%s:%u] getaddrinfo error: "%s"
jsonrpc
[%s] JSON decode failed
[%s] JSON decode failed: "%s"
nicehash
[%s] error: "%s", code: %d
message
[%s] unsupported method: "%s"
message
[%s] login error code: %d
[%s] error: "%s", code: %d
[%s] connect error: "%s"
{"id":%lld,"jsonrpc":"2.0","method":"keepalived","params":{"id":"%s"}}
[%s] DNS error: "%s"
[%s] read error: "%s"
[%s] DNS error: "No IPv4 (A) or IPv6 (AAAA) records found"
OpenCL.dll
[1;31m
compiling code and initializing GPUs. This will take a while...
%s%s OpenCL platform NOT found.
[1;31m
%sSelected OpenCL platform index %d doesn't exist.
access-token
worker-id
restricted
autosave
background
donate-level
opencl-platform
log-file
opencl-loader
retries
print-time
threads
retry-pause
user-agent
intensity
threads
Selected OpenCL device index %zu doesn't exist.
dev donate started
[1;37muse pool 
[1;36m%s:%d 
[1;32m%s
[1;30m%s 
[1;30m
use pool %s:%d %s %s
%sfingerprint (SHA-256): "%s"
no active pools, stop mining
dev donate finished
rejected (%lld/%lld) diff %u "%s" (%llu ms)
[1;31mrejected
[0m (%lld/%lld) diff 
[1;37m%u
[31m"%s"
[1;30m(%llu ms)
accepted (%lld/%lld) diff %u (%llu ms)
[1;32maccepted
[0m (%lld/%lld) diff 
[1;37m%u
[1;30m(%llu ms)
new job from %s:%d diff %d algo %s height %llu
new job from %s:%d diff %d algo %s
[1;35mnew job
[0m from 
[1;37m%s:%d
[0m diff 
[1;37m%d
[0m algo 
[1;37m%s
[0m height 
[1;37m%llu
donate.v2.xmrig.com
[1;35mnew job
[0m from 
[1;37m%s:%d
[0m diff 
[1;37m%d
[0m algo 
[1;37m%s
[1;31m-
[1;32m
[1;31m-
[1;32m
[1;32m * 
[1;37m%-13s
[1;37m%s %sx64 %sAES
 * %-13s%s %sx64 %sAES
[1;31m
[1;32m * 
[1;37m%-13s%s, %sdonate=%d%%
 * COMMANDS     'h' hashrate, 'p' pause, 'r' resume
[1;32m * 
[1;37mCOMMANDS     
[1;35mh
[1;37mashrate, 
[1;35mp
[1;37mause, 
[1;35mr
[1;37mesume
 * %-13s%s, %sdonate=%d%%
[1;37mspeed
[0m 10s/60s/15m 
[1;36m%s
[0;36m %s %s 
[1;36mH/s
[0m max 
[1;36m%s H/s
speed 10s/60s/15m %s %s %s H/s max %s H/s
affine_to_cpu
comp_mode
mem_chunk
intensity
strided_index
worksize
[1;37m
%s| THREAD | GPU | 10s H/s | 60s H/s | 15m H/s |
[1;33m
| %6zu | %3zu | %7s | %7s | %7s |
/.cache
%sTHREAD #%zu: "strided_index":1 is not compatible with CryptoNight variant 2
RtlGetVersion
XMRig-AMD
; Win64; x64) libuv/%s
%s/%s (Windows NT %lu.%lu
Unable to set affinity. Windows supports only affinity up to 63.
 msvc/%d
Huge pages support was successfully enabled, but reboot required to use it
Sb*kA?AT?*
0Hx(x`(07
$~Z6ZH6$
tX4Fr.rh.46Aw-wl-6
cB pP0P@0 
&y_5_L5&
.eK9K\9.
2O}+}d+2
k(lD<DP<(
r\8Tl$lp$8W_
>]c!c|!>
:Si'it':'
+"wU3UD3"
-<Zf"fx"<
m,bN:NX:,
~	L#'Q&
)l\^'-
This is a test This is a test This is a test
Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.
recW~|
Zn80hJs
Pmb=:z
qmdb*4+
:oOQn3
L&&jl66Z~??A
Oh44\Q
sb11S*
uB!!c 
D""fT**~;
;d22Vt::N
J%%o\..r8
gg}V++
jL&&Zl66A~??
Sb11?*
tX,,.4
RRMv;;a
MMUf33
PPDx<<
cB!!0 
~~Gz==
fD""~T**
Vd22Nt::
xxoJ%%r\..$8
ppB|>>
aa_j55
UUxP((z
&jL&6Zl6?A~?
~=Gz=d
"fD"*~T*
2Vd2:Nt:
x%oJ%.r\.
a5_j5W
=&&jL66Zl??A~
g99KrJJ
==Gzdd
""fD**~T
22Vd::Nt
$$lH\\
77Ynmm
%%oJ..r\
55_jWW
IQUM."
Q	sa~jW
/1/config
/1/threads
/1/config
failures
error_log
highest
threads
connection
worker_id
hashrate
sockets
version
hugepages
donate_level
shares_total
avg_time
diff_current
shares_good
error_log
results
hashes_total
hashrate
threads
HTTP Daemon failed to start.
OPTIONS
application/json
Content-Type
Content-Type
application/json
GET, PUT
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Authorization
Bearer 
Authorization, Content-Type
Access-Control-Allow-Headers
error: %1!d!
0123456789ABCDEF
0123456789abcdef
%u.%u.%u.%u
0123456789
abcdefghijklmnopqrstuvwxyz0123456789
vector<T> too long
invalid string position
string too long
CL_SUCCESS
CL_DEVICE_NOT_FOUND
CL_DEVICE_NOT_AVAILABLE
CL_COMPILER_NOT_AVAILABLE
CL_MEM_OBJECT_ALLOCATION_FAILURE
CL_OUT_OF_RESOURCES
CL_OUT_OF_HOST_MEMORY
CL_PROFILING_INFO_NOT_AVAILABLE
CL_MEM_COPY_OVERLAP
CL_IMAGE_FORMAT_MISMATCH
CL_IMAGE_FORMAT_NOT_SUPPORTED
CL_BUILD_PROGRAM_FAILURE
CL_MAP_FAILURE
CL_MISALIGNED_SUB_BUFFER_OFFSET
CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
CL_COMPILE_PROGRAM_FAILURE
CL_LINKER_NOT_AVAILABLE
CL_LINK_PROGRAM_FAILURE
CL_DEVICE_PARTITION_FAILED
CL_KERNEL_ARG_INFO_NOT_AVAILABLE
CL_INVALID_VALUE
CL_INVALID_DEVICE_TYPE
CL_INVALID_PLATFORM
CL_INVALID_DEVICE
CL_INVALID_CONTEXT
CL_INVALID_QUEUE_PROPERTIES
CL_INVALID_COMMAND_QUEUE
CL_INVALID_HOST_PTR
CL_INVALID_MEM_OBJECT
CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
CL_INVALID_IMAGE_SIZE
CL_INVALID_SAMPLER
CL_INVALID_BINARY
CL_INVALID_BUILD_OPTIONS
CL_INVALID_PROGRAM
CL_INVALID_PROGRAM_EXECUTABLE
CL_INVALID_KERNEL_NAME
CL_INVALID_KERNEL_DEFINITION
CL_INVALID_KERNEL
CL_INVALID_ARG_INDEX
CL_INVALID_ARG_VALUE
CL_INVALID_ARG_SIZE
CL_INVALID_KERNEL_ARGS
CL_INVALID_WORK_DIMENSION
CL_INVALID_WORK_GROUP_SIZE
CL_INVALID_WORK_ITEM_SIZE
CL_INVALID_GLOBAL_OFFSET
CL_INVALID_EVENT_WAIT_LIST
CL_INVALID_EVENT
CL_INVALID_OPERATION
CL_INVALID_GL_OBJECT
CL_INVALID_BUFFER_SIZE
CL_INVALID_MIP_LEVEL
CL_INVALID_GLOBAL_WORK_SIZE
CL_INVALID_PROPERTY
CL_INVALID_IMAGE_DESCRIPTOR
CL_INVALID_COMPILER_OPTIONS
CL_INVALID_LINKER_OPTIONS
CL_INVALID_DEVICE_PARTITION_COUNT
CL_INVALID_PIPE_SIZE
CL_INVALID_DEVICE_QUEUE
UNKNOWN_ERROR
vector<bool> too long
xdigit
()$^.*+?[]|\-{},:=!
No error.
The document is empty.
The document root must not be followed by other values.
Invalid value.
Missing a name for object member.
Missing a colon after a name of object member.
Missing a comma or '}' after an object member.
Missing a comma or ']' after an array element.
Incorrect hex digit after \u escape in string.
The surrogate pair in string is invalid.
Invalid escape character in string.
Missing a closing quotation mark in string.
Invalid encoding in string.
Number too big to be stored in double.
Miss fraction part in number.
Miss exponent in number.
Terminate parsing due to Handler error.
Unspecific syntax error.
Unknown error.
                
																\\\\\\\\\\\\\\\\<
""""""""""""""""
9Y>)F$
s\ax}?
tC7Ddx
xg^Jp5|
{zel#|67
invalid map<K, T> key
map/set<T> too long
0123456789ABCDEFuuuuuuuubtnufruuuuuuuuuuuuuuuuuu
00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899x
THREAD #%d COMPUTE ERROR
list<T> too long
no error
Unknown system error %d
Unknown system error
argument list too long
address already in use
permission denied
address family not supported
address not available
temporary failure
resource temporarily unavailable
invalid value for hints
bad ai_flags value
permanent failure
request canceled
out of memory
ai_family not supported
unknown node or service
no address
resolved protocol is unknown
argument buffer overflow
socket type not supported
service not available for socket type
bad file descriptor
connection already in progress
operation canceled
resource busy or locked
software caused connection abort
invalid Unicode character
connection reset by peer
connection refused
file already exists
destination address required
file too large
bad address in system call argument
interrupted system call
host is unreachable
i/o error
invalid argument
illegal operation on a directory
socket is already connected
too many open files
too many symbolic links encountered
name too long
message too long
network is unreachable
network is down
no buffer space available
file table overflow
no such file or directory
no such device
machine is not on the network
not enough memory
no space left on device
protocol not available
socket is not connected
function not implemented
directory not empty
not a directory
operation not supported on socket
socket operation on non-socket
broken pipe
operation not permitted
protocol not supported
protocol error
result too large
protocol wrong type for socket
cannot send after transport endpoint shutdown
read-only file system
no such process
invalid seek
text file is busy
connection timed out
unknown error
cross-device link not permitted
no such device or address
end of file
host is down
too many links
inappropriate ioctl for device
remote I/O error
inappropriate file type or format
GetQueuedCompletionStatus
GetQueuedCompletionStatusEx
conout$
PostQueuedCompletionStatus
uv__malloc
1.31.0
WaitForSingleObject
CreateEvent
ReleaseSemaphore
UV_THREADPOOL_SIZE
QueueUserWorkItem
0.0.0.0
getsockopt
WSAStartup
socket
closesocket
Unknown error
(%d) %s
%s: (%d) %s
ntdll.dll
RtlGetVersion
GetModuleHandleA
GetProcAddress
RtlNtStatusToDosError
NtQueryInformationFile
NtDeviceIoControlFile
NtQueryVolumeInformationFile
NtSetInformationFile
NtQuerySystemInformation
NtQueryDirectoryFile
kernel32.dll
NtQueryInformationProcess
PowerRegisterSuspendResumeNotification
powrprof.dll
SetWinEventHook
user32.dll
UnregisterWaitEx
.text$di
.text$mn
.text$mn$00
.text$x
.text$yd
.idata$5
.00cfg
.CRT$XCA
.CRT$XCAA
.CRT$XCC
.CRT$XCL
.CRT$XCU
.CRT$XCZ
.CRT$XIA
.CRT$XIAA
.CRT$XIAC
.CRT$XIC
.CRT$XIZ
.CRT$XLA
.CRT$XLZ
.CRT$XPA
.CRT$XPB
.CRT$XPX
.CRT$XPXA
.CRT$XPZ
.CRT$XTA
.CRT$XTZ
.rdata
.rdata$T
.rdata$r
.rdata$zzzdbg
.rtc$IAA
.rtc$IZZ
.rtc$TAA
.rtc$TZZ
.tls$ZZZ
.xdata
.xdata$x
.idata$2
.idata$3
.idata$4
.idata$6
.data$r
.pdata
_TEXT_CNV2_MAINLOOP
_TEXT_CN_TEMPLATE
.rsrc$01
.rsrc$02
KERNEL32.DLL
ADVAPI32.dll
IPHLPAPI.DLL
SHELL32.dll
USER32.dll
WINMM.dll
WS2_32.dll
SetStdHandle
GetCommandLineW
GetCommandLineA
RtlPcToFileHeader
RtlUnwindEx
GetConsoleCP
QueryDepthSList
InterlockedFlushSList
InterlockedPushEntrySList
InterlockedPopEntrySList
GetFileAttributesExW
SetFileAttributesW
LoadLibraryW
ExitThread
FreeLibraryAndExitThread
GetThreadTimes
GetProcessAffinityMask
GetNumaHighestNodeNumber
DeleteTimerQueueTimer
GetStdHandle
SetConsoleMode
GetConsoleMode
CloseHandle
FreeConsole
GetConsoleWindow
MultiByteToWideChar
SetThreadAffinityMask
GetCurrentProcess
SetThreadPriority
GetCurrentThread
GetProcAddress
GetModuleHandleW
VirtualProtect
VirtualFree
VirtualAlloc
LocalAlloc
GetLastError
LocalFree
FlushInstructionCache
FreeLibrary
FormatMessageA
LoadLibraryExW
SetErrorMode
GetQueuedCompletionStatus
PostQueuedCompletionStatus
GetQueuedCompletionStatusEx
CreateIoCompletionPort
GetConsoleScreenBufferInfo
SetConsoleTextAttribute
RegisterWaitForSingleObject
UnregisterWait
GetConsoleCursorInfo
CreateFileW
DuplicateHandle
QueueUserWorkItem
SetConsoleCursorInfo
FillConsoleOutputCharacterW
ReadConsoleInputW
CreateFileA
ReadConsoleW
WriteConsoleInputW
FillConsoleOutputAttribute
WriteConsoleW
GetNumberOfConsoleInputEvents
WideCharToMultiByte
SetConsoleCursorPosition
GetLongPathNameW
GetShortPathNameW
GetFileAttributesW
GetCurrentDirectoryW
ReadDirectoryChangesW
VerifyVersionInfoA
EnterCriticalSection
GetModuleFileNameW
SetEnvironmentVariableW
LeaveCriticalSection
InitializeCriticalSection
GetVersionExW
FreeEnvironmentStringsW
QueryPerformanceFrequency
GetModuleHandleExW
GetSystemInfo
VerSetConditionMask
GetCurrentProcessId
GetSystemTimeAsFileTime
QueryPerformanceCounter
GetEnvironmentStringsW
SetConsoleCtrlHandler
GetFileType
CreateDirectoryW
ReadFile
GetFileInformationByHandleEx
FindFirstFileW
GetFileSizeEx
SetLastError
FindNextFileW
WriteFile
GetDiskFreeSpaceW
DeviceIoControl
RemoveDirectoryW
GetFinalPathNameByHandleW
SetFileTime
ReOpenFile
CreateHardLinkW
FindClose
UnmapViewOfFile
GetFileInformationByHandle
FlushViewOfFile
SetFilePointerEx
CreateFileMappingA
RtlUnwind
CopyFileW
CreateSymbolicLinkW
MapViewOfFile
FlushFileBuffers
SleepConditionVariableCS
TryEnterCriticalSection
TlsSetValue
ReleaseSemaphore
WakeConditionVariable
InitializeConditionVariable
WaitForSingleObject
ResumeThread
SetEvent
TlsAlloc
GetNativeSystemInfo
DeleteCriticalSection
CreateSemaphoreW
TlsGetValue
TlsFree
CreateSemaphoreA
CreateEventA
CancelIo
SetHandleInformation
SetFileCompletionNotificationModes
SetNamedPipeHandleState
CreateNamedPipeW
PeekNamedPipe
CancelSynchronousIo
GetNamedPipeHandleStateA
CancelIoEx
SwitchToThread
ConnectNamedPipe
DebugBreak
GetModuleHandleA
LoadLibraryA
TerminateProcess
UnregisterWaitEx
LCMapStringW
GetExitCodeProcess
GetStartupInfoW
InitializeCriticalSectionAndSpinCount
GetCurrentThreadId
GetTickCount64
RaiseException
ChangeTimerQueueTimer
CreateTimerQueueTimer
GetLogicalProcessorInformation
GetThreadPriority
CreateThread
SignalObjectAndWait
CreateTimerQueue
InitializeSListHead
IsDebuggerPresent
IsProcessorFeaturePresent
ExitProcess
HeapAlloc
HeapFree
IsValidLocale
GetUserDefaultLCID
EnumSystemLocalesW
HeapReAlloc
GetTimeZoneInformation
HeapSize
FindFirstFileExW
IsValidCodePage
GetACP
GetOEMCP
GetProcessHeap
SetEndOfFile
MoveFileExW
WaitForSingleObjectEx
CreateEventW
GetTickCount
EncodePointer
DecodePointer
GetCPInfo
CompareStringW
GetLocaleInfoW
GetStringTypeW
RtlCaptureContext
RtlLookupFunctionEntry
RtlVirtualUnwind
UnhandledExceptionFilter
SetUnhandledExceptionFilter
CryptAcquireContextA
CryptGenRandom
CryptReleaseContext
LookupPrivilegeValueW
AdjustTokenPrivileges
OpenProcessToken
LsaOpenPolicy
LsaAddAccountRights
LsaClose
GetTokenInformation
GetAdaptersAddresses
SHGetSpecialFolderPathA
DispatchMessageA
GetMessageA
ShowWindow
GetSystemMetrics
TranslateMessage
MapVirtualKeyW
timeGetDevCaps
timeBeginPeriod
timeEndPeriod
WSAPoll
WSARecvFrom
WSAIoctl
WSASend
WSASocketW
WSARecv
FreeAddrInfoW
GetAddrInfoW
Copyright (c) by P.J. Plauger, licensed by Dinkumware, Ltd. ALL RIGHTS RESERVED.
                          
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
                          
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Switching Protocols
Processing
Continue
Accepted
Non-Authoritative Information
Created
Partial Content
Multi-Status
No Content
Reset Content
Unknown
Unknown
Already Reported
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
IM Used
Multiple Choices
Unknown
Unknown
See Other
Not Modified
Moved Permanently
Temporary Redirect
Permanent Redirect
Use Proxy
Switch Proxy
Payment Required
Forbidden
Bad Request
Unauthorized
Not Acceptable
Proxy Authentication Required
Not Found
Method Not Allowed
Length Required
Request Timeout
Conflict
URI Too Long
Unsupported Media Type
Precondition Failed
Payload Too Large
Unknown
Unknown
Range Not Satisfiable
Expectation Failed
Unprocessable Entity
Locked
Unknown
Misdirected Request
Upgrade Required
Unknown
Failed Dependency
Unordered Collection
Unknown
Request Header Fields Too Large
Precondition Required
Too Many Requests
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
No Response
Unknown
Blocked by Windows Parental Controls
Unavailable For Legal Reasons
Unknown
Retry With
Bad Gateway
Service Unavailable
Internal Server Error
Not Implemented
Variant Also Negotiates
Insufficient Storage
Gateway Timeout
HTTP Version Not Supported
Not Extended
Network Authentication Required
Loop Detected
Bandwidth Limit Exceeded
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Winsock version 2.2 is not available
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to initialize winsock
%x.%x.%x
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to destroy ITC.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to join a thread
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to signal shutdown via inter-thread communication channel
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
0 == daemon->worker_pool_size
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
MHD_ITC_IS_INVALID_(daemon->itc)
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
MHD_INVALID_SOCKET != fd
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to signal shutdown via inter-thread communication channel.
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
1 < daemon->worker_pool_size
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Cookie
Failed to join a thread
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to join a thread
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to signal shutdown via inter-thread communication channel
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
MHD_stop_daemon() called while we have suspended connections.
Failed to destroy ITC.
Initiated daemon shutdown while "upgraded" connection was not closed.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
MHD_stop_daemon() called while we have suspended connections.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
Failed to create pool thread: %s
MHD-worker
MHD failed to initialize cleanup connection mutex
Failed to create worker inter-thread communication channel: %s
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
Failed to create listen thread: %s
MHD-single
MHD-listen
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
MHD failed to initialize IP connection limit mutex
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
MHD failed to initialize IP connection limit mutex
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
Failed to set nonblocking mode on listening socket: %s
Unknown address family!
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
0 != (*pflags & MHD_USE_IPv6)
Failed to get listen port number: %s
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
Failed to listen for connections: %s
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
Failed to bind to port %u: %s
setsockopt failed: %s
setsockopt failed: %s
setsockopt failed: %s
Failed to create socket for listening: %s
MHD thread pooling only works with MHD_USE_INTERNAL_POLLING_THREAD
MHD failed to initialize nonce-nc mutex
Failed to allocate memory for nonce-nc map: %s
Specified value for NC_SIZE too large
Failed to create inter-thread communication channel: %s
Using debug build of libmicrohttpd.
(NULL != (pos)->prev) || ((pos) == (daemon->connections_head))
! pos->resuming
! pos->suspended
Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD was added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.
Invalid option %d! (Did you terminate the list with MHD_OPTION_END?)
(NULL != (pos)->next) || ((pos) == (daemon->connections_tail))
poll failed: %s
MHD HTTPS option %d passed to MHD compiled without HTTPS support
%s:%u Assertion failed: %s
Program aborted.
poll failed: %s
Flag MHD_USE_PEDANTIC_CHECKS is ignored because another behavior is specified by MHD_OPTION_STRICT_CLIENT.
MHD_OPTION_LISTEN_SOCKET specified for daemon with MHD_USE_NO_LISTEN_SOCKET flag set.
select failed: %s
Both MHD_OPTION_THREAD_POOL_SIZE option and MHD_USE_THREAD_PER_CONNECTION flag are specified.
MHD_OPTION_THREAD_POOL_SIZE option is specified but MHD_USE_INTERNAL_POLLING_THREAD flag is not specified.
Warning: "1", specified for thread pool size, is ignored. Thread pool is not used.
Warning: Zero size, specified for thread pool size, is ignored. Thread pool is not used.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (pos)->prevX) || ((pos) == (daemon->manual_timeout_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Could not add listen socket to fdset
(NULL != (pos)->nextX) || ((pos) == (daemon->manual_timeout_tail))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Could not obtain daemon fdsets
Close socket failed.
(NULL != (pos)->prevX) || ((pos) == (daemon->normal_timeout_head))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Close socket failed.
(NULL != (pos)->nextX) || ((pos) == (daemon->normal_timeout_tail))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Error allocating memory: %s
Error accepting connection: %s
NULL == (pos)->prev
Could not add control inter-thread communication channel FD to fdset
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to join a thread
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (pos)->prev) || ((pos) == (daemon->cleanup_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (pos)->next) || ((pos) == (daemon->cleanup_tail))
%s:%u Assertion failed: %s
Program aborted.
NULL == (pos)->next
Failed to set noninheritable mode on incoming connection socket.
%s:%u Assertion failed: %s
Program aborted.
NULL == (pos)->prevX
Failed to set nonblocking mode on incoming connection socket: %s
%s:%u Assertion failed: %s
Program aborted.
NULL == (pos)->nextX
Hit process or system resource limit at %u connections, temporarily suspending accept(). Consider setting a lower MHD_OPTION_CONNECTION_LIMIT.
Hit process or system resource limit at FIRST connection. This is really bad as there is no sane way to proceed. Will try busy waiting for system resources to become magically available.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to signal resume of connection via inter-thread communication channel.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == (pos)->prevX
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == (pos)->nextX
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (pos)->prev) || ((pos) == (daemon->suspended_connections_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (pos)->next) || ((pos) == (daemon->suspended_connections_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
pos->suspended
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != prev) || (daemon->shutdown)
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == daemon->worker_pool
Failed to signal resume via inter-thread communication channel.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Cannot resume connections without enabling MHD_ALLOW_SUSPEND_RESUME!
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
! connection->suspended
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (connection)->prev) || ((connection) == (daemon->connections_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (connection)->next) || ((connection) == (daemon->connections_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (connection)->prevX) || ((connection) == (daemon->manual_timeout_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Close socket failed.
(NULL != (connection)->nextX) || ((connection) == (daemon->manual_timeout_tail))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Failed to create a thread: %s
Close socket failed.
(NULL != (connection)->prevX) || ((connection) == (daemon->normal_timeout_head))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
MHD-connection
Close socket failed.
(NULL != (connection)->nextX) || ((connection) == (daemon->normal_timeout_tail))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Server reached connection limit. Closing inbound connection.
Close socket failed.
(NULL != (connection)->prev) || ((connection) == (daemon->connections_head))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (connection)->next) || ((connection) == (daemon->connections_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL != (connection)->prevX) || ((connection) == (daemon->normal_timeout_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
%s:%u Assertion failed: %s
Program aborted.
Close socket failed.
(NULL != (connection)->nextX) || ((connection) == (daemon->normal_timeout_tail))
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == (connection)->prev
%s:%u Assertion failed: %s
Program aborted.
Close socket failed.
Failed to signal new connection via inter-thread communication channel.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == (connection)->next
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == (connection)->prevX
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
NULL == (connection)->nextX
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Error allocating memory: %s
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Error allocating memory: %s
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Error allocating memory: %s
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Server reached connection limit. Closing inbound connection.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Close socket failed.
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
(NULL == daemon->worker_pool) || (external_add)
Failed to signal thread termination via inter-thread communication channel.
Error during poll: `%s'
Error during select (%d): `%s'
Failed to add FD to fd_set
Error during poll: `%s'
Error during select (%d): `%s'
Failed to add FD to fd_set
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Previously-added IP address had counter of zero
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\daemon.c
Failed to find previously-added IP address
Failed to add IP connection count node
Fatal error in GNU libmicrohttpd %s:%u: %s
Invalid response for upgrade: application failed to set the 'Upgrade' header!
Upgrade
Content-Length
chunked
identity
Transfer-Encoding
Application used invalid status code for 'upgrade' response!
Closing connection (failed to create response header)
Attempted 'upgrade' connection on daemon without MHD_ALLOW_UPGRADE option!
Attempted to queue response on wrong thread!
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Closing connection (failed to create response header)
<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>
Connection was closed while sending response body.
<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>
Connection was closed while sending response body.
Failed to signal end of connection via inter-thread communication channel
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
NULL == (connection)->next
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
(NULL != (connection)->prev) || ((connection) == (daemon->connections_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
(NULL != (connection)->next) || ((connection) == (daemon->connections_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
(NULL != (connection)->prevX) || ((connection) == (daemon->manual_timeout_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Connection was closed while sending response headers.
(NULL != (connection)->nextX) || ((connection) == (daemon->manual_timeout_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Failed to send data in request for %s.
(NULL != (connection)->prevX) || ((connection) == (daemon->normal_timeout_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Failed to parse `Content-Length' header. Closing connection.
Content-Length
chunked
(NULL != (connection)->nextX) || ((connection) == (daemon->normal_timeout_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Transfer-Encoding
(NULL != (connection)->prev) || ((connection) == (daemon->suspended_connections_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Closing connection (failed to queue response)
Closing connection (failed to create response)
Received HTTP 1.1 request without `Host' header.
(NULL != (connection)->next) || ((connection) == (daemon->suspended_connections_tail))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Failed to send data in request for `%s'.
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
HTTP/1.1 100 Continue
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Connection socket is closed due to error when reading request.
Socket disconnected while reading request.
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
(NULL != (connection)->prevX) || ((connection) == (daemon->normal_timeout_head))
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
(NULL != last) && (NULL != connection->colon)
Not enough memory in pool to allocate header record!
(NULL != (connection)->nextX) || ((connection) == (daemon->normal_timeout_tail))
%s:%u Assertion failed: %s
Program aborted.
Closing connection (failed to create response header)
<html><head><title>&quot;Host:&quot; header required</title></head><body>In HTTP 1.1, requests must include a &quot;Host:&quot; header, and your HTTP 1.1 request lacked such a header.</body></html>
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
NULL == connection->response
HTTP/1.1
%s:%u Assertion failed: %s
Program aborted.
Closing connection (failed to queue response)
Connection: close
<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>
Content-Length: %llu
<html><head><title>Request too big</title></head><body>Your HTTP header was too big for the memory constraints of this webserver.</body></html>
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
<html><head><title>Request too big</title></head><body>Your HTTP header was too big for the memory constraints of this webserver.</body></html>
Received malformed line (no colon). Closing connection.
WARNING: incomplete upload processing and connection not suspended may result in hung connection.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
libmicrohttpd API violation
Application reported internal error, closing connection.
Not enough memory in pool to parse cookies!
Not enough memory for write!
CONNECT
Received malformed HTTP request (bad chunked encoding). Closing connection.
Received malformed HTTP request (bad chunked encoding). Closing connection.
Application reported internal error, closing connection.
<html><head><title>Request too big</title></head><body>Your HTTP header was too big for the memory constraints of this webserver.</body></html>
<html><head><title>Request too big</title></head><body>Your HTTP header was too big for the memory constraints of this webserver.</body></html>
<html><head><title>Request too big</title></head><body>Your HTTP header was too big for the memory constraints of this webserver.</body></html>
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
<html><head><title>Internal server error</title></head><body>Please ask the developer of this Web server to carefully read the GNU libmicrohttpd documentation about connection management and blocking.</body></html>
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
Content-Length
Transfer-Encoding
<html><head><title>Request too big</title></head><body>Your HTTP header was too big for the memory constraints of this webserver.</body></html>
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
NULL != connection->response
Error processing request (HTTP response code is %u (`%s')). Closing connection.
HTTP/1.0
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
%s: %s
Keep-Alive
Connection
Transfer-Encoding: chunked
Connection: Keep-Alive
Keep-Alive
Connection
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
! (must_add_chunked_encoding && must_add_content_length)
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
! (must_add_close && must_add_keep_alive)
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
identity
HTTP/1.1
Connection
Connection
Keep-Alive
Connection
%s %u %s
HTTP/1.1
HTTP/1.0
HTTP/1.0
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
NULL != connection->version
Date: %3s, %02u %3s %04u %02u:%02u:%02u GMT
Connection
Keep-Alive
HTTP/1.0
Connection
Connection
upgrade
HTTP/1.1
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
(size_t)cblen < sizeof(cbuf)
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
cblen > 0
Closing connection (application error generating response)
Closing connection (out of memory)
Expect
Closing connection (application reported error generating data)
100-continue
HTTP/1.1
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
NULL != connection
%s:%u Assertion failed: %s
Program aborted.
c:\libs\x64\libmicrohttpd-0.9.63\src\microhttpd\connection.c
NULL != connection
Unknown winsock error
Reserved policy QoS element type
Invalid QoS shaping rate object
Invalid QoS shape discard mode object
Invalid QoS provider-specific filterspec
Invalid QoS provider-specific flowspec
Invalid QoS flow descriptor
Invalid QoS policy object
Unrecognized QoS object
Incorrect QoS flow count
Invalid QoS object length
Incorrect QoS filter count
Invalid QoS filter type
Invalid QoS filter style
Invalid QoS provider buffer
QoS flowspec error
QoS service type error
QoS generic error
QoS traffic control error
QoS bad object
QoS bad style
QoS policy failure
QoS admission error
QoS request confirmed
QoS no receivers
No QoS senders
QoS senders
QoS receivers
Valid name, no data record of requested type
This is a nonrecoverable error
Nonauthoritative host not found
Host not found
Database query was refused
Call was canceled
No more results
Class type not found
Service not found
System call failure
Service provider failed to initialize
Service provider is invalid
Procedure call table is invalid
Call has been canceled
No more results
Graceful shutdown in progress
Successful WSAStartup not yet performed
Winsock.dll version out of range
Network subsystem is unavailable
Item is remote
Stale file handle reference
Disk quota exceeded
User quota exceeded
Too many processes
Directory not empty
No route to host
Host is down
Name too long
Cannot translate name
Connection refused
Connection timed out
Too many references
Cannot send after socket shutdown
Socket is not connected
Socket is already connected
No buffer space available
Connection reset by peer
Software caused connection abort
Network dropped connection on reset
Network is unreachable
Network is down
Cannot assign requested address
Address already in use
Address family not supported by protocol family
Protocol family not supported
Operation not supported
Socket type not supported
Protocol not supported
Bad protocol option
Protocol wrong type for socket
Message too long
Destination address required
Socket operation on nonsocket
Operation already in progress
Operation now in progress
Resource temporarily unavailable
Too many open files
Invalid argument
Bad address
Permission denied
File handle is not valid
Interrupted function call
Overlapped operations will complete later
Overlapped I/O event object not in signaled state
Overlapped operation aborted
One or more parameters are invalid
Insufficient memory available
Specified event object handle is invalid
No error
Unknown
.?AV_Locimp@locale@std@@
.?AVbad_alloc@std@@
.?AVinvalid_argument@std@@
.?AVlogic_error@std@@
.?AVlength_error@std@@
.?AVout_of_range@std@@
.?AVregex_error@std@@
.?AVstl_condition_variable_interface@details@Concurrency@@
.?AVstl_condition_variable_vista@details@Concurrency@@
.?AVstl_condition_variable_win7@details@Concurrency@@
.?AVstl_condition_variable_concrt@details@Concurrency@@
.?AVstl_critical_section_interface@details@Concurrency@@
.?AVstl_critical_section_vista@details@Concurrency@@
.?AVstl_critical_section_win7@details@Concurrency@@
.?AVstl_critical_section_concrt@details@Concurrency@@
.?AVtype_info@@
.?AVbad_array_new_length@std@@
.?AVWaitBlock@details@Concurrency@@
.?AVSingleWaitBlock@details@Concurrency@@
.?AVMultiWaitBlock@details@Concurrency@@
.?AVWaitAllBlock@details@Concurrency@@
.?AVWaitAnyBlock@details@Concurrency@@
.?AVTimedSingleWaitBlock@details@Concurrency@@
.?AV?$_MallocaArrayHolder@PEAVContext@Concurrency@@@details@Concurrency@@
.?AVimproper_lock@Concurrency@@
.?AVscheduler_resource_allocation_error@Concurrency@@
.?AVunsupported_os@Concurrency@@
.?AVinvalid_operation@Concurrency@@
.?AVResourceManager@details@Concurrency@@
.?AUIResourceManager@Concurrency@@
.?AUITopologyExecutionResource@Concurrency@@
.?AUITopologyNode@Concurrency@@
.?AUTopologyObject@GlobalCore@details@Concurrency@@
.?AUTopologyObject@GlobalNode@details@Concurrency@@
.?AVscheduler_worker_creation_error@Concurrency@@
.?AVimproper_scheduler_reference@Concurrency@@
.?AVimproper_scheduler_attach@Concurrency@@
.?AVScheduleGroupBase@details@Concurrency@@
.?AVScheduleGroup@Concurrency@@
.?AVCacheLocalScheduleGroup@details@Concurrency@@
.?AVFairScheduleGroup@details@Concurrency@@
.?AVSchedulerBase@details@Concurrency@@
.?AVScheduler@Concurrency@@
.?AU_Chore@details@Concurrency@@
.?AVRealizedChore@details@Concurrency@@
.?AVCacheLocalScheduleGroupSegment@details@Concurrency@@
.?AVScheduleGroupSegmentBase@details@Concurrency@@
.?AVFairScheduleGroupSegment@details@Concurrency@@
.?AVcontext_unblock_unbalanced@Concurrency@@
.?AVcontext_self_unblock@Concurrency@@
.?AVmissing_wait@Concurrency@@
.?AVinvalid_scheduler_policy_key@Concurrency@@
.?AVinvalid_scheduler_policy_value@Concurrency@@
.?AVinvalid_scheduler_policy_thread_specification@Concurrency@@
.?AVnested_scheduler_missing_detach@Concurrency@@
.?AVinvalid_oversubscribe_operation@Concurrency@@
.?AVContextBase@details@Concurrency@@
.?AVContext@Concurrency@@
.?AV_Interruption_exception@details@Concurrency@@
.?AV_RefCounter@details@Concurrency@@
.?AV_CancellationTokenRegistration@details@Concurrency@@
.?AVCancellationTokenRegistration_TaskProc@details@Concurrency@@
.?AV?$_MallocaArrayHolder@PEAVevent@Concurrency@@@details@Concurrency@@
.?AVExecutionResource@details@Concurrency@@
.?AUIExecutionResource@Concurrency@@
.?AVSchedulerProxy@details@Concurrency@@
.?AUISchedulerProxy@Concurrency@@
.?AVFreeThreadProxy@details@Concurrency@@
.?AVThreadProxy@details@Concurrency@@
.?AUIThreadProxy@Concurrency@@
.?AUIThreadProxyFactory@details@Concurrency@@
.?AVFreeThreadProxyFactory@details@Concurrency@@
.?AV?$ThreadProxyFactory@VFreeThreadProxy@details@Concurrency@@@details@Concurrency@@
.?AVVirtualProcessor@details@Concurrency@@
.?AVInternalContextBase@details@Concurrency@@
.?AUIExecutionContext@Concurrency@@
.?AVExternalContextBase@details@Concurrency@@
.?AVThreadScheduler@details@Concurrency@@
.?AUIScheduler@Concurrency@@
.?AVThreadInternalContext@details@Concurrency@@
.?AVVirtualProcessorRoot@details@Concurrency@@
.?AUIVirtualProcessorRoot@Concurrency@@
.?AVFreeVirtualProcessorRoot@details@Concurrency@@
.?AVThreadVirtualProcessor@details@Concurrency@@
.?AV__non_rtti_object@std@@
.?AVbad_typeid@std@@
.?AVbad_exception@std@@
.?AV_Ref_count_base@std@@
.?AV?$_Ref_count_obj_alloc@V__ExceptionPtr@@U?$_StaticAllocator@H@@@std@@
.?AV?$_Ref_count_obj@V__ExceptionPtr@@@std@@
.?AVfailure@ios_base@std@@
.?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@
.?AVruntime_error@std@@
.?AV?$codecvt@DDU_Mbstatet@@@std@@
.?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@
.?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@
.?AVios_base@std@@
.?AVerror_category@std@@
.?AV?$ctype@D@std@@
.?AVsystem_error@std@@
.?AVcodecvt_base@std@@
.?AV_Facet_base@std@@
.?AV_Generic_error_category@std@@
.?AU_Crt_new_delete@std@@
.?AV?$_Iosb@H@std@@
.?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@
.?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@
.?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@
.?AV_Iostream_error_category@std@@
.?AVbad_cast@std@@
.?AUctype_base@std@@
.?AV?$basic_istream@DU?$char_traits@D@std@@@std@@
.?AV?$basic_ios@DU?$char_traits@D@std@@@std@@
.?AVfacet@locale@std@@
.?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@
.?AV_System_error@std@@
.?AVexception@std@@
.?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@
.?AUBackgroundTaskBase@@
.?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@
.?AV?$numpunct@D@std@@
.?AV?$_LaunchPad@V?$unique_ptr@V?$tuple@P6AXXZ@std@@U?$default_delete@V?$tuple@P6AXXZ@std@@@2@@std@@@std@@
.?AU?$BackgroundTask@V<lambda_dda690976c28185048275601e3828705>@@@@
.?AV_Pad@std@@
.?AV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@
.?AV_Node_if@std@@
.?AV?$collate@D@std@@
.?AV?$_Node_str@D@std@@
.?AV_Node_end_rep@std@@
.?AV_Node_end_group@std@@
.?AV_Node_back@std@@
.?AV_Node_base@std@@
.?AV_Root_node@std@@
.?AV_Node_assert@std@@
.?AV_Node_rep@std@@
.?AV?$_Node_class@DV?$regex_traits@D@std@@@std@@
.?AV_Node_capture@std@@
.?AV_Node_endif@std@@
.?AVISignalListener@xmrig@@
.?AVIConsoleListener@@
.?AVApp@xmrig@@
.?AVIConfig@xmrig@@
.?AVCommonConfig@xmrig@@
.?AVConfigWatcher@xmrig@@
.?AVIWatcherListener@xmrig@@
.?AVBasicCpuInfo@xmrig@@
.?AVICpuInfo@xmrig@@
.?AVBasicLog@@
.?AVILogBackend@@
.?AVConsoleLog@@
.?AVFileLog@@
.?AVIStrategy@xmrig@@
.?AVFailoverStrategy@xmrig@@
.?AVIClientListener@xmrig@@
.?AVSinglePoolStrategy@xmrig@@
.?AVConfig@xmrig@@
.?AVIConfigCreator@xmrig@@
.?AVConfigCreator@xmrig@@
.?AVIConfigListener@xmrig@@
.?AVController@xmrig@@
.?AVNetwork@xmrig@@
.?AVIStrategyListener@xmrig@@
.?AVIJobResultListener@xmrig@@
.?AVIControllerListener@xmrig@@
.?AVDonateStrategy@xmrig@@
.?AVOclThread@xmrig@@
.?AVIThread@xmrig@@
.?AVOclWorker@@
.?AVIWorker@@
.?AVApiRouter@@
UVWATAUAVAWH
API3A@fH
IXI3IH
fffffff
fffffff
fffffff
PA_A^A]A\_^]
t$ WATAUAVAWH
API3A@fH
IXI3IHI
)t$0fH
A_A^A]A\_
fffffff
t$ WATAUAVAWH
API3A@fH
IXI3IHI
)t$0fH
A_A^A]A\_
fffffff
SUVWATAUAVAWH
y I39I
IXI3HH
@PI3@@f
IXI3IHfH
API3A@f
o9fffffff
fffffff
A_A^A]A\_^][
fffffff
fffffff
fffffff
UVWATAUAVAWH
API3A@fH
IXI3IH
fffffff
fffffff
fffffff
PA_A^A]A\_^]
SUVWATAUAVAWH
y I39I
IXI3HH
@PI3@@f
IXI3IHfH
API3A@f
o9fffffff
fffffff
A_A^A]A\_^][
t$ ARASATAUAVAWWH
d$8L3b
)t$0fI
bXL3bHfH
BPH3B@f
@_A_A^A]A\A[AZ
UVWATAUAVAWH
z L3:fH
HXI3HHL
@PI3@@
JXH3JHfL
BPH3B@fD
fffffff
A_A^A]A\_^]
fffffff
fffffff
t$ ARASATAUAVAWWH
d$8L3b
)t$0fI
bXL3bHfH
BPH3B@f
@_A_A^A]A\A[AZ
fffffff
fffffff
UVWATAUAVAWH
z L3:fH
HXI3HHL
@PI3@@
JXH3JHfL
BPH3B@fD
fffffff
A_A^A]A\_^]
fffffff
fffffff
SUVWATAUAVAWH
IXI3JHI
A_A^A]A\_^][
fffffff
fffffff
SUVWATAUAVAWH
IXI3JHI
A_A^A]A\_^][
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    name="JR.Inno.Setup"
    processorArchitecture="x86"
    version="1.0.0.0"
    type="win32"/>
<description>Inno Setup</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="x86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker"            uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
</application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
        <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
        <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
    </application>
</compatibility>
</assembly>