text
stringlengths
1
1.05M
/*A positive integer of n digits is called an Armstrong number of order n (order is number of digits) if abcd... = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) + .... */ #include <iostream> #include <math.h> using namespace std; //To calculate the order of the number int order(int num) { int count; while (num > 0) { count++; num /= 10; } return count; } //Function to check if the number is armstrong or not int armstrong(int num, int count) { int sum = 0; while (num > 0) { //d is the remainder d = num % 10; //To calculate sum sum += pow(d, count); num /= 10; } return sum; } int main() { int num, d; cout << "Enter the number: "; cin >> num; int count = order(num); int sum = armstrong(num, count); if (sum == n) cout << "Armstrong number"; else cout << "Not an armstrong number"; return 0; } /*Enter the number: 153 Armstrong number*/
; A026274: Greatest k such that s(k) = n, where s = A026272. ; 3,5,8,11,13,16,18,21,24,26,29,32,34,37,39,42,45,47,50,52,55,58,60,63,66,68,71,73,76,79,81,84,87,89,92,94,97,100,102,105,107,110,113,115,118,121,123,126,128,131,134,136,139,141,144,147,149,152,155,157,160,162,165,168,170,173,176,178,181,183,186,189,191,194,196,199,202,204,207,210,212,215,217,220,223,225,228,231,233,236,238,241,244,246,249,251,254,257,259,262,265,267,270,272,275,278,280,283,285,288,291,293,296,299,301,304,306,309,312,314,317,320,322,325,327,330,333,335,338,340,343,346,348,351,354,356,359,361,364,367,369,372,374,377,380,382,385,388,390,393,395,398,401,403,406,409,411,414,416,419,422,424,427,429,432,435,437,440,443,445,448,450,453,456,458,461,464,466,469,471,474,477,479,482,484,487,490,492,495,498,500,503,505,508,511,513,516,518,521,524,526,529,532,534,537,539,542,545,547,550,553,555,558,560,563,566,568,571,573,576,579,581,584,587,589,592,594,597,600,602,605,608,610,613,615,618,621,623,626,628,631,634,636,639,642,644,647,649,652,655 mov $4,$0 add $4,1 mov $6,$0 lpb $4 mov $0,$6 sub $4,1 sub $0,$4 mov $8,2 mov $10,$0 lpb $8 mov $0,$10 sub $8,1 add $0,$8 mov $2,$0 mov $3,$0 add $0,1 pow $0,2 add $2,3 lpb $0 add $0,1 mov $5,$0 mov $0,0 add $2,2 add $5,2 trn $5,$2 add $0,$5 lpe mov $5,$2 sub $5,4 mov $11,$3 mul $11,2 add $5,$11 mov $7,$8 lpb $7 sub $7,1 mov $9,$5 lpe lpe lpb $10 sub $9,$5 mov $10,0 lpe mov $5,$9 sub $5,1 mul $5,2 add $5,4 add $1,$5 lpe sub $1,12 div $1,4 add $1,3
;------------------------------------------------------------------------------ ; This file is part of the 'RTX-51 tiny' Real-Time Operating System Package ; Copyright KEIL ELEKTRONIK GmbH and Keil Software, Inc. 1991 - 2002 ;------------------------------------------------------------------------------ ; ; OS_SET_READY.A51: This module contains the OS_SET_READY function ; ; RTX51 TINY VERSION 2 ; ;------------------------------------------------------------------------------ NAME ?RTX51_TINY_OS_SEND_RUN $include (os_defines.inc) PUBLIC _os_set_ready PUBLIC _isr_set_ready EXTRN CODE (?RTX?SET_ISR) ?RTX?CODE SEGMENT CODE RSEG ?RTX?CODE USING 0 ; Registerbank 0 for following code _os_set_ready: _isr_set_ready: ; os_send_ready (uchar taskid) { ; p = &STATE[taskid].st; MOV A,R7 RL A ADD A,#?RTX?TASKSTATE?S+1 MOV R0,A CLR EA MOV A,@R0 ; *p |= (K_READY | K_USER); ORL A,#K_READY OR K_RDY MOV @R0,A SETB EA NO_USR_PENDING: JMP ?RTX?SET_ISR END
; A135032: a(n) = 6*a(n-1) + 4*a(n-2). ; Submitted by Jamie Morken(s4) ; 0,1,6,40,264,1744,11520,76096,502656,3320320,21932544,144876544,956989440,6321442816,41756614656,275825459200,1821979213824,12035177119744,79498979573760,525134585921536,3468803433824256,22913358946631680,151355367415087104,999785640277049344,6604135311322644480,43623954429044064256,288160267819554963456,1903457424633506037760,12573385619079256080384,83054143413009560633344,548618402954374388121600,3623926991378284571262976,23938035560087204980064256,158123921326036368165437440 mov $1,1 lpb $0 sub $0,1 mov $2,$3 mul $2,4 mul $3,6 add $3,$1 mov $1,$2 lpe mov $0,$3
<% import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft %> <%docstring>pciconfig_write(bus, dfn, off, length, buf) -> str Invokes the syscall pciconfig_write. See 'man 2 pciconfig_write' for more information. Arguments: bus(unsigned): bus dfn(unsigned): dfn off(unsigned): off len(unsigned): len buf(void*): buf Returns: int </%docstring> <%page args="bus=0, dfn=0, off=0, length=0, buf=0"/> <% abi = pwnlib.abi.ABI.syscall() stack = abi.stack regs = abi.register_arguments[1:] allregs = pwnlib.shellcraft.registers.current() can_pushstr = ['buf'] can_pushstr_array = [] argument_names = ['bus', 'dfn', 'off', 'length', 'buf'] argument_values = [bus, dfn, off, length, buf] # Load all of the arguments into their destination registers / stack slots. register_arguments = dict() stack_arguments = collections.OrderedDict() string_arguments = dict() dict_arguments = dict() array_arguments = dict() syscall_repr = [] for name, arg in zip(argument_names, argument_values): if arg is not None: syscall_repr.append('%s=%r' % (name, arg)) # If the argument itself (input) is a register... if arg in allregs: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[index] = arg # The argument is not a register. It is a string value, and we # are expecting a string value elif name in can_pushstr and isinstance(arg, str): string_arguments[name] = arg # The argument is not a register. It is a dictionary, and we are # expecting K:V paris. elif name in can_pushstr_array and isinstance(arg, dict): array_arguments[name] = ['%s=%s' % (k,v) for (k,v) in arg.items()] # The arguent is not a register. It is a list, and we are expecting # a list of arguments. elif name in can_pushstr_array and isinstance(arg, (list, tuple)): array_arguments[name] = arg # The argument is not a register, string, dict, or list. # It could be a constant string ('O_RDONLY') for an integer argument, # an actual integer value, or a constant. else: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[target] = arg # Some syscalls have different names on various architectures. # Determine which syscall number to use for the current architecture. for syscall in ['SYS_pciconfig_write']: if hasattr(pwnlib.constants, syscall): break else: raise Exception("Could not locate any syscalls: %r" % syscalls) %> /* pciconfig_write(${', '.join(syscall_repr)}) */ %for name, arg in string_arguments.items(): ${pwnlib.shellcraft.pushstr(arg, append_null=('\x00' not in arg))} ${pwnlib.shellcraft.mov(regs[argument_names.index(name)], abi.stack)} %endfor %for name, arg in array_arguments.items(): ${pwnlib.shellcraft.pushstr_array(regs[argument_names.index(name)], arg)} %endfor %for name, arg in stack_arguments.items(): ${pwnlib.shellcraft.push(arg)} %endfor ${pwnlib.shellcraft.setregs(register_arguments)} ${pwnlib.shellcraft.syscall(syscall)}
; A002324: Number of divisors of n == 1 (mod 3) minus number of divisors of n == 2 (mod 3). ; Submitted by Christian Krause ; 1,0,1,1,0,0,2,0,1,0,0,1,2,0,0,1,0,0,2,0,2,0,0,0,1,0,1,2,0,0,2,0,0,0,0,1,2,0,2,0,0,0,2,0,0,0,0,1,3,0,0,2,0,0,0,0,2,0,0,0,2,0,2,1,0,0,2,0,0,0,0,0,2,0,1,2,0,0,2,0,1,0,0,2,0,0,0,0,0,0,4,0,2,0,0,0,2,0,0,1 add $0,1 mov $2,$0 lpb $0 mov $3,$2 dif $3,$0 mov $4,$0 sub $0,1 cmp $3,$2 sub $3,$1 mul $1,-1 cmp $4,0 sub $4,1 mul $5,$4 add $5,1 sub $5,$3 add $1,$5 lpe mov $0,$1 add $0,1
; CALLER linkage for function pointers XLIB sp1_Initialize LIB sp1_Initialize_callee XREF ASMDISP_SP1_INITIALIZE_CALLEE .sp1_Initialize ld hl,6 add hl,sp ld a,(hl) dec hl dec hl ld d,(hl) dec hl dec hl ld e,(hl) ex de,hl jp sp1_Initialize_callee + ASMDISP_SP1_INITIALIZE_CALLEE
// Copyright 2017 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "fxjs/xfa/cjx_instancemanager.h" #include <algorithm> #include <vector> #include "fxjs/cfxjse_engine.h" #include "fxjs/cfxjse_value.h" #include "fxjs/js_resources.h" #include "xfa/fxfa/cxfa_ffnotify.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_instancemanager.h" #include "xfa/fxfa/parser/cxfa_layoutprocessor.h" #include "xfa/fxfa/parser/cxfa_occur.h" const CJX_MethodSpec CJX_InstanceManager::MethodSpecs[] = { {"addInstance", addInstance_static}, {"insertInstance", insertInstance_static}, {"moveInstance", moveInstance_static}, {"removeInstance", removeInstance_static}, {"setInstances", setInstances_static}}; CJX_InstanceManager::CJX_InstanceManager(CXFA_InstanceManager* mgr) : CJX_Node(mgr) { DefineMethods(MethodSpecs, FX_ArraySize(MethodSpecs)); } CJX_InstanceManager::~CJX_InstanceManager() {} int32_t CJX_InstanceManager::SetInstances(int32_t iDesired) { CXFA_Occur* occur = GetXFANode()->GetOccurIfExists(); int32_t iMin = occur ? occur->GetMin() : CXFA_Occur::kDefaultMin; if (iDesired < iMin) { ThrowTooManyOccurancesException(L"min"); return 1; } int32_t iMax = occur ? occur->GetMax() : CXFA_Occur::kDefaultMax; if (iMax >= 0 && iDesired > iMax) { ThrowTooManyOccurancesException(L"max"); return 2; } int32_t iCount = GetXFANode()->GetCount(); if (iDesired == iCount) return 0; if (iDesired < iCount) { WideString wsInstManagerName = GetCData(XFA_Attribute::Name); WideString wsInstanceName = WideString( wsInstManagerName.IsEmpty() ? wsInstManagerName : wsInstManagerName.Right(wsInstManagerName.GetLength() - 1)); uint32_t dInstanceNameHash = FX_HashCode_GetW(wsInstanceName.AsStringView(), false); CXFA_Node* pPrevSibling = iDesired == 0 ? GetXFANode() : GetXFANode()->GetItemIfExists(iDesired - 1); if (!pPrevSibling) { // TODO(dsinclair): Better error? ThrowIndexOutOfBoundsException(); return 0; } while (iCount > iDesired) { CXFA_Node* pRemoveInstance = pPrevSibling->GetNextSibling(); if (pRemoveInstance->GetElementType() != XFA_Element::Subform && pRemoveInstance->GetElementType() != XFA_Element::SubformSet) { continue; } if (pRemoveInstance->GetElementType() == XFA_Element::InstanceManager) { NOTREACHED(); break; } if (pRemoveInstance->GetNameHash() == dInstanceNameHash) { GetXFANode()->RemoveItem(pRemoveInstance, true); iCount--; } } } else { while (iCount < iDesired) { CXFA_Node* pNewInstance = GetXFANode()->CreateInstanceIfPossible(true); if (!pNewInstance) return 0; GetXFANode()->InsertItem(pNewInstance, iCount, iCount, false); ++iCount; CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (!pNotify) return 0; pNotify->RunNodeInitialize(pNewInstance); } } CXFA_LayoutProcessor* pLayoutPro = GetDocument()->GetLayoutProcessor(); if (pLayoutPro) { pLayoutPro->AddChangedContainer( ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Form))); } return 0; } int32_t CJX_InstanceManager::MoveInstance(int32_t iTo, int32_t iFrom) { int32_t iCount = GetXFANode()->GetCount(); if (iFrom > iCount || iTo > iCount - 1) { ThrowIndexOutOfBoundsException(); return 1; } if (iFrom < 0 || iTo < 0 || iFrom == iTo) return 0; CXFA_Node* pMoveInstance = GetXFANode()->GetItemIfExists(iFrom); if (!pMoveInstance) { ThrowIndexOutOfBoundsException(); return 1; } GetXFANode()->RemoveItem(pMoveInstance, false); GetXFANode()->InsertItem(pMoveInstance, iTo, iCount - 1, true); CXFA_LayoutProcessor* pLayoutPro = GetDocument()->GetLayoutProcessor(); if (pLayoutPro) { pLayoutPro->AddChangedContainer( ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Form))); } return 0; } CJS_Return CJX_InstanceManager::moveInstance( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); int32_t iFrom = runtime->ToInt32(params[0]); int32_t iTo = runtime->ToInt32(params[1]); MoveInstance(iTo, iFrom); CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (!pNotify) return CJS_Return(true); CXFA_Node* pToInstance = GetXFANode()->GetItemIfExists(iTo); if (pToInstance && pToInstance->GetElementType() == XFA_Element::Subform) pNotify->RunSubformIndexChange(pToInstance); CXFA_Node* pFromInstance = GetXFANode()->GetItemIfExists(iFrom); if (pFromInstance && pFromInstance->GetElementType() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pFromInstance); } return CJS_Return(true); } CJS_Return CJX_InstanceManager::removeInstance( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); int32_t iIndex = runtime->ToInt32(params[0]); int32_t iCount = GetXFANode()->GetCount(); if (iIndex < 0 || iIndex >= iCount) return CJS_Return(JSGetStringFromID(JSMessage::kInvalidInputError)); CXFA_Occur* occur = GetXFANode()->GetOccurIfExists(); int32_t iMin = occur ? occur->GetMin() : CXFA_Occur::kDefaultMin; if (iCount - 1 < iMin) return CJS_Return(JSGetStringFromID(JSMessage::kTooManyOccurances)); CXFA_Node* pRemoveInstance = GetXFANode()->GetItemIfExists(iIndex); if (!pRemoveInstance) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); GetXFANode()->RemoveItem(pRemoveInstance, true); CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (pNotify) { for (int32_t i = iIndex; i < iCount - 1; i++) { CXFA_Node* pSubformInstance = GetXFANode()->GetItemIfExists(i); if (pSubformInstance && pSubformInstance->GetElementType() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pSubformInstance); } } } CXFA_LayoutProcessor* pLayoutPro = GetDocument()->GetLayoutProcessor(); if (pLayoutPro) { pLayoutPro->AddChangedContainer( ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Form))); } return CJS_Return(true); } CJS_Return CJX_InstanceManager::setInstances( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); SetInstances(runtime->ToInt32(params[0])); return CJS_Return(true); } CJS_Return CJX_InstanceManager::addInstance( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty() && params.size() != 1) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); bool fFlags = true; if (params.size() == 1) fFlags = runtime->ToBoolean(params[0]); int32_t iCount = GetXFANode()->GetCount(); CXFA_Occur* occur = GetXFANode()->GetOccurIfExists(); int32_t iMax = occur ? occur->GetMax() : CXFA_Occur::kDefaultMax; if (iMax >= 0 && iCount >= iMax) return CJS_Return(JSGetStringFromID(JSMessage::kTooManyOccurances)); CXFA_Node* pNewInstance = GetXFANode()->CreateInstanceIfPossible(fFlags); if (!pNewInstance) return CJS_Return(runtime->NewNull()); GetXFANode()->InsertItem(pNewInstance, iCount, iCount, false); CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (pNotify) { pNotify->RunNodeInitialize(pNewInstance); CXFA_LayoutProcessor* pLayoutPro = GetDocument()->GetLayoutProcessor(); if (pLayoutPro) { pLayoutPro->AddChangedContainer( ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Form))); } } CFXJSE_Value* value = GetDocument()->GetScriptContext()->GetJSValueFromMap(pNewInstance); if (!value) return CJS_Return(runtime->NewNull()); return CJS_Return(value->DirectGetValue().Get(runtime->GetIsolate())); } CJS_Return CJX_InstanceManager::insertInstance( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (params.size() != 1 && params.size() != 2) return CJS_Return(JSGetStringFromID(JSMessage::kParamError)); int32_t iIndex = runtime->ToInt32(params[0]); bool bBind = false; if (params.size() == 2) bBind = runtime->ToBoolean(params[1]); int32_t iCount = GetXFANode()->GetCount(); if (iIndex < 0 || iIndex > iCount) return CJS_Return(JSGetStringFromID(JSMessage::kInvalidInputError)); CXFA_Occur* occur = GetXFANode()->GetOccurIfExists(); int32_t iMax = occur ? occur->GetMax() : CXFA_Occur::kDefaultMax; if (iMax >= 0 && iCount >= iMax) return CJS_Return(JSGetStringFromID(JSMessage::kInvalidInputError)); CXFA_Node* pNewInstance = GetXFANode()->CreateInstanceIfPossible(bBind); if (!pNewInstance) return CJS_Return(runtime->NewNull()); GetXFANode()->InsertItem(pNewInstance, iIndex, iCount, true); CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (pNotify) { pNotify->RunNodeInitialize(pNewInstance); CXFA_LayoutProcessor* pLayoutPro = GetDocument()->GetLayoutProcessor(); if (pLayoutPro) { pLayoutPro->AddChangedContainer( ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Form))); } } CFXJSE_Value* value = GetDocument()->GetScriptContext()->GetJSValueFromMap(pNewInstance); if (!value) return CJS_Return(runtime->NewNull()); return CJS_Return(value->DirectGetValue().Get(runtime->GetIsolate())); } void CJX_InstanceManager::max(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute) { if (bSetting) { ThrowInvalidPropertyException(); return; } CXFA_Occur* occur = GetXFANode()->GetOccurIfExists(); pValue->SetInteger(occur ? occur->GetMax() : CXFA_Occur::kDefaultMax); } void CJX_InstanceManager::min(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute) { if (bSetting) { ThrowInvalidPropertyException(); return; } CXFA_Occur* occur = GetXFANode()->GetOccurIfExists(); pValue->SetInteger(occur ? occur->GetMin() : CXFA_Occur::kDefaultMin); } void CJX_InstanceManager::count(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute) { if (bSetting) { pValue->SetInteger(GetXFANode()->GetCount()); return; } SetInstances(pValue->ToInteger()); }
CeruleanCity_Object: db $f ; border block db 10 ; warps warp 27, 11, 0, CERULEAN_TRASHED_HOUSE warp 13, 15, 0, CERULEAN_TRADE_HOUSE warp 19, 17, 0, CERULEAN_POKECENTER warp 30, 19, 0, CERULEAN_GYM warp 13, 25, 0, BIKE_SHOP warp 25, 25, 0, CERULEAN_MART warp 4, 11, 0, CERULEAN_CAVE_1F warp 27, 9, 2, CERULEAN_TRASHED_HOUSE warp 9, 11, 1, CERULEAN_BADGE_HOUSE warp 9, 9, 0, CERULEAN_BADGE_HOUSE db 6 ; signs sign 23, 19, 12 ; CeruleanCityText12 sign 17, 29, 13 ; CeruleanCityText13 sign 26, 25, 14 ; MartSignText sign 20, 17, 15 ; PokeCenterSignText sign 11, 25, 16 ; CeruleanCityText16 sign 27, 21, 17 ; CeruleanCityText17 db 11 ; objects object SPRITE_BLUE, 20, 2, STAY, DOWN, 1 ; person object SPRITE_ROCKET, 30, 8, STAY, NONE, 2, OPP_ROCKET, 5 object SPRITE_BLACK_HAIR_BOY_1, 31, 20, STAY, DOWN, 3 ; person object SPRITE_BLACK_HAIR_BOY_2, 15, 18, WALK, 1, 4 ; person object SPRITE_BLACK_HAIR_BOY_2, 9, 21, WALK, 2, 5 ; person object SPRITE_GUARD, 28, 12, STAY, DOWN, 6 ; person object SPRITE_LASS, 29, 26, STAY, LEFT, 7 ; person object SPRITE_SLOWBRO, 28, 26, STAY, DOWN, 8 ; person object SPRITE_LASS, 9, 27, WALK, 2, 9 ; person object SPRITE_BLACK_HAIR_BOY_2, 4, 12, STAY, DOWN, 10 ; person object SPRITE_GUARD, 27, 12, STAY, DOWN, 11 ; person ; warp-to warp_to 27, 11, CERULEAN_CITY_WIDTH ; CERULEAN_TRASHED_HOUSE warp_to 13, 15, CERULEAN_CITY_WIDTH ; CERULEAN_TRADE_HOUSE warp_to 19, 17, CERULEAN_CITY_WIDTH ; CERULEAN_POKECENTER warp_to 30, 19, CERULEAN_CITY_WIDTH ; CERULEAN_GYM warp_to 13, 25, CERULEAN_CITY_WIDTH ; BIKE_SHOP warp_to 25, 25, CERULEAN_CITY_WIDTH ; CERULEAN_MART warp_to 4, 11, CERULEAN_CITY_WIDTH ; CERULEAN_CAVE_1F warp_to 27, 9, CERULEAN_CITY_WIDTH ; CERULEAN_TRASHED_HOUSE warp_to 9, 11, CERULEAN_CITY_WIDTH ; CERULEAN_BADGE_HOUSE warp_to 9, 9, CERULEAN_CITY_WIDTH ; CERULEAN_BADGE_HOUSE
; A164675: a(n) = 8*a(n-2) for n > 2; a(1) = 1, a(2) = 12. ; 1,12,8,96,64,768,512,6144,4096,49152,32768,393216,262144,3145728,2097152,25165824,16777216,201326592,134217728,1610612736,1073741824,12884901888,8589934592,103079215104,68719476736,824633720832,549755813888,6597069766656,4398046511104,52776558133248,35184372088832,422212465065984,281474976710656,3377699720527872,2251799813685248 mov $1,$0 mod $1,2 add $1,2 lpb $0 sub $0,1 trn $0,1 mov $2,4 mul $2,$1 mul $2,2 mov $1,$2 lpe sub $1,2 div $1,2 add $1,1
pow: movq $0, %rbx cmp %rsi, %rbx je zero_pow cmp %rdi, %rbx je zero_value movq %rdi, %rax movq $1, %rbx mult: addq $1, %rbx mulq %rdi cmp %rsi, %rbx jz exit jmp mult zero_pow: movq $1, %rax jmp exit zero_value: movq $0, %rax jmp exit exit: retq
; ; Z88dk Generic Floating Point Math Library ; ; ; $Id: pack.asm,v 1.1 2002/01/21 20:35:22 dom Exp $: XLIB pack LIB pack2 .PACK LD A,B jp pack2
default rel %define XMMWORD %define YMMWORD %define ZMMWORD section .text code align=64 EXTERN aes_nohw_encrypt EXTERN aes_nohw_decrypt ALIGN 64 _bsaes_encrypt8: lea r11,[$L$BS0] movdqa xmm8,XMMWORD[rax] lea rax,[16+rax] movdqa xmm7,XMMWORD[80+r11] pxor xmm15,xmm8 pxor xmm0,xmm8 pxor xmm1,xmm8 pxor xmm2,xmm8 DB 102,68,15,56,0,255 DB 102,15,56,0,199 pxor xmm3,xmm8 pxor xmm4,xmm8 DB 102,15,56,0,207 DB 102,15,56,0,215 pxor xmm5,xmm8 pxor xmm6,xmm8 DB 102,15,56,0,223 DB 102,15,56,0,231 DB 102,15,56,0,239 DB 102,15,56,0,247 _bsaes_encrypt8_bitslice: movdqa xmm7,XMMWORD[r11] movdqa xmm8,XMMWORD[16+r11] movdqa xmm9,xmm5 psrlq xmm5,1 movdqa xmm10,xmm3 psrlq xmm3,1 pxor xmm5,xmm6 pxor xmm3,xmm4 pand xmm5,xmm7 pand xmm3,xmm7 pxor xmm6,xmm5 psllq xmm5,1 pxor xmm4,xmm3 psllq xmm3,1 pxor xmm5,xmm9 pxor xmm3,xmm10 movdqa xmm9,xmm1 psrlq xmm1,1 movdqa xmm10,xmm15 psrlq xmm15,1 pxor xmm1,xmm2 pxor xmm15,xmm0 pand xmm1,xmm7 pand xmm15,xmm7 pxor xmm2,xmm1 psllq xmm1,1 pxor xmm0,xmm15 psllq xmm15,1 pxor xmm1,xmm9 pxor xmm15,xmm10 movdqa xmm7,XMMWORD[32+r11] movdqa xmm9,xmm4 psrlq xmm4,2 movdqa xmm10,xmm3 psrlq xmm3,2 pxor xmm4,xmm6 pxor xmm3,xmm5 pand xmm4,xmm8 pand xmm3,xmm8 pxor xmm6,xmm4 psllq xmm4,2 pxor xmm5,xmm3 psllq xmm3,2 pxor xmm4,xmm9 pxor xmm3,xmm10 movdqa xmm9,xmm0 psrlq xmm0,2 movdqa xmm10,xmm15 psrlq xmm15,2 pxor xmm0,xmm2 pxor xmm15,xmm1 pand xmm0,xmm8 pand xmm15,xmm8 pxor xmm2,xmm0 psllq xmm0,2 pxor xmm1,xmm15 psllq xmm15,2 pxor xmm0,xmm9 pxor xmm15,xmm10 movdqa xmm9,xmm2 psrlq xmm2,4 movdqa xmm10,xmm1 psrlq xmm1,4 pxor xmm2,xmm6 pxor xmm1,xmm5 pand xmm2,xmm7 pand xmm1,xmm7 pxor xmm6,xmm2 psllq xmm2,4 pxor xmm5,xmm1 psllq xmm1,4 pxor xmm2,xmm9 pxor xmm1,xmm10 movdqa xmm9,xmm0 psrlq xmm0,4 movdqa xmm10,xmm15 psrlq xmm15,4 pxor xmm0,xmm4 pxor xmm15,xmm3 pand xmm0,xmm7 pand xmm15,xmm7 pxor xmm4,xmm0 psllq xmm0,4 pxor xmm3,xmm15 psllq xmm15,4 pxor xmm0,xmm9 pxor xmm15,xmm10 dec r10d jmp NEAR $L$enc_sbox ALIGN 16 $L$enc_loop: pxor xmm15,XMMWORD[rax] pxor xmm0,XMMWORD[16+rax] pxor xmm1,XMMWORD[32+rax] pxor xmm2,XMMWORD[48+rax] DB 102,68,15,56,0,255 DB 102,15,56,0,199 pxor xmm3,XMMWORD[64+rax] pxor xmm4,XMMWORD[80+rax] DB 102,15,56,0,207 DB 102,15,56,0,215 pxor xmm5,XMMWORD[96+rax] pxor xmm6,XMMWORD[112+rax] DB 102,15,56,0,223 DB 102,15,56,0,231 DB 102,15,56,0,239 DB 102,15,56,0,247 lea rax,[128+rax] $L$enc_sbox: pxor xmm4,xmm5 pxor xmm1,xmm0 pxor xmm2,xmm15 pxor xmm5,xmm1 pxor xmm4,xmm15 pxor xmm5,xmm2 pxor xmm2,xmm6 pxor xmm6,xmm4 pxor xmm2,xmm3 pxor xmm3,xmm4 pxor xmm2,xmm0 pxor xmm1,xmm6 pxor xmm0,xmm4 movdqa xmm10,xmm6 movdqa xmm9,xmm0 movdqa xmm8,xmm4 movdqa xmm12,xmm1 movdqa xmm11,xmm5 pxor xmm10,xmm3 pxor xmm9,xmm1 pxor xmm8,xmm2 movdqa xmm13,xmm10 pxor xmm12,xmm3 movdqa xmm7,xmm9 pxor xmm11,xmm15 movdqa xmm14,xmm10 por xmm9,xmm8 por xmm10,xmm11 pxor xmm14,xmm7 pand xmm13,xmm11 pxor xmm11,xmm8 pand xmm7,xmm8 pand xmm14,xmm11 movdqa xmm11,xmm2 pxor xmm11,xmm15 pand xmm12,xmm11 pxor xmm10,xmm12 pxor xmm9,xmm12 movdqa xmm12,xmm6 movdqa xmm11,xmm4 pxor xmm12,xmm0 pxor xmm11,xmm5 movdqa xmm8,xmm12 pand xmm12,xmm11 por xmm8,xmm11 pxor xmm7,xmm12 pxor xmm10,xmm14 pxor xmm9,xmm13 pxor xmm8,xmm14 movdqa xmm11,xmm1 pxor xmm7,xmm13 movdqa xmm12,xmm3 pxor xmm8,xmm13 movdqa xmm13,xmm0 pand xmm11,xmm2 movdqa xmm14,xmm6 pand xmm12,xmm15 pand xmm13,xmm4 por xmm14,xmm5 pxor xmm10,xmm11 pxor xmm9,xmm12 pxor xmm8,xmm13 pxor xmm7,xmm14 movdqa xmm11,xmm10 pand xmm10,xmm8 pxor xmm11,xmm9 movdqa xmm13,xmm7 movdqa xmm14,xmm11 pxor xmm13,xmm10 pand xmm14,xmm13 movdqa xmm12,xmm8 pxor xmm14,xmm9 pxor xmm12,xmm7 pxor xmm10,xmm9 pand xmm12,xmm10 movdqa xmm9,xmm13 pxor xmm12,xmm7 pxor xmm9,xmm12 pxor xmm8,xmm12 pand xmm9,xmm7 pxor xmm13,xmm9 pxor xmm8,xmm9 pand xmm13,xmm14 pxor xmm13,xmm11 movdqa xmm11,xmm5 movdqa xmm7,xmm4 movdqa xmm9,xmm14 pxor xmm9,xmm13 pand xmm9,xmm5 pxor xmm5,xmm4 pand xmm4,xmm14 pand xmm5,xmm13 pxor xmm5,xmm4 pxor xmm4,xmm9 pxor xmm11,xmm15 pxor xmm7,xmm2 pxor xmm14,xmm12 pxor xmm13,xmm8 movdqa xmm10,xmm14 movdqa xmm9,xmm12 pxor xmm10,xmm13 pxor xmm9,xmm8 pand xmm10,xmm11 pand xmm9,xmm15 pxor xmm11,xmm7 pxor xmm15,xmm2 pand xmm7,xmm14 pand xmm2,xmm12 pand xmm11,xmm13 pand xmm15,xmm8 pxor xmm7,xmm11 pxor xmm15,xmm2 pxor xmm11,xmm10 pxor xmm2,xmm9 pxor xmm5,xmm11 pxor xmm15,xmm11 pxor xmm4,xmm7 pxor xmm2,xmm7 movdqa xmm11,xmm6 movdqa xmm7,xmm0 pxor xmm11,xmm3 pxor xmm7,xmm1 movdqa xmm10,xmm14 movdqa xmm9,xmm12 pxor xmm10,xmm13 pxor xmm9,xmm8 pand xmm10,xmm11 pand xmm9,xmm3 pxor xmm11,xmm7 pxor xmm3,xmm1 pand xmm7,xmm14 pand xmm1,xmm12 pand xmm11,xmm13 pand xmm3,xmm8 pxor xmm7,xmm11 pxor xmm3,xmm1 pxor xmm11,xmm10 pxor xmm1,xmm9 pxor xmm14,xmm12 pxor xmm13,xmm8 movdqa xmm10,xmm14 pxor xmm10,xmm13 pand xmm10,xmm6 pxor xmm6,xmm0 pand xmm0,xmm14 pand xmm6,xmm13 pxor xmm6,xmm0 pxor xmm0,xmm10 pxor xmm6,xmm11 pxor xmm3,xmm11 pxor xmm0,xmm7 pxor xmm1,xmm7 pxor xmm6,xmm15 pxor xmm0,xmm5 pxor xmm3,xmm6 pxor xmm5,xmm15 pxor xmm15,xmm0 pxor xmm0,xmm4 pxor xmm4,xmm1 pxor xmm1,xmm2 pxor xmm2,xmm4 pxor xmm3,xmm4 pxor xmm5,xmm2 dec r10d jl NEAR $L$enc_done pshufd xmm7,xmm15,0x93 pshufd xmm8,xmm0,0x93 pxor xmm15,xmm7 pshufd xmm9,xmm3,0x93 pxor xmm0,xmm8 pshufd xmm10,xmm5,0x93 pxor xmm3,xmm9 pshufd xmm11,xmm2,0x93 pxor xmm5,xmm10 pshufd xmm12,xmm6,0x93 pxor xmm2,xmm11 pshufd xmm13,xmm1,0x93 pxor xmm6,xmm12 pshufd xmm14,xmm4,0x93 pxor xmm1,xmm13 pxor xmm4,xmm14 pxor xmm8,xmm15 pxor xmm7,xmm4 pxor xmm8,xmm4 pshufd xmm15,xmm15,0x4E pxor xmm9,xmm0 pshufd xmm0,xmm0,0x4E pxor xmm12,xmm2 pxor xmm15,xmm7 pxor xmm13,xmm6 pxor xmm0,xmm8 pxor xmm11,xmm5 pshufd xmm7,xmm2,0x4E pxor xmm14,xmm1 pshufd xmm8,xmm6,0x4E pxor xmm10,xmm3 pshufd xmm2,xmm5,0x4E pxor xmm10,xmm4 pshufd xmm6,xmm4,0x4E pxor xmm11,xmm4 pshufd xmm5,xmm1,0x4E pxor xmm7,xmm11 pshufd xmm1,xmm3,0x4E pxor xmm8,xmm12 pxor xmm2,xmm10 pxor xmm6,xmm14 pxor xmm5,xmm13 movdqa xmm3,xmm7 pxor xmm1,xmm9 movdqa xmm4,xmm8 movdqa xmm7,XMMWORD[48+r11] jnz NEAR $L$enc_loop movdqa xmm7,XMMWORD[64+r11] jmp NEAR $L$enc_loop ALIGN 16 $L$enc_done: movdqa xmm7,XMMWORD[r11] movdqa xmm8,XMMWORD[16+r11] movdqa xmm9,xmm1 psrlq xmm1,1 movdqa xmm10,xmm2 psrlq xmm2,1 pxor xmm1,xmm4 pxor xmm2,xmm6 pand xmm1,xmm7 pand xmm2,xmm7 pxor xmm4,xmm1 psllq xmm1,1 pxor xmm6,xmm2 psllq xmm2,1 pxor xmm1,xmm9 pxor xmm2,xmm10 movdqa xmm9,xmm3 psrlq xmm3,1 movdqa xmm10,xmm15 psrlq xmm15,1 pxor xmm3,xmm5 pxor xmm15,xmm0 pand xmm3,xmm7 pand xmm15,xmm7 pxor xmm5,xmm3 psllq xmm3,1 pxor xmm0,xmm15 psllq xmm15,1 pxor xmm3,xmm9 pxor xmm15,xmm10 movdqa xmm7,XMMWORD[32+r11] movdqa xmm9,xmm6 psrlq xmm6,2 movdqa xmm10,xmm2 psrlq xmm2,2 pxor xmm6,xmm4 pxor xmm2,xmm1 pand xmm6,xmm8 pand xmm2,xmm8 pxor xmm4,xmm6 psllq xmm6,2 pxor xmm1,xmm2 psllq xmm2,2 pxor xmm6,xmm9 pxor xmm2,xmm10 movdqa xmm9,xmm0 psrlq xmm0,2 movdqa xmm10,xmm15 psrlq xmm15,2 pxor xmm0,xmm5 pxor xmm15,xmm3 pand xmm0,xmm8 pand xmm15,xmm8 pxor xmm5,xmm0 psllq xmm0,2 pxor xmm3,xmm15 psllq xmm15,2 pxor xmm0,xmm9 pxor xmm15,xmm10 movdqa xmm9,xmm5 psrlq xmm5,4 movdqa xmm10,xmm3 psrlq xmm3,4 pxor xmm5,xmm4 pxor xmm3,xmm1 pand xmm5,xmm7 pand xmm3,xmm7 pxor xmm4,xmm5 psllq xmm5,4 pxor xmm1,xmm3 psllq xmm3,4 pxor xmm5,xmm9 pxor xmm3,xmm10 movdqa xmm9,xmm0 psrlq xmm0,4 movdqa xmm10,xmm15 psrlq xmm15,4 pxor xmm0,xmm6 pxor xmm15,xmm2 pand xmm0,xmm7 pand xmm15,xmm7 pxor xmm6,xmm0 psllq xmm0,4 pxor xmm2,xmm15 psllq xmm15,4 pxor xmm0,xmm9 pxor xmm15,xmm10 movdqa xmm7,XMMWORD[rax] pxor xmm3,xmm7 pxor xmm5,xmm7 pxor xmm2,xmm7 pxor xmm6,xmm7 pxor xmm1,xmm7 pxor xmm4,xmm7 pxor xmm15,xmm7 pxor xmm0,xmm7 DB 0F3h,0C3h ;repret ALIGN 64 _bsaes_decrypt8: lea r11,[$L$BS0] movdqa xmm8,XMMWORD[rax] lea rax,[16+rax] movdqa xmm7,XMMWORD[((-48))+r11] pxor xmm15,xmm8 pxor xmm0,xmm8 pxor xmm1,xmm8 pxor xmm2,xmm8 DB 102,68,15,56,0,255 DB 102,15,56,0,199 pxor xmm3,xmm8 pxor xmm4,xmm8 DB 102,15,56,0,207 DB 102,15,56,0,215 pxor xmm5,xmm8 pxor xmm6,xmm8 DB 102,15,56,0,223 DB 102,15,56,0,231 DB 102,15,56,0,239 DB 102,15,56,0,247 movdqa xmm7,XMMWORD[r11] movdqa xmm8,XMMWORD[16+r11] movdqa xmm9,xmm5 psrlq xmm5,1 movdqa xmm10,xmm3 psrlq xmm3,1 pxor xmm5,xmm6 pxor xmm3,xmm4 pand xmm5,xmm7 pand xmm3,xmm7 pxor xmm6,xmm5 psllq xmm5,1 pxor xmm4,xmm3 psllq xmm3,1 pxor xmm5,xmm9 pxor xmm3,xmm10 movdqa xmm9,xmm1 psrlq xmm1,1 movdqa xmm10,xmm15 psrlq xmm15,1 pxor xmm1,xmm2 pxor xmm15,xmm0 pand xmm1,xmm7 pand xmm15,xmm7 pxor xmm2,xmm1 psllq xmm1,1 pxor xmm0,xmm15 psllq xmm15,1 pxor xmm1,xmm9 pxor xmm15,xmm10 movdqa xmm7,XMMWORD[32+r11] movdqa xmm9,xmm4 psrlq xmm4,2 movdqa xmm10,xmm3 psrlq xmm3,2 pxor xmm4,xmm6 pxor xmm3,xmm5 pand xmm4,xmm8 pand xmm3,xmm8 pxor xmm6,xmm4 psllq xmm4,2 pxor xmm5,xmm3 psllq xmm3,2 pxor xmm4,xmm9 pxor xmm3,xmm10 movdqa xmm9,xmm0 psrlq xmm0,2 movdqa xmm10,xmm15 psrlq xmm15,2 pxor xmm0,xmm2 pxor xmm15,xmm1 pand xmm0,xmm8 pand xmm15,xmm8 pxor xmm2,xmm0 psllq xmm0,2 pxor xmm1,xmm15 psllq xmm15,2 pxor xmm0,xmm9 pxor xmm15,xmm10 movdqa xmm9,xmm2 psrlq xmm2,4 movdqa xmm10,xmm1 psrlq xmm1,4 pxor xmm2,xmm6 pxor xmm1,xmm5 pand xmm2,xmm7 pand xmm1,xmm7 pxor xmm6,xmm2 psllq xmm2,4 pxor xmm5,xmm1 psllq xmm1,4 pxor xmm2,xmm9 pxor xmm1,xmm10 movdqa xmm9,xmm0 psrlq xmm0,4 movdqa xmm10,xmm15 psrlq xmm15,4 pxor xmm0,xmm4 pxor xmm15,xmm3 pand xmm0,xmm7 pand xmm15,xmm7 pxor xmm4,xmm0 psllq xmm0,4 pxor xmm3,xmm15 psllq xmm15,4 pxor xmm0,xmm9 pxor xmm15,xmm10 dec r10d jmp NEAR $L$dec_sbox ALIGN 16 $L$dec_loop: pxor xmm15,XMMWORD[rax] pxor xmm0,XMMWORD[16+rax] pxor xmm1,XMMWORD[32+rax] pxor xmm2,XMMWORD[48+rax] DB 102,68,15,56,0,255 DB 102,15,56,0,199 pxor xmm3,XMMWORD[64+rax] pxor xmm4,XMMWORD[80+rax] DB 102,15,56,0,207 DB 102,15,56,0,215 pxor xmm5,XMMWORD[96+rax] pxor xmm6,XMMWORD[112+rax] DB 102,15,56,0,223 DB 102,15,56,0,231 DB 102,15,56,0,239 DB 102,15,56,0,247 lea rax,[128+rax] $L$dec_sbox: pxor xmm2,xmm3 pxor xmm3,xmm6 pxor xmm1,xmm6 pxor xmm5,xmm3 pxor xmm6,xmm5 pxor xmm0,xmm6 pxor xmm15,xmm0 pxor xmm1,xmm4 pxor xmm2,xmm15 pxor xmm4,xmm15 pxor xmm0,xmm2 movdqa xmm10,xmm2 movdqa xmm9,xmm6 movdqa xmm8,xmm0 movdqa xmm12,xmm3 movdqa xmm11,xmm4 pxor xmm10,xmm15 pxor xmm9,xmm3 pxor xmm8,xmm5 movdqa xmm13,xmm10 pxor xmm12,xmm15 movdqa xmm7,xmm9 pxor xmm11,xmm1 movdqa xmm14,xmm10 por xmm9,xmm8 por xmm10,xmm11 pxor xmm14,xmm7 pand xmm13,xmm11 pxor xmm11,xmm8 pand xmm7,xmm8 pand xmm14,xmm11 movdqa xmm11,xmm5 pxor xmm11,xmm1 pand xmm12,xmm11 pxor xmm10,xmm12 pxor xmm9,xmm12 movdqa xmm12,xmm2 movdqa xmm11,xmm0 pxor xmm12,xmm6 pxor xmm11,xmm4 movdqa xmm8,xmm12 pand xmm12,xmm11 por xmm8,xmm11 pxor xmm7,xmm12 pxor xmm10,xmm14 pxor xmm9,xmm13 pxor xmm8,xmm14 movdqa xmm11,xmm3 pxor xmm7,xmm13 movdqa xmm12,xmm15 pxor xmm8,xmm13 movdqa xmm13,xmm6 pand xmm11,xmm5 movdqa xmm14,xmm2 pand xmm12,xmm1 pand xmm13,xmm0 por xmm14,xmm4 pxor xmm10,xmm11 pxor xmm9,xmm12 pxor xmm8,xmm13 pxor xmm7,xmm14 movdqa xmm11,xmm10 pand xmm10,xmm8 pxor xmm11,xmm9 movdqa xmm13,xmm7 movdqa xmm14,xmm11 pxor xmm13,xmm10 pand xmm14,xmm13 movdqa xmm12,xmm8 pxor xmm14,xmm9 pxor xmm12,xmm7 pxor xmm10,xmm9 pand xmm12,xmm10 movdqa xmm9,xmm13 pxor xmm12,xmm7 pxor xmm9,xmm12 pxor xmm8,xmm12 pand xmm9,xmm7 pxor xmm13,xmm9 pxor xmm8,xmm9 pand xmm13,xmm14 pxor xmm13,xmm11 movdqa xmm11,xmm4 movdqa xmm7,xmm0 movdqa xmm9,xmm14 pxor xmm9,xmm13 pand xmm9,xmm4 pxor xmm4,xmm0 pand xmm0,xmm14 pand xmm4,xmm13 pxor xmm4,xmm0 pxor xmm0,xmm9 pxor xmm11,xmm1 pxor xmm7,xmm5 pxor xmm14,xmm12 pxor xmm13,xmm8 movdqa xmm10,xmm14 movdqa xmm9,xmm12 pxor xmm10,xmm13 pxor xmm9,xmm8 pand xmm10,xmm11 pand xmm9,xmm1 pxor xmm11,xmm7 pxor xmm1,xmm5 pand xmm7,xmm14 pand xmm5,xmm12 pand xmm11,xmm13 pand xmm1,xmm8 pxor xmm7,xmm11 pxor xmm1,xmm5 pxor xmm11,xmm10 pxor xmm5,xmm9 pxor xmm4,xmm11 pxor xmm1,xmm11 pxor xmm0,xmm7 pxor xmm5,xmm7 movdqa xmm11,xmm2 movdqa xmm7,xmm6 pxor xmm11,xmm15 pxor xmm7,xmm3 movdqa xmm10,xmm14 movdqa xmm9,xmm12 pxor xmm10,xmm13 pxor xmm9,xmm8 pand xmm10,xmm11 pand xmm9,xmm15 pxor xmm11,xmm7 pxor xmm15,xmm3 pand xmm7,xmm14 pand xmm3,xmm12 pand xmm11,xmm13 pand xmm15,xmm8 pxor xmm7,xmm11 pxor xmm15,xmm3 pxor xmm11,xmm10 pxor xmm3,xmm9 pxor xmm14,xmm12 pxor xmm13,xmm8 movdqa xmm10,xmm14 pxor xmm10,xmm13 pand xmm10,xmm2 pxor xmm2,xmm6 pand xmm6,xmm14 pand xmm2,xmm13 pxor xmm2,xmm6 pxor xmm6,xmm10 pxor xmm2,xmm11 pxor xmm15,xmm11 pxor xmm6,xmm7 pxor xmm3,xmm7 pxor xmm0,xmm6 pxor xmm5,xmm4 pxor xmm3,xmm0 pxor xmm1,xmm6 pxor xmm4,xmm6 pxor xmm3,xmm1 pxor xmm6,xmm15 pxor xmm3,xmm4 pxor xmm2,xmm5 pxor xmm5,xmm0 pxor xmm2,xmm3 pxor xmm3,xmm15 pxor xmm6,xmm2 dec r10d jl NEAR $L$dec_done pshufd xmm7,xmm15,0x4E pshufd xmm13,xmm2,0x4E pxor xmm7,xmm15 pshufd xmm14,xmm4,0x4E pxor xmm13,xmm2 pshufd xmm8,xmm0,0x4E pxor xmm14,xmm4 pshufd xmm9,xmm5,0x4E pxor xmm8,xmm0 pshufd xmm10,xmm3,0x4E pxor xmm9,xmm5 pxor xmm15,xmm13 pxor xmm0,xmm13 pshufd xmm11,xmm1,0x4E pxor xmm10,xmm3 pxor xmm5,xmm7 pxor xmm3,xmm8 pshufd xmm12,xmm6,0x4E pxor xmm11,xmm1 pxor xmm0,xmm14 pxor xmm1,xmm9 pxor xmm12,xmm6 pxor xmm5,xmm14 pxor xmm3,xmm13 pxor xmm1,xmm13 pxor xmm6,xmm10 pxor xmm2,xmm11 pxor xmm1,xmm14 pxor xmm6,xmm14 pxor xmm4,xmm12 pshufd xmm7,xmm15,0x93 pshufd xmm8,xmm0,0x93 pxor xmm15,xmm7 pshufd xmm9,xmm5,0x93 pxor xmm0,xmm8 pshufd xmm10,xmm3,0x93 pxor xmm5,xmm9 pshufd xmm11,xmm1,0x93 pxor xmm3,xmm10 pshufd xmm12,xmm6,0x93 pxor xmm1,xmm11 pshufd xmm13,xmm2,0x93 pxor xmm6,xmm12 pshufd xmm14,xmm4,0x93 pxor xmm2,xmm13 pxor xmm4,xmm14 pxor xmm8,xmm15 pxor xmm7,xmm4 pxor xmm8,xmm4 pshufd xmm15,xmm15,0x4E pxor xmm9,xmm0 pshufd xmm0,xmm0,0x4E pxor xmm12,xmm1 pxor xmm15,xmm7 pxor xmm13,xmm6 pxor xmm0,xmm8 pxor xmm11,xmm3 pshufd xmm7,xmm1,0x4E pxor xmm14,xmm2 pshufd xmm8,xmm6,0x4E pxor xmm10,xmm5 pshufd xmm1,xmm3,0x4E pxor xmm10,xmm4 pshufd xmm6,xmm4,0x4E pxor xmm11,xmm4 pshufd xmm3,xmm2,0x4E pxor xmm7,xmm11 pshufd xmm2,xmm5,0x4E pxor xmm8,xmm12 pxor xmm10,xmm1 pxor xmm6,xmm14 pxor xmm13,xmm3 movdqa xmm3,xmm7 pxor xmm2,xmm9 movdqa xmm5,xmm13 movdqa xmm4,xmm8 movdqa xmm1,xmm2 movdqa xmm2,xmm10 movdqa xmm7,XMMWORD[((-16))+r11] jnz NEAR $L$dec_loop movdqa xmm7,XMMWORD[((-32))+r11] jmp NEAR $L$dec_loop ALIGN 16 $L$dec_done: movdqa xmm7,XMMWORD[r11] movdqa xmm8,XMMWORD[16+r11] movdqa xmm9,xmm2 psrlq xmm2,1 movdqa xmm10,xmm1 psrlq xmm1,1 pxor xmm2,xmm4 pxor xmm1,xmm6 pand xmm2,xmm7 pand xmm1,xmm7 pxor xmm4,xmm2 psllq xmm2,1 pxor xmm6,xmm1 psllq xmm1,1 pxor xmm2,xmm9 pxor xmm1,xmm10 movdqa xmm9,xmm5 psrlq xmm5,1 movdqa xmm10,xmm15 psrlq xmm15,1 pxor xmm5,xmm3 pxor xmm15,xmm0 pand xmm5,xmm7 pand xmm15,xmm7 pxor xmm3,xmm5 psllq xmm5,1 pxor xmm0,xmm15 psllq xmm15,1 pxor xmm5,xmm9 pxor xmm15,xmm10 movdqa xmm7,XMMWORD[32+r11] movdqa xmm9,xmm6 psrlq xmm6,2 movdqa xmm10,xmm1 psrlq xmm1,2 pxor xmm6,xmm4 pxor xmm1,xmm2 pand xmm6,xmm8 pand xmm1,xmm8 pxor xmm4,xmm6 psllq xmm6,2 pxor xmm2,xmm1 psllq xmm1,2 pxor xmm6,xmm9 pxor xmm1,xmm10 movdqa xmm9,xmm0 psrlq xmm0,2 movdqa xmm10,xmm15 psrlq xmm15,2 pxor xmm0,xmm3 pxor xmm15,xmm5 pand xmm0,xmm8 pand xmm15,xmm8 pxor xmm3,xmm0 psllq xmm0,2 pxor xmm5,xmm15 psllq xmm15,2 pxor xmm0,xmm9 pxor xmm15,xmm10 movdqa xmm9,xmm3 psrlq xmm3,4 movdqa xmm10,xmm5 psrlq xmm5,4 pxor xmm3,xmm4 pxor xmm5,xmm2 pand xmm3,xmm7 pand xmm5,xmm7 pxor xmm4,xmm3 psllq xmm3,4 pxor xmm2,xmm5 psllq xmm5,4 pxor xmm3,xmm9 pxor xmm5,xmm10 movdqa xmm9,xmm0 psrlq xmm0,4 movdqa xmm10,xmm15 psrlq xmm15,4 pxor xmm0,xmm6 pxor xmm15,xmm1 pand xmm0,xmm7 pand xmm15,xmm7 pxor xmm6,xmm0 psllq xmm0,4 pxor xmm1,xmm15 psllq xmm15,4 pxor xmm0,xmm9 pxor xmm15,xmm10 movdqa xmm7,XMMWORD[rax] pxor xmm5,xmm7 pxor xmm3,xmm7 pxor xmm1,xmm7 pxor xmm6,xmm7 pxor xmm2,xmm7 pxor xmm4,xmm7 pxor xmm15,xmm7 pxor xmm0,xmm7 DB 0F3h,0C3h ;repret ALIGN 16 _bsaes_key_convert: lea r11,[$L$masks] movdqu xmm7,XMMWORD[rcx] lea rcx,[16+rcx] movdqa xmm0,XMMWORD[r11] movdqa xmm1,XMMWORD[16+r11] movdqa xmm2,XMMWORD[32+r11] movdqa xmm3,XMMWORD[48+r11] movdqa xmm4,XMMWORD[64+r11] pcmpeqd xmm5,xmm5 movdqu xmm6,XMMWORD[rcx] movdqa XMMWORD[rax],xmm7 lea rax,[16+rax] dec r10d jmp NEAR $L$key_loop ALIGN 16 $L$key_loop: DB 102,15,56,0,244 movdqa xmm8,xmm0 movdqa xmm9,xmm1 pand xmm8,xmm6 pand xmm9,xmm6 movdqa xmm10,xmm2 pcmpeqb xmm8,xmm0 psllq xmm0,4 movdqa xmm11,xmm3 pcmpeqb xmm9,xmm1 psllq xmm1,4 pand xmm10,xmm6 pand xmm11,xmm6 movdqa xmm12,xmm0 pcmpeqb xmm10,xmm2 psllq xmm2,4 movdqa xmm13,xmm1 pcmpeqb xmm11,xmm3 psllq xmm3,4 movdqa xmm14,xmm2 movdqa xmm15,xmm3 pxor xmm8,xmm5 pxor xmm9,xmm5 pand xmm12,xmm6 pand xmm13,xmm6 movdqa XMMWORD[rax],xmm8 pcmpeqb xmm12,xmm0 psrlq xmm0,4 movdqa XMMWORD[16+rax],xmm9 pcmpeqb xmm13,xmm1 psrlq xmm1,4 lea rcx,[16+rcx] pand xmm14,xmm6 pand xmm15,xmm6 movdqa XMMWORD[32+rax],xmm10 pcmpeqb xmm14,xmm2 psrlq xmm2,4 movdqa XMMWORD[48+rax],xmm11 pcmpeqb xmm15,xmm3 psrlq xmm3,4 movdqu xmm6,XMMWORD[rcx] pxor xmm13,xmm5 pxor xmm14,xmm5 movdqa XMMWORD[64+rax],xmm12 movdqa XMMWORD[80+rax],xmm13 movdqa XMMWORD[96+rax],xmm14 movdqa XMMWORD[112+rax],xmm15 lea rax,[128+rax] dec r10d jnz NEAR $L$key_loop movdqa xmm7,XMMWORD[80+r11] DB 0F3h,0C3h ;repret EXTERN aes_nohw_cbc_encrypt global bsaes_cbc_encrypt ALIGN 16 bsaes_cbc_encrypt: mov r11d,DWORD[48+rsp] cmp r11d,0 jne NEAR aes_nohw_cbc_encrypt cmp r8,128 jb NEAR aes_nohw_cbc_encrypt mov rax,rsp $L$cbc_dec_prologue: push rbp push rbx push r12 push r13 push r14 push r15 lea rsp,[((-72))+rsp] mov r10,QWORD[160+rsp] lea rsp,[((-160))+rsp] movaps XMMWORD[64+rsp],xmm6 movaps XMMWORD[80+rsp],xmm7 movaps XMMWORD[96+rsp],xmm8 movaps XMMWORD[112+rsp],xmm9 movaps XMMWORD[128+rsp],xmm10 movaps XMMWORD[144+rsp],xmm11 movaps XMMWORD[160+rsp],xmm12 movaps XMMWORD[176+rsp],xmm13 movaps XMMWORD[192+rsp],xmm14 movaps XMMWORD[208+rsp],xmm15 $L$cbc_dec_body: mov rbp,rsp mov eax,DWORD[240+r9] mov r12,rcx mov r13,rdx mov r14,r8 mov r15,r9 mov rbx,r10 shr r14,4 mov edx,eax shl rax,7 sub rax,96 sub rsp,rax mov rax,rsp mov rcx,r15 mov r10d,edx call _bsaes_key_convert pxor xmm7,XMMWORD[rsp] movdqa XMMWORD[rax],xmm6 movdqa XMMWORD[rsp],xmm7 movdqu xmm14,XMMWORD[rbx] sub r14,8 $L$cbc_dec_loop: movdqu xmm15,XMMWORD[r12] movdqu xmm0,XMMWORD[16+r12] movdqu xmm1,XMMWORD[32+r12] movdqu xmm2,XMMWORD[48+r12] movdqu xmm3,XMMWORD[64+r12] movdqu xmm4,XMMWORD[80+r12] mov rax,rsp movdqu xmm5,XMMWORD[96+r12] mov r10d,edx movdqu xmm6,XMMWORD[112+r12] movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu xmm9,XMMWORD[32+r12] pxor xmm5,xmm8 movdqu xmm10,XMMWORD[48+r12] pxor xmm3,xmm9 movdqu xmm11,XMMWORD[64+r12] pxor xmm1,xmm10 movdqu xmm12,XMMWORD[80+r12] pxor xmm6,xmm11 movdqu xmm13,XMMWORD[96+r12] pxor xmm2,xmm12 movdqu xmm14,XMMWORD[112+r12] pxor xmm4,xmm13 movdqu XMMWORD[r13],xmm15 lea r12,[128+r12] movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 movdqu XMMWORD[48+r13],xmm3 movdqu XMMWORD[64+r13],xmm1 movdqu XMMWORD[80+r13],xmm6 movdqu XMMWORD[96+r13],xmm2 movdqu XMMWORD[112+r13],xmm4 lea r13,[128+r13] sub r14,8 jnc NEAR $L$cbc_dec_loop add r14,8 jz NEAR $L$cbc_dec_done movdqu xmm15,XMMWORD[r12] mov rax,rsp mov r10d,edx cmp r14,2 jb NEAR $L$cbc_dec_one movdqu xmm0,XMMWORD[16+r12] je NEAR $L$cbc_dec_two movdqu xmm1,XMMWORD[32+r12] cmp r14,4 jb NEAR $L$cbc_dec_three movdqu xmm2,XMMWORD[48+r12] je NEAR $L$cbc_dec_four movdqu xmm3,XMMWORD[64+r12] cmp r14,6 jb NEAR $L$cbc_dec_five movdqu xmm4,XMMWORD[80+r12] je NEAR $L$cbc_dec_six movdqu xmm5,XMMWORD[96+r12] movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu xmm9,XMMWORD[32+r12] pxor xmm5,xmm8 movdqu xmm10,XMMWORD[48+r12] pxor xmm3,xmm9 movdqu xmm11,XMMWORD[64+r12] pxor xmm1,xmm10 movdqu xmm12,XMMWORD[80+r12] pxor xmm6,xmm11 movdqu xmm14,XMMWORD[96+r12] pxor xmm2,xmm12 movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 movdqu XMMWORD[48+r13],xmm3 movdqu XMMWORD[64+r13],xmm1 movdqu XMMWORD[80+r13],xmm6 movdqu XMMWORD[96+r13],xmm2 jmp NEAR $L$cbc_dec_done ALIGN 16 $L$cbc_dec_six: movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu xmm9,XMMWORD[32+r12] pxor xmm5,xmm8 movdqu xmm10,XMMWORD[48+r12] pxor xmm3,xmm9 movdqu xmm11,XMMWORD[64+r12] pxor xmm1,xmm10 movdqu xmm14,XMMWORD[80+r12] pxor xmm6,xmm11 movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 movdqu XMMWORD[48+r13],xmm3 movdqu XMMWORD[64+r13],xmm1 movdqu XMMWORD[80+r13],xmm6 jmp NEAR $L$cbc_dec_done ALIGN 16 $L$cbc_dec_five: movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu xmm9,XMMWORD[32+r12] pxor xmm5,xmm8 movdqu xmm10,XMMWORD[48+r12] pxor xmm3,xmm9 movdqu xmm14,XMMWORD[64+r12] pxor xmm1,xmm10 movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 movdqu XMMWORD[48+r13],xmm3 movdqu XMMWORD[64+r13],xmm1 jmp NEAR $L$cbc_dec_done ALIGN 16 $L$cbc_dec_four: movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu xmm9,XMMWORD[32+r12] pxor xmm5,xmm8 movdqu xmm14,XMMWORD[48+r12] pxor xmm3,xmm9 movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 movdqu XMMWORD[48+r13],xmm3 jmp NEAR $L$cbc_dec_done ALIGN 16 $L$cbc_dec_three: movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu xmm14,XMMWORD[32+r12] pxor xmm5,xmm8 movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 jmp NEAR $L$cbc_dec_done ALIGN 16 $L$cbc_dec_two: movdqa XMMWORD[32+rbp],xmm14 call _bsaes_decrypt8 pxor xmm15,XMMWORD[32+rbp] movdqu xmm7,XMMWORD[r12] movdqu xmm14,XMMWORD[16+r12] pxor xmm0,xmm7 movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 jmp NEAR $L$cbc_dec_done ALIGN 16 $L$cbc_dec_one: lea rcx,[r12] lea rdx,[32+rbp] lea r8,[r15] call aes_nohw_decrypt pxor xmm14,XMMWORD[32+rbp] movdqu XMMWORD[r13],xmm14 movdqa xmm14,xmm15 $L$cbc_dec_done: movdqu XMMWORD[rbx],xmm14 lea rax,[rsp] pxor xmm0,xmm0 $L$cbc_dec_bzero: movdqa XMMWORD[rax],xmm0 movdqa XMMWORD[16+rax],xmm0 lea rax,[32+rax] cmp rbp,rax ja NEAR $L$cbc_dec_bzero lea rax,[120+rbp] movaps xmm6,XMMWORD[64+rbp] movaps xmm7,XMMWORD[80+rbp] movaps xmm8,XMMWORD[96+rbp] movaps xmm9,XMMWORD[112+rbp] movaps xmm10,XMMWORD[128+rbp] movaps xmm11,XMMWORD[144+rbp] movaps xmm12,XMMWORD[160+rbp] movaps xmm13,XMMWORD[176+rbp] movaps xmm14,XMMWORD[192+rbp] movaps xmm15,XMMWORD[208+rbp] lea rax,[160+rax] $L$cbc_dec_tail: mov r15,QWORD[((-48))+rax] mov r14,QWORD[((-40))+rax] mov r13,QWORD[((-32))+rax] mov r12,QWORD[((-24))+rax] mov rbx,QWORD[((-16))+rax] mov rbp,QWORD[((-8))+rax] lea rsp,[rax] $L$cbc_dec_epilogue: DB 0F3h,0C3h ;repret global bsaes_ctr32_encrypt_blocks ALIGN 16 bsaes_ctr32_encrypt_blocks: mov rax,rsp $L$ctr_enc_prologue: push rbp push rbx push r12 push r13 push r14 push r15 lea rsp,[((-72))+rsp] mov r10,QWORD[160+rsp] lea rsp,[((-160))+rsp] movaps XMMWORD[64+rsp],xmm6 movaps XMMWORD[80+rsp],xmm7 movaps XMMWORD[96+rsp],xmm8 movaps XMMWORD[112+rsp],xmm9 movaps XMMWORD[128+rsp],xmm10 movaps XMMWORD[144+rsp],xmm11 movaps XMMWORD[160+rsp],xmm12 movaps XMMWORD[176+rsp],xmm13 movaps XMMWORD[192+rsp],xmm14 movaps XMMWORD[208+rsp],xmm15 $L$ctr_enc_body: mov rbp,rsp movdqu xmm0,XMMWORD[r10] mov eax,DWORD[240+r9] mov r12,rcx mov r13,rdx mov r14,r8 mov r15,r9 movdqa XMMWORD[32+rbp],xmm0 cmp r8,8 jb NEAR $L$ctr_enc_short mov ebx,eax shl rax,7 sub rax,96 sub rsp,rax mov rax,rsp mov rcx,r15 mov r10d,ebx call _bsaes_key_convert pxor xmm7,xmm6 movdqa XMMWORD[rax],xmm7 movdqa xmm8,XMMWORD[rsp] lea r11,[$L$ADD1] movdqa xmm15,XMMWORD[32+rbp] movdqa xmm7,XMMWORD[((-32))+r11] DB 102,68,15,56,0,199 DB 102,68,15,56,0,255 movdqa XMMWORD[rsp],xmm8 jmp NEAR $L$ctr_enc_loop ALIGN 16 $L$ctr_enc_loop: movdqa XMMWORD[32+rbp],xmm15 movdqa xmm0,xmm15 movdqa xmm1,xmm15 paddd xmm0,XMMWORD[r11] movdqa xmm2,xmm15 paddd xmm1,XMMWORD[16+r11] movdqa xmm3,xmm15 paddd xmm2,XMMWORD[32+r11] movdqa xmm4,xmm15 paddd xmm3,XMMWORD[48+r11] movdqa xmm5,xmm15 paddd xmm4,XMMWORD[64+r11] movdqa xmm6,xmm15 paddd xmm5,XMMWORD[80+r11] paddd xmm6,XMMWORD[96+r11] movdqa xmm8,XMMWORD[rsp] lea rax,[16+rsp] movdqa xmm7,XMMWORD[((-16))+r11] pxor xmm15,xmm8 pxor xmm0,xmm8 pxor xmm1,xmm8 pxor xmm2,xmm8 DB 102,68,15,56,0,255 DB 102,15,56,0,199 pxor xmm3,xmm8 pxor xmm4,xmm8 DB 102,15,56,0,207 DB 102,15,56,0,215 pxor xmm5,xmm8 pxor xmm6,xmm8 DB 102,15,56,0,223 DB 102,15,56,0,231 DB 102,15,56,0,239 DB 102,15,56,0,247 lea r11,[$L$BS0] mov r10d,ebx call _bsaes_encrypt8_bitslice sub r14,8 jc NEAR $L$ctr_enc_loop_done movdqu xmm7,XMMWORD[r12] movdqu xmm8,XMMWORD[16+r12] movdqu xmm9,XMMWORD[32+r12] movdqu xmm10,XMMWORD[48+r12] movdqu xmm11,XMMWORD[64+r12] movdqu xmm12,XMMWORD[80+r12] movdqu xmm13,XMMWORD[96+r12] movdqu xmm14,XMMWORD[112+r12] lea r12,[128+r12] pxor xmm7,xmm15 movdqa xmm15,XMMWORD[32+rbp] pxor xmm0,xmm8 movdqu XMMWORD[r13],xmm7 pxor xmm3,xmm9 movdqu XMMWORD[16+r13],xmm0 pxor xmm5,xmm10 movdqu XMMWORD[32+r13],xmm3 pxor xmm2,xmm11 movdqu XMMWORD[48+r13],xmm5 pxor xmm6,xmm12 movdqu XMMWORD[64+r13],xmm2 pxor xmm1,xmm13 movdqu XMMWORD[80+r13],xmm6 pxor xmm4,xmm14 movdqu XMMWORD[96+r13],xmm1 lea r11,[$L$ADD1] movdqu XMMWORD[112+r13],xmm4 lea r13,[128+r13] paddd xmm15,XMMWORD[112+r11] jnz NEAR $L$ctr_enc_loop jmp NEAR $L$ctr_enc_done ALIGN 16 $L$ctr_enc_loop_done: add r14,8 movdqu xmm7,XMMWORD[r12] pxor xmm15,xmm7 movdqu XMMWORD[r13],xmm15 cmp r14,2 jb NEAR $L$ctr_enc_done movdqu xmm8,XMMWORD[16+r12] pxor xmm0,xmm8 movdqu XMMWORD[16+r13],xmm0 je NEAR $L$ctr_enc_done movdqu xmm9,XMMWORD[32+r12] pxor xmm3,xmm9 movdqu XMMWORD[32+r13],xmm3 cmp r14,4 jb NEAR $L$ctr_enc_done movdqu xmm10,XMMWORD[48+r12] pxor xmm5,xmm10 movdqu XMMWORD[48+r13],xmm5 je NEAR $L$ctr_enc_done movdqu xmm11,XMMWORD[64+r12] pxor xmm2,xmm11 movdqu XMMWORD[64+r13],xmm2 cmp r14,6 jb NEAR $L$ctr_enc_done movdqu xmm12,XMMWORD[80+r12] pxor xmm6,xmm12 movdqu XMMWORD[80+r13],xmm6 je NEAR $L$ctr_enc_done movdqu xmm13,XMMWORD[96+r12] pxor xmm1,xmm13 movdqu XMMWORD[96+r13],xmm1 jmp NEAR $L$ctr_enc_done ALIGN 16 $L$ctr_enc_short: lea rcx,[32+rbp] lea rdx,[48+rbp] lea r8,[r15] call aes_nohw_encrypt movdqu xmm0,XMMWORD[r12] lea r12,[16+r12] mov eax,DWORD[44+rbp] bswap eax pxor xmm0,XMMWORD[48+rbp] inc eax movdqu XMMWORD[r13],xmm0 bswap eax lea r13,[16+r13] mov DWORD[44+rsp],eax dec r14 jnz NEAR $L$ctr_enc_short $L$ctr_enc_done: lea rax,[rsp] pxor xmm0,xmm0 $L$ctr_enc_bzero: movdqa XMMWORD[rax],xmm0 movdqa XMMWORD[16+rax],xmm0 lea rax,[32+rax] cmp rbp,rax ja NEAR $L$ctr_enc_bzero lea rax,[120+rbp] movaps xmm6,XMMWORD[64+rbp] movaps xmm7,XMMWORD[80+rbp] movaps xmm8,XMMWORD[96+rbp] movaps xmm9,XMMWORD[112+rbp] movaps xmm10,XMMWORD[128+rbp] movaps xmm11,XMMWORD[144+rbp] movaps xmm12,XMMWORD[160+rbp] movaps xmm13,XMMWORD[176+rbp] movaps xmm14,XMMWORD[192+rbp] movaps xmm15,XMMWORD[208+rbp] lea rax,[160+rax] $L$ctr_enc_tail: mov r15,QWORD[((-48))+rax] mov r14,QWORD[((-40))+rax] mov r13,QWORD[((-32))+rax] mov r12,QWORD[((-24))+rax] mov rbx,QWORD[((-16))+rax] mov rbp,QWORD[((-8))+rax] lea rsp,[rax] $L$ctr_enc_epilogue: DB 0F3h,0C3h ;repret global bsaes_xts_encrypt ALIGN 16 bsaes_xts_encrypt: mov rax,rsp $L$xts_enc_prologue: push rbp push rbx push r12 push r13 push r14 push r15 lea rsp,[((-72))+rsp] mov r10,QWORD[160+rsp] mov r11,QWORD[168+rsp] lea rsp,[((-160))+rsp] movaps XMMWORD[64+rsp],xmm6 movaps XMMWORD[80+rsp],xmm7 movaps XMMWORD[96+rsp],xmm8 movaps XMMWORD[112+rsp],xmm9 movaps XMMWORD[128+rsp],xmm10 movaps XMMWORD[144+rsp],xmm11 movaps XMMWORD[160+rsp],xmm12 movaps XMMWORD[176+rsp],xmm13 movaps XMMWORD[192+rsp],xmm14 movaps XMMWORD[208+rsp],xmm15 $L$xts_enc_body: mov rbp,rsp mov r12,rcx mov r13,rdx mov r14,r8 mov r15,r9 lea rcx,[r11] lea rdx,[32+rbp] lea r8,[r10] call aes_nohw_encrypt mov eax,DWORD[240+r15] mov rbx,r14 mov edx,eax shl rax,7 sub rax,96 sub rsp,rax mov rax,rsp mov rcx,r15 mov r10d,edx call _bsaes_key_convert pxor xmm7,xmm6 movdqa XMMWORD[rax],xmm7 and r14,-16 sub rsp,0x80 movdqa xmm6,XMMWORD[32+rbp] pxor xmm14,xmm14 movdqa xmm12,XMMWORD[$L$xts_magic] pcmpgtd xmm14,xmm6 sub r14,0x80 jc NEAR $L$xts_enc_short jmp NEAR $L$xts_enc_loop ALIGN 16 $L$xts_enc_loop: pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm15,xmm6 movdqa XMMWORD[rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm0,xmm6 movdqa XMMWORD[16+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm7,XMMWORD[r12] pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm1,xmm6 movdqa XMMWORD[32+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm8,XMMWORD[16+r12] pxor xmm15,xmm7 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm2,xmm6 movdqa XMMWORD[48+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm9,XMMWORD[32+r12] pxor xmm0,xmm8 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm3,xmm6 movdqa XMMWORD[64+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm10,XMMWORD[48+r12] pxor xmm1,xmm9 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm4,xmm6 movdqa XMMWORD[80+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm11,XMMWORD[64+r12] pxor xmm2,xmm10 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm5,xmm6 movdqa XMMWORD[96+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm12,XMMWORD[80+r12] pxor xmm3,xmm11 movdqu xmm13,XMMWORD[96+r12] pxor xmm4,xmm12 movdqu xmm14,XMMWORD[112+r12] lea r12,[128+r12] movdqa XMMWORD[112+rsp],xmm6 pxor xmm5,xmm13 lea rax,[128+rsp] pxor xmm6,xmm14 mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm3,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm5,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm3 pxor xmm2,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm5 pxor xmm6,XMMWORD[80+rsp] movdqu XMMWORD[64+r13],xmm2 pxor xmm1,XMMWORD[96+rsp] movdqu XMMWORD[80+r13],xmm6 pxor xmm4,XMMWORD[112+rsp] movdqu XMMWORD[96+r13],xmm1 movdqu XMMWORD[112+r13],xmm4 lea r13,[128+r13] movdqa xmm6,XMMWORD[112+rsp] pxor xmm14,xmm14 movdqa xmm12,XMMWORD[$L$xts_magic] pcmpgtd xmm14,xmm6 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 sub r14,0x80 jnc NEAR $L$xts_enc_loop $L$xts_enc_short: add r14,0x80 jz NEAR $L$xts_enc_done pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm15,xmm6 movdqa XMMWORD[rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm0,xmm6 movdqa XMMWORD[16+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm7,XMMWORD[r12] cmp r14,16 je NEAR $L$xts_enc_1 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm1,xmm6 movdqa XMMWORD[32+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm8,XMMWORD[16+r12] cmp r14,32 je NEAR $L$xts_enc_2 pxor xmm15,xmm7 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm2,xmm6 movdqa XMMWORD[48+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm9,XMMWORD[32+r12] cmp r14,48 je NEAR $L$xts_enc_3 pxor xmm0,xmm8 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm3,xmm6 movdqa XMMWORD[64+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm10,XMMWORD[48+r12] cmp r14,64 je NEAR $L$xts_enc_4 pxor xmm1,xmm9 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm4,xmm6 movdqa XMMWORD[80+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm11,XMMWORD[64+r12] cmp r14,80 je NEAR $L$xts_enc_5 pxor xmm2,xmm10 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm5,xmm6 movdqa XMMWORD[96+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm12,XMMWORD[80+r12] cmp r14,96 je NEAR $L$xts_enc_6 pxor xmm3,xmm11 movdqu xmm13,XMMWORD[96+r12] pxor xmm4,xmm12 movdqa XMMWORD[112+rsp],xmm6 lea r12,[112+r12] pxor xmm5,xmm13 lea rax,[128+rsp] mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm3,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm5,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm3 pxor xmm2,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm5 pxor xmm6,XMMWORD[80+rsp] movdqu XMMWORD[64+r13],xmm2 pxor xmm1,XMMWORD[96+rsp] movdqu XMMWORD[80+r13],xmm6 movdqu XMMWORD[96+r13],xmm1 lea r13,[112+r13] movdqa xmm6,XMMWORD[112+rsp] jmp NEAR $L$xts_enc_done ALIGN 16 $L$xts_enc_6: pxor xmm3,xmm11 lea r12,[96+r12] pxor xmm4,xmm12 lea rax,[128+rsp] mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm3,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm5,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm3 pxor xmm2,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm5 pxor xmm6,XMMWORD[80+rsp] movdqu XMMWORD[64+r13],xmm2 movdqu XMMWORD[80+r13],xmm6 lea r13,[96+r13] movdqa xmm6,XMMWORD[96+rsp] jmp NEAR $L$xts_enc_done ALIGN 16 $L$xts_enc_5: pxor xmm2,xmm10 lea r12,[80+r12] pxor xmm3,xmm11 lea rax,[128+rsp] mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm3,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm5,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm3 pxor xmm2,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm5 movdqu XMMWORD[64+r13],xmm2 lea r13,[80+r13] movdqa xmm6,XMMWORD[80+rsp] jmp NEAR $L$xts_enc_done ALIGN 16 $L$xts_enc_4: pxor xmm1,xmm9 lea r12,[64+r12] pxor xmm2,xmm10 lea rax,[128+rsp] mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm3,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm5,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm3 movdqu XMMWORD[48+r13],xmm5 lea r13,[64+r13] movdqa xmm6,XMMWORD[64+rsp] jmp NEAR $L$xts_enc_done ALIGN 16 $L$xts_enc_3: pxor xmm0,xmm8 lea r12,[48+r12] pxor xmm1,xmm9 lea rax,[128+rsp] mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm3,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm3 lea r13,[48+r13] movdqa xmm6,XMMWORD[48+rsp] jmp NEAR $L$xts_enc_done ALIGN 16 $L$xts_enc_2: pxor xmm15,xmm7 lea r12,[32+r12] pxor xmm0,xmm8 lea rax,[128+rsp] mov r10d,edx call _bsaes_encrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 lea r13,[32+r13] movdqa xmm6,XMMWORD[32+rsp] jmp NEAR $L$xts_enc_done ALIGN 16 $L$xts_enc_1: pxor xmm7,xmm15 lea r12,[16+r12] movdqa XMMWORD[32+rbp],xmm7 lea rcx,[32+rbp] lea rdx,[32+rbp] lea r8,[r15] call aes_nohw_encrypt pxor xmm15,XMMWORD[32+rbp] movdqu XMMWORD[r13],xmm15 lea r13,[16+r13] movdqa xmm6,XMMWORD[16+rsp] $L$xts_enc_done: and ebx,15 jz NEAR $L$xts_enc_ret mov rdx,r13 $L$xts_enc_steal: movzx eax,BYTE[r12] movzx ecx,BYTE[((-16))+rdx] lea r12,[1+r12] mov BYTE[((-16))+rdx],al mov BYTE[rdx],cl lea rdx,[1+rdx] sub ebx,1 jnz NEAR $L$xts_enc_steal movdqu xmm15,XMMWORD[((-16))+r13] lea rcx,[32+rbp] pxor xmm15,xmm6 lea rdx,[32+rbp] movdqa XMMWORD[32+rbp],xmm15 lea r8,[r15] call aes_nohw_encrypt pxor xmm6,XMMWORD[32+rbp] movdqu XMMWORD[(-16)+r13],xmm6 $L$xts_enc_ret: lea rax,[rsp] pxor xmm0,xmm0 $L$xts_enc_bzero: movdqa XMMWORD[rax],xmm0 movdqa XMMWORD[16+rax],xmm0 lea rax,[32+rax] cmp rbp,rax ja NEAR $L$xts_enc_bzero lea rax,[120+rbp] movaps xmm6,XMMWORD[64+rbp] movaps xmm7,XMMWORD[80+rbp] movaps xmm8,XMMWORD[96+rbp] movaps xmm9,XMMWORD[112+rbp] movaps xmm10,XMMWORD[128+rbp] movaps xmm11,XMMWORD[144+rbp] movaps xmm12,XMMWORD[160+rbp] movaps xmm13,XMMWORD[176+rbp] movaps xmm14,XMMWORD[192+rbp] movaps xmm15,XMMWORD[208+rbp] lea rax,[160+rax] $L$xts_enc_tail: mov r15,QWORD[((-48))+rax] mov r14,QWORD[((-40))+rax] mov r13,QWORD[((-32))+rax] mov r12,QWORD[((-24))+rax] mov rbx,QWORD[((-16))+rax] mov rbp,QWORD[((-8))+rax] lea rsp,[rax] $L$xts_enc_epilogue: DB 0F3h,0C3h ;repret global bsaes_xts_decrypt ALIGN 16 bsaes_xts_decrypt: mov rax,rsp $L$xts_dec_prologue: push rbp push rbx push r12 push r13 push r14 push r15 lea rsp,[((-72))+rsp] mov r10,QWORD[160+rsp] mov r11,QWORD[168+rsp] lea rsp,[((-160))+rsp] movaps XMMWORD[64+rsp],xmm6 movaps XMMWORD[80+rsp],xmm7 movaps XMMWORD[96+rsp],xmm8 movaps XMMWORD[112+rsp],xmm9 movaps XMMWORD[128+rsp],xmm10 movaps XMMWORD[144+rsp],xmm11 movaps XMMWORD[160+rsp],xmm12 movaps XMMWORD[176+rsp],xmm13 movaps XMMWORD[192+rsp],xmm14 movaps XMMWORD[208+rsp],xmm15 $L$xts_dec_body: mov rbp,rsp mov r12,rcx mov r13,rdx mov r14,r8 mov r15,r9 lea rcx,[r11] lea rdx,[32+rbp] lea r8,[r10] call aes_nohw_encrypt mov eax,DWORD[240+r15] mov rbx,r14 mov edx,eax shl rax,7 sub rax,96 sub rsp,rax mov rax,rsp mov rcx,r15 mov r10d,edx call _bsaes_key_convert pxor xmm7,XMMWORD[rsp] movdqa XMMWORD[rax],xmm6 movdqa XMMWORD[rsp],xmm7 xor eax,eax and r14,-16 test ebx,15 setnz al shl rax,4 sub r14,rax sub rsp,0x80 movdqa xmm6,XMMWORD[32+rbp] pxor xmm14,xmm14 movdqa xmm12,XMMWORD[$L$xts_magic] pcmpgtd xmm14,xmm6 sub r14,0x80 jc NEAR $L$xts_dec_short jmp NEAR $L$xts_dec_loop ALIGN 16 $L$xts_dec_loop: pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm15,xmm6 movdqa XMMWORD[rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm0,xmm6 movdqa XMMWORD[16+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm7,XMMWORD[r12] pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm1,xmm6 movdqa XMMWORD[32+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm8,XMMWORD[16+r12] pxor xmm15,xmm7 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm2,xmm6 movdqa XMMWORD[48+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm9,XMMWORD[32+r12] pxor xmm0,xmm8 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm3,xmm6 movdqa XMMWORD[64+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm10,XMMWORD[48+r12] pxor xmm1,xmm9 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm4,xmm6 movdqa XMMWORD[80+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm11,XMMWORD[64+r12] pxor xmm2,xmm10 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm5,xmm6 movdqa XMMWORD[96+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm12,XMMWORD[80+r12] pxor xmm3,xmm11 movdqu xmm13,XMMWORD[96+r12] pxor xmm4,xmm12 movdqu xmm14,XMMWORD[112+r12] lea r12,[128+r12] movdqa XMMWORD[112+rsp],xmm6 pxor xmm5,xmm13 lea rax,[128+rsp] pxor xmm6,xmm14 mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm5,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm3,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm5 pxor xmm1,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm3 pxor xmm6,XMMWORD[80+rsp] movdqu XMMWORD[64+r13],xmm1 pxor xmm2,XMMWORD[96+rsp] movdqu XMMWORD[80+r13],xmm6 pxor xmm4,XMMWORD[112+rsp] movdqu XMMWORD[96+r13],xmm2 movdqu XMMWORD[112+r13],xmm4 lea r13,[128+r13] movdqa xmm6,XMMWORD[112+rsp] pxor xmm14,xmm14 movdqa xmm12,XMMWORD[$L$xts_magic] pcmpgtd xmm14,xmm6 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 sub r14,0x80 jnc NEAR $L$xts_dec_loop $L$xts_dec_short: add r14,0x80 jz NEAR $L$xts_dec_done pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm15,xmm6 movdqa XMMWORD[rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm0,xmm6 movdqa XMMWORD[16+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm7,XMMWORD[r12] cmp r14,16 je NEAR $L$xts_dec_1 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm1,xmm6 movdqa XMMWORD[32+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm8,XMMWORD[16+r12] cmp r14,32 je NEAR $L$xts_dec_2 pxor xmm15,xmm7 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm2,xmm6 movdqa XMMWORD[48+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm9,XMMWORD[32+r12] cmp r14,48 je NEAR $L$xts_dec_3 pxor xmm0,xmm8 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm3,xmm6 movdqa XMMWORD[64+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm10,XMMWORD[48+r12] cmp r14,64 je NEAR $L$xts_dec_4 pxor xmm1,xmm9 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm4,xmm6 movdqa XMMWORD[80+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm11,XMMWORD[64+r12] cmp r14,80 je NEAR $L$xts_dec_5 pxor xmm2,xmm10 pshufd xmm13,xmm14,0x13 pxor xmm14,xmm14 movdqa xmm5,xmm6 movdqa XMMWORD[96+rsp],xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 pcmpgtd xmm14,xmm6 pxor xmm6,xmm13 movdqu xmm12,XMMWORD[80+r12] cmp r14,96 je NEAR $L$xts_dec_6 pxor xmm3,xmm11 movdqu xmm13,XMMWORD[96+r12] pxor xmm4,xmm12 movdqa XMMWORD[112+rsp],xmm6 lea r12,[112+r12] pxor xmm5,xmm13 lea rax,[128+rsp] mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm5,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm3,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm5 pxor xmm1,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm3 pxor xmm6,XMMWORD[80+rsp] movdqu XMMWORD[64+r13],xmm1 pxor xmm2,XMMWORD[96+rsp] movdqu XMMWORD[80+r13],xmm6 movdqu XMMWORD[96+r13],xmm2 lea r13,[112+r13] movdqa xmm6,XMMWORD[112+rsp] jmp NEAR $L$xts_dec_done ALIGN 16 $L$xts_dec_6: pxor xmm3,xmm11 lea r12,[96+r12] pxor xmm4,xmm12 lea rax,[128+rsp] mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm5,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm3,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm5 pxor xmm1,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm3 pxor xmm6,XMMWORD[80+rsp] movdqu XMMWORD[64+r13],xmm1 movdqu XMMWORD[80+r13],xmm6 lea r13,[96+r13] movdqa xmm6,XMMWORD[96+rsp] jmp NEAR $L$xts_dec_done ALIGN 16 $L$xts_dec_5: pxor xmm2,xmm10 lea r12,[80+r12] pxor xmm3,xmm11 lea rax,[128+rsp] mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm5,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm3,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm5 pxor xmm1,XMMWORD[64+rsp] movdqu XMMWORD[48+r13],xmm3 movdqu XMMWORD[64+r13],xmm1 lea r13,[80+r13] movdqa xmm6,XMMWORD[80+rsp] jmp NEAR $L$xts_dec_done ALIGN 16 $L$xts_dec_4: pxor xmm1,xmm9 lea r12,[64+r12] pxor xmm2,xmm10 lea rax,[128+rsp] mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm5,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 pxor xmm3,XMMWORD[48+rsp] movdqu XMMWORD[32+r13],xmm5 movdqu XMMWORD[48+r13],xmm3 lea r13,[64+r13] movdqa xmm6,XMMWORD[64+rsp] jmp NEAR $L$xts_dec_done ALIGN 16 $L$xts_dec_3: pxor xmm0,xmm8 lea r12,[48+r12] pxor xmm1,xmm9 lea rax,[128+rsp] mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 pxor xmm5,XMMWORD[32+rsp] movdqu XMMWORD[16+r13],xmm0 movdqu XMMWORD[32+r13],xmm5 lea r13,[48+r13] movdqa xmm6,XMMWORD[48+rsp] jmp NEAR $L$xts_dec_done ALIGN 16 $L$xts_dec_2: pxor xmm15,xmm7 lea r12,[32+r12] pxor xmm0,xmm8 lea rax,[128+rsp] mov r10d,edx call _bsaes_decrypt8 pxor xmm15,XMMWORD[rsp] pxor xmm0,XMMWORD[16+rsp] movdqu XMMWORD[r13],xmm15 movdqu XMMWORD[16+r13],xmm0 lea r13,[32+r13] movdqa xmm6,XMMWORD[32+rsp] jmp NEAR $L$xts_dec_done ALIGN 16 $L$xts_dec_1: pxor xmm7,xmm15 lea r12,[16+r12] movdqa XMMWORD[32+rbp],xmm7 lea rcx,[32+rbp] lea rdx,[32+rbp] lea r8,[r15] call aes_nohw_decrypt pxor xmm15,XMMWORD[32+rbp] movdqu XMMWORD[r13],xmm15 lea r13,[16+r13] movdqa xmm6,XMMWORD[16+rsp] $L$xts_dec_done: and ebx,15 jz NEAR $L$xts_dec_ret pxor xmm14,xmm14 movdqa xmm12,XMMWORD[$L$xts_magic] pcmpgtd xmm14,xmm6 pshufd xmm13,xmm14,0x13 movdqa xmm5,xmm6 paddq xmm6,xmm6 pand xmm13,xmm12 movdqu xmm15,XMMWORD[r12] pxor xmm6,xmm13 lea rcx,[32+rbp] pxor xmm15,xmm6 lea rdx,[32+rbp] movdqa XMMWORD[32+rbp],xmm15 lea r8,[r15] call aes_nohw_decrypt pxor xmm6,XMMWORD[32+rbp] mov rdx,r13 movdqu XMMWORD[r13],xmm6 $L$xts_dec_steal: movzx eax,BYTE[16+r12] movzx ecx,BYTE[rdx] lea r12,[1+r12] mov BYTE[rdx],al mov BYTE[16+rdx],cl lea rdx,[1+rdx] sub ebx,1 jnz NEAR $L$xts_dec_steal movdqu xmm15,XMMWORD[r13] lea rcx,[32+rbp] pxor xmm15,xmm5 lea rdx,[32+rbp] movdqa XMMWORD[32+rbp],xmm15 lea r8,[r15] call aes_nohw_decrypt pxor xmm5,XMMWORD[32+rbp] movdqu XMMWORD[r13],xmm5 $L$xts_dec_ret: lea rax,[rsp] pxor xmm0,xmm0 $L$xts_dec_bzero: movdqa XMMWORD[rax],xmm0 movdqa XMMWORD[16+rax],xmm0 lea rax,[32+rax] cmp rbp,rax ja NEAR $L$xts_dec_bzero lea rax,[120+rbp] movaps xmm6,XMMWORD[64+rbp] movaps xmm7,XMMWORD[80+rbp] movaps xmm8,XMMWORD[96+rbp] movaps xmm9,XMMWORD[112+rbp] movaps xmm10,XMMWORD[128+rbp] movaps xmm11,XMMWORD[144+rbp] movaps xmm12,XMMWORD[160+rbp] movaps xmm13,XMMWORD[176+rbp] movaps xmm14,XMMWORD[192+rbp] movaps xmm15,XMMWORD[208+rbp] lea rax,[160+rax] $L$xts_dec_tail: mov r15,QWORD[((-48))+rax] mov r14,QWORD[((-40))+rax] mov r13,QWORD[((-32))+rax] mov r12,QWORD[((-24))+rax] mov rbx,QWORD[((-16))+rax] mov rbp,QWORD[((-8))+rax] lea rsp,[rax] $L$xts_dec_epilogue: DB 0F3h,0C3h ;repret ALIGN 64 _bsaes_const: $L$M0ISR: DQ 0x0a0e0206070b0f03,0x0004080c0d010509 $L$ISRM0: DQ 0x01040b0e0205080f,0x0306090c00070a0d $L$ISR: DQ 0x0504070602010003,0x0f0e0d0c080b0a09 $L$BS0: DQ 0x5555555555555555,0x5555555555555555 $L$BS1: DQ 0x3333333333333333,0x3333333333333333 $L$BS2: DQ 0x0f0f0f0f0f0f0f0f,0x0f0f0f0f0f0f0f0f $L$SR: DQ 0x0504070600030201,0x0f0e0d0c0a09080b $L$SRM0: DQ 0x0304090e00050a0f,0x01060b0c0207080d $L$M0SR: DQ 0x0a0e02060f03070b,0x0004080c05090d01 $L$SWPUP: DQ 0x0706050403020100,0x0c0d0e0f0b0a0908 $L$SWPUPM0SR: DQ 0x0a0d02060c03070b,0x0004080f05090e01 $L$ADD1: DQ 0x0000000000000000,0x0000000100000000 $L$ADD2: DQ 0x0000000000000000,0x0000000200000000 $L$ADD3: DQ 0x0000000000000000,0x0000000300000000 $L$ADD4: DQ 0x0000000000000000,0x0000000400000000 $L$ADD5: DQ 0x0000000000000000,0x0000000500000000 $L$ADD6: DQ 0x0000000000000000,0x0000000600000000 $L$ADD7: DQ 0x0000000000000000,0x0000000700000000 $L$ADD8: DQ 0x0000000000000000,0x0000000800000000 $L$xts_magic: DD 0x87,0,1,0 $L$masks: DQ 0x0101010101010101,0x0101010101010101 DQ 0x0202020202020202,0x0202020202020202 DQ 0x0404040404040404,0x0404040404040404 DQ 0x0808080808080808,0x0808080808080808 $L$M0: DQ 0x02060a0e03070b0f,0x0004080c0105090d $L$63: DQ 0x6363636363636363,0x6363636363636363 DB 66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102 DB 111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44 DB 32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44 DB 32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32 DB 65,110,100,121,32,80,111,108,121,97,107,111,118,0 ALIGN 64 EXTERN __imp_RtlVirtualUnwind ALIGN 16 se_handler: push rsi push rdi push rbx push rbp push r12 push r13 push r14 push r15 pushfq sub rsp,64 mov rax,QWORD[120+r8] mov rbx,QWORD[248+r8] mov rsi,QWORD[8+r9] mov r11,QWORD[56+r9] mov r10d,DWORD[r11] lea r10,[r10*1+rsi] cmp rbx,r10 jbe NEAR $L$in_prologue mov r10d,DWORD[4+r11] lea r10,[r10*1+rsi] cmp rbx,r10 jae NEAR $L$in_prologue mov r10d,DWORD[8+r11] lea r10,[r10*1+rsi] cmp rbx,r10 jae NEAR $L$in_tail mov rax,QWORD[160+r8] lea rsi,[64+rax] lea rdi,[512+r8] mov ecx,20 DD 0xa548f3fc lea rax,[((160+120))+rax] $L$in_tail: mov rbp,QWORD[((-48))+rax] mov rbx,QWORD[((-40))+rax] mov r12,QWORD[((-32))+rax] mov r13,QWORD[((-24))+rax] mov r14,QWORD[((-16))+rax] mov r15,QWORD[((-8))+rax] mov QWORD[144+r8],rbx mov QWORD[160+r8],rbp mov QWORD[216+r8],r12 mov QWORD[224+r8],r13 mov QWORD[232+r8],r14 mov QWORD[240+r8],r15 $L$in_prologue: mov QWORD[152+r8],rax mov rdi,QWORD[40+r9] mov rsi,r8 mov ecx,154 DD 0xa548f3fc mov rsi,r9 xor rcx,rcx mov rdx,QWORD[8+rsi] mov r8,QWORD[rsi] mov r9,QWORD[16+rsi] mov r10,QWORD[40+rsi] lea r11,[56+rsi] lea r12,[24+rsi] mov QWORD[32+rsp],r10 mov QWORD[40+rsp],r11 mov QWORD[48+rsp],r12 mov QWORD[56+rsp],rcx call QWORD[__imp_RtlVirtualUnwind] mov eax,1 add rsp,64 popfq pop r15 pop r14 pop r13 pop r12 pop rbp pop rbx pop rdi pop rsi DB 0F3h,0C3h ;repret section .pdata rdata align=4 ALIGN 4 DD $L$cbc_dec_prologue wrt ..imagebase DD $L$cbc_dec_epilogue wrt ..imagebase DD $L$cbc_dec_info wrt ..imagebase DD $L$ctr_enc_prologue wrt ..imagebase DD $L$ctr_enc_epilogue wrt ..imagebase DD $L$ctr_enc_info wrt ..imagebase DD $L$xts_enc_prologue wrt ..imagebase DD $L$xts_enc_epilogue wrt ..imagebase DD $L$xts_enc_info wrt ..imagebase DD $L$xts_dec_prologue wrt ..imagebase DD $L$xts_dec_epilogue wrt ..imagebase DD $L$xts_dec_info wrt ..imagebase section .xdata rdata align=8 ALIGN 8 $L$cbc_dec_info: DB 9,0,0,0 DD se_handler wrt ..imagebase DD $L$cbc_dec_body wrt ..imagebase,$L$cbc_dec_epilogue wrt ..imagebase DD $L$cbc_dec_tail wrt ..imagebase DD 0 $L$ctr_enc_info: DB 9,0,0,0 DD se_handler wrt ..imagebase DD $L$ctr_enc_body wrt ..imagebase,$L$ctr_enc_epilogue wrt ..imagebase DD $L$ctr_enc_tail wrt ..imagebase DD 0 $L$xts_enc_info: DB 9,0,0,0 DD se_handler wrt ..imagebase DD $L$xts_enc_body wrt ..imagebase,$L$xts_enc_epilogue wrt ..imagebase DD $L$xts_enc_tail wrt ..imagebase DD 0 $L$xts_dec_info: DB 9,0,0,0 DD se_handler wrt ..imagebase DD $L$xts_dec_body wrt ..imagebase,$L$xts_dec_epilogue wrt ..imagebase DD $L$xts_dec_tail wrt ..imagebase DD 0
; A309391: a(n) = gcd(n, A064169(n-2)) for n > 2. ; Submitted by Christian Krause ; 3,1,5,1,7,1,1,1,11,1,13,1,1,1,17,1,19,1,1,1,23,1,5,1,1,1,29,1,31,1,1,1,1,1,37,1,1,1,41,1,43,1,1,1,47,1,7,1,1,1,53,1,1,1,1,1,59,1,61,1,1,1,1,1,67,1,1,1,71,1,73,1,1,1,1,1,79,1,1,1,83,1,1,1,1,11,89,1,1,1,1,1,1,1,97,1,1,1,101,1 add $0,1 mov $1,$0 add $0,2 seq $1,1008 ; Numerators of harmonic numbers H(n) = Sum_{i=1..n} 1/i. gcd $0,$1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2016 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %include "sha1_job.asm" %include "memcpy.asm" %include "sha1_mb_mgr_datastruct.asm" %include "reg_sizes.asm" %ifdef HAVE_AS_KNOWS_AVX512 extern sha1_mb_x16_avx512 %ifidn __OUTPUT_FORMAT__, elf64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; LINUX register definitions %define arg1 rdi ; rcx %define arg2 rsi ; rdx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %else ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; WINDOWS register definitions %define arg1 rcx %define arg2 rdx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %endif ; Common definitions and latter-state(unused,covered,unchanged) %define state arg1 ; unchanged, mb_x16's input1 %define job arg2 ; arg2 unused %define len2 arg2 ; arg2 unused, mb_x16's input2 ; idx must be a register not clobberred by sha1_x16_avx512 %define idx r8 ; unchanged %define p r11 ; unused %define unused_lanes rbx ; covered %define job_rax rax ; covered %define len rax ; unused %define lane rbp ; unused %define tmp r9 ; covered %define num_lanes_inuse r9 ; covered %define lane_data r10 ; covered ; STACK_SPACE needs to be an odd multiple of 8 %define STACK_SPACE 8*8 + 16*10 + 8 ; JOB* sha1_mb_mgr_submit_avx512(MB_MGR *state, JOB_SHA1 *job) ; arg 1 : rcx : state ; arg 2 : rdx : job mk_global sha1_mb_mgr_submit_avx512, function sha1_mb_mgr_submit_avx512: sub rsp, STACK_SPACE mov [rsp + 8*0], rbx mov [rsp + 8*3], rbp mov [rsp + 8*4], r12 mov [rsp + 8*5], r13 mov [rsp + 8*6], r14 mov [rsp + 8*7], r15 %ifidn __OUTPUT_FORMAT__, win64 mov [rsp + 8*1], rsi mov [rsp + 8*2], rdi vmovdqa [rsp + 8*8 + 16*0], xmm6 vmovdqa [rsp + 8*8 + 16*1], xmm7 vmovdqa [rsp + 8*8 + 16*2], xmm8 vmovdqa [rsp + 8*8 + 16*3], xmm9 vmovdqa [rsp + 8*8 + 16*4], xmm10 vmovdqa [rsp + 8*8 + 16*5], xmm11 vmovdqa [rsp + 8*8 + 16*6], xmm12 vmovdqa [rsp + 8*8 + 16*7], xmm13 vmovdqa [rsp + 8*8 + 16*8], xmm14 vmovdqa [rsp + 8*8 + 16*9], xmm15 %endif mov unused_lanes, [state + _unused_lanes] mov lane, unused_lanes and lane, 0xF shr unused_lanes, 4 imul lane_data, lane, _LANE_DATA_size mov dword [job + _status], STS_BEING_PROCESSED lea lane_data, [state + _ldata + lane_data] mov [state + _unused_lanes], unused_lanes mov DWORD(len), [job + _len] mov [lane_data + _job_in_lane], job shl len,4 or len, lane mov [state + _lens + 4*lane], DWORD(len) ; Load digest words from result_digest vmovdqu xmm0, [job + _result_digest + 0*16] mov DWORD(tmp), [job + _result_digest + 1*16] vmovd [state + _args_digest + 4*lane + 0*64], xmm0 vpextrd [state + _args_digest + 4*lane + 1*64], xmm0, 1 vpextrd [state + _args_digest + 4*lane + 2*64], xmm0, 2 vpextrd [state + _args_digest + 4*lane + 3*64], xmm0, 3 mov [state + _args_digest + 4*lane + 4*64], DWORD(tmp) mov p, [job + _buffer] mov [state + _args_data_ptr + 8*lane], p mov DWORD(num_lanes_inuse), [state + _num_lanes_inuse] add num_lanes_inuse, 1 mov [state + _num_lanes_inuse], DWORD(num_lanes_inuse) cmp num_lanes_inuse, 16 jne return_null start_loop: ; Find min length, ymm0 holds ahead 8, ymm1 holds rear 8 vmovdqu ymm0, [state + _lens + 0*32] vmovdqu ymm1, [state + _lens + 1*32] vpminud ymm2, ymm0, ymm1 ; ymm2 has {H1,G1,F1,E1,D1,C1,B1,A1} vpalignr ymm3, ymm3, ymm2, 8 ; ymm3 has {x,x,H1,G1,x,x,D1,C1} vpminud ymm2, ymm2, ymm3 ; ymm2 has {x,x,H2,G2,x,x,D2,C2} vpalignr ymm3, ymm3, ymm2, 4 ; ymm3 has {x,x, x,H2,x,x, x,D2} vpminud ymm2, ymm2, ymm3 ; ymm2 has {x,x, x,G3,x,x, x,C3} vperm2i128 ymm3, ymm2, ymm2, 1 ; ymm3 has {x,x, x, x,x,x, x,C3} vpminud ymm2, ymm2, ymm3 ; ymm2 has min value in low dword vmovd DWORD(idx), xmm2 mov len2, idx and idx, 0xF ; idx represent min length index shr len2, 4 ; size in blocks jz len_is_0 vpand ymm2, ymm2, [rel clear_low_nibble] vpshufd ymm2, ymm2, 0 vpsubd ymm0, ymm0, ymm2 vpsubd ymm1, ymm1, ymm2 vmovdqu [state + _lens + 0*32], ymm0 vmovdqu [state + _lens + 1*32], ymm1 ; "state" and "args" are the same address, arg1 ; len is arg2 call sha1_mb_x16_avx512 ; state and idx are intact len_is_0: ; process completed job "idx" imul lane_data, idx, _LANE_DATA_size lea lane_data, [state + _ldata + lane_data] mov job_rax, [lane_data + _job_in_lane] mov unused_lanes, [state + _unused_lanes] mov qword [lane_data + _job_in_lane], 0 mov dword [job_rax + _status], STS_COMPLETED shl unused_lanes, 4 or unused_lanes, idx mov [state + _unused_lanes], unused_lanes mov DWORD(num_lanes_inuse), [state + _num_lanes_inuse] sub num_lanes_inuse, 1 mov [state + _num_lanes_inuse], DWORD(num_lanes_inuse) vmovd xmm0, [state + _args_digest + 4*idx + 0*64] vpinsrd xmm0, [state + _args_digest + 4*idx + 1*64], 1 vpinsrd xmm0, [state + _args_digest + 4*idx + 2*64], 2 vpinsrd xmm0, [state + _args_digest + 4*idx + 3*64], 3 mov DWORD(tmp), [state + _args_digest + 4*idx + 4*64] vmovdqa [job_rax + _result_digest + 0*16], xmm0 mov [job_rax + _result_digest + 1*16], DWORD(tmp) return: %ifidn __OUTPUT_FORMAT__, win64 vmovdqa xmm6, [rsp + 8*8 + 16*0] vmovdqa xmm7, [rsp + 8*8 + 16*1] vmovdqa xmm8, [rsp + 8*8 + 16*2] vmovdqa xmm9, [rsp + 8*8 + 16*3] vmovdqa xmm10, [rsp + 8*8 + 16*4] vmovdqa xmm11, [rsp + 8*8 + 16*5] vmovdqa xmm12, [rsp + 8*8 + 16*6] vmovdqa xmm13, [rsp + 8*8 + 16*7] vmovdqa xmm14, [rsp + 8*8 + 16*8] vmovdqa xmm15, [rsp + 8*8 + 16*9] mov rsi, [rsp + 8*1] mov rdi, [rsp + 8*2] %endif mov rbx, [rsp + 8*0] mov rbp, [rsp + 8*3] mov r12, [rsp + 8*4] mov r13, [rsp + 8*5] mov r14, [rsp + 8*6] mov r15, [rsp + 8*7] add rsp, STACK_SPACE ret return_null: xor job_rax, job_rax jmp return section .data align=32 align 32 clear_low_nibble: dq 0x00000000FFFFFFF0, 0x0000000000000000 dq 0x00000000FFFFFFF0, 0x0000000000000000 %else %ifidn __OUTPUT_FORMAT__, win64 global no_sha1_mb_mgr_submit_avx512 no_sha1_mb_mgr_submit_avx512: %endif %endif ; HAVE_AS_KNOWS_AVX512
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1990-1995. All rights reserved. GEOWORKS CONFIDENTIAL PROJECT: GEOS MODULE: Sokoban FILE: sokoban.asm REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 11/10/92 Initial version DESCRIPTION: GEOS port of the much-beloved Sokoban game. RCS STAMP: $Id: sokobanManager.asm,v 1.1 97/04/04 15:12:55 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;------------------------------------------------------------------------------ ; Product shme ;------------------------------------------------------------------------------ include stdapp.def _JEDI = FALSE LEVEL_EDITOR equ TRUE SET_BACKGROUND_COLOR equ TRUE EXTERNAL_LEVELS equ TRUE HIGH_SCORES equ TRUE PLAY_SOUNDS equ TRUE DOCUMENT_CONTROL equ TRUE ; ; .gp files only handle constants being defined, and don't ; care what they're defined to. So we only define them ; where they're needed. ; GP_LEVEL_EDITOR equ TRUE GP_HIGH_SCORES equ TRUE GP_PLAY_SOUNDS equ TRUE GP_DOCUMENT_CONTROL equ TRUE ;------------------------------------------------------------------------------ ; Include files ;------------------------------------------------------------------------------ include file.def include hugearr.def include vm.def include char.def include input.def include initfile.def ; loading/saving options include system.def include gstring.def include Internal/threadIn.def ; ThreadBorrowStackSpace include assert.def include Objects/winC.def include Objects/inputC.def ; Required for mouse input ;------------------------------------------------------------------------------ ; Libraries used ;------------------------------------------------------------------------------ if HIGH_SCORES UseLib game.def endif if PLAY_SOUNDS UseLib sound.def endif UseLib Objects/vTextC.def UseLib Objects/colorC.def ; ; Local include files. ; include sokoban.def include sokoban.rdef ; include compiled UI definitions ; ; There must be an instance of every class in idata. ; idata segment SokobanProcessClass mask CLASSF_NEVER_SAVED SokobanApplicationClass MapContentClass if HIGH_SCORES SokobanHighScoreClass endif MapViewClass idata ends ;------------------------------------------------------------------------------ ; Resources ;------------------------------------------------------------------------------ ; ; Include all the source assembly files (small model). ; include sokobanBitmaps.asm include sokoban.asm include sokobanUI.asm include sokobanDocument.asm include sokobanApplication.asm include sokobanSolve.asm include sokobanMove.asm if PLAY_SOUNDS include sokobanSounds.asm endif if HIGH_SCORES include sokobanScores.asm endif if LEVEL_EDITOR include sokobanLevels.asm include sokobanEditor.asm endif
// -*- C++ -*- // // Package: FWLite // Class : storageSize // // Implementation: // [Notes on implementation] // // Original Author: Chris Jones // Created: Thu Jan 20 09:50:58 CST 2011 // // system include files #include <iostream> #include <boost/program_options.hpp> #include "TClass.h" #include "TFile.h" #include "TBranch.h" #include "TBufferFile.h" #include "TTree.h" // user include files #include "FWCore/FWLite/interface/FWLiteEnabler.h" #include "FWCore/Utilities/interface/Exception.h" // // constants, enums and typedefs // static char const* const kBranchNameOpt = "branchName"; static char const* const kFileNameOpt = "fileName"; static char const* const kHelpOpt = "help"; static char const* const kHelpCommandOpt="help,h"; static char const* const kEntryNumberCommandOpt = "entryNumber,e"; static char const* const kEntryNumberOpt = "entryNumber"; int main(int argc, char* argv[]) try { std::string descString(argv[0]); descString += " [options] [--"; descString += kBranchNameOpt; descString += "] branch_name [--"; descString += kFileNameOpt; descString += "] file_name" "\n The program dumps information about how much storage space is needed to store a given TBranch within a ROOT file" "\nAllowed options"; boost::program_options::options_description desc(descString); desc.add_options() (kHelpCommandOpt, "show this help message") (kEntryNumberCommandOpt, boost::program_options::value<int>(),"read branch from the given entry value (default 0)") (kBranchNameOpt,"name of branch") (kFileNameOpt,"name of file"); boost::program_options::positional_options_description p; p.add(kBranchNameOpt, 1); p.add(kFileNameOpt, 1); boost::program_options::variables_map vm; try { store(boost::program_options::command_line_parser(argc,argv).options(desc).positional(p).run(),vm); notify(vm); } catch(boost::program_options::error const& iException) { std::cerr <<"failed to parse command line \n"<<iException.what()<<"\n"; return 1; } if(vm.count(kHelpOpt)) { std::cout << desc <<std::endl; return 0; } int entryNumber = 0; if(vm.count(kEntryNumberOpt)) { entryNumber = vm[kEntryNumberOpt].as<int>(); } if(!vm.count(kBranchNameOpt)) { std::cerr <<"no branch name given\n"; return 1; } if(!vm.count(kFileNameOpt)) { std::cerr <<"no branch name given\n"; return 1; } std::string branchName(vm[kBranchNameOpt].as<std::string>()); std::string fileName(vm[kFileNameOpt].as<std::string>()); TFile* file = TFile::Open(fileName.c_str()); if (nullptr == file) { std::cerr <<"failed to open '"<<fileName<<"'"; return 1; } TTree* eventTree = dynamic_cast<TTree*> (file->Get("Events")); if(nullptr == eventTree) { std::cerr <<"The file '"<<fileName<<"' does not contain an 'Events' TTree"; return 1; } TBranch* branch = eventTree->GetBranch(branchName.c_str()); if(nullptr == branch) { std::cerr <<"The Events TTree does not contain the branch "<<branchName; return 1; } FWLiteEnabler::enable(); TClass* cls = TClass::GetClass(branch->GetClassName()); if(nullptr == cls) { std::cerr <<"class '"<<branch->GetClassName()<<"' is unknown by ROOT\n"; return 1; } void* objInstance = cls->New(); if(nullptr == objInstance) { std::cerr <<"unable to create a default instance of the class "<<branch->GetClassName(); return 1; } //associate this with the branch void* pObjInstance = &objInstance; branch->SetAddress(pObjInstance); branch->GetEntry(entryNumber); TBufferFile bf(TBuffer::kWrite); gDebug = 3; cls->WriteBuffer(bf, objInstance); gDebug = 0; std::cout <<"Total amount stored: "<<bf.Length()<<" bytes"<<std::endl; std::cout<<"\nNOTE: add 4 bytes for each 'has written' value because of a bug in ROOT's printout of the accounting" <<"\n Each class (inheriting or as member data) has metadata an overhead of 10 bytes"<<std::endl; return 0; } catch(cms::Exception const& e) { std::cerr << e.explainSelf() << std::endl; return 1; } catch(std::exception const& e) { std::cerr << e.what() << std::endl; return 1; }
#include <qalloc> // Compile with: qcor -qpu qpp -qrt ftqc simple-demo.cpp // or with noise: qcor -qpu aer[noise-model:noise_model.json] -qrt ftqc simple-demo.cpp // Execute: ./a.out // We should get the print out conditioned by the measurement. // If not using the "ftqc" QRT, this will cause errors since the Measure results // are not available yet. __qpu__ void bell(qreg q, int nbRuns) { using qcor::xasm; for (int i = 0; i < nbRuns; ++i) { H(q[0]); CX(q[0], q[1]); const bool q0Result = Measure(q[0]); const bool q1Result = Measure(q[1]); if (q0Result == q1Result) { std::cout << "Iter " << i << ": Matched!\n"; } else { std::cout << "Iter " << i << ": NOT Matched!\n"; } // Reset qubits if (q0Result) { X(q[0]); } if (q1Result) { X(q[1]); } } } int main() { auto q = qalloc(2); bell(q, 100); }
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_UC_ht+0x5d34, %rax clflush (%rax) nop nop nop nop cmp $58185, %r10 mov $0x6162636465666768, %r8 movq %r8, %xmm2 vmovups %ymm2, (%rax) nop nop nop nop nop cmp %r14, %r14 lea addresses_WT_ht+0xd134, %rsi lea addresses_UC_ht+0xcab4, %rdi nop nop nop nop nop and $10689, %r8 mov $103, %rcx rep movsq nop nop nop add %rcx, %rcx lea addresses_D_ht+0xc757, %rax cmp %r8, %r8 mov $0x6162636465666768, %rdi movq %rdi, (%rax) nop nop nop nop nop add $60708, %rsi lea addresses_WC_ht+0xd222, %r8 nop nop nop nop inc %r10 mov (%r8), %rsi sub %rcx, %rcx lea addresses_A_ht+0x1cbb8, %rdi nop nop xor %r10, %r10 mov $0x6162636465666768, %r8 movq %r8, %xmm0 movups %xmm0, (%rdi) nop nop nop nop xor $35198, %r14 lea addresses_WC_ht+0x6ab4, %r10 xor $22927, %rax movw $0x6162, (%r10) nop nop nop nop sub %r8, %r8 lea addresses_normal_ht+0x1802a, %rsi lea addresses_normal_ht+0x13d48, %rdi nop nop nop nop sub %r13, %r13 mov $84, %rcx rep movsb nop nop nop nop nop xor $25006, %rsi lea addresses_WT_ht+0x9614, %rdi nop cmp %r10, %r10 mov $0x6162636465666768, %rax movq %rax, (%rdi) nop nop cmp $1024, %rdi lea addresses_WT_ht+0x10ab4, %rax nop nop nop nop nop inc %r8 mov (%rax), %si nop nop and %r14, %r14 lea addresses_WT_ht+0x10564, %r8 clflush (%r8) nop xor $64322, %rax mov (%r8), %rdi nop cmp $8240, %rsi lea addresses_UC_ht+0xebb2, %rsi lea addresses_A_ht+0x10030, %rdi nop nop nop nop nop xor %r13, %r13 mov $21, %rcx rep movsq cmp %r13, %r13 lea addresses_normal_ht+0x10634, %rsi lea addresses_WC_ht+0xcab4, %rdi clflush (%rdi) nop nop nop cmp $38041, %r13 mov $110, %rcx rep movsl add $40058, %r8 lea addresses_normal_ht+0x11734, %r13 inc %r14 movb $0x61, (%r13) nop nop inc %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r9 push %rax push %rbp push %rbx // Store lea addresses_WT+0x1a494, %r9 nop nop nop nop nop add $30883, %rax movb $0x51, (%r9) cmp $60748, %r11 // Faulty Load lea addresses_RW+0x22b4, %r11 nop cmp $39602, %rbp mov (%r11), %r10w lea oracles, %rbp and $0xff, %r10 shlq $12, %r10 mov (%rbp,%r10,1), %r10 pop %rbx pop %rbp pop %rax pop %r9 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 2, 'AVXalign': True}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WT', 'size': 1, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': True, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': True}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
// Copyright 2019 Autodesk, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "read_geometry.h" #include "registry.h" #include <pxr/usd/usdGeom/basisCurves.h> #include <pxr/usd/usdGeom/capsule.h> #include <pxr/usd/usdGeom/cone.h> #include <pxr/usd/usdGeom/cube.h> #include <pxr/usd/usdGeom/curves.h> #include <pxr/usd/usdGeom/cylinder.h> #include <pxr/usd/usdGeom/mesh.h> #include <pxr/usd/usdGeom/pointInstancer.h> #include <pxr/usd/usdGeom/points.h> #include <pxr/usd/usdGeom/sphere.h> #include <pxr/usd/usdVol/openVDBAsset.h> #include <pxr/usd/usdVol/volume.h> #include <pxr/base/gf/matrix4f.h> #include <pxr/base/gf/rotation.h> #include <pxr/base/gf/transform.h> #include <pxr/base/tf/stringUtils.h> #include <ai.h> #include <cstdio> #include <cstring> #include <string> #include <vector> #include <constant_strings.h> #include <shape_utils.h> #include "utils.h" //-************************************************************************* PXR_NAMESPACE_USING_DIRECTIVE namespace { /** * Read a UsdGeomPointsBased points attribute to get its positions, as well as its velocities * If velocities are found, we just get the positions at the "current" frame, and interpolate * to compute the positions keys. * If no velocities are found, we get the positions at the different motion steps **/ static inline void _ReadPointsAndVelocities(const UsdGeomPointBased &geom, AtNode *node, const char *attrName, const TimeSettings &time) { UsdAttribute pointsAttr = geom.GetPointsAttr(); UsdAttribute velAttr = geom.GetVelocitiesAttr(); VtValue velValue; if (time.motionBlur && velAttr && velAttr.Get(&velValue, time.frame)) { // Motion blur is enabled and velocity attribute is present const VtArray<GfVec3f>& velArray = velValue.Get<VtArray<GfVec3f>>(); size_t velSize = velArray.size(); if (velSize > 0) { // Non-empty velocities VtValue posValue; if (pointsAttr.Get(&posValue, time.frame)) { const VtArray<GfVec3f>& posArray = posValue.Get<VtArray<GfVec3f>>(); size_t posSize = posArray.size(); // Only consider velocities if they're the same size as positions if (posSize == velSize) { VtArray<GfVec3f> fullVec; fullVec.resize(2 * posSize); // we just want 2 motion keys const GfVec3f *pos = posArray.data(); const GfVec3f *vel = velArray.data(); for (size_t i = 0; i < posSize; ++i, pos++, vel++) { // Set 2 keys, the first one will be the extrapolated // position at "shutter start", and the second the // extrapolated position at "shutter end", based // on the velocities fullVec[i] = (*pos) + time.motionStart * (*vel); fullVec[i + posSize] = (*pos) + time.motionEnd * (*vel); } // Set the arnold array attribute AiNodeSetArray(node, attrName, AiArrayConvert(posSize, 2, AI_TYPE_VECTOR, fullVec.data())); // We need to set the motion start and motion end // corresponding the array keys we've just set AiNodeSetFlt(node, str::motion_start, time.motionStart); AiNodeSetFlt(node, str::motion_end, time.motionEnd); return; } } } } // No velocities, let's read the positions, eventually at different motion frames if (ReadArray<GfVec3f, GfVec3f>(pointsAttr, node, attrName, time) > 1) { // We got more than 1 key, so we need to set the motion start/end AiNodeSetFlt(node, str::motion_start, time.motionStart); AiNodeSetFlt(node, str::motion_end, time.motionEnd); } } } // namespace struct MeshOrientation { MeshOrientation() : reverse(false) {} VtIntArray nsidesArray; bool reverse; template <class T> void OrientFaceIndexAttribute(T& attr); }; // Reverse an attribute of the face. Basically, it converts from the clockwise // to the counterclockwise and back. template <class T> void MeshOrientation::OrientFaceIndexAttribute(T& attr) { if (!reverse) return; size_t counter = 0; for (auto npoints : nsidesArray) { for (size_t j = 0; j < npoints / 2; j++) { size_t from = counter + j; size_t to = counter + npoints - 1 - j; std::swap(attr[from], attr[to]); } counter += npoints; } } class MeshPrimvarsRemapper : public PrimvarsRemapper { public: MeshPrimvarsRemapper(MeshOrientation &orientation) : _orientation(orientation) {} virtual ~MeshPrimvarsRemapper() {} bool RemapIndexes(const UsdGeomPrimvar &primvar, const TfToken &interpolation, std::vector<unsigned int> &indexes) override; private: MeshOrientation &_orientation; }; bool MeshPrimvarsRemapper::RemapIndexes(const UsdGeomPrimvar &primvar, const TfToken &interpolation, std::vector<unsigned int> &indexes) { if (interpolation != UsdGeomTokens->faceVarying) return false; _orientation.OrientFaceIndexAttribute(indexes); return true; } /** Reading a USD Mesh description to Arnold **/ void UsdArnoldReadMesh::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; // For some attributes, we should never try to read them with motion blur, // we use another timeSettings for them TimeSettings staticTime(time); staticTime.motionBlur = false; AtNode *node = context.CreateArnoldNode("polymesh", prim.GetPath().GetText()); AiNodeSetBool(node, str::smoothing, true); // Get mesh. UsdGeomMesh mesh(prim); MeshOrientation meshOrientation; // Get orientation. If Left-handed, we will need to invert the vertex // indices { TfToken orientationToken; if (mesh.GetOrientationAttr().Get(&orientationToken, frame)) { if (orientationToken == UsdGeomTokens->leftHanded) { meshOrientation.reverse = true; mesh.GetFaceVertexCountsAttr().Get(&meshOrientation.nsidesArray, frame); } } } ReadArray<int, unsigned char>(mesh.GetFaceVertexCountsAttr(), node, "nsides", staticTime); if (!meshOrientation.reverse) { // Basic right-handed orientation, no need to do anything special here ReadArray<int, unsigned int>(mesh.GetFaceVertexIndicesAttr(), node, "vidxs", staticTime); } else { // We can't call ReadArray here because the orientation requires to // reverse face attributes. So we're duplicating the function here. VtIntArray array; mesh.GetFaceVertexIndicesAttr().Get(&array, frame); size_t size = array.size(); if (size > 0) { meshOrientation.OrientFaceIndexAttribute(array); // Need to convert the data from int to unsigned int std::vector<unsigned int> arnold_vec(array.begin(), array.end()); AiNodeSetArray(node, str::vidxs, AiArrayConvert(size, 1, AI_TYPE_UINT, arnold_vec.data())); } else AiNodeResetParameter(node, str::vidxs); } _ReadPointsAndVelocities(mesh, node, str::vlist, time); // Read USD builtin normals VtValue normalsValue; if (mesh.GetNormalsAttr().Get(&normalsValue, frame)) { TfToken normalsInterp = mesh.GetNormalsInterpolation(); const VtArray<GfVec3f>& normalsArray = normalsValue.Get<VtArray<GfVec3f>>(); AiNodeSetArray(node, str::nlist, AiArrayConvert(normalsArray.size(), 1, AI_TYPE_VECTOR, normalsArray.data())); // Arnold expects indexed normals, so we need to create the nidxs list accordingly if (normalsInterp == UsdGeomTokens->varying || (normalsInterp == UsdGeomTokens->vertex)) AiNodeSetArray(node, str::nidxs, AiArrayCopy(AiNodeGetArray(node, str::vidxs))); else if (normalsInterp == UsdGeomTokens->faceVarying) { std::vector<unsigned int> nidxs; nidxs.resize(normalsArray.size()); // Fill it with 0, 1, ..., 99. std::iota(std::begin(nidxs), std::end(nidxs), 0); AiNodeSetArray(node, str::nidxs, AiArrayConvert(nidxs.size(), 1, AI_TYPE_UINT, nidxs.data())); } } VtValue sidednessValue; if (mesh.GetDoubleSidedAttr().Get(&sidednessValue, frame)) AiNodeSetByte(node, str::sidedness, VtValueGetBool(sidednessValue) ? AI_RAY_ALL : 0); // reset subdiv_iterations to 0, it might be set in readArnoldParameter AiNodeSetByte(node, str::subdiv_iterations, 0); ReadMatrix(prim, node, time, context); MeshPrimvarsRemapper primvarsRemapper(meshOrientation); ReadPrimvars(prim, node, time, context, &primvarsRemapper); std::vector<UsdGeomSubset> subsets = UsdGeomSubset::GetAllGeomSubsets(mesh); if (!subsets.empty()) { // Currently, subsets are only used for shader & disp_map assignments VtIntArray faceVtxArray; mesh.GetFaceVertexCountsAttr().Get(&faceVtxArray, frame); ReadSubsetsMaterialBinding(prim, node, context, subsets, faceVtxArray.size()); } else { ReadMaterialBinding(prim, node, context); } UsdAttribute cornerWeightsAttr = mesh.GetCornerSharpnessesAttr(); UsdAttribute creaseWeightsAttr = mesh.GetCreaseSharpnessesAttr(); if (cornerWeightsAttr.HasAuthoredValue() || creaseWeightsAttr.HasAuthoredValue()) { VtIntArray cornerIndices; mesh.GetCornerIndicesAttr().Get(&cornerIndices, frame); VtArray<float> cornerWeights; cornerWeightsAttr.Get(&cornerWeights, frame); VtIntArray creaseIndices; mesh.GetCreaseIndicesAttr().Get(&creaseIndices, frame); VtArray<float> creaseWeights; creaseWeightsAttr.Get(&creaseWeights, frame); VtIntArray creaseLengths; mesh.GetCreaseLengthsAttr().Get(&creaseLengths, frame); ArnoldUsdReadCreases(node, cornerIndices, cornerWeights, creaseIndices, creaseLengths, creaseWeights); } _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check if subdiv_iterations were set in _ReadArnoldParameters, // and only set the subdiv_type if it's > 0. If we don't do this, // we get smoothed normals by default. // Also, we only read the builting subdivisionScheme if the arnold // attribute wasn't explcitely set above, through primvars:arnold (see #679) if ((!prim.HasAttribute(str::t_primvars_arnold_subdiv_type)) && (AiNodeGetByte(node, str::subdiv_iterations) > 0)) { TfToken subdiv; mesh.GetSubdivisionSchemeAttr().Get(&subdiv, time.frame); if (subdiv == UsdGeomTokens->none) AiNodeSetStr(node, str::subdiv_type, str::none); else if (subdiv == UsdGeomTokens->catmullClark) AiNodeSetStr(node, str::subdiv_type, str::catclark); else if (subdiv == UsdGeomTokens->bilinear) AiNodeSetStr(node, str::subdiv_type, str::linear); else AiMsgWarning( "[usd] %s subdivision scheme not supported for mesh on path %s", subdiv.GetString().c_str(), mesh.GetPath().GetString().c_str()); } // Check the prim visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } class CurvesPrimvarsRemapper : public PrimvarsRemapper { public: CurvesPrimvarsRemapper(bool remapValues, ArnoldUsdCurvesData &curvesData) : _remapValues(remapValues), _curvesData(curvesData) {} virtual ~CurvesPrimvarsRemapper() {} bool RemapValues(const UsdGeomPrimvar &primvar, const TfToken &interpolation, VtValue &value) override; void RemapPrimvar(TfToken &name, TfToken &interpolation) override; private: bool _remapValues; ArnoldUsdCurvesData &_curvesData; }; bool CurvesPrimvarsRemapper::RemapValues(const UsdGeomPrimvar &primvar, const TfToken &interpolation, VtValue &value) { if (!_remapValues) return false; if (interpolation != UsdGeomTokens->vertex && interpolation != UsdGeomTokens->varying) return false; // Try to read any of the following types, depending on which type the value is holding return _curvesData.RemapCurvesVertexPrimvar<float, double, GfVec2f, GfVec2d, GfVec3f, GfVec3d, GfVec4f, GfVec4d, int, unsigned int, unsigned char, bool>(value); } void CurvesPrimvarsRemapper::RemapPrimvar(TfToken &name, TfToken &interpolation) { // primvars:st should be converted to curves "uvs" #957 if (name == str::t_st) name = str::t_uvs; } void UsdArnoldReadCurves::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; AtNode *node = context.CreateArnoldNode("curves", prim.GetPath().GetText()); AtString basis = str::linear; if (prim.IsA<UsdGeomBasisCurves>()) { // TODO: use a scope_pointer for curves and basisCurves. UsdGeomBasisCurves basisCurves(prim); TfToken curveType; basisCurves.GetTypeAttr().Get(&curveType, frame); if (curveType == UsdGeomTokens->cubic) { TfToken basisType; basisCurves.GetBasisAttr().Get(&basisType, frame); if (basisType == UsdGeomTokens->bezier) basis = str::bezier; else if (basisType == UsdGeomTokens->bspline) basis = str::b_spline; else if (basisType == UsdGeomTokens->catmullRom) basis = str::catmull_rom; } } AiNodeSetStr(node, str::basis, basis); UsdGeomCurves curves(prim); // CV counts per curve ReadArray<int, unsigned int>(curves.GetCurveVertexCountsAttr(), node, "num_points", time); // CVs positions _ReadPointsAndVelocities(curves, node, "points", time); AtArray *pointsArray = AiNodeGetArray(node, str::points); unsigned int pointsSize = (pointsArray) ? AiArrayGetNumElements(pointsArray) : 0; // Widths // We need to divide the width by 2 in order to get the radius for arnold points VtValue widthValues; VtIntArray vertexCounts; curves.GetCurveVertexCountsAttr().Get(&vertexCounts, frame); const auto vstep = basis == str::bezier ? 3 : 1; const auto vmin = basis == str::linear ? 2 : 4; ArnoldUsdCurvesData curvesData(vmin, vstep, vertexCounts); if (curves.GetWidthsAttr().Get(&widthValues, frame)) { TfToken widthInterpolation = curves.GetWidthsInterpolation(); if ((widthInterpolation == UsdGeomTokens->vertex || widthInterpolation == UsdGeomTokens->varying) && basis != str::linear) { curvesData.RemapCurvesVertexPrimvar<float, double>(widthValues); curvesData.SetRadiusFromValue(node, widthValues); } else { curvesData.SetRadiusFromValue(node, widthValues); } } ReadMatrix(prim, node, time, context); CurvesPrimvarsRemapper primvarsRemapper((basis != str::linear), curvesData); ReadPrimvars(prim, node, time, context, &primvarsRemapper); std::vector<UsdGeomSubset> subsets = UsdGeomSubset::GetAllGeomSubsets(curves); if (!subsets.empty()) { // Currently, subsets are only used for shader & disp_map assignments VtIntArray curveVtxArray; curves.GetCurveVertexCountsAttr().Get(&curveVtxArray, frame); ReadSubsetsMaterialBinding(prim, node, context, subsets, curveVtxArray.size()); } else { ReadMaterialBinding(prim, node, context); } _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the prim visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } void UsdArnoldReadPoints::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; AtNode *node = context.CreateArnoldNode("points", prim.GetPath().GetText()); UsdGeomPoints points(prim); // Points positions _ReadPointsAndVelocities(points, node, "points", time); AtArray *pointsArray = AiNodeGetArray(node, "points"); unsigned int pointsSize = (pointsArray) ? AiArrayGetNumElements(pointsArray) : 0; // Points radius // We need to divide the width by 2 in order to get the radius for arnold points VtArray<float> widthArray; if (points.GetWidthsAttr().Get(&widthArray, frame)) { size_t widthCount = widthArray.size(); if (widthCount <= 1 && pointsSize > widthCount) { // USD accepts empty width attributes, or a constant width for all points, // but arnold fails in that case. So we need to generate a dedicated array float radiusVal = (widthCount == 0) ? 0.f : widthArray[0] * 0.5f; // Create an array where each point has the same radius std::vector<float> radiusVec(pointsSize, radiusVal); AiNodeSetArray(node, str::radius, AiArrayConvert(pointsSize, 1, AI_TYPE_FLOAT, &radiusVec[0])); } else if (widthCount > 0) { AtArray *radiusArray = AiArrayAllocate(widthCount, 1, AI_TYPE_FLOAT); float *out = static_cast<float *>(AiArrayMap(radiusArray)); for (unsigned int i = 0; i < widthCount; ++i) { out[i] = widthArray[i] * 0.5f; } AiArrayUnmap(radiusArray); AiNodeSetArray(node, str::radius, radiusArray); } } ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context); _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the primitive visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } /** * Convert the basic USD shapes (cube, sphere, cylinder, cone,...) * to Arnold. There are 2 main differences so far : * - capsules don't exist in arnold * - cylinders are different (one is closed the other isn't) **/ void UsdArnoldReadCube::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; AtNode *node = context.CreateArnoldNode("box", prim.GetPath().GetText()); UsdGeomCube cube(prim); VtValue sizeValue; if (cube.GetSizeAttr().Get(&sizeValue, frame)) { float size = VtValueGetFloat(sizeValue); AiNodeSetVec(node, str::_min, -size / 2.f, -size / 2.f, -size / 2.f); AiNodeSetVec(node, str::_max, size / 2.f, size / 2.f, size / 2.f); } ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context); _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the primitive visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } void UsdArnoldReadSphere::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; AtNode *node = context.CreateArnoldNode("sphere", prim.GetPath().GetText()); UsdGeomSphere sphere(prim); VtValue radiusValue; if (sphere.GetRadiusAttr().Get(&radiusValue, frame)) AiNodeSetFlt(node, str::radius, VtValueGetFloat(radiusValue)); ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context); _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the primitive visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } // Conversion code that is common to cylinder, cone and capsule template <class T> void exportCylindricalShape(const UsdPrim &prim, AtNode *node, float frame, const char *radiusName) { T geom(prim); VtValue radiusValue; if (geom.GetRadiusAttr().Get(&radiusValue, frame)) AiNodeSetFlt(node, radiusName, VtValueGetFloat(radiusValue)); float height = 1.f; VtValue heightValue; if (geom.GetHeightAttr().Get(&heightValue, frame)) height = VtValueGetFloat(heightValue); height /= 2.f; TfToken axis; geom.GetAxisAttr().Get(&axis, frame); AtVector bottom(0.f, 0.f, 0.f); AtVector top(0.f, 0.f, 0.f); if (axis == UsdGeomTokens->x) { bottom.x = -height; top.x = height; } else if (axis == UsdGeomTokens->y) { bottom.y = -height; top.y = height; } else // UsdGeomTokens->z or unknown { bottom.z = -height; top.z = height; } AiNodeSetVec(node, str::bottom, bottom.x, bottom.y, bottom.z); AiNodeSetVec(node, str::top, top.x, top.y, top.z); } void UsdArnoldReadCylinder::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { AtNode *node = context.CreateArnoldNode("cylinder", prim.GetPath().GetText()); const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; exportCylindricalShape<UsdGeomCylinder>(prim, node, frame, "radius"); ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context); _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the primitive visibility, set the AtNode visibility to 0 if it's meant to be hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } void UsdArnoldReadCone::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { AtNode *node = context.CreateArnoldNode("cone", prim.GetPath().GetText()); const TimeSettings &time = context.GetTimeSettings(); exportCylindricalShape<UsdGeomCone>(prim, node, time.frame, "bottom_radius"); ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context); _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the primitive visibility, set the AtNode visibility to 0 if it's meant to be hidden if (!context.GetPrimVisibility(prim, time.frame)) AiNodeSetByte(node, str::visibility, 0); } // Note that we don't have capsule shapes in Arnold. Do we want to make a // special case, and combine cylinders with spheres, or is it enough for now ? void UsdArnoldReadCapsule::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { AtNode *node = context.CreateArnoldNode("cylinder", prim.GetPath().GetText()); const TimeSettings &time = context.GetTimeSettings(); exportCylindricalShape<UsdGeomCapsule>(prim, node, time.frame, "radius"); ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context); _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the primitive visibility, set the AtNode visibility to 0 if it's meant to be hidden if (!context.GetPrimVisibility(prim, time.frame)) AiNodeSetByte(node, str::visibility, 0); } void ApplyInputMatrix(AtNode *node, const AtParamValueMap* params) { if (params == nullptr) return; AtArray* parentMatrices = nullptr; if (!AiParamValueMapGetArray(params, str::matrix, &parentMatrices)) return; if (parentMatrices == nullptr || AiArrayGetNumElements(parentMatrices) == 0) return; AtArray *matrix = AiNodeGetArray(node, str::matrix); AtMatrix m; if (matrix != nullptr && AiArrayGetNumElements(matrix) > 0) m = AiM4Mult(AiArrayGetMtx(parentMatrices, 0), AiArrayGetMtx(matrix, 0)); else m = AiArrayGetMtx(parentMatrices, 0); AiArraySetMtx(matrix, 0, m); } void UsdArnoldReadBounds::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; if (!context.GetPrimVisibility(prim, frame)) return; AtNode *node = context.CreateArnoldNode("box", prim.GetPath().GetText()); if (!prim.IsA<UsdGeomBoundable>()) return; UsdGeomBoundable boundable(prim); VtVec3fArray extent; UsdGeomBoundable::ComputeExtentFromPlugins(boundable, UsdTimeCode(frame), &extent); AiNodeSetVec(node, str::_min, extent[0][0], extent[0][1], extent[0][2]); AiNodeSetVec(node, str::_max, extent[1][0], extent[1][1], extent[1][2]); ReadMatrix(prim, node, time, context); ApplyInputMatrix(node, _params); // Check the primitive visibility, set the AtNode visibility to 0 if it's meant to be hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } void UsdArnoldReadGenericPolygons::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; if (!context.GetPrimVisibility(prim, frame)) return; AtNode *node = context.CreateArnoldNode("polymesh", prim.GetPath().GetText()); if (!prim.IsA<UsdGeomMesh>()) return; UsdGeomMesh mesh(prim); MeshOrientation meshOrientation; // Get orientation. If Left-handed, we will need to invert the vertex // indices { TfToken orientationToken; if (mesh.GetOrientationAttr().Get(&orientationToken, frame)) { if (orientationToken == UsdGeomTokens->leftHanded) { meshOrientation.reverse = true; mesh.GetFaceVertexCountsAttr().Get(&meshOrientation.nsidesArray, frame); } } } ReadArray<int, unsigned char>(mesh.GetFaceVertexCountsAttr(), node, "nsides", time); if (!meshOrientation.reverse) { // Basic right-handed orientation, no need to do anything special here ReadArray<int, unsigned int>(mesh.GetFaceVertexIndicesAttr(), node, "vidxs", time); } else { // We can't call ReadArray here because the orientation requires to // reverse face attributes. So we're duplicating the function here. VtIntArray array; mesh.GetFaceVertexIndicesAttr().Get(&array, frame); size_t size = array.size(); if (size > 0) { meshOrientation.OrientFaceIndexAttribute(array); // Need to convert the data from int to unsigned int std::vector<unsigned int> arnold_vec(array.begin(), array.end()); AiNodeSetArray(node, str::vidxs, AiArrayConvert(size, 1, AI_TYPE_UINT, arnold_vec.data())); } else AiNodeResetParameter(node, str::vidxs); } ReadArray<GfVec3f, GfVec3f>(mesh.GetPointsAttr(), node, str::vlist, time); ReadMatrix(prim, node, time, context); ApplyInputMatrix(node, _params); // Check the primitive visibility, set the AtNode visibility to 0 if it's meant to be hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } void UsdArnoldReadGenericPoints::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; AtNode *node = context.CreateArnoldNode("points", prim.GetPath().GetText()); if (!prim.IsA<UsdGeomPointBased>()) return; UsdGeomPointBased points(prim); ReadArray<GfVec3f, GfVec3f>(points.GetPointsAttr(), node, "points", time); ReadMatrix(prim, node, time, context); ApplyInputMatrix(node, _params); // Check the primitive visibility, set the AtNode visibility to 0 if it's meant to be hidden if (!context.GetPrimVisibility(prim, frame)) AiNodeSetByte(node, str::visibility, 0); } class InstancerPrimvarsRemapper : public PrimvarsRemapper { public: InstancerPrimvarsRemapper() {} virtual ~InstancerPrimvarsRemapper() {} bool RemapValues(const UsdGeomPrimvar &primvar, const TfToken &interpolation, VtValue &value) override; void RemapPrimvar(TfToken &name, TfToken &interpolation) override; void SetIndex(unsigned int index) {m_index = index;} private: TfToken m_interpolation; unsigned int m_index = 0; }; template <class T> static bool CopyArrayElement(VtValue &value, unsigned int index) { if (!value.IsHolding<VtArray<T>>()) return false; VtArray<T> array = value.UncheckedGet<VtArray<T>>(); if (index < array.size()) { value = array[index]; } return true; } template <typename T0, typename T1, typename... T> inline bool CopyArrayElement(VtValue &value, unsigned int index) { return CopyArrayElement<T0>(value, index) || CopyArrayElement<T1, T...>(value, index); } bool InstancerPrimvarsRemapper::RemapValues(const UsdGeomPrimvar &primvar, const TfToken &interpolation, VtValue &value) { // copy the value from a given array index to the output constant value return CopyArrayElement<int, long, unsigned int, unsigned long, bool, unsigned char, float, double, GfVec2f, GfVec3f, GfVec4f, GfVec2h, GfVec3h, GfVec4h, GfVec2d, GfVec3d, GfVec4d, std::string, TfToken, SdfAssetPath>(value, m_index); } void InstancerPrimvarsRemapper::RemapPrimvar(TfToken &name, TfToken &interpolation) { // Store the original interpolation, but force it to be constant // on the ginstance nodes m_interpolation = interpolation; interpolation = TfToken("constant"); } /** * Convert the Point Instancer node to Arnold. Since there is no such node in Arnold (yet), * we need to convert it as ginstances, one for each instance. * There are however certain use case that are more complex : * - a point instancer instantiating another point instancer (how to handle the recursion ?) * - one of the "proto nodes" to be instantiated is a Xform in the middle of the hierarchy, and thus doesn't match an existing arnold node (here we'd need to create one ginstance per leaf node below this xform) * * A simple way to address these issues, is to check if each "proto node" exists in the Arnold scene * or not. If it doesn't, then we create a usd procedural with object_path pointing at this path. This way, * each instance of this usd procedural will properly instantiate the whole contents of this path. **/ void UsdArnoldReadPointInstancer::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { UsdArnoldReader *reader = context.GetReader(); if (reader == nullptr) return; const TimeSettings &time = context.GetTimeSettings(); float frame = time.frame; // If the USD primitive is hidden, we need to hide each of the nodes that are being created here bool isVisible = context.GetPrimVisibility(prim, frame); UsdGeomPointInstancer pointInstancer(prim); // this will be used later to contruct the name of the instances std::string primName = prim.GetPath().GetText(); // get all proto paths (i.e. input nodes to be instantiated) SdfPathVector protoPaths; pointInstancer.GetPrototypesRel().GetTargets(&protoPaths); // get the visibility of each prototype, so that we can apply its visibility to all of its instances // If this point instancer primitive is hidden itself, then we want to hide everything std::vector<unsigned char> protoVisibility(protoPaths.size(), isVisible ? AI_RAY_ALL : 0); // get the usdFilePath from the reader, we will use this path later to apply when we create new usd procs std::string filename = reader->GetFilename(); int cacheId = reader->GetCacheId(); // Same as above, get the eventual overrides from the reader const AtArray *overrides = reader->GetOverrides(); // get proto type index for all instances VtIntArray protoIndices; pointInstancer.GetProtoIndicesAttr().Get(&protoIndices, frame); // the size of the protoIndices array gives us the amount of instances size_t numInstances = protoIndices.size(); for (size_t i = 0; i < protoPaths.size(); ++i) { const SdfPath &protoPath = protoPaths.at(i); // get the proto primitive, and ensure it's properly exported to arnold, // since we don't control the order in which nodes are read. UsdPrim protoPrim = reader->GetStage()->GetPrimAtPath(protoPath); std::string objType = (protoPrim) ? protoPrim.GetTypeName().GetText() : ""; if (protoPrim) { // Compute the USD visibility of this prototype. If it's hidden, we want all its instances // to be hidden too #458 UsdGeomImageable imageableProto = UsdGeomImageable(protoPrim); if (imageableProto && imageableProto.ComputeVisibility(frame) == UsdGeomTokens->invisible) protoVisibility[i] = 0; } // I need to create a new proto node in case this primitive isn't directly translated as an Arnold AtNode. // As of now, this only happens for Xform and Point Instancer nodes, so I'm checking for these types, // and also I'm verifying if the registry is able to read nodes of this type. // In the future we might want to make this more robust, we could eventually add a function in // the primReader telling us if this primitive will generate an arnold node with the same name or not. bool createProto = (objType == "Xform" || objType == "PointInstancer" || objType == "" || (reader->GetRegistry()->GetPrimReader(objType) == nullptr)); if (createProto) { // There's no AtNode for this proto, we need to create a usd procedural that loads // the same usd file but points only at this object path std::string childUsdEntry = "usd"; const AtNode *parentProc = reader->GetProceduralParent(); if (parentProc) childUsdEntry = AiNodeEntryGetName(AiNodeGetNodeEntry(parentProc)); AtNode *node = context.CreateArnoldNode(childUsdEntry.c_str(), protoPath.GetText()); AiNodeSetStr(node, str::filename, filename.c_str()); AiNodeSetInt(node, str::cache_id, cacheId); AiNodeSetStr(node, str::object_path, protoPath.GetText()); AiNodeSetFlt(node, str::frame, frame); // give it the desired frame AiNodeSetFlt(node, str::motion_start, time.motionStart); AiNodeSetFlt(node, str::motion_end, time.motionEnd); if (overrides) AiNodeSetArray(node, str::overrides, AiArrayCopy(overrides)); // This procedural is created in addition to the original hierarchy traversal // so we always want it to be hidden to avoid duplicated geometries. // We just want the instances to be visible eventually AiNodeSetByte(node, str::visibility, 0); } } std::vector<UsdTimeCode> times; if (time.motionBlur) { times.push_back(time.start()); times.push_back(time.end()); } else { times.push_back(frame); } std::vector<bool> pruneMaskValues = pointInstancer.ComputeMaskAtTime(frame); if (!pruneMaskValues.empty() && pruneMaskValues.size() != numInstances) { // If the amount of prune mask elements doesn't match the amount of instances, // then something is wrong. We dump an error and clear the mask vector. AiMsgError("[usd] Point instancer %s : Mismatch in length of indices and mask", primName.c_str()); pruneMaskValues.clear(); } std::vector<VtArray<GfMatrix4d> > xformsArray; pointInstancer.ComputeInstanceTransformsAtTimes(&xformsArray, times, frame); // Check the Point Instancer's world matrix, so that we apply // it to all instances AtArray *instancerMatrices = ReadMatrix(prim, time, context); std::vector<AtMatrix> parentMatrices; if (instancerMatrices) { // always add the first matrix key parentMatrices.push_back(AiArrayGetMtx(instancerMatrices, 0)); // if motion blur is enabled, also add the last matrix key so that it has // the same size as "xformArray" if (time.motionBlur) parentMatrices.push_back(AiArrayGetMtx(instancerMatrices, AiArrayGetNumKeys(instancerMatrices) - 1)); bool hasMatrix = false; for (auto mtx : parentMatrices) { if (!AiM4IsIdentity(mtx)) hasMatrix = true; } // if all the matrices are identity, we can clear the vector // so that we don't even try to apply it if (!hasMatrix) parentMatrices.clear(); } InstancerPrimvarsRemapper remapper; for (size_t i = 0; i < numInstances; ++i) { // This instance has to be pruned, let's skip it if (!pruneMaskValues.empty() && pruneMaskValues[i] == false) continue; std::vector<AtMatrix> matrices(xformsArray.size()); // loop over all the motion steps and append the matrices as a big list of floats for (size_t t = 0; t < xformsArray.size(); ++t) { const double *matrixArray = xformsArray[t][i].GetArray(); AtMatrix &matrix = matrices[t]; for (int i = 0; i < 4; ++i) for (int j = 0; j < 4; ++j, matrixArray++) matrix[i][j] = (float)*matrixArray; if (!parentMatrices.empty()) { AtMatrix parentMtx = (t < parentMatrices.size()) ? parentMatrices[t] : parentMatrices.back(); matrix = AiM4Mult(matrix, parentMtx); } } // construct the instance name, based on the point instancer name, // suffixed by the instance number std::string instanceName = TfStringPrintf("%s_%d", primName.c_str(), i); // create a ginstance pointing at this proto node AtNode *arnoldInstance = context.CreateArnoldNode("ginstance", instanceName.c_str()); AiNodeSetBool(arnoldInstance, str::inherit_xform, false); int protoId = protoIndices[i]; // which proto to instantiate if (protoId < protoPaths.size()) // safety out-of-bounds check, shouldn't happen { // Add a connection from ginstance.node to the desired proto. This connection will be applied // after all nodes were exported to Arnold. context.AddConnection( arnoldInstance, "node", protoPaths.at(protoId).GetText(), UsdArnoldReader::CONNECTION_PTR); // Set the instance visibility as being the same as its prototype AiNodeSetByte(arnoldInstance, str::visibility, protoVisibility[protoId]); } AiNodeSetFlt(arnoldInstance, str::motion_start, time.motionStart); AiNodeSetFlt(arnoldInstance, str::motion_end, time.motionEnd); // set the instance xform AiNodeSetArray(arnoldInstance, str::matrix, AiArrayConvert(1, matrices.size(), AI_TYPE_MATRIX, &matrices[0])); remapper.SetIndex(i); ReadPrimvars(prim, arnoldInstance, time, context, &remapper); } } void UsdArnoldReadVolume::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { UsdArnoldReader *reader = context.GetReader(); if (reader == nullptr) return; AtNode *node = context.CreateArnoldNode("volume", prim.GetPath().GetText()); UsdVolVolume volume(prim); const TimeSettings &time = context.GetTimeSettings(); UsdVolVolume::FieldMap fields = volume.GetFieldPaths(); std::string filename; std::vector<std::string> grids; // Loop over all the fields in this volume node. // Note that arnold doesn't support grids from multiple vdb files, as opposed to USD volumes. // So we can only use the first .vdb that is found, and we'll dump a warning if needed. for (UsdVolVolume::FieldMap::iterator it = fields.begin(); it != fields.end(); ++it) { UsdPrim fieldPrim = reader->GetStage()->GetPrimAtPath(it->second); if (!fieldPrim.IsA<UsdVolOpenVDBAsset>()) continue; UsdVolOpenVDBAsset vdbAsset(fieldPrim); VtValue vdbFilePathValue; if (vdbAsset.GetFilePathAttr().Get(&vdbFilePathValue, time.frame)) { std::string fieldFilename = VtValueGetString(vdbFilePathValue); if (filename.empty()) filename = fieldFilename; else if (fieldFilename != filename) { AiMsgWarning("[usd] %s: arnold volume nodes only support a single .vdb file. ", AiNodeGetName(node)); } TfToken vdbGrid; if (vdbAsset.GetFieldNameAttr().Get(&vdbGrid, time.frame)) { grids.push_back(vdbGrid); } } } // Now set the first vdb filename that was found AiNodeSetStr(node, str::filename, AtString(filename.c_str())); // Set all the grids that are needed AtArray *gridsArray = AiArrayAllocate(grids.size(), 1, AI_TYPE_STRING); for (size_t i = 0; i < grids.size(); ++i) { AiArraySetStr(gridsArray, i, AtString(grids[i].c_str())); } AiNodeSetArray(node, str::grids, gridsArray); ReadMatrix(prim, node, time, context); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context, false); // don't assign the default shader _ReadArnoldParameters(prim, context, node, time, "primvars:arnold"); // Check the prim visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, time.frame)) AiNodeSetByte(node, str::visibility, 0); } void UsdArnoldReadProceduralCustom::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { // This schema is meant for custom procedurals. Its attribute "node_entry" will // indicate what is the node entry name for this node. UsdAttribute attr = prim.GetAttribute(str::t_arnold_node_entry); // for backward compatibility, check the attribute without namespace if (!attr) attr = prim.GetAttribute(str::t_node_entry); const TimeSettings &time = context.GetTimeSettings(); VtValue value; // If the attribute "node_entry" isn't defined, we don't know what type of node // to create, so there is nothing we can do if (!attr || !attr.Get(&value, time.frame)) { return; } std::string nodeType = VtValueGetString(value); AtNode *node = context.CreateArnoldNode(nodeType.c_str(), prim.GetPath().GetText()); ReadPrimvars(prim, node, time, context); ReadMaterialBinding(prim, node, context, false); // don't assign the default shader // The attributes will be read here, without an arnold scope, as in UsdArnoldReadArnoldType _ReadArnoldParameters(prim, context, node, time, "arnold", true); // Check the prim visibility, set the AtNode visibility to 0 if it's hidden if (!context.GetPrimVisibility(prim, time.frame)) { AiNodeSetByte(node, str::visibility, 0); } } void UsdArnoldReadProcViewport::Read(const UsdPrim &prim, UsdArnoldReaderContext &context) { UsdArnoldReader *reader = context.GetReader(); if (reader == nullptr) return; AtUniverse *universe = reader->GetUniverse(); const TimeSettings &time = context.GetTimeSettings(); std::string filename; std::string nodeType = _procName; if (!_procName.empty()) { // Get the filename of this ass/usd/abc procedural UsdAttribute attr = prim.GetAttribute(str::t_arnold_filename); // for backward compatibility, check the attribute without namespace if (!attr) attr = prim.GetAttribute(str::t_filename); VtValue value; if (!attr || !attr.Get(&value, time.frame)) { return; } filename = VtValueGetString(value); } else { // There's not a determined procedural node type, this is a custom procedural. // We get this information from the attribute "node_entry" UsdAttribute attr = prim.GetAttribute(str::t_arnold_node_entry); // for backward compatibility, check the attribute without namespace if (!attr) attr = prim.GetAttribute(str::t_node_entry); VtValue value; if (!attr || !attr.Get(&value, time.frame)) { return; } nodeType = VtValueGetString(value); } // create a temporary universe to create a dummy procedural AtUniverse *tmpUniverse = AiUniverse(); // copy the procedural search path string from the input universe AiNodeSetStr( AiUniverseGetOptions(tmpUniverse), str::procedural_searchpath, AiNodeGetStr(AiUniverseGetOptions(universe), str::procedural_searchpath)); // Create a procedural with the given node type AtNode *proc = AiNode(tmpUniverse, nodeType.c_str(), "viewport_proc"); // Set the eventual filename if (!filename.empty()) { AiNodeSetStr(proc, str::filename, filename.c_str()); } // read the matrix and apply the eventual input one from the AtParamsValueMap // This node's matrix won't be taken into account but we'll apply it to the params map ReadMatrix(prim, proc, time, context); ApplyInputMatrix(proc, _params); AtMatrix m; bool setMatrixParam = false; AtArray *matrices = AiNodeGetArray(proc, str::matrix); if (matrices && AiArrayGetNumElements(matrices) > 0) setMatrixParam = (!AiM4IsIdentity(AiArrayGetMtx(matrices, 0))); // ensure we read all the parameters from the procedural _ReadArnoldParameters(prim, context, proc, time, "arnold", true); ReadPrimvars(prim, proc, time, context); AtParamValueMap *params = (_params) ? AiParamValueMapClone(_params) : AiParamValueMap(); AiParamValueMapSetInt(params, str::mask, AI_NODE_SHAPE); // if needed, propagate the matrix to the child nodes if (setMatrixParam) AiParamValueMapSetArray(params, str::matrix, matrices); AiProceduralViewport(proc, universe, _mode, params); AiParamValueMapDestroy(params); AiUniverseDestroy(tmpUniverse); }
; A230629: a(0) = 0; thereafter a(n) = (1 + a(floor(n/2))) mod 3. ; 0,1,2,2,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 lpb $0 div $0,2 add $1,1 lpe mod $1,3
; $Id: bs3-mode-SwitchToLM32.asm 69111 2017-10-17 14:26:02Z vboxsync $ ;; @file ; BS3Kit - Bs3SwitchToLM32 ; ; ; Copyright (C) 2007-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; %include "bs3kit-template-header.mac" ;; ; Switch to 32-bit long mode from any other mode. ; ; @cproto BS3_DECL(void) Bs3SwitchToLM32(void); ; ; @uses Nothing (except possibly high 32-bit and/or upper 64-bit register parts). ; ; @remarks There are no IDT or TSS differences between LM16, LM32 and LM64 (unlike ; PE16 & PE32, PP16 & PP32, and PAE16 & PAE32). ; ; @remarks Obviously returns to 32-bit mode, even if the caller was in 16-bit ; or 64-bit mode. It doesn't not preserve the callers ring, but ; instead changes to ring-0. ; ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. ; BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToLM32_Safe), function, 0 BS3_PROC_BEGIN_MODE Bs3SwitchToLM32, BS3_PBC_NEAR %ifdef TMPL_LM32 ret %elifdef TMPL_CMN_LM ; ; Already in long mode, just switch to 32-bit. ; extern BS3_CMN_NM(Bs3SwitchTo32Bit) jmp BS3_CMN_NM(Bs3SwitchTo32Bit) %elif BS3_MODE_IS_V86(TMPL_MODE) ; ; V8086 - Switch to 16-bit ring-0 and call worker for that mode. ; extern BS3_CMN_NM(Bs3SwitchToRing0) call BS3_CMN_NM(Bs3SwitchToRing0) extern %[BS3_MODE_R0_NM_ %+ TMPL_MODE](Bs3SwitchToLM32) jmp %[BS3_MODE_R0_NM_ %+ TMPL_MODE](Bs3SwitchToLM32) %else %if TMPL_BITS == 16 push word 0 ; save space for extending the return value. %endif ; ; Switch to 32-bit protected mode (for identify mapped pages). ; extern TMPL_NM(Bs3SwitchToPE32) call TMPL_NM(Bs3SwitchToPE32) BS3_SET_BITS 32 %if TMPL_BITS == 16 jmp .thirty_two_bit_segment BS3_BEGIN_TEXT32 BS3_GLOBAL_LOCAL_LABEL .thirty_two_bit_segment %endif push eax push ecx push edx pushfd ; ; Make sure both PAE and PSE are enabled (requires pentium pro). ; mov eax, cr4 mov ecx, eax or eax, X86_CR4_PAE | X86_CR4_PSE cmp eax, ecx je .cr4_is_fine mov cr4, eax .cr4_is_fine: ; ; Get the page directory (returned in eax). ; Will lazy init page tables. ; extern NAME(Bs3PagingGetRootForLM64_pe32) call NAME(Bs3PagingGetRootForLM64_pe32) cli mov cr3, eax ; ; Enable long mode in EFER. ; mov ecx, MSR_K6_EFER rdmsr or eax, MSR_K6_EFER_LME wrmsr ; ; Enable paging and thereby activating LM64. ; BS3_EXTERN_SYSTEM16 Bs3Lgdt_Gdt BS3_BEGIN_TEXT32 mov eax, cr0 or eax, X86_CR0_PG mov cr0, eax jmp .in_lm32 .in_lm32: ; ; Call rountine for doing mode specific setups. ; extern NAME(Bs3EnteredMode_lm32) call NAME(Bs3EnteredMode_lm32) ; ; Load full 64-bit GDT base address from 64-bit segment. ; jmp dword BS3_SEL_R0_CS64:.load_full_gdt_base wrt FLAT .load_full_gdt_base: BS3_SET_BITS 64 lgdt [Bs3Lgdt_Gdt wrt FLAT] push BS3_SEL_R0_CS32 push .back_to_32bit wrt FLAT o64 retf .back_to_32bit: BS3_SET_BITS 32 ; ; Restore ecx, eax and flags (IF). ; %if TMPL_BITS == 16 movzx eax, word [esp + 16 + 2] ; Load return address. add eax, BS3_ADDR_BS3TEXT16 ; Convert it to a flat address. mov [esp + 16], eax ; Store it in the place right for 32-bit returns. %endif popfd pop edx pop ecx pop eax ret %if TMPL_BITS != 32 TMPL_BEGIN_TEXT %endif %endif BS3_PROC_END_MODE Bs3SwitchToLM32 %if TMPL_BITS == 16 ;; ; Custom far stub. BS3_BEGIN_TEXT16_FARSTUBS BS3_PROC_BEGIN_MODE Bs3SwitchToLM32, BS3_PBC_FAR inc bp push bp mov bp, sp ; Call the real thing. call TMPL_NM(Bs3SwitchToLM32) BS3_SET_BITS 32 ; Jmp to common code for the tedious conversion. %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 %else extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 %endif BS3_SET_BITS 16 BS3_PROC_END_MODE Bs3SwitchToLM32 %endif
#include "StdAfx.h" #include "VulkanSwapchain.h" #include "System/System.h" #include "Platform/OS.h" #include "VulkanContext.h" #include "VulkanQueue.h" #include "VulkanTexture.h" #include "VulkanSynchronizePrimitive.h" #include "RendererVulkan/Utils/VkConvert.h" #include "Memory/Memory.h" namespace SG { VulkanSwapchain::VulkanSwapchain(VulkanContext& c) :context(c) { CreateSurface(); } VulkanSwapchain::~VulkanSwapchain() { DestroySurface(); } bool VulkanSwapchain::CreateOrRecreate(UInt32 width, UInt32 height, bool vsync) { // if there is an old swapchain, use it to ease up recreation. VkSwapchainKHR oldSwapchain = swapchain; VkSurfaceCapabilitiesKHR capabilities = {}; vector<VkSurfaceFormatKHR> formats; vector<VkPresentModeKHR> presentModes; vkGetPhysicalDeviceSurfaceCapabilitiesKHR(context.instance.physicalDevice, mPresentSurface, &capabilities); UInt32 formatCount; vkGetPhysicalDeviceSurfaceFormatsKHR(context.instance.physicalDevice, mPresentSurface, &formatCount, nullptr); if (formatCount != 0) { formats.resize(formatCount); vkGetPhysicalDeviceSurfaceFormatsKHR(context.instance.physicalDevice, mPresentSurface, &formatCount, formats.data()); } UInt32 presentModeCount; vkGetPhysicalDeviceSurfacePresentModesKHR(context.instance.physicalDevice, mPresentSurface, &presentModeCount, nullptr); if (presentModeCount != 0) { presentModes.resize(presentModeCount); vkGetPhysicalDeviceSurfacePresentModesKHR(context.instance.physicalDevice, mPresentSurface, &presentModeCount, presentModes.data()); } // if the swapchain can do presenting bool bIsSwapChainAdequate = false; bIsSwapChainAdequate = !formats.empty() && !presentModes.empty(); if (!bIsSwapChainAdequate) SG_LOG_WARN("Unpresentable swapchain detected"); // the VK_PRESENT_MODE_FIFO_KHR mode must always be present as per spec // this mode waits for the vertical blank ("v-sync") VkPresentModeKHR swapchainPresentMode = VK_PRESENT_MODE_FIFO_KHR; // if v-sync is not requested, try to find a mailbox mode // it's the lowest latency non-tearing present mode available if (!vsync) { for (Size i = 0; i < presentModeCount; i++) { if (presentModes[i] == VK_PRESENT_MODE_MAILBOX_KHR) { swapchainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR; break; } if (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR) { swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; } } } VkSurfaceCapabilitiesKHR surfCaps; vkGetPhysicalDeviceSurfaceCapabilitiesKHR(context.instance.physicalDevice, mPresentSurface, &surfCaps); // find the transformation of the surface VkSurfaceTransformFlagsKHR preTransform; if (surfCaps.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) { // We prefer a non-rotated transform preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; } else { preTransform = surfCaps.currentTransform; } VkExtent2D swapchainExtent = {}; // if width (and height) equals the special value 0xFFFFFFFF, the size of the surface will be set by the swapchain if (surfCaps.currentExtent.width == (UInt32)-1) { // if the surface size is undefined, the size is set to // the size of the images requested. swapchainExtent.width = width; swapchainExtent.height = height; } else { // If the surface size is defined, the swap chain size must match swapchainExtent = surfCaps.currentExtent; width = surfCaps.currentExtent.width; height = surfCaps.currentExtent.height; } imageCount = capabilities.minImageCount + 1; if (capabilities.maxImageCount > 0 && imageCount > capabilities.maxImageCount) imageCount = capabilities.maxImageCount; VkSwapchainCreateInfoKHR createInfo = {}; createInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; createInfo.surface = mPresentSurface; createInfo.minImageCount = imageCount; createInfo.imageFormat = mFormat; createInfo.imageColorSpace = mColorSpace; createInfo.imageExtent = swapchainExtent; createInfo.imageArrayLayers = 1; createInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; createInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; createInfo.queueFamilyIndexCount = 0; createInfo.pQueueFamilyIndices = nullptr; createInfo.preTransform = capabilities.currentTransform; createInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; createInfo.presentMode = swapchainPresentMode; createInfo.clipped = VK_TRUE; createInfo.oldSwapchain = oldSwapchain; if (vkCreateSwapchainKHR(context.device.logicalDevice, &createInfo, nullptr, &swapchain) != VK_SUCCESS) { SG_LOG_ERROR("Failed to create swapchain"); return false; } // clean up old resources if (oldSwapchain != VK_NULL_HANDLE) { for (auto& e : imageViews) vkDestroyImageView(context.device.logicalDevice, e, nullptr); vkDestroySwapchainKHR(context.device.logicalDevice, oldSwapchain, nullptr); for (UInt32 i = 0; i < imageCount; ++i) Delete(mpRts[i]); } vkGetSwapchainImagesKHR(context.device.logicalDevice, swapchain, &imageCount, nullptr); images.resize(imageCount); vkGetSwapchainImagesKHR(context.device.logicalDevice, swapchain, &imageCount, images.data()); imageViews.resize(imageCount); mpRts.resize(imageCount); for (UInt32 i = 0; i < imageCount; ++i) { VkImageViewCreateInfo colorAttachmentView = {}; colorAttachmentView.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; colorAttachmentView.pNext = NULL; colorAttachmentView.format = mFormat; colorAttachmentView.components = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }; colorAttachmentView.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; colorAttachmentView.subresourceRange.baseMipLevel = 0; colorAttachmentView.subresourceRange.levelCount = 1; colorAttachmentView.subresourceRange.baseArrayLayer = 0; colorAttachmentView.subresourceRange.layerCount = 1; colorAttachmentView.viewType = VK_IMAGE_VIEW_TYPE_2D; colorAttachmentView.flags = 0; colorAttachmentView.image = images[i]; vkCreateImageView(context.device.logicalDevice, &colorAttachmentView, nullptr, &imageViews[i]); mpRts[i] = New(VulkanRenderTarget, context); mpRts[i]->width = swapchainExtent.width; mpRts[i]->height = swapchainExtent.height; mpRts[i]->depth = 1; mpRts[i]->array = 1; mpRts[i]->mipLevel = 1; mpRts[i]->currLayouts.resize(1); mpRts[i]->currLayouts[0] = VK_IMAGE_LAYOUT_UNDEFINED; mpRts[i]->format = ToSGImageFormat(mFormat); mpRts[i]->sample = ToSGSampleCount(VK_SAMPLE_COUNT_1_BIT); mpRts[i]->type = ToSGImageType(VK_IMAGE_TYPE_2D); mpRts[i]->usage = ToSGImageUsage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT); mpRts[i]->image = images[i]; mpRts[i]->imageView = imageViews[i]; #if SG_USE_VULKAN_MEMORY_ALLOCATOR mpRts[i]->vmaAllocation = nullptr; #else mpRts[i]->memory = 0; #endif mpRts[i]->mbIsDepth = false; mpRts[i]->id = VulkanTexture::msIdAllocator.Allocate(); } return true; } void VulkanSwapchain::DestroySurface() { if (mPresentSurface != VK_NULL_HANDLE) vkDestroySurfaceKHR(context.instance.instance, mPresentSurface, nullptr); } VulkanRenderTarget* VulkanSwapchain::GetRenderTarget(UInt32 index) const { SG_ASSERT(index >= 0 && index < imageCount); if (mpRts.empty()) SG_LOG_WARN("Swapchain not created yet!"); return mpRts[index]; } void VulkanSwapchain::CleanUp() { for (UInt32 i = 0; i < imageCount; ++i) vkDestroyImageView(context.device.logicalDevice, imageViews[i], nullptr); for (auto* ptr : mpRts) Delete(ptr); if (swapchain != VK_NULL_HANDLE) vkDestroySwapchainKHR(context.device.logicalDevice, swapchain, nullptr); } bool VulkanSwapchain::AcquireNextImage(VulkanSemaphore* pSignalSemaphore, UInt32& imageIndex) { if (vkAcquireNextImageKHR(context.device.logicalDevice, swapchain, UINT64_MAX, pSignalSemaphore->semaphore, VK_NULL_HANDLE, &imageIndex) != VK_SUCCESS) { SG_LOG_WARN("Failed to acquire next image!"); return false; } return true; } EImageState VulkanSwapchain::Present(VulkanQueue* queue, UInt32 imageIndex, VulkanSemaphore* pWaitSemaphore) { VkPresentInfoKHR presentInfo = {}; presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; presentInfo.pNext = nullptr; presentInfo.swapchainCount = 1; presentInfo.pSwapchains = &swapchain; presentInfo.pImageIndices = &imageIndex; if (pWaitSemaphore != nullptr) { presentInfo.pWaitSemaphores = &pWaitSemaphore->semaphore; presentInfo.waitSemaphoreCount = 1; } VkResult res = vkQueuePresentKHR(queue->handle, &presentInfo); if (res == VK_SUCCESS) return EImageState::eComplete; else if (res == VK_SUBOPTIMAL_KHR) return EImageState::eIncomplete; return EImageState::eFailure; } bool VulkanSwapchain::CreateSurface() { #ifdef SG_PLATFORM_WINDOWS Window* mainWindow = OperatingSystem::GetMainWindow(); VkWin32SurfaceCreateInfoKHR createInfo = {}; createInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; createInfo.hwnd = (HWND)mainWindow->GetNativeHandle(); createInfo.hinstance = ::GetModuleHandle(NULL); if (vkCreateWin32SurfaceKHR(context.instance.instance, &createInfo, nullptr, &mPresentSurface) != VK_SUCCESS) return false; CheckSurfacePresentable(context.device.queueFamilyIndices.graphics); // Get list of supported surface formats uint32_t formatCount; vkGetPhysicalDeviceSurfaceFormatsKHR(context.instance.physicalDevice, mPresentSurface, &formatCount, NULL); vector<VkSurfaceFormatKHR> surfaceFormats(formatCount); vkGetPhysicalDeviceSurfaceFormatsKHR(context.instance.physicalDevice, mPresentSurface, &formatCount, surfaceFormats.data()); // If the surface format list only includes one entry with VK_FORMAT_UNDEFINED, // there is no preferred format, so we assume VK_FORMAT_B8G8R8A8_UNORM if ((formatCount == 1) && (surfaceFormats[0].format == VK_FORMAT_UNDEFINED)) { mFormat = VK_FORMAT_B8G8R8A8_UNORM; mColorSpace = surfaceFormats[0].colorSpace; } else { // iterate over the list of available surface format and // check for the presence of VK_FORMAT_B8G8R8A8_UNORM bool bFoundB8G8R8A8UNORM = false; for (auto& surfaceFormat : surfaceFormats) { if (surfaceFormat.format == VK_FORMAT_B8G8R8A8_UNORM) { mFormat = surfaceFormat.format; mColorSpace = surfaceFormat.colorSpace; bFoundB8G8R8A8UNORM = true; break; } } // in case VK_FORMAT_B8G8R8A8_UNORM is not available // select the first available color format if (!bFoundB8G8R8A8UNORM) { mFormat = surfaceFormats[0].format; mColorSpace = surfaceFormats[0].colorSpace; } } return true; #endif } bool VulkanSwapchain::CheckSurfacePresentable(UInt32 familyIndex) { // check if the graphic queue can do the presentation job VkBool32 presentSupport = false; vkGetPhysicalDeviceSurfaceSupportKHR(context.instance.physicalDevice, familyIndex, mPresentSurface, &presentSupport); if (!presentSupport) { SG_LOG_ERROR("Current physical device not support surface presentation"); return false; } return true; } }
object_const_def ; object_event constants const VIRIDIANCITY_GRAMPS1 const VIRIDIANCITY_GRAMPS2 const VIRIDIANCITY_FISHER const VIRIDIANCITY_YOUNGSTER ViridianCity_MapScripts: db 0 ; scene scripts db 1 ; callbacks callback MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint: setflag ENGINE_FLYPOINT_VIRIDIAN return ViridianCityCoffeeGramps: faceplayer opentext writetext ViridianCityCoffeeGrampsQuestionText yesorno iffalse .no writetext ViridianCityCoffeeGrampsBelievedText waitbutton closetext end .no: writetext ViridianCityCoffeeGrampsDoubtedText waitbutton closetext end ViridianCityGrampsNearGym: faceplayer opentext checkevent EVENT_BLUE_IN_CINNABAR iftrue .BlueReturned writetext ViridianCityGrampsNearGymText waitbutton closetext end .BlueReturned: writetext ViridianCityGrampsNearGymBlueReturnedText waitbutton closetext end ViridianCityDreamEaterFisher: faceplayer opentext checkevent EVENT_GOT_TM42_DREAM_EATER iftrue .GotDreamEater writetext ViridianCityDreamEaterFisherText buttonsound verbosegivetmhm TM_DREAM_EATER iffalse .NoRoomForDreamEater setevent EVENT_GOT_TM42_DREAM_EATER .GotDreamEater: writetext ViridianCityDreamEaterFisherGotDreamEaterText waitbutton .NoRoomForDreamEater: closetext end ViridianCityYoungsterScript: jumptextfaceplayer ViridianCityYoungsterText ViridianCitySign: jumptext ViridianCitySignText ViridianGymSign: jumptext ViridianGymSignText ViridianCityWelcomeSign: jumptext ViridianCityWelcomeSignText TrainerHouseSign: jumptext TrainerHouseSignText ViridianCityPokecenterSign: jumpstd pokecentersign ViridianCityMartSign: jumpstd martsign ViridianCityCoffeeGrampsQuestionText: text "Hey, kid! I just" line "had a double shot" para "of espresso, and" line "I am wired!" para "I need to talk to" line "someone, so you'll" cont "have to do!" para "I might not look" line "like much now, but" para "I was an expert at" line "catching #MON." para "Do you believe me?" done ViridianCityCoffeeGrampsBelievedText: text "Good, good. Yes, I" line "was something out" para "of the ordinary," line "let me tell you!" done ViridianCityCoffeeGrampsDoubtedText: text "What? You little" line "whelp!" para "If I were just a" line "bit younger, I'd" para "show you a thing" line "or two. Humph!" done ViridianCityGrampsNearGymText: text "This GYM didn't" line "have a LEADER" cont "until recently." para "A young man from" line "PALLET became the" para "LEADER, but he's" line "often away." done ViridianCityGrampsNearGymBlueReturnedText: text "Are you going to" line "battle the LEADER?" para "Good luck to you." line "You'll need it." done ViridianCityDreamEaterFisherText: text "Yawn!" para "I must have dozed" line "off in the sun." para "…I had this dream" line "about a DROWZEE" para "eating my dream." line "Weird, huh?" para "Huh?" line "What's this?" para "Where did this TM" line "come from?" para "This is spooky!" line "Here, you can have" cont "this TM." done ViridianCityDreamEaterFisherGotDreamEaterText: text "TM42 contains" line "DREAM EATER…" para "…Zzzzz…" done ViridianCityYoungsterText: text "I heard that there" line "are many items on" para "the ground in" line "VIRIDIAN FOREST." done ViridianCitySignText: text "VIRIDIAN CITY" para "The Eternally" line "Green Paradise" done ViridianGymSignText: text "VIRIDIAN CITY" line "#MON GYM" cont "LEADER: …" para "The rest of the" line "text is illegible…" done ViridianCityWelcomeSignText: text "WELCOME TO" line "VIRIDIAN CITY," para "THE GATEWAY TO" line "INDIGO PLATEAU" done TrainerHouseSignText: text "TRAINER HOUSE" para "The Club for Top" line "Trainer Battles" done ViridianCity_MapEvents: db 0, 0 ; filler db 5 ; warp events warp_event 32, 7, VIRIDIAN_GYM, 1 warp_event 21, 9, VIRIDIAN_NICKNAME_SPEECH_HOUSE, 1 warp_event 23, 15, TRAINER_HOUSE_1F, 1 warp_event 29, 19, VIRIDIAN_MART, 2 warp_event 23, 25, VIRIDIAN_POKECENTER_1F, 1 db 0 ; coord events db 6 ; bg events bg_event 17, 17, BGEVENT_READ, ViridianCitySign bg_event 27, 7, BGEVENT_READ, ViridianGymSign bg_event 19, 1, BGEVENT_READ, ViridianCityWelcomeSign bg_event 21, 15, BGEVENT_READ, TrainerHouseSign bg_event 24, 25, BGEVENT_READ, ViridianCityPokecenterSign bg_event 30, 19, BGEVENT_READ, ViridianCityMartSign db 4 ; object events object_event 18, 5, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianCityCoffeeGramps, -1 object_event 30, 8, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ViridianCityGrampsNearGym, -1 object_event 6, 23, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ViridianCityDreamEaterFisher, -1 object_event 17, 21, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianCityYoungsterScript, -1
; A140498: a(n) = 3*a(n-1)-3*a(n-2)+3*a(n-3) with a(0)=1, a(1)=3, a(2)=7. ; Submitted by Jamie Morken(s3) ; 1,3,7,15,33,75,171,387,873,1971,4455,10071,22761,51435,116235,262683,593649,1341603,3031911,6851871,15484689,34994187,79084107,178723827,403901721,912786003,2062824327,4661820135,10535345433,23809048875,53806570731,121598601867 mov $1,1 mov $3,-1 lpb $0 sub $0,1 add $2,2 add $3,$1 add $1,$2 sub $1,2 add $2,$4 mov $4,$3 add $3,$1 lpe add $1,$2 mov $0,$1
; SMSQ Hardware table handling V2.10  1999 Tony Tebby section hwt xdef hwt_preset ; preset values ;+++ ; Hardware table setup - preset values ; ; d0 s ; a3 c p linkage block ; a4 s ; a5 c u pointer to vector table in driver definition table ; status return arbirary ;--- hwt_preset move.l a0,-(sp) move.l a5,a0 move.w (a5)+,d0 ; get pointer to table and move on beq.s hwtp_exit ; no table add.w d0,a0 hwtp_loop move.w (a0)+,d0 ; next location to set beq.s hwtp_exit ; no more to set lea (a3,d0.w),a4 move.w (a0)+,d0 ; length to set hwtp_word move.w (a0)+,(a4)+ ; copy a word of preset data subq.w #2,d0 bgt.s hwtp_word bra.s hwtp_loop hwtp_exit move.l (sp)+,a0 rts end
;; ;; aPLib compression library - the smaller the better :) ;; ;; TASM / MASM / WASM assembler depacker ;; ;; Copyright (c) 1998-2004 by Joergen Ibsen / Jibz ;; All Rights Reserved ;; ;; http://www.ibsensoftware.com/ ;; .386p .MODEL flat .CODE PUBLIC _aP_depack_asm _aP_depack_asm: pushad mov esi, [esp + 36] ; C calling convention mov edi, [esp + 40] cld mov dl, 80h xor ebx, ebx literal: movsb mov bl, 2 nexttag: call getbit jnc literal xor ecx, ecx call getbit jnc codepair xor eax, eax call getbit jnc shortmatch mov bl, 2 inc ecx mov al, 10h getmorebits: call getbit adc al, al jnc getmorebits jnz domatch stosb jmp short nexttag codepair: call getgamma_no_ecx sub ecx, ebx jnz normalcodepair call getgamma jmp short domatch_lastpos shortmatch: lodsb shr eax, 1 jz donedepacking adc ecx, ecx jmp short domatch_with_2inc normalcodepair: xchg eax, ecx dec eax shl eax, 8 lodsb call getgamma cmp eax, 32000 jae domatch_with_2inc cmp ah, 5 jae domatch_with_inc cmp eax, 7fh ja domatch_new_lastpos domatch_with_2inc: inc ecx domatch_with_inc: inc ecx domatch_new_lastpos: xchg eax, ebp domatch_lastpos: mov eax, ebp mov bl, 1 domatch: push esi mov esi, edi sub esi, eax rep movsb pop esi jmp short nexttag getbit: add dl, dl jnz stillbitsleft mov dl, [esi] inc esi adc dl, dl stillbitsleft: ret getgamma: xor ecx, ecx getgamma_no_ecx: inc ecx getgammaloop: call getbit adc ecx, ecx call getbit jc getgammaloop ret donedepacking: sub edi, [esp + 40] mov [esp + 28], edi ; return unpacked length in eax popad ret END
section .multiboot_header header_start: dd 0xe85250d6 ; magic number (multiboot 2) dd 0 ; architecture 0 (protected mode i386) dd header_end - header_start ; header length ; checksum dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start)) ; insert optional multiboot tags here ; required end tag dw 0 ; type dw 0 ; flags dd 8 ; size header_end:
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x5f7f, %r12 nop nop nop nop add $15519, %rdx movw $0x6162, (%r12) add $7886, %r15 lea addresses_UC_ht+0xdcbf, %rbx nop nop nop nop nop cmp $2574, %r13 mov $0x6162636465666768, %rdx movq %rdx, %xmm5 movups %xmm5, (%rbx) nop nop nop and %rdx, %rdx lea addresses_UC_ht+0x1c8ff, %rsi lea addresses_WT_ht+0x137bf, %rdi nop nop nop nop xor %r12, %r12 mov $127, %rcx rep movsb nop nop dec %rcx lea addresses_UC_ht+0x182bf, %rsi lea addresses_normal_ht+0xb4f, %rdi clflush (%rdi) nop xor %r15, %r15 mov $46, %rcx rep movsb cmp %rdi, %rdi lea addresses_A_ht+0x1cbf, %rsi lea addresses_normal_ht+0x76ff, %rdi nop nop dec %r15 mov $40, %rcx rep movsb nop xor $36419, %rcx lea addresses_D_ht+0x1463f, %rsi lea addresses_A_ht+0x51a7, %rdi nop nop nop nop nop add $43090, %rbx mov $124, %rcx rep movsb nop cmp $19999, %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r14 push %rcx push %rdi push %rsi // Store lea addresses_RW+0x1fe09, %r10 clflush (%r10) nop nop nop nop xor $44417, %r12 movb $0x51, (%r10) nop nop nop xor %r13, %r13 // REPMOV mov $0xbbf, %rsi lea addresses_D+0x3ed7, %rdi nop sub %r11, %r11 mov $4, %rcx rep movsb nop nop and $8308, %r12 // Faulty Load mov $0x7f94380000000abf, %r13 nop nop nop xor $41061, %r10 mov (%r13), %esi lea oracles, %rdi and $0xff, %rsi shlq $12, %rsi mov (%rdi,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %r14 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_RW', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_P', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 2, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
<% from pwnlib.shellcraft.aarch64.linux import syscall %> <%page args="mask"/> <%docstring> Invokes the syscall umask. See 'man 2 umask' for more information. Arguments: mask(mode_t): mask </%docstring> ${syscall('SYS_umask', mask)}
#include "gridslamprocessor.h" #include <deque> #include <fstream> #include <iomanip> #include <list> #include <map> #include <set> #include <string> #include "utils/stat.h" //#define MAP_CONSISTENCY_CHECK //#define GENERATE_TRAJECTORIES namespace GMapping { const double m_distanceThresholdCheck = 20; using namespace std; GridSlamProcessor::GridSlamProcessor() : m_infoStream(cout) { m_obsSigmaGain = 1; m_resampleThreshold = 0.5; m_minimumScore = 0.; m_outputStream.open("/tmp/loggmapping.log", std::ofstream::out); } GridSlamProcessor::GridSlamProcessor(const GridSlamProcessor& gsp) : m_particles(gsp.m_particles), m_infoStream(cout) { m_obsSigmaGain = gsp.m_obsSigmaGain; m_resampleThreshold = gsp.m_resampleThreshold; m_minimumScore = gsp.m_minimumScore; m_beams = gsp.m_beams; m_indexes = gsp.m_indexes; m_motionModel = gsp.m_motionModel; m_resampleThreshold = gsp.m_resampleThreshold; m_matcher = gsp.m_matcher; m_count = gsp.m_count; m_readingCount = gsp.m_readingCount; m_lastPartPose = gsp.m_lastPartPose; m_pose = gsp.m_pose; m_odoPose = gsp.m_odoPose; m_linearDistance = gsp.m_linearDistance; m_angularDistance = gsp.m_angularDistance; m_neff = gsp.m_neff; cerr << "FILTER COPY CONSTRUCTOR" << endl; cerr << "m_odoPose=" << m_odoPose.x << " " << m_odoPose.y << " " << m_odoPose.theta << endl; cerr << "m_lastPartPose=" << m_lastPartPose.x << " " << m_lastPartPose.y << " " << m_lastPartPose.theta << endl; cerr << "m_linearDistance=" << m_linearDistance << endl; cerr << "m_angularDistance=" << m_linearDistance << endl; m_xmin = gsp.m_xmin; m_ymin = gsp.m_ymin; m_xmax = gsp.m_xmax; m_ymax = gsp.m_ymax; m_delta = gsp.m_delta; m_regScore = gsp.m_regScore; m_critScore = gsp.m_critScore; m_maxMove = gsp.m_maxMove; m_linearThresholdDistance = gsp.m_linearThresholdDistance; m_angularThresholdDistance = gsp.m_angularThresholdDistance; m_obsSigmaGain = gsp.m_obsSigmaGain; #ifdef MAP_CONSISTENCY_CHECK cerr << __PRETTY_FUNCTION__ << ": trajectories copy.... "; #endif TNodeVector v = gsp.getTrajectories(); for (unsigned int i = 0; i < v.size(); i++) { m_particles[i].node = v[i]; } #ifdef MAP_CONSISTENCY_CHECK cerr << "end" << endl; #endif cerr << "Tree: normalizing, resetting and propagating weights within copy " "construction/cloneing ..."; updateTreeWeights(false); cerr << ".done!" << endl; } GridSlamProcessor::GridSlamProcessor(std::ostream& infoS) : m_infoStream(infoS) { m_obsSigmaGain = 1; m_resampleThreshold = 0.5; m_minimumScore = 0.; } GridSlamProcessor* GridSlamProcessor::clone() const { #ifdef MAP_CONSISTENCY_CHECK cerr << __PRETTY_FUNCTION__ << ": performing preclone_fit_test" << endl; typedef std::map<autoptr<Array2D<PointAccumulator> >::reference* const, int> PointerMap; PointerMap pmap; for (ParticleVector::const_iterator it = m_particles.begin(); it != m_particles.end(); it++) { const ScanMatcherMap& m1(it->map); const HierarchicalArray2D<PointAccumulator>& h1(m1.storage()); for (int x = 0; x < h1.getXSize(); x++) { for (int y = 0; y < h1.getYSize(); y++) { const autoptr<Array2D<PointAccumulator> >& a1(h1.m_cells[x][y]); if (a1.m_reference) { PointerMap::iterator f = pmap.find(a1.m_reference); if (f == pmap.end()) pmap.insert(make_pair(a1.m_reference, 1)); else f->second++; } } } } cerr << __PRETTY_FUNCTION__ << ": Number of allocated chunks" << pmap.size() << endl; for (PointerMap::const_iterator it = pmap.begin(); it != pmap.end(); it++) assert(it->first->shares == (unsigned int)it->second); cerr << __PRETTY_FUNCTION__ << ": SUCCESS, the error is somewhere else" << endl; #endif GridSlamProcessor* cloned = new GridSlamProcessor(*this); #ifdef MAP_CONSISTENCY_CHECK cerr << __PRETTY_FUNCTION__ << ": trajectories end" << endl; cerr << __PRETTY_FUNCTION__ << ": performing afterclone_fit_test" << endl; ParticleVector::const_iterator jt = cloned->m_particles.begin(); for (ParticleVector::const_iterator it = m_particles.begin(); it != m_particles.end(); it++) { const ScanMatcherMap& m1(it->map); const ScanMatcherMap& m2(jt->map); const HierarchicalArray2D<PointAccumulator>& h1(m1.storage()); const HierarchicalArray2D<PointAccumulator>& h2(m2.storage()); jt++; for (int x = 0; x < h1.getXSize(); x++) { for (int y = 0; y < h1.getYSize(); y++) { const autoptr<Array2D<PointAccumulator> >& a1(h1.m_cells[x][y]); const autoptr<Array2D<PointAccumulator> >& a2(h2.m_cells[x][y]); assert(a1.m_reference == a2.m_reference); assert((!a1.m_reference) || !(a1.m_reference->shares % 2)); } } } cerr << __PRETTY_FUNCTION__ << ": SUCCESS, the error is somewhere else" << endl; #endif return cloned; } GridSlamProcessor::~GridSlamProcessor() { for (std::vector<Particle>::iterator it = m_particles.begin(); it != m_particles.end(); it++) { #ifdef TREE_CONSISTENCY_CHECK TNode* node = it->node; while (node) node = node->parent; cerr << "@" << endl; #endif if (it->node) delete it->node; // cout << "l=" << it->weight<< endl; } #ifdef MAP_CONSISTENCY_CHECK cerr << __PRETTY_FUNCTION__ << ": performing predestruction_fit_test" << endl; typedef std::map<autoptr<Array2D<PointAccumulator> >::reference* const, int> PointerMap; PointerMap pmap; for (ParticleVector::const_iterator it = m_particles.begin(); it != m_particles.end(); it++) { const ScanMatcherMap& m1(it->map); const HierarchicalArray2D<PointAccumulator>& h1(m1.storage()); for (int x = 0; x < h1.getXSize(); x++) { for (int y = 0; y < h1.getYSize(); y++) { const autoptr<Array2D<PointAccumulator> >& a1(h1.m_cells[x][y]); if (a1.m_reference) { PointerMap::iterator f = pmap.find(a1.m_reference); if (f == pmap.end()) pmap.insert(make_pair(a1.m_reference, 1)); else f->second++; } } } } cerr << __PRETTY_FUNCTION__ << ": Number of allocated chunks" << pmap.size() << endl; for (PointerMap::const_iterator it = pmap.begin(); it != pmap.end(); it++) assert(it->first->shares >= (unsigned int)it->second); cerr << __PRETTY_FUNCTION__ << ": SUCCESS, the error is somewhere else" << endl; #endif } void GridSlamProcessor::setMatchingParameters( double urange, double range, double sigma, int kernsize, double lopt, double aopt, int iterations, double likelihoodSigma, double likelihoodGain, unsigned int likelihoodSkip) { m_obsSigmaGain = likelihoodGain; m_matcher.setMatchingParameters(urange, range, sigma, kernsize, lopt, aopt, iterations, likelihoodSigma, likelihoodSkip); if (m_infoStream) m_infoStream << " -maxUrange " << urange << " -maxUrange " << range << " -sigma " << sigma << " -kernelSize " << kernsize << " -lstep " << lopt << " -lobsGain " << m_obsSigmaGain << " -astep " << aopt << endl; } void GridSlamProcessor::setMotionModelParameters(double srr, double srt, double str, double stt) { m_motionModel.srr = srr; m_motionModel.srt = srt; m_motionModel.str = str; m_motionModel.stt = stt; if (m_infoStream) m_infoStream << " -srr " << srr << " -srt " << srt << " -str " << str << " -stt " << stt << endl; } void GridSlamProcessor::setUpdateDistances(double linear, double angular, double resampleThreshold) { m_linearThresholdDistance = linear; m_angularThresholdDistance = angular; m_resampleThreshold = resampleThreshold; if (m_infoStream) m_infoStream << " -linearUpdate " << linear << " -angularUpdate " << angular << " -resampleThreshold " << m_resampleThreshold << endl; } // HERE STARTS THE BEEF GridSlamProcessor::Particle::Particle(const ScanMatcherMap& m) : map(m), pose(0, 0, 0), weight(0), weightSum(0), gweight(0), previousIndex(0) { node = 0; } void GridSlamProcessor::setSensorMap(const SensorMap& smap) { /* Construct the angle table for the sensor FIXME For now detect the readings of only the front laser, and assume its pose is in the center of the robot */ SensorMap::const_iterator laser_it = smap.find(std::string("FLASER")); if (laser_it == smap.end()) { cerr << "Attempting to load the new carmen log format" << endl; laser_it = smap.find(std::string("ROBOTLASER1")); assert(laser_it != smap.end()); } const RangeSensor* rangeSensor = dynamic_cast<const RangeSensor*>((laser_it->second)); assert(rangeSensor && rangeSensor->beams().size()); m_beams = static_cast<unsigned int>(rangeSensor->beams().size()); double* angles = new double[rangeSensor->beams().size()]; for (unsigned int i = 0; i < m_beams; i++) { angles[i] = rangeSensor->beams()[i].pose.theta; } m_matcher.setLaserParameters(m_beams, angles, rangeSensor->getPose()); delete[] angles; } void GridSlamProcessor::init(unsigned int size, double xmin, double ymin, double xmax, double ymax, double delta, OrientedPoint initialPose) { m_xmin = xmin; m_ymin = ymin; m_xmax = xmax; m_ymax = ymax; m_delta = delta; if (m_infoStream) { m_infoStream << " -xmin " << m_xmin << " -xmax " << m_xmax << " -ymin " << m_ymin << " -ymax " << m_ymax << " -delta " << m_delta << " -particles " << size << endl; } m_particles.clear(); ScanMatcherMap lmap(Point(xmin + xmax, ymin + ymax) * .5, xmax - xmin, ymax - ymin, delta); for (unsigned int i = 0; i < size; i++) { m_particles.push_back(Particle(lmap)); m_particles.back().pose = initialPose; m_particles.back().previousPose = initialPose; m_particles.back().setWeight(0); m_particles.back().previousIndex = 0; TNode* node = new TNode(initialPose, 0, 0, 0); m_particles.back().node = node; } m_neff = (double)size; m_count = 0; m_readingCount = 0; m_linearDistance = m_angularDistance = 0; } void GridSlamProcessor::processTruePos(const OdometryReading& o) { const OdometrySensor* os = dynamic_cast<const OdometrySensor*>(o.getSensor()); if (os && os->isIdeal() && m_outputStream) { m_outputStream << setiosflags(ios::fixed) << setprecision(3); m_outputStream << "SIMULATOR_POS " << o.getPose().x << " " << o.getPose().y << " "; m_outputStream << setiosflags(ios::fixed) << setprecision(6) << o.getPose().theta << " " << o.getTime() << endl; } } bool GridSlamProcessor::processScan(const RangeReading& reading, int adaptParticles) { // retrieve the position from the reading, and compute the odometry OrientedPoint relPose = reading.getPose(); if (!m_count) { m_lastPartPose = m_odoPose = relPose; } // write the state of the reading and update all the particles using the // motion model for (ParticleVector::iterator it = m_particles.begin(); it != m_particles.end(); it++) { OrientedPoint& pose(it->pose); pose = m_motionModel.drawFromMotion(it->pose, relPose, m_odoPose); } // update the output file if (m_outputStream.is_open()) { m_outputStream << setiosflags(ios::fixed) << setprecision(6); m_outputStream << "ODOM "; m_outputStream << setiosflags(ios::fixed) << setprecision(3) << m_odoPose.x << " " << m_odoPose.y << " "; m_outputStream << setiosflags(ios::fixed) << setprecision(6) << m_odoPose.theta << " "; m_outputStream << reading.getTime(); m_outputStream << endl; } if (m_outputStream.is_open()) { m_outputStream << setiosflags(ios::fixed) << setprecision(6); m_outputStream << "ODO_UPDATE " << m_particles.size() << " "; for (ParticleVector::iterator it = m_particles.begin(); it != m_particles.end(); it++) { OrientedPoint& pose(it->pose); m_outputStream << setiosflags(ios::fixed) << setprecision(3) << pose.x << " " << pose.y << " "; m_outputStream << setiosflags(ios::fixed) << setprecision(6) << pose.theta << " " << it->weight << " "; } m_outputStream << reading.getTime(); m_outputStream << endl; } // invoke the callback onOdometryUpdate(); // accumulate the robot translation and rotation OrientedPoint move = relPose - m_odoPose; move.theta = atan2(sin(move.theta), cos(move.theta)); m_linearDistance += sqrt(move * move); m_angularDistance += fabs(move.theta); // if the robot jumps throw a warning if (m_linearDistance > m_distanceThresholdCheck) { cerr << "******************************************************************" "*****" << endl; cerr << "********** Error: m_distanceThresholdCheck overridden!!!! " "*************" << endl; cerr << "m_distanceThresholdCheck=" << m_distanceThresholdCheck << endl; cerr << "Old Odometry Pose= " << m_odoPose.x << " " << m_odoPose.y << " " << m_odoPose.theta << endl; cerr << "New Odometry Pose (reported from observation)= " << relPose.x << " " << relPose.y << " " << relPose.theta << endl; cerr << "******************************************************************" "*****" << endl; cerr << "** The Odometry has a big jump here. This is probably a bug in " "the **" << endl; cerr << "** odometry/laser input. We continue now, but the result is " "probably **" << endl; cerr << "** crap or can lead to a core dump since the map doesn't fit.... " "C&G **" << endl; cerr << "******************************************************************" "*****" << endl; } m_odoPose = relPose; bool processed = false; // process a scan only if the robot has traveled a given distance if (!m_count || m_linearDistance > m_linearThresholdDistance || m_angularDistance > m_angularThresholdDistance) { if (m_outputStream.is_open()) { m_outputStream << setiosflags(ios::fixed) << setprecision(6); m_outputStream << "FRAME " << m_readingCount; m_outputStream << " " << m_linearDistance; m_outputStream << " " << m_angularDistance << endl; } if (m_infoStream) { m_infoStream << "update frame " << m_readingCount << endl << "update ld=" << m_linearDistance << " ad=" << m_angularDistance << endl; } // this is for converting the reading in a scan-matcher feedable form assert(reading.size() == m_beams); double* plainReading = new double[m_beams]; for (unsigned int i = 0; i < m_beams; i++) { plainReading[i] = reading[i]; } if (m_infoStream) { m_infoStream << "m_count " << m_count << endl; } RangeReading* previous_reading = new RangeReading(reading.size(), &(reading[0]), static_cast<const RangeSensor*>(reading.getSensor()), reading.getTime()); if (m_count > 0) { scanMatch(plainReading); if (m_outputStream.is_open()) { m_outputStream << "LASER_READING " << reading.size() << " "; m_outputStream << setiosflags(ios::fixed) << setprecision(2); for (RangeReading::const_iterator b = reading.begin(); b != reading.end(); b++) { m_outputStream << *b << " "; } OrientedPoint p = reading.getPose(); m_outputStream << setiosflags(ios::fixed) << setprecision(6); m_outputStream << p.x << " " << p.y << " " << p.theta << " " << reading.getTime() << endl; m_outputStream << "SM_UPDATE " << m_particles.size() << " "; for (ParticleVector::const_iterator it = m_particles.begin(); it != m_particles.end(); it++) { const OrientedPoint& pose = it->pose; m_outputStream << setiosflags(ios::fixed) << setprecision(3) << pose.x << " " << pose.y << " "; m_outputStream << setiosflags(ios::fixed) << setprecision(6) << pose.theta << " " << it->weight << " "; } m_outputStream << endl; } onScanmatchUpdate(); updateTreeWeights(false); if (m_infoStream) { m_infoStream << "neff= " << m_neff << endl; } if (m_outputStream.is_open()) { m_outputStream << setiosflags(ios::fixed) << setprecision(6); m_outputStream << "NEFF " << m_neff << endl; } resample(plainReading, adaptParticles, previous_reading); } else { m_infoStream << "Registering First Scan" << endl; for (ParticleVector::iterator it = m_particles.begin(); it != m_particles.end(); it++) { m_matcher.invalidateActiveArea(); m_matcher.computeActiveArea(it->map, it->pose, plainReading); m_matcher.registerScan(it->map, it->pose, plainReading); // cyr: not needed anymore, particles refer to the root in the // beginning! TNode* node = new TNode(it->pose, 0., it->node, 0); node->reading = previous_reading; it->node = node; } } updateTreeWeights(false); delete[] plainReading; m_lastPartPose = m_odoPose; // update the past pose for the next iteration m_linearDistance = 0; m_angularDistance = 0; m_count++; processed = true; // keep ready for the next step for (ParticleVector::iterator it = m_particles.begin(); it != m_particles.end(); it++) { it->previousPose = it->pose; } } if (m_outputStream.is_open()) { m_outputStream << flush; } m_readingCount++; return processed; } std::ofstream& GridSlamProcessor::outputStream() { return m_outputStream; } std::ostream& GridSlamProcessor::infoStream() { return m_infoStream; } int GridSlamProcessor::getBestParticleIndex() const { unsigned int bi = 0; double bw = -std::numeric_limits<double>::max(); for (unsigned int i = 0; i < m_particles.size(); i++) if (bw < m_particles[i].weightSum) { bw = m_particles[i].weightSum; bi = i; } return (int)bi; } void GridSlamProcessor::onScanmatchUpdate() {} void GridSlamProcessor::onResampleUpdate() {} void GridSlamProcessor::onOdometryUpdate() {} }; // namespace GMapping
; A035338: 4th column of Wythoff array. ; 5,18,26,39,52,60,73,81,94,107,115,128,141,149,162,170,183,196,204,217,225,238,251,259,272,285,293,306,314,327,340,348,361,374,382,395,403,416,429,437,450,458,471,484,492,505,518,526,539,547,560,573,581,594,602,615,628,636,649,662,670,683,691,704,717,725,738,751,759,772,780,793,806,814,827,835,848,861,869,882,895,903,916,924,937,950,958,971,984,992,1005,1013,1026,1039,1047,1060,1068,1081,1094,1102,1115,1128,1136,1149,1157,1170,1183,1191,1204,1212,1225,1238,1246,1259,1272,1280,1293,1301,1314,1327,1335,1348,1361,1369,1382,1390,1403,1416,1424,1437,1445,1458,1471,1479,1492,1505,1513,1526,1534,1547,1560,1568,1581,1589,1602,1615,1623,1636,1649,1657,1670,1678,1691,1704,1712,1725,1738,1746,1759,1767,1780,1793,1801,1814,1822,1835,1848,1856,1869,1882,1890,1903,1911,1924,1937,1945,1958,1971,1979,1992,2000,2013,2026,2034,2047,2055,2068,2081,2089,2102,2115,2123,2136,2144,2157,2170,2178,2191,2199,2212,2225,2233,2246,2259,2267,2280,2288,2301,2314,2322,2335,2348,2356,2369,2377,2390,2403,2411,2424,2432,2445,2458,2466,2479,2492,2500,2513,2521,2534,2547,2555,2568,2581,2589,2602,2610,2623,2636,2644,2657,2665,2678,2691,2699,2712,2725,2733,2746,2754,2767 mov $7,$0 mov $9,$0 add $9,1 mov $10,$0 lpb $9,1 mov $0,$7 sub $9,1 sub $0,$9 mov $3,$0 mov $5,2 lpb $5,1 mov $0,$3 sub $5,1 add $0,$5 mov $1,$0 pow $0,2 lpb $0,1 sub $0,$1 trn $0,1 add $1,2 lpe mul $1,16 mov $6,$5 lpb $6,1 mov $4,$1 sub $6,1 lpe lpe lpb $3,1 mov $3,0 sub $4,$1 lpe mov $1,$4 div $1,32 mul $1,5 add $1,2 add $8,$1 lpe mov $1,$8 sub $1,2 mov $2,$10 mul $2,6 add $1,$2
FuchsiaCity_Script: jp EnableAutoTextBoxDrawing FuchsiaCity_TextPointers: dw FuchsiaCityText1 dw FuchsiaCityText2 dw FuchsiaCityText3 dw FuchsiaCityText4 dw FuchsiaCityText5 dw FuchsiaCityText6 dw FuchsiaCityText7 dw FuchsiaCityText8 dw FuchsiaCityText9 dw FuchsiaCityText10 dw FuchsiaCityText11 dw FuchsiaCityText12 dw FuchsiaCityText13 dw MartSignText dw PokeCenterSignText dw FuchsiaCityText16 dw FuchsiaCityText17 dw FuchsiaCityText18 dw FuchsiaCityText19 dw FuchsiaCityText20 dw FuchsiaCityText21 dw FuchsiaCityText22 dw FuchsiaCityText23 dw FuchsiaCityText24 FuchsiaCityText1: text_far _FuchsiaCityText1 text_end FuchsiaCityText2: text_far _FuchsiaCityText2 text_end FuchsiaCityText3: text_far _FuchsiaCityText3 text_end FuchsiaCityText4: text_far _FuchsiaCityText4 text_end FuchsiaCityText5: FuchsiaCityText6: FuchsiaCityText7: FuchsiaCityText8: FuchsiaCityText9: FuchsiaCityText10: text_far _FuchsiaCityText5 text_end FuchsiaCityText12: FuchsiaCityText11: text_far _FuchsiaCityText11 text_end FuchsiaCityText13: text_far _FuchsiaCityText13 text_end FuchsiaCityText16: text_far _FuchsiaCityText16 text_end FuchsiaCityText17: text_far _FuchsiaCityText17 text_end FuchsiaCityText18: text_far _FuchsiaCityText18 text_end FuchsiaCityText19: text_asm ld hl, FuchsiaCityChanseyText call PrintText ld a, CHANSEY call DisplayPokedex jp TextScriptEnd FuchsiaCityChanseyText: text_far _FuchsiaCityChanseyText text_end FuchsiaCityText20: text_asm ld hl, FuchsiaCityVoltorbText call PrintText ld a, VOLTORB call DisplayPokedex jp TextScriptEnd FuchsiaCityVoltorbText: text_far _FuchsiaCityVoltorbText text_end FuchsiaCityText21: text_asm ld hl, FuchsiaCityKangaskhanText call PrintText ld a, KANGASKHAN call DisplayPokedex jp TextScriptEnd FuchsiaCityKangaskhanText: text_far _FuchsiaCityKangaskhanText text_end FuchsiaCityText22: text_asm ld hl, FuchsiaCitySlowpokeText call PrintText ld a, SLOWPOKE call DisplayPokedex jp TextScriptEnd FuchsiaCitySlowpokeText: text_far _FuchsiaCitySlowpokeText text_end FuchsiaCityText23: text_asm ld hl, FuchsiaCityLaprasText call PrintText ld a, LAPRAS call DisplayPokedex jp TextScriptEnd FuchsiaCityLaprasText: text_far _FuchsiaCityLaprasText text_end FuchsiaCityText24: text_asm CheckEvent EVENT_GOT_DOME_FOSSIL jr nz, .asm_3b4e8 CheckEventReuseA EVENT_GOT_HELIX_FOSSIL jr nz, .asm_667d5 ld hl, FuchsiaCityText_19b2a call PrintText jr .asm_4343f .asm_3b4e8 ld hl, FuchsiaCityOmanyteText call PrintText ld a, OMANYTE jr .asm_81556 .asm_667d5 ld hl, FuchsiaCityKabutoText call PrintText ld a, KABUTO .asm_81556 call DisplayPokedex .asm_4343f jp TextScriptEnd FuchsiaCityOmanyteText: text_far _FuchsiaCityOmanyteText text_end FuchsiaCityKabutoText: text_far _FuchsiaCityKabutoText text_end FuchsiaCityText_19b2a: text_far _FuchsiaCityText_19b2a text_end
; =============================================================== ; Mar 2014 ; =============================================================== ; ; w_array_t *w_array_init(void *p, void *data, size_t capacity) ; ; Initialize a word array structure at address p and set the ; array's initial data and capacity members. array.size = 0 ; ; =============================================================== SECTION code_adt_w_array PUBLIC asm_w_array_init EXTERN asm_b_array_init, error_zc asm_w_array_init: ; enter : hl = p ; de = data ; bc = capacity in words ; ; exit : success ; ; hl = array * ; carry reset ; ; fail if capacity too large ; ; hl = 0 ; carry set ; ; uses : af, bc sla c rl b jp nc, asm_b_array_init jp error_zc
/* * Win32 EntropySource * (C) 1999-2009 Jack Lloyd * * Distributed under the terms of the Botan license */ #include <botan/internal/es_win32.h> #include <windows.h> #include <tlhelp32.h> namespace Botan { /** * Win32 poll using stats functions including Tooltip32 */ void Win32_EntropySource::poll(Entropy_Accumulator& accum) { /* First query a bunch of basic statistical stuff, though don't count it for much in terms of contributed entropy. */ accum.add(GetTickCount(), 0); accum.add(GetMessagePos(), 0); accum.add(GetMessageTime(), 0); accum.add(GetInputState(), 0); accum.add(GetCurrentProcessId(), 0); accum.add(GetCurrentThreadId(), 0); SYSTEM_INFO sys_info; GetSystemInfo(&sys_info); accum.add(sys_info, 1); MEMORYSTATUS mem_info; GlobalMemoryStatus(&mem_info); accum.add(mem_info, 1); POINT point; GetCursorPos(&point); accum.add(point, 1); GetCaretPos(&point); accum.add(point, 1); LARGE_INTEGER perf_counter; QueryPerformanceCounter(&perf_counter); accum.add(perf_counter, 0); /* Now use the Tooltip library to iterate throug various objects on the system, including processes, threads, and heap objects. */ HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0); #define TOOLHELP32_ITER(DATA_TYPE, FUNC_FIRST, FUNC_NEXT) \ if(!accum.polling_goal_achieved()) \ { \ DATA_TYPE info; \ info.dwSize = sizeof(DATA_TYPE); \ if(FUNC_FIRST(snapshot, &info)) \ { \ do \ { \ accum.add(info, 1); \ } while(FUNC_NEXT(snapshot, &info)); \ } \ } TOOLHELP32_ITER(MODULEENTRY32, Module32First, Module32Next); TOOLHELP32_ITER(PROCESSENTRY32, Process32First, Process32Next); TOOLHELP32_ITER(THREADENTRY32, Thread32First, Thread32Next); #undef TOOLHELP32_ITER if(!accum.polling_goal_achieved()) { size_t heap_lists_found = 0; HEAPLIST32 heap_list; heap_list.dwSize = sizeof(HEAPLIST32); const size_t HEAP_LISTS_MAX = 32; const size_t HEAP_OBJS_PER_LIST = 128; if(Heap32ListFirst(snapshot, &heap_list)) { do { accum.add(heap_list, 1); if(++heap_lists_found > HEAP_LISTS_MAX) break; size_t heap_objs_found = 0; HEAPENTRY32 heap_entry; heap_entry.dwSize = sizeof(HEAPENTRY32); if(Heap32First(&heap_entry, heap_list.th32ProcessID, heap_list.th32HeapID)) { do { if(heap_objs_found++ > HEAP_OBJS_PER_LIST) break; accum.add(heap_entry, 1); } while(Heap32Next(&heap_entry)); } if(accum.polling_goal_achieved()) break; } while(Heap32ListNext(snapshot, &heap_list)); } } CloseHandle(snapshot); } }
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r15 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x1adf7, %rax nop nop and $20535, %r14 movb $0x61, (%rax) sub $17355, %rbx lea addresses_normal_ht+0x10751, %rsi lea addresses_A_ht+0x177f0, %rdi nop nop nop nop and $21527, %r10 mov $119, %rcx rep movsl nop nop nop nop cmp %r10, %r10 lea addresses_normal_ht+0x4787, %rcx cmp $27579, %r15 mov (%rcx), %si dec %rax lea addresses_UC_ht+0x4d87, %rsi lea addresses_normal_ht+0x161c7, %rdi nop nop nop nop inc %r15 mov $94, %rcx rep movsl nop cmp %rsi, %rsi lea addresses_UC_ht+0xea87, %rsi lea addresses_A_ht+0x17647, %rdi nop add %rbx, %rbx mov $62, %rcx rep movsq nop nop nop nop and %r10, %r10 lea addresses_normal_ht+0x19c87, %rsi lea addresses_WT_ht+0xde87, %rdi nop nop cmp $20514, %rax mov $71, %rcx rep movsq nop nop dec %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r8 push %r9 push %rax push %rbp push %rcx push %rsi // Store lea addresses_PSE+0x1df87, %rsi nop sub %r9, %r9 mov $0x5152535455565758, %rax movq %rax, (%rsi) nop nop nop nop add %rcx, %rcx // Store lea addresses_WT+0x4387, %rbp nop nop inc %r8 mov $0x5152535455565758, %rax movq %rax, (%rbp) nop nop sub %r9, %r9 // Faulty Load lea addresses_US+0x10b87, %rbp nop nop nop nop and %r9, %r9 mov (%rbp), %r14d lea oracles, %rbp and $0xff, %r14 shlq $12, %r14 mov (%rbp,%r14,1), %r14 pop %rsi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 9, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}} {'00': 19024} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
; A074609: a(n) = 3^n + 8^n. ; 2,11,73,539,4177,33011,262873,2099339,16783777,134237411,1073800873,8590111739,68720008177,549757408211,4398051294073,35184386437739,281475019757377,2251799942825411,18014398896902473,144115189238117339 mov $1,8 pow $1,$0 mov $2,3 pow $2,$0 add $1,$2 mov $0,$1
; A022314: a(n) = a(n-1) + a(n-2) + 1, with a(0) = 0, a(1) = 9. ; 0,9,10,20,31,52,84,137,222,360,583,944,1528,2473,4002,6476,10479,16956,27436,44393,71830,116224,188055,304280,492336,796617,1288954,2085572,3374527,5460100,8834628,14294729,23129358,37424088,60553447,97977536,158530984,256508521,415039506,671548028,1086587535,1758135564,2844723100,4602858665,7447581766,12050440432,19498022199,31548462632,51046484832,82594947465,133641432298,216236379764,349877812063,566114191828,915992003892,1482106195721,2398098199614,3880204395336,6278302594951,10158506990288,16436809585240,26595316575529,43032126160770,69627442736300,112659568897071,182287011633372,294946580530444,477233592163817,772180172694262,1249413764858080,2021593937552343,3271007702410424,5292601639962768,8563609342373193 mov $1,1 mov $2,9 lpb $0,1 sub $0,1 mov $3,$2 mov $2,$1 add $1,$3 lpe sub $1,1
; A047294: Numbers that are congruent to {1, 2, 4, 6} mod 7. ; 1,2,4,6,8,9,11,13,15,16,18,20,22,23,25,27,29,30,32,34,36,37,39,41,43,44,46,48,50,51,53,55,57,58,60,62,64,65,67,69,71,72,74,76,78,79,81,83,85,86,88,90,92,93,95,97,99,100,102,104,106,107,109,111,113,114,116,118,120,121,123,125,127,128,130,132,134,135,137,139,141,142,144,146,148,149,151,153,155,156,158,160,162,163,165,167,169,170,172,174,176,177,179,181,183,184,186,188,190,191,193,195,197,198,200,202,204,205,207,209,211,212,214,216,218,219,221,223,225,226,228,230,232,233,235,237,239,240,242,244,246,247,249,251,253,254,256,258,260,261,263,265,267,268,270,272,274,275,277,279,281,282,284,286,288,289,291,293,295,296,298,300,302,303,305,307,309,310,312,314,316,317,319,321,323,324,326,328,330,331,333,335,337,338,340,342,344,345,347,349,351,352,354,356,358,359,361,363,365,366,368,370,372,373,375,377,379,380,382,384,386,387,389,391,393,394,396,398,400,401,403,405,407,408,410,412,414,415,417,419,421,422,424,426,428,429,431,433,435,436 mov $1,$0 mul $1,7 div $1,4 add $1,1
; A283353: Decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 619", based on the 5-celled von Neumann neighborhood. ; 1,2,4,14,28,62,124,254,508,1022,2044,4094,8188,16382,32764,65534,131068,262142,524284,1048574,2097148,4194302,8388604,16777214,33554428,67108862,134217724,268435454,536870908,1073741822,2147483644,4294967294,8589934588,17179869182,34359738364,68719476734,137438953468,274877906942,549755813884,1099511627774,2199023255548,4398046511102,8796093022204,17592186044414,35184372088828,70368744177662,140737488355324,281474976710654,562949953421308,1125899906842622,2251799813685244,4503599627370494,9007199254740988,18014398509481982,36028797018963964,72057594037927934,144115188075855868,288230376151711742,576460752303423484,1152921504606846974,2305843009213693948,4611686018427387902,9223372036854775804,18446744073709551614,36893488147419103228,73786976294838206462,147573952589676412924,295147905179352825854,590295810358705651708,1180591620717411303422,2361183241434822606844,4722366482869645213694,9444732965739290427388,18889465931478580854782,37778931862957161709564,75557863725914323419134,151115727451828646838268,302231454903657293676542,604462909807314587353084,1208925819614629174706174,2417851639229258349412348,4835703278458516698824702,9671406556917033397649404,19342813113834066795298814,38685626227668133590597628,77371252455336267181195262,154742504910672534362390524,309485009821345068724781054,618970019642690137449562108,1237940039285380274899124222,2475880078570760549798248444,4951760157141521099596496894,9903520314283042199192993788,19807040628566084398385987582,39614081257132168796771975164,79228162514264337593543950334,158456325028528675187087900668,316912650057057350374175801342,633825300114114700748351602684,1267650600228229401496703205374 mov $1,1 mov $2,1 lpb $0 sub $0,1 add $1,2 mul $2,2 add $3,$1 mov $1,$2 mov $2,$3 sub $2,1 add $3,1 lpe mov $0,$1
;============================================================== ; WLA-DX banking setup ;============================================================== .memorymap defaultslot 0 ; rom area slotsize $4000 slot 0 $0000 slot 1 $4000 slot 2 $8000 ; ram area slotsize $2000 slot 3 $C000 slot 4 $E000 .endme .rombankmap bankstotal 2 banksize $4000 banks 2 .endro ;============================================================== ; SDSC tag and SMS rom header ;============================================================== .sdsctag 0.0,"ZX Basic program","Generated by zxb2wla 0.03 alpha","Haroldo" .smstag .include "..\lib\wla\boot.inc" ;============================================================== ; Includes ;============================================================== .include "..\lib\wla\Useful functions.inc" .include "..\lib\wla\BBC Micro font.inc" .include "..\lib\wla\sprite.inc" .section "ZX Basic code" free zb__START_PROGRAM: ld hl, 256 ld (zb_ballSpdX), hl ld hl, 256 ld (zb_ballSpdY), hl zb__LABEL0: call zb_ReadJoypad1 ld (zb_joy), a ld hl, 4 push hl ld a, (zb_joy) ld l, a ld h, 0 call zb_AndW ld a, h or l jp z, zb__LABEL2 ld hl, (zb_padSpdX) ld de, -64 add hl, de ld (zb_padSpdX), hl push hl ld de, 65024 pop hl or a sbc hl, de add hl, hl jp nc, zb__LABEL5 ld hl, 65024 ld (zb_padSpdX), hl zb__LABEL5: jp zb__LABEL3 zb__LABEL2: ld hl, 8 push hl ld a, (zb_joy) ld l, a ld h, 0 call zb_AndW ld a, h or l jp z, zb__LABEL6 ld hl, (zb_padSpdX) ld de, 64 add hl, de ld (zb_padSpdX), hl push hl ld hl, 512 pop de or a sbc hl, de add hl, hl jp nc, zb__LABEL9 ld hl, 512 ld (zb_padSpdX), hl zb__LABEL9: jp zb__LABEL7 zb__LABEL6: ld hl, (zb_padSpdX) push hl ld de, 0 pop hl or a sbc hl, de add hl, hl jp nc, zb__LABEL12 ld hl, (zb_padSpdX) call zb__NEGHL srl h rr l call zb__NEGHL ld (zb_padSpdX), hl jp zb__LABEL13 zb__LABEL12: ld hl, (zb_padSpdX) srl h rr l ld (zb_padSpdX), hl zb__LABEL13: zb__LABEL11: zb__LABEL7: zb__LABEL3: ld hl, (zb_padX) push hl ld hl, (zb_padSpdX) ex de, hl pop hl add hl, de ld (zb_padX), hl push hl ld de, 0 pop hl or a sbc hl, de add hl, hl jp nc, zb__LABEL14 ld hl, 0 ld (zb_padX), hl jp zb__LABEL15 zb__LABEL14: ld hl, (zb_padX) push hl ld hl, 13312 pop de or a sbc hl, de add hl, hl jp nc, zb__LABEL17 ld hl, 13312 ld (zb_padX), hl zb__LABEL17: zb__LABEL15: ld hl, (zb_ballX) push hl ld hl, (zb_ballSpdX) ex de, hl pop hl add hl, de ld (zb_ballX), hl ld hl, (zb_ballY) push hl ld hl, (zb_ballSpdY) ex de, hl pop hl add hl, de ld (zb_ballY), hl ld hl, (zb_ballX) push hl ld de, 0 pop hl or a sbc hl, de add hl, hl jp nc, zb__LABEL18 ld hl, 0 ld (zb_ballX), hl ld hl, (zb_ballSpdX) call zb__NEGHL ld (zb_ballSpdX), hl jp zb__LABEL19 zb__LABEL18: ld hl, (zb_ballX) push hl ld hl, 15872 pop de or a sbc hl, de add hl, hl jp nc, zb__LABEL21 ld hl, 15872 ld (zb_ballX), hl ld hl, (zb_ballSpdX) call zb__NEGHL ld (zb_ballSpdX), hl zb__LABEL21: zb__LABEL19: ld hl, (zb_ballY) push hl ld de, 0 pop hl or a sbc hl, de add hl, hl jp nc, zb__LABEL22 ld hl, 0 ld (zb_ballY), hl ld hl, (zb_ballSpdY) call zb__NEGHL ld (zb_ballSpdY), hl jp zb__LABEL23 zb__LABEL22: ld hl, (zb_ballY) push hl ld hl, 11776 pop de or a sbc hl, de add hl, hl jp nc, zb__LABEL25 ld hl, 11776 ld (zb_ballY), hl ld hl, (zb_ballSpdY) call zb__NEGHL ld (zb_ballSpdY), hl zb__LABEL25: zb__LABEL23: call zb_DrawPad ld a, 10 push af ld hl, (zb_ballY) ld b, 6 zb__LABEL32: sra h rr l djnz zb__LABEL32 ld a, l push af ld hl, (zb_ballX) ld b, 6 zb__LABEL33: sra h rr l djnz zb__LABEL33 ld a, l push af ld a, 6 call zb_SetSprite call zb_WaitForVBlankNoInt call zb_UpdateSprites jp zb__LABEL0 zb__LABEL1: zb_UpdateSprites: ;#line 1 jp UpdateSprites ;#line 2 zb_UpdateSprites__leave: ret zb_WaitForVBlankNoInt: ;#line 8 jp WaitForVBlankNoInt ;#line 9 zb_WaitForVBlankNoInt__leave: ret zb_SetSprite: ;#line 15 exx pop hl exx ld d, 0 ld e, a pop bc ld hl, hw_sprites_y add hl, de pop af ld (hl), a ld hl, hw_sprites_xc add hl, de add hl, de ld (hl), b inc hl pop af ld (hl), a exx push hl exx ;#line 35 zb_SetSprite__leave: ret zb_ReadJoypad1: ;#line 52 in a, ($dc) cpl ;#line 54 zb_ReadJoypad1__leave: ret zb_ReadJoypad2: ;#line 59 in a, ($dc) cpl rla rla rla and $03 ld l, a in a, ($dd) cpl add a, a add a, a or l ;#line 71 zb_ReadJoypad2__leave: ret zb_AndW: ;#line 76 pop bc pop de ld a, l and e ld l, a ld a, h and d ld h, a push bc ;#line 85 zb_AndW__leave: ret zb_DrawPad: push ix ld ix, 0 add ix, sp ld hl, 0 push hl ld hl, (zb_padX) ld b, 6 zb__LABEL34: sra h rr l djnz zb__LABEL34 ld a, l ld (ix-2), a ld a, 28 push af ld a, 160 push af ld a, (ix-2) push af xor a call zb_SetSprite ld a, (ix-2) add a, 8 ld (ix-2), a ld (ix-1), 1 jp zb__LABEL26 zb__LABEL30: ld a, 29 push af ld a, 160 push af ld a, (ix-2) push af ld a, (ix-1) call zb_SetSprite ld a, (ix-2) add a, 8 ld (ix-2), a zb__LABEL31: ld a, (ix-1) inc a ld (ix-1), a zb__LABEL26: ld a, (ix-1) push af ld a, 4 pop hl cp h jp nc, zb__LABEL30 zb__LABEL29: ld a, 30 push af ld a, 160 push af ld a, (ix-2) push af ld a, (ix-1) call zb_SetSprite zb_DrawPad__leave: ld sp, ix pop ix ret ;#line 1 "neg16.asm" ; Negates HL value (16 bit) zb__ABS16: bit 7, h ret z zb__NEGHL: ld a, l ; HL = -HL cpl ld l, a ld a, h cpl ld h, a inc hl ret ;#line 366 "test.zxb" ret .ends .section "ZXB variable init values" free ZXBASIC_USER_DATA_VALUES: ; zb_ballSpdX .db 00, 00 ; zb_padX .db 00, 00 ; zb_ballX .db 00, 00 ; zb_ballY .db 00, 00 ; zb_ballSpdY .db 00, 00 ; zb_padSpdX .db 00, 00 ; zb_joy .db 00 ZXBASIC_USER_DATA_VALUES_END: .ends .ramsection "ZXBasic Variables" slot 3 ZXBASIC_USER_DATA ds 0 zb_ballSpdX ds 2 zb_padX ds 2 zb_ballX ds 2 zb_ballY ds 2 zb_ballSpdY ds 2 zb_padSpdX ds 2 zb_joy ds 1 ZXBASIC_USER_DATA_END ds 0 .ends
; A178874: Partial sums of round(5^n/8). ; 0,1,4,20,98,489,2442,12208,61036,305177,1525880,7629396,38146974,190734865,953674318,4768371584,23841857912,119209289553,596046447756,2980232238772,14901161193850,74505805969241,372529029846194,1862645149230960 mov $2,$0 mov $4,$0 lpb $4,1 mov $0,$2 sub $4,1 sub $0,$4 mov $3,5 pow $3,$0 add $3,4 mov $5,1 mul $5,$3 div $5,8 add $1,$5 lpe
defw 3306
//==- CheckObjCDealloc.cpp - Check ObjC -dealloc implementation --*- C++ -*-==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This checker analyzes Objective-C -dealloc methods and their callees // to warn about improper releasing of instance variables that back synthesized // properties. It warns about missing releases in the following cases: // - When a class has a synthesized instance variable for a 'retain' or 'copy' // property and lacks a -dealloc method in its implementation. // - When a class has a synthesized instance variable for a 'retain'/'copy' // property but the ivar is not released in -dealloc by either -release // or by nilling out the property. // // It warns about extra releases in -dealloc (but not in callees) when a // synthesized instance variable is released in the following cases: // - When the property is 'assign' and is not 'readonly'. // - When the property is 'weak'. // // This checker only warns for instance variables synthesized to back // properties. Handling the more general case would require inferring whether // an instance variable is stored retained or not. For synthesized properties, // this is specified in the property declaration itself. // //===----------------------------------------------------------------------===// #include "ClangSACheckers.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprObjC.h" #include "clang/Basic/LangOptions.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h" #include "clang/StaticAnalyzer/Core/Checker.h" #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h" #include "llvm/Support/raw_ostream.h" using namespace clang; using namespace ento; /// Indicates whether an instance variable is required to be released in /// -dealloc. enum class ReleaseRequirement { /// The instance variable must be released, either by calling /// -release on it directly or by nilling it out with a property setter. MustRelease, /// The instance variable must not be directly released with -release. MustNotReleaseDirectly, /// The requirement for the instance variable could not be determined. Unknown }; /// Returns true if the property implementation is synthesized and the /// type of the property is retainable. static bool isSynthesizedRetainableProperty(const ObjCPropertyImplDecl *I, const ObjCIvarDecl **ID, const ObjCPropertyDecl **PD) { if (I->getPropertyImplementation() != ObjCPropertyImplDecl::Synthesize) return false; (*ID) = I->getPropertyIvarDecl(); if (!(*ID)) return false; QualType T = (*ID)->getType(); if (!T->isObjCRetainableType()) return false; (*PD) = I->getPropertyDecl(); // Shouldn't be able to synthesize a property that doesn't exist. assert(*PD); return true; } namespace { class ObjCDeallocChecker : public Checker<check::ASTDecl<ObjCImplementationDecl>, check::PreObjCMessage, check::PostObjCMessage, check::PreCall, check::BeginFunction, check::EndFunction, eval::Assume, check::PointerEscape, check::PreStmt<ReturnStmt>> { mutable IdentifierInfo *NSObjectII, *SenTestCaseII, *XCTestCaseII, *Block_releaseII, *CIFilterII; mutable Selector DeallocSel, ReleaseSel; std::unique_ptr<BugType> MissingReleaseBugType; std::unique_ptr<BugType> ExtraReleaseBugType; std::unique_ptr<BugType> MistakenDeallocBugType; public: ObjCDeallocChecker(); void checkASTDecl(const ObjCImplementationDecl *D, AnalysisManager& Mgr, BugReporter &BR) const; void checkBeginFunction(CheckerContext &Ctx) const; void checkPreObjCMessage(const ObjCMethodCall &M, CheckerContext &C) const; void checkPreCall(const CallEvent &Call, CheckerContext &C) const; void checkPostObjCMessage(const ObjCMethodCall &M, CheckerContext &C) const; ProgramStateRef evalAssume(ProgramStateRef State, SVal Cond, bool Assumption) const; ProgramStateRef checkPointerEscape(ProgramStateRef State, const InvalidatedSymbols &Escaped, const CallEvent *Call, PointerEscapeKind Kind) const; void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const; void checkEndFunction(CheckerContext &Ctx) const; private: void diagnoseMissingReleases(CheckerContext &C) const; bool diagnoseExtraRelease(SymbolRef ReleasedValue, const ObjCMethodCall &M, CheckerContext &C) const; bool diagnoseMistakenDealloc(SymbolRef DeallocedValue, const ObjCMethodCall &M, CheckerContext &C) const; SymbolRef getValueReleasedByNillingOut(const ObjCMethodCall &M, CheckerContext &C) const; const ObjCIvarRegion *getIvarRegionForIvarSymbol(SymbolRef IvarSym) const; SymbolRef getInstanceSymbolFromIvarSymbol(SymbolRef IvarSym) const; const ObjCPropertyImplDecl* findPropertyOnDeallocatingInstance(SymbolRef IvarSym, CheckerContext &C) const; ReleaseRequirement getDeallocReleaseRequirement(const ObjCPropertyImplDecl *PropImpl) const; bool isInInstanceDealloc(const CheckerContext &C, SVal &SelfValOut) const; bool isInInstanceDealloc(const CheckerContext &C, const LocationContext *LCtx, SVal &SelfValOut) const; bool instanceDeallocIsOnStack(const CheckerContext &C, SVal &InstanceValOut) const; bool isSuperDeallocMessage(const ObjCMethodCall &M) const; const ObjCImplDecl *getContainingObjCImpl(const LocationContext *LCtx) const; const ObjCPropertyDecl * findShadowedPropertyDecl(const ObjCPropertyImplDecl *PropImpl) const; void transitionToReleaseValue(CheckerContext &C, SymbolRef Value) const; ProgramStateRef removeValueRequiringRelease(ProgramStateRef State, SymbolRef InstanceSym, SymbolRef ValueSym) const; void initIdentifierInfoAndSelectors(ASTContext &Ctx) const; bool classHasSeparateTeardown(const ObjCInterfaceDecl *ID) const; bool isReleasedByCIFilterDealloc(const ObjCPropertyImplDecl *PropImpl) const; }; } // End anonymous namespace. typedef llvm::ImmutableSet<SymbolRef> SymbolSet; /// Maps from the symbol for a class instance to the set of /// symbols remaining that must be released in -dealloc. REGISTER_MAP_WITH_PROGRAMSTATE(UnreleasedIvarMap, SymbolRef, SymbolSet) namespace clang { namespace ento { template<> struct ProgramStateTrait<SymbolSet> : public ProgramStatePartialTrait<SymbolSet> { static void *GDMIndex() { static int index = 0; return &index; } }; } } /// An AST check that diagnose when the class requires a -dealloc method and /// is missing one. void ObjCDeallocChecker::checkASTDecl(const ObjCImplementationDecl *D, AnalysisManager &Mgr, BugReporter &BR) const { assert(Mgr.getLangOpts().getGC() != LangOptions::GCOnly); assert(!Mgr.getLangOpts().ObjCAutoRefCount); initIdentifierInfoAndSelectors(Mgr.getASTContext()); const ObjCInterfaceDecl *ID = D->getClassInterface(); // If the class is known to have a lifecycle with a separate teardown method // then it may not require a -dealloc method. if (classHasSeparateTeardown(ID)) return; // Does the class contain any synthesized properties that are retainable? // If not, skip the check entirely. const ObjCPropertyImplDecl *PropImplRequiringRelease = nullptr; bool HasOthers = false; for (const auto *I : D->property_impls()) { if (getDeallocReleaseRequirement(I) == ReleaseRequirement::MustRelease) { if (!PropImplRequiringRelease) PropImplRequiringRelease = I; else { HasOthers = true; break; } } } if (!PropImplRequiringRelease) return; const ObjCMethodDecl *MD = nullptr; // Scan the instance methods for "dealloc". for (const auto *I : D->instance_methods()) { if (I->getSelector() == DeallocSel) { MD = I; break; } } if (!MD) { // No dealloc found. const char* Name = "Missing -dealloc"; std::string Buf; llvm::raw_string_ostream OS(Buf); OS << "'" << *D << "' lacks a 'dealloc' instance method but " << "must release '" << *PropImplRequiringRelease->getPropertyIvarDecl() << "'"; if (HasOthers) OS << " and others"; PathDiagnosticLocation DLoc = PathDiagnosticLocation::createBegin(D, BR.getSourceManager()); BR.EmitBasicReport(D, this, Name, categories::CoreFoundationObjectiveC, OS.str(), DLoc); return; } } /// If this is the beginning of -dealloc, mark the values initially stored in /// instance variables that must be released by the end of -dealloc /// as unreleased in the state. void ObjCDeallocChecker::checkBeginFunction( CheckerContext &C) const { initIdentifierInfoAndSelectors(C.getASTContext()); // Only do this if the current method is -dealloc. SVal SelfVal; if (!isInInstanceDealloc(C, SelfVal)) return; SymbolRef SelfSymbol = SelfVal.getAsSymbol(); const LocationContext *LCtx = C.getLocationContext(); ProgramStateRef InitialState = C.getState(); ProgramStateRef State = InitialState; SymbolSet::Factory &F = State->getStateManager().get_context<SymbolSet>(); // Symbols that must be released by the end of the -dealloc; SymbolSet RequiredReleases = F.getEmptySet(); // If we're an inlined -dealloc, we should add our symbols to the existing // set from our subclass. if (const SymbolSet *CurrSet = State->get<UnreleasedIvarMap>(SelfSymbol)) RequiredReleases = *CurrSet; for (auto *PropImpl : getContainingObjCImpl(LCtx)->property_impls()) { ReleaseRequirement Requirement = getDeallocReleaseRequirement(PropImpl); if (Requirement != ReleaseRequirement::MustRelease) continue; SVal LVal = State->getLValue(PropImpl->getPropertyIvarDecl(), SelfVal); Optional<Loc> LValLoc = LVal.getAs<Loc>(); if (!LValLoc) continue; SVal InitialVal = State->getSVal(LValLoc.getValue()); SymbolRef Symbol = InitialVal.getAsSymbol(); if (!Symbol || !isa<SymbolRegionValue>(Symbol)) continue; // Mark the value as requiring a release. RequiredReleases = F.add(RequiredReleases, Symbol); } if (!RequiredReleases.isEmpty()) { State = State->set<UnreleasedIvarMap>(SelfSymbol, RequiredReleases); } if (State != InitialState) { C.addTransition(State); } } /// Given a symbol for an ivar, return the ivar region it was loaded from. /// Returns nullptr if the instance symbol cannot be found. const ObjCIvarRegion * ObjCDeallocChecker::getIvarRegionForIvarSymbol(SymbolRef IvarSym) const { return dyn_cast_or_null<ObjCIvarRegion>(IvarSym->getOriginRegion()); } /// Given a symbol for an ivar, return a symbol for the instance containing /// the ivar. Returns nullptr if the instance symbol cannot be found. SymbolRef ObjCDeallocChecker::getInstanceSymbolFromIvarSymbol(SymbolRef IvarSym) const { const ObjCIvarRegion *IvarRegion = getIvarRegionForIvarSymbol(IvarSym); if (!IvarRegion) return nullptr; return IvarRegion->getSymbolicBase()->getSymbol(); } /// If we are in -dealloc or -dealloc is on the stack, handle the call if it is /// a release or a nilling-out property setter. void ObjCDeallocChecker::checkPreObjCMessage( const ObjCMethodCall &M, CheckerContext &C) const { // Only run if -dealloc is on the stack. SVal DeallocedInstance; if (!instanceDeallocIsOnStack(C, DeallocedInstance)) return; SymbolRef ReleasedValue = nullptr; if (M.getSelector() == ReleaseSel) { ReleasedValue = M.getReceiverSVal().getAsSymbol(); } else if (M.getSelector() == DeallocSel && !M.isReceiverSelfOrSuper()) { if (diagnoseMistakenDealloc(M.getReceiverSVal().getAsSymbol(), M, C)) return; } if (ReleasedValue) { // An instance variable symbol was released with -release: // [_property release]; if (diagnoseExtraRelease(ReleasedValue,M, C)) return; } else { // An instance variable symbol was released nilling out its property: // self.property = nil; ReleasedValue = getValueReleasedByNillingOut(M, C); } if (!ReleasedValue) return; transitionToReleaseValue(C, ReleasedValue); } /// If we are in -dealloc or -dealloc is on the stack, handle the call if it is /// call to Block_release(). void ObjCDeallocChecker::checkPreCall(const CallEvent &Call, CheckerContext &C) const { const IdentifierInfo *II = Call.getCalleeIdentifier(); if (II != Block_releaseII) return; if (Call.getNumArgs() != 1) return; SymbolRef ReleasedValue = Call.getArgSVal(0).getAsSymbol(); if (!ReleasedValue) return; transitionToReleaseValue(C, ReleasedValue); } /// If the message was a call to '[super dealloc]', diagnose any missing /// releases. void ObjCDeallocChecker::checkPostObjCMessage( const ObjCMethodCall &M, CheckerContext &C) const { // We perform this check post-message so that if the super -dealloc // calls a helper method and that this class overrides, any ivars released in // the helper method will be recorded before checking. if (isSuperDeallocMessage(M)) diagnoseMissingReleases(C); } /// Check for missing releases even when -dealloc does not call /// '[super dealloc]'. void ObjCDeallocChecker::checkEndFunction( CheckerContext &C) const { diagnoseMissingReleases(C); } /// Check for missing releases on early return. void ObjCDeallocChecker::checkPreStmt( const ReturnStmt *RS, CheckerContext &C) const { diagnoseMissingReleases(C); } /// When a symbol is assumed to be nil, remove it from the set of symbols /// require to be nil. ProgramStateRef ObjCDeallocChecker::evalAssume(ProgramStateRef State, SVal Cond, bool Assumption) const { if (State->get<UnreleasedIvarMap>().isEmpty()) return State; auto *CondBSE = dyn_cast_or_null<BinarySymExpr>(Cond.getAsSymExpr()); if (!CondBSE) return State; BinaryOperator::Opcode OpCode = CondBSE->getOpcode(); if (Assumption) { if (OpCode != BO_EQ) return State; } else { if (OpCode != BO_NE) return State; } SymbolRef NullSymbol = nullptr; if (auto *SIE = dyn_cast<SymIntExpr>(CondBSE)) { const llvm::APInt &RHS = SIE->getRHS(); if (RHS != 0) return State; NullSymbol = SIE->getLHS(); } else if (auto *SIE = dyn_cast<IntSymExpr>(CondBSE)) { const llvm::APInt &LHS = SIE->getLHS(); if (LHS != 0) return State; NullSymbol = SIE->getRHS(); } else { return State; } SymbolRef InstanceSymbol = getInstanceSymbolFromIvarSymbol(NullSymbol); if (!InstanceSymbol) return State; State = removeValueRequiringRelease(State, InstanceSymbol, NullSymbol); return State; } /// If a symbol escapes conservatively assume unseen code released it. ProgramStateRef ObjCDeallocChecker::checkPointerEscape( ProgramStateRef State, const InvalidatedSymbols &Escaped, const CallEvent *Call, PointerEscapeKind Kind) const { if (State->get<UnreleasedIvarMap>().isEmpty()) return State; // Don't treat calls to '[super dealloc]' as escaping for the purposes // of this checker. Because the checker diagnoses missing releases in the // post-message handler for '[super dealloc], escaping here would cause // the checker to never warn. auto *OMC = dyn_cast_or_null<ObjCMethodCall>(Call); if (OMC && isSuperDeallocMessage(*OMC)) return State; for (const auto &Sym : Escaped) { if (!Call || (Call && !Call->isInSystemHeader())) { // If Sym is a symbol for an object with instance variables that // must be released, remove these obligations when the object escapes // unless via a call to a system function. System functions are // very unlikely to release instance variables on objects passed to them, // and are frequently called on 'self' in -dealloc (e.g., to remove // observers) -- we want to avoid false negatives from escaping on // them. State = State->remove<UnreleasedIvarMap>(Sym); } SymbolRef InstanceSymbol = getInstanceSymbolFromIvarSymbol(Sym); if (!InstanceSymbol) continue; State = removeValueRequiringRelease(State, InstanceSymbol, Sym); } return State; } /// Report any unreleased instance variables for the current instance being /// dealloced. void ObjCDeallocChecker::diagnoseMissingReleases(CheckerContext &C) const { ProgramStateRef State = C.getState(); SVal SelfVal; if (!isInInstanceDealloc(C, SelfVal)) return; const MemRegion *SelfRegion = SelfVal.castAs<loc::MemRegionVal>().getRegion(); const LocationContext *LCtx = C.getLocationContext(); ExplodedNode *ErrNode = nullptr; SymbolRef SelfSym = SelfVal.getAsSymbol(); if (!SelfSym) return; const SymbolSet *OldUnreleased = State->get<UnreleasedIvarMap>(SelfSym); if (!OldUnreleased) return; SymbolSet NewUnreleased = *OldUnreleased; SymbolSet::Factory &F = State->getStateManager().get_context<SymbolSet>(); ProgramStateRef InitialState = State; for (auto *IvarSymbol : *OldUnreleased) { const TypedValueRegion *TVR = cast<SymbolRegionValue>(IvarSymbol)->getRegion(); const ObjCIvarRegion *IvarRegion = cast<ObjCIvarRegion>(TVR); // Don't warn if the ivar is not for this instance. if (SelfRegion != IvarRegion->getSuperRegion()) continue; const ObjCIvarDecl *IvarDecl = IvarRegion->getDecl(); // Prevent an inlined call to -dealloc in a super class from warning // about the values the subclass's -dealloc should release. if (IvarDecl->getContainingInterface() != cast<ObjCMethodDecl>(LCtx->getDecl())->getClassInterface()) continue; // Prevents diagnosing multiple times for the same instance variable // at, for example, both a return and at the end of of the function. NewUnreleased = F.remove(NewUnreleased, IvarSymbol); if (State->getStateManager() .getConstraintManager() .isNull(State, IvarSymbol) .isConstrainedTrue()) { continue; } // A missing release manifests as a leak, so treat as a non-fatal error. if (!ErrNode) ErrNode = C.generateNonFatalErrorNode(); // If we've already reached this node on another path, return without // diagnosing. if (!ErrNode) return; std::string Buf; llvm::raw_string_ostream OS(Buf); const ObjCInterfaceDecl *Interface = IvarDecl->getContainingInterface(); // If the class is known to have a lifecycle with teardown that is // separate from -dealloc, do not warn about missing releases. We // suppress here (rather than not tracking for instance variables in // such classes) because these classes are rare. if (classHasSeparateTeardown(Interface)) return; ObjCImplDecl *ImplDecl = Interface->getImplementation(); const ObjCPropertyImplDecl *PropImpl = ImplDecl->FindPropertyImplIvarDecl(IvarDecl->getIdentifier()); const ObjCPropertyDecl *PropDecl = PropImpl->getPropertyDecl(); assert(PropDecl->getSetterKind() == ObjCPropertyDecl::Copy || PropDecl->getSetterKind() == ObjCPropertyDecl::Retain); OS << "The '" << *IvarDecl << "' ivar in '" << *ImplDecl << "' was "; if (PropDecl->getSetterKind() == ObjCPropertyDecl::Retain) OS << "retained"; else OS << "copied"; OS << " by a synthesized property but not released" " before '[super dealloc]'"; std::unique_ptr<BugReport> BR( new BugReport(*MissingReleaseBugType, OS.str(), ErrNode)); C.emitReport(std::move(BR)); } if (NewUnreleased.isEmpty()) { State = State->remove<UnreleasedIvarMap>(SelfSym); } else { State = State->set<UnreleasedIvarMap>(SelfSym, NewUnreleased); } if (ErrNode) { C.addTransition(State, ErrNode); } else if (State != InitialState) { C.addTransition(State); } // Make sure that after checking in the top-most frame the list of // tracked ivars is empty. This is intended to detect accidental leaks in // the UnreleasedIvarMap program state. assert(!LCtx->inTopFrame() || State->get<UnreleasedIvarMap>().isEmpty()); } /// Given a symbol, determine whether the symbol refers to an ivar on /// the top-most deallocating instance. If so, find the property for that /// ivar, if one exists. Otherwise return null. const ObjCPropertyImplDecl * ObjCDeallocChecker::findPropertyOnDeallocatingInstance( SymbolRef IvarSym, CheckerContext &C) const { SVal DeallocedInstance; if (!isInInstanceDealloc(C, DeallocedInstance)) return nullptr; // Try to get the region from which the ivar value was loaded. auto *IvarRegion = getIvarRegionForIvarSymbol(IvarSym); if (!IvarRegion) return nullptr; // Don't try to find the property if the ivar was not loaded from the // given instance. if (DeallocedInstance.castAs<loc::MemRegionVal>().getRegion() != IvarRegion->getSuperRegion()) return nullptr; const LocationContext *LCtx = C.getLocationContext(); const ObjCIvarDecl *IvarDecl = IvarRegion->getDecl(); const ObjCImplDecl *Container = getContainingObjCImpl(LCtx); const ObjCPropertyImplDecl *PropImpl = Container->FindPropertyImplIvarDecl(IvarDecl->getIdentifier()); return PropImpl; } /// Emits a warning if the current context is -dealloc and ReleasedValue /// must not be directly released in a -dealloc. Returns true if a diagnostic /// was emitted. bool ObjCDeallocChecker::diagnoseExtraRelease(SymbolRef ReleasedValue, const ObjCMethodCall &M, CheckerContext &C) const { // Try to get the region from which the the released value was loaded. // Note that, unlike diagnosing for missing releases, here we don't track // values that must not be released in the state. This is because even if // these values escape, it is still an error under the rules of MRR to // release them in -dealloc. const ObjCPropertyImplDecl *PropImpl = findPropertyOnDeallocatingInstance(ReleasedValue, C); if (!PropImpl) return false; // If the ivar belongs to a property that must not be released directly // in dealloc, emit a warning. if (getDeallocReleaseRequirement(PropImpl) != ReleaseRequirement::MustNotReleaseDirectly) { return false; } // If the property is readwrite but it shadows a read-only property in its // external interface, treat the property a read-only. If the outside // world cannot write to a property then the internal implementation is free // to make its own convention about whether the value is stored retained // or not. We look up the shadow here rather than in // getDeallocReleaseRequirement() because doing so can be expensive. const ObjCPropertyDecl *PropDecl = findShadowedPropertyDecl(PropImpl); if (PropDecl) { if (PropDecl->isReadOnly()) return false; } else { PropDecl = PropImpl->getPropertyDecl(); } ExplodedNode *ErrNode = C.generateNonFatalErrorNode(); if (!ErrNode) return false; std::string Buf; llvm::raw_string_ostream OS(Buf); assert(PropDecl->getSetterKind() == ObjCPropertyDecl::Weak || (PropDecl->getSetterKind() == ObjCPropertyDecl::Assign && !PropDecl->isReadOnly()) || isReleasedByCIFilterDealloc(PropImpl) ); const ObjCImplDecl *Container = getContainingObjCImpl(C.getLocationContext()); OS << "The '" << *PropImpl->getPropertyIvarDecl() << "' ivar in '" << *Container; if (isReleasedByCIFilterDealloc(PropImpl)) { OS << "' will be released by '-[CIFilter dealloc]' but also released here"; } else { OS << "' was synthesized for "; if (PropDecl->getSetterKind() == ObjCPropertyDecl::Weak) OS << "a weak"; else OS << "an assign, readwrite"; OS << " property but was released in 'dealloc'"; } std::unique_ptr<BugReport> BR( new BugReport(*ExtraReleaseBugType, OS.str(), ErrNode)); BR->addRange(M.getOriginExpr()->getSourceRange()); C.emitReport(std::move(BR)); return true; } /// Emits a warning if the current context is -dealloc and DeallocedValue /// must not be directly dealloced in a -dealloc. Returns true if a diagnostic /// was emitted. bool ObjCDeallocChecker::diagnoseMistakenDealloc(SymbolRef DeallocedValue, const ObjCMethodCall &M, CheckerContext &C) const { // Find the property backing the instance variable that M // is dealloc'ing. const ObjCPropertyImplDecl *PropImpl = findPropertyOnDeallocatingInstance(DeallocedValue, C); if (!PropImpl) return false; if (getDeallocReleaseRequirement(PropImpl) != ReleaseRequirement::MustRelease) { return false; } ExplodedNode *ErrNode = C.generateErrorNode(); if (!ErrNode) return false; std::string Buf; llvm::raw_string_ostream OS(Buf); OS << "'" << *PropImpl->getPropertyIvarDecl() << "' should be released rather than deallocated"; std::unique_ptr<BugReport> BR( new BugReport(*MistakenDeallocBugType, OS.str(), ErrNode)); BR->addRange(M.getOriginExpr()->getSourceRange()); C.emitReport(std::move(BR)); return true; } ObjCDeallocChecker::ObjCDeallocChecker() : NSObjectII(nullptr), SenTestCaseII(nullptr), XCTestCaseII(nullptr), CIFilterII(nullptr) { MissingReleaseBugType.reset( new BugType(this, "Missing ivar release (leak)", categories::MemoryCoreFoundationObjectiveC)); ExtraReleaseBugType.reset( new BugType(this, "Extra ivar release", categories::MemoryCoreFoundationObjectiveC)); MistakenDeallocBugType.reset( new BugType(this, "Mistaken dealloc", categories::MemoryCoreFoundationObjectiveC)); } void ObjCDeallocChecker::initIdentifierInfoAndSelectors( ASTContext &Ctx) const { if (NSObjectII) return; NSObjectII = &Ctx.Idents.get("NSObject"); SenTestCaseII = &Ctx.Idents.get("SenTestCase"); XCTestCaseII = &Ctx.Idents.get("XCTestCase"); Block_releaseII = &Ctx.Idents.get("_Block_release"); CIFilterII = &Ctx.Idents.get("CIFilter"); IdentifierInfo *DeallocII = &Ctx.Idents.get("dealloc"); IdentifierInfo *ReleaseII = &Ctx.Idents.get("release"); DeallocSel = Ctx.Selectors.getSelector(0, &DeallocII); ReleaseSel = Ctx.Selectors.getSelector(0, &ReleaseII); } /// Returns true if M is a call to '[super dealloc]'. bool ObjCDeallocChecker::isSuperDeallocMessage( const ObjCMethodCall &M) const { if (M.getOriginExpr()->getReceiverKind() != ObjCMessageExpr::SuperInstance) return false; return M.getSelector() == DeallocSel; } /// Returns the ObjCImplDecl containing the method declaration in LCtx. const ObjCImplDecl * ObjCDeallocChecker::getContainingObjCImpl(const LocationContext *LCtx) const { auto *MD = cast<ObjCMethodDecl>(LCtx->getDecl()); return cast<ObjCImplDecl>(MD->getDeclContext()); } /// Returns the property that shadowed by PropImpl if one exists and /// nullptr otherwise. const ObjCPropertyDecl *ObjCDeallocChecker::findShadowedPropertyDecl( const ObjCPropertyImplDecl *PropImpl) const { const ObjCPropertyDecl *PropDecl = PropImpl->getPropertyDecl(); // Only readwrite properties can shadow. if (PropDecl->isReadOnly()) return nullptr; auto *CatDecl = dyn_cast<ObjCCategoryDecl>(PropDecl->getDeclContext()); // Only class extensions can contain shadowing properties. if (!CatDecl || !CatDecl->IsClassExtension()) return nullptr; IdentifierInfo *ID = PropDecl->getIdentifier(); DeclContext::lookup_result R = CatDecl->getClassInterface()->lookup(ID); for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E; ++I) { auto *ShadowedPropDecl = dyn_cast<ObjCPropertyDecl>(*I); if (!ShadowedPropDecl) continue; if (ShadowedPropDecl->isInstanceProperty()) { assert(ShadowedPropDecl->isReadOnly()); return ShadowedPropDecl; } } return nullptr; } /// Add a transition noting the release of the given value. void ObjCDeallocChecker::transitionToReleaseValue(CheckerContext &C, SymbolRef Value) const { assert(Value); SymbolRef InstanceSym = getInstanceSymbolFromIvarSymbol(Value); if (!InstanceSym) return; ProgramStateRef InitialState = C.getState(); ProgramStateRef ReleasedState = removeValueRequiringRelease(InitialState, InstanceSym, Value); if (ReleasedState != InitialState) { C.addTransition(ReleasedState); } } /// Remove the Value requiring a release from the tracked set for /// Instance and return the resultant state. ProgramStateRef ObjCDeallocChecker::removeValueRequiringRelease( ProgramStateRef State, SymbolRef Instance, SymbolRef Value) const { assert(Instance); assert(Value); const ObjCIvarRegion *RemovedRegion = getIvarRegionForIvarSymbol(Value); if (!RemovedRegion) return State; const SymbolSet *Unreleased = State->get<UnreleasedIvarMap>(Instance); if (!Unreleased) return State; // Mark the value as no longer requiring a release. SymbolSet::Factory &F = State->getStateManager().get_context<SymbolSet>(); SymbolSet NewUnreleased = *Unreleased; for (auto &Sym : *Unreleased) { const ObjCIvarRegion *UnreleasedRegion = getIvarRegionForIvarSymbol(Sym); assert(UnreleasedRegion); if (RemovedRegion->getDecl() == UnreleasedRegion->getDecl()) { NewUnreleased = F.remove(NewUnreleased, Sym); } } if (NewUnreleased.isEmpty()) { return State->remove<UnreleasedIvarMap>(Instance); } return State->set<UnreleasedIvarMap>(Instance, NewUnreleased); } /// Determines whether the instance variable for \p PropImpl must or must not be /// released in -dealloc or whether it cannot be determined. ReleaseRequirement ObjCDeallocChecker::getDeallocReleaseRequirement( const ObjCPropertyImplDecl *PropImpl) const { const ObjCIvarDecl *IvarDecl; const ObjCPropertyDecl *PropDecl; if (!isSynthesizedRetainableProperty(PropImpl, &IvarDecl, &PropDecl)) return ReleaseRequirement::Unknown; ObjCPropertyDecl::SetterKind SK = PropDecl->getSetterKind(); switch (SK) { // Retain and copy setters retain/copy their values before storing and so // the value in their instance variables must be released in -dealloc. case ObjCPropertyDecl::Retain: case ObjCPropertyDecl::Copy: if (isReleasedByCIFilterDealloc(PropImpl)) return ReleaseRequirement::MustNotReleaseDirectly; return ReleaseRequirement::MustRelease; case ObjCPropertyDecl::Weak: return ReleaseRequirement::MustNotReleaseDirectly; case ObjCPropertyDecl::Assign: // It is common for the ivars for read-only assign properties to // always be stored retained, so their release requirement cannot be // be determined. if (PropDecl->isReadOnly()) return ReleaseRequirement::Unknown; return ReleaseRequirement::MustNotReleaseDirectly; } llvm_unreachable("Unrecognized setter kind"); } /// Returns the released value if M is a call a setter that releases /// and nils out its underlying instance variable. SymbolRef ObjCDeallocChecker::getValueReleasedByNillingOut(const ObjCMethodCall &M, CheckerContext &C) const { SVal ReceiverVal = M.getReceiverSVal(); if (!ReceiverVal.isValid()) return nullptr; if (M.getNumArgs() == 0) return nullptr; if (!M.getArgExpr(0)->getType()->isObjCRetainableType()) return nullptr; // Is the first argument nil? SVal Arg = M.getArgSVal(0); ProgramStateRef notNilState, nilState; std::tie(notNilState, nilState) = M.getState()->assume(Arg.castAs<DefinedOrUnknownSVal>()); if (!(nilState && !notNilState)) return nullptr; const ObjCPropertyDecl *Prop = M.getAccessedProperty(); if (!Prop) return nullptr; ObjCIvarDecl *PropIvarDecl = Prop->getPropertyIvarDecl(); if (!PropIvarDecl) return nullptr; ProgramStateRef State = C.getState(); SVal LVal = State->getLValue(PropIvarDecl, ReceiverVal); Optional<Loc> LValLoc = LVal.getAs<Loc>(); if (!LValLoc) return nullptr; SVal CurrentValInIvar = State->getSVal(LValLoc.getValue()); return CurrentValInIvar.getAsSymbol(); } /// Returns true if the current context is a call to -dealloc and false /// otherwise. If true, it also sets SelfValOut to the value of /// 'self'. bool ObjCDeallocChecker::isInInstanceDealloc(const CheckerContext &C, SVal &SelfValOut) const { return isInInstanceDealloc(C, C.getLocationContext(), SelfValOut); } /// Returns true if LCtx is a call to -dealloc and false /// otherwise. If true, it also sets SelfValOut to the value of /// 'self'. bool ObjCDeallocChecker::isInInstanceDealloc(const CheckerContext &C, const LocationContext *LCtx, SVal &SelfValOut) const { auto *MD = dyn_cast<ObjCMethodDecl>(LCtx->getDecl()); if (!MD || !MD->isInstanceMethod() || MD->getSelector() != DeallocSel) return false; const ImplicitParamDecl *SelfDecl = LCtx->getSelfDecl(); assert(SelfDecl && "No self in -dealloc?"); ProgramStateRef State = C.getState(); SelfValOut = State->getSVal(State->getRegion(SelfDecl, LCtx)); return true; } /// Returns true if there is a call to -dealloc anywhere on the stack and false /// otherwise. If true, it also sets InstanceValOut to the value of /// 'self' in the frame for -dealloc. bool ObjCDeallocChecker::instanceDeallocIsOnStack(const CheckerContext &C, SVal &InstanceValOut) const { const LocationContext *LCtx = C.getLocationContext(); while (LCtx) { if (isInInstanceDealloc(C, LCtx, InstanceValOut)) return true; LCtx = LCtx->getParent(); } return false; } /// Returns true if the ID is a class in which which is known to have /// a separate teardown lifecycle. In this case, -dealloc warnings /// about missing releases should be suppressed. bool ObjCDeallocChecker::classHasSeparateTeardown( const ObjCInterfaceDecl *ID) const { // Suppress if the class is not a subclass of NSObject. for ( ; ID ; ID = ID->getSuperClass()) { IdentifierInfo *II = ID->getIdentifier(); if (II == NSObjectII) return false; // FIXME: For now, ignore classes that subclass SenTestCase and XCTestCase, // as these don't need to implement -dealloc. They implement tear down in // another way, which we should try and catch later. // http://llvm.org/bugs/show_bug.cgi?id=3187 if (II == XCTestCaseII || II == SenTestCaseII) return true; } return true; } /// The -dealloc method in CIFilter highly unusual in that is will release /// instance variables belonging to its *subclasses* if the variable name /// starts with "input" or backs a property whose name starts with "input". /// Subclasses should not release these ivars in their own -dealloc method -- /// doing so could result in an over release. /// /// This method returns true if the property will be released by /// -[CIFilter dealloc]. bool ObjCDeallocChecker::isReleasedByCIFilterDealloc( const ObjCPropertyImplDecl *PropImpl) const { assert(PropImpl->getPropertyIvarDecl()); StringRef PropName = PropImpl->getPropertyDecl()->getName(); StringRef IvarName = PropImpl->getPropertyIvarDecl()->getName(); const char *ReleasePrefix = "input"; if (!(PropName.startswith(ReleasePrefix) || IvarName.startswith(ReleasePrefix))) { return false; } const ObjCInterfaceDecl *ID = PropImpl->getPropertyIvarDecl()->getContainingInterface(); for ( ; ID ; ID = ID->getSuperClass()) { IdentifierInfo *II = ID->getIdentifier(); if (II == CIFilterII) return true; } return false; } void ento::registerObjCDeallocChecker(CheckerManager &Mgr) { const LangOptions &LangOpts = Mgr.getLangOpts(); // These checker only makes sense under MRR. if (LangOpts.getGC() == LangOptions::GCOnly || LangOpts.ObjCAutoRefCount) return; Mgr.registerChecker<ObjCDeallocChecker>(); }
; A068548: Coefficients of (-x^(2n-6)) in Chebyshev polynomial of degree 2n. ; 1,32,400,3584,26880,180224,1118208,6553600,36765696,199229440,1049624576,5402263552,27262976000,135291469824,661693399040,3195455668224,15260018802688,72155450572800,338168545017856 mul $0,2 seq $0,1794 ; Negated coefficients of Chebyshev T polynomials: [x^n](-T(n+6, x)), n >= 0.
;=========================================== section .text ;------------------------------------------- ; socket_create() ; Create socket and return it. ; Return: ; rax -- socket socket_create: mov rax, 41 ; sys_socket mov rdi, 2 ; AF_INET mov rsi, 1 ; SOCK_STREAM mov rdx, 0 ; IPPROTO_TCP syscall ret ;------------------------------------------- ; socket_bind(socket, port) ; Bind socket to a port. ; Args: ; rdi -- socket ; rsi -- port socket_bind: ; bind( ; socket (return by socket_create), ; { AF_INET = 2 (2 bytes), ; port (2 bytes), ; INADDR_ANY = 0 (4 bytes) ; }, ; 16 ; ) enter 0, 0 mov ebx, esi xor rcx, rcx mov cl, bl shl ecx, 8 mov cl, bh shl ecx, 16 mov cx, 0x0002 push rcx mov rsi, rsp ; &sa mov rdx, 16 ; sizeof(sa) mov rax, 49 ; sys_bind syscall leave ret ;------------------------------------------- ; socket_reuse_port(socket) ; Make port reusable. ; Args: ; rdi -- socket socket_reuse_port: enter 0, 0 push qword 1 ; true mov rax, 54 ; sys_setsockopt mov rsi, 1 ; SOL_SOCKET mov rdx, 2 ; SO_REUSEPORT=2 mov r10, rsp ; &true mov r8, 8 ; 8 bytes syscall leave ret ;------------------------------------------- ; socket_listen(socket) ; Start listening. ; Args: ; rdi -- socket socket_listen: ; listen(socket, 0); mov rax, 50 ; sys_listen xor rsi, rsi ; 0 syscall ret ;------------------------------------------- ; socket_accept(socket) ; Accept a client, return it's file descriptor. ; Args: ; rdi -- socket ; Return: ; rax -- file descriptor socket_accept: ; accept(socket, 0, 0); xor rsi, rsi ; rsi = 0 xor rdx, rdx ; rdx = 0 mov rax, 43 ; rax = sys_accept syscall ret
; A085464: Number of monotone n-weightings of complete bipartite digraph K(4,2). ; 1,19,134,586,1919,5173,12124,25572,49677,90343,155650,256334,406315,623273,929272,1351432,1922649,2682363,3677374,4962706,6602519,8671069,11253716,14447980,18364645,23128911,28881594,35780374,44001091,53739089,65210608,78654224,94332337,112532707,133570038,157787610,185558959,217289605,253418828,294421492,340809917,393135799,451992178,518015454,591887451,674337529,766144744,868140056,981208585,1106291915,1244390446,1396565794,1563943239,1747714221,1949138884,2169548668,2410348949,2673021727,2959128362,3270312358,3608302195,3974914209,4372055520,4801727008,5266026337,5767151027,6307401574,6889184618,7515016159,8187524821,8909455164,9683671044,10513159021,11401031815,12350531810,13365034606,14448052619,15603238729,16834389976,18145451304,19540519353,21023846299,22599843742,24273086642,26048317303,27930449405,29924572084,32035954060,34270047813,36632493807,39129124762,41765969974,44549259683,47485429489,50581124816,53843205424,57278749969,60895060611,64699667670,68700334330,72905061391,77322092069,81959916844,86827278356,91933176349,97286872663,102897896274,108776048382,114931407547,121374334873,128115479240,135165782584,142536485225,150239131243,158285573902,166687981122,175458840999,184610967373,194157505444,204111937436,214488088309,225300131519,236562594826,248290366150,260498699475,273203220801,286419934144,300165227584,314455879361,329309064019,344742358598,360773748874,377421635647,394704841077,412642615068,431254641700,450561045709,470582399015,491339727298,512854516622,535148720107,558244764649,582165557688,606934494024,632575462681,659112853819,686571565694,714977011666,744355127255,774732377245,806135762836,838592828844,872131670949,906780942991,942569864314,979528227158,1017686404099,1057075355537,1097726637232,1139672407888,1182945436785,1227579111459,1273607445430,1321065085978,1369987321967,1420410091717,1472369990924,1525904280628,1581050895229,1637848450551,1696336251954,1756554302494,1818543311131,1882344700985,1948000617640,2015553937496,2085048276169,2156527996939,2230038219246,2305624827234,2383334478343,2463214611949,2545313458052,2629680046012,2716364213333,2805416614495,2896888729834,2990832874470,3087302207283,3186350739937,3288033345952,3392405769824,3499524636193,3609447459059,3722232651046,3837939532714,3956628341919,4078360243221,4203197337340,4331202670660,4462440244781,4596975026119,4734872955554,4876200958126,5021026952779,5169419862153,5321449622424,5477187193192,5636704567417,5800074781403,5967371924830,6138671150834,6314048686135,6493581841213,6677349020532,6865429732812,7057904601349,7254855374383,7456364935514,7662517314166,7873397696099,8089092433969,8309689057936,8535276286320,8765944036305,9001783434691,9242886828694,9489347796794,9741261159631,9998722990949,10261830628588,10530682685524,10805379060957,11086020951447,11372710862098,11665552617790,11964651374459,12270113630425,12582047237768,12900561413752,13225766752297,13557775235499,13896700245198,14242656574594,14595760439911,14956129492109,15323882828644,15699141005276,16082026047925,16472661464575 cal $0,249961 ; Number of length 1+5 0..n arrays with no six consecutive terms having the maximum of any two terms equal to the minimum of the remaining four terms. mov $1,$0 div $1,15
;Test EB ;Overflow data segment divid dd 12345678h divis dw 1h data ends stack segment stack'stack' db 100h dup(0) stack ends code segment assume cs:code,ds:data,es:data,ss:stack start: mov ax,data mov ds,ax mov dx,offset divid mov si,dx mov ax,[si] mov dx,[si+2] mov bx,[si+4] div bx mov ax,4c00h int 21h code ends end start
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/04/Mult.asm // Implements: gongqingkui At 126.com // Multiplies R0 and R1 and stores the result in R2. // (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.) // Put your code here. @2 M=0 (LOOP) @0 D=M @END D;JLE @1 D=M @2 M=D+M @0 D=M M=D-1 @LOOP D;JGT (END) @END 0;JMP
#include <iostream> #include <string> #include <curl/curl.h> #include <nlohmann/json.hpp> size_t responseHandler(void* deliveredData, size_t size, size_t deliveredDataSize, void* responseBuffer) { const auto deliveredDataActualSize = size * deliveredDataSize; *static_cast<std::string*>(responseBuffer) = std::string( static_cast<const char*>(deliveredData), deliveredDataActualSize); return deliveredDataActualSize; } int main() { CURL* curl = curl_easy_init(); curl_easy_setopt( curl, CURLOPT_URL, "http://dummy.restapiexample.com/api/v1/employee/1"); std::string response{}; curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, responseHandler); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); const auto curlSuccess = curl_easy_perform(curl) == CURLE_OK; curl_easy_cleanup(curl); if (!curlSuccess) { std::cerr << "Could not reach website to fetch employee data" << std::endl; return 1; } auto employeeData = nlohmann::json::parse(response); if (employeeData["status"] != "success") { std::cerr << "Error while fetching employee data" << std::endl; return 1; } std::cout << "ID: " << employeeData["data"]["id"] << std::endl; std::cout << "Name: " << employeeData["data"]["employee_name"] << std::endl; std::cout << "Age: " << employeeData["data"]["employee_age"] << std::endl; return 0; }
; A157653: a(n) = 80000*n^2 - 39200*n + 4801. ; 45601,246401,607201,1128001,1808801,2649601,3650401,4811201,6132001,7612801,9253601,11054401,13015201,15136001,17416801,19857601,22458401,25219201,28140001,31220801,34461601,37862401,41423201,45144001,49024801,53065601,57266401,61627201,66148001,70828801,75669601,80670401,85831201,91152001,96632801,102273601,108074401,114035201,120156001,126436801,132877601,139478401,146239201,153160001,160240801,167481601,174882401,182443201,190164001,198044801,206085601,214286401,222647201,231168001,239848801,248689601,257690401,266851201,276172001,285652801,295293601,305094401,315055201,325176001,335456801,345897601,356498401,367259201,378180001,389260801,400501601,411902401,423463201,435184001,447064801,459105601,471306401,483667201,496188001,508868801,521709601,534710401,547871201,561192001,574672801,588313601,602114401,616075201,630196001,644476801,658917601,673518401,688279201,703200001,718280801,733521601,748922401,764483201,780204001,796084801 seq $0,157652 ; a(n) = 40*(200*n - 49). pow $0,2 sub $0,36481600 div $0,640000 mul $0,800 add $0,45601
<% from pwnlib.shellcraft.mips.linux import listen, dupsh %> <%page args="port, network='ipv4'"/> <%docstring> bindsh(port, network) Listens on a TCP port and spawns a shell for the first to connect. Port is the TCP port to listen on, network is either 'ipv4' or 'ipv6'. </%docstring> ${listen(port, network)} ${dupsh()}
; A027024: a(n) = T(n,n+2), T given by A027023. ; 1,5,13,27,53,101,189,351,649,1197,2205,4059,7469,13741,25277,46495,85521,157301,289325,532155,978789,1800277,3311229,6090303,11201817,20603357,37895485,69700667,128199517,235795677,433695869,797691071,1467182625,2698569573,4963443277,9129195483,16791208341,30883847109,56804250941,104479306399,192167404457,353450961805,650097672669,1195716038939,2199264673421,4045078385037,7440059097405,13684402155871,25169539638321,46294000891605,85147942685805,156611483215739,288053426793157,529812852694709,974477762703613,1792344042191487,3296634657589817,6063456462484925 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 cal $0,301657 ; Number of nX3 0..1 arrays with every element equal to 0, 1 or 4 horizontally or vertically adjacent elements, with upper left element zero. sub $0,1 mov $3,$0 sub $3,1 add $1,$3 lpe sub $1,1 mul $1,2 add $1,1
; A130252: Partial sums of A130250. ; 0,1,4,7,11,15,20,25,30,35,40,45,51,57,63,69,75,81,87,93,99,105,112,119,126,133,140,147,154,161,168,175,182,189,196,203,210,217,224,231,238,245,252,259,267,275,283,291,299,307,315,323,331,339,347,355,363,371 mov $3,$0 mov $5,$0 lpb $3,1 mov $0,$5 sub $3,1 sub $0,$3 mov $2,$0 mov $0,5 mov $4,6 mov $6,$2 mov $8,5 lpb $0,1 mov $0,2 mov $7,$6 mul $7,$4 sub $7,$8 lpe add $7,1 log $7,$0 add $7,1 mov $2,$7 sub $2,1 add $1,$2 lpe
; Copyright (c) 2010-2015, Stefan Lankes, RWTH Aachen University ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in the ; documentation and/or other materials provided with the distribution. ; * Neither the name of the University nor the names of its contributors ; may be used to endorse or promote products derived from this software ; without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ; DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY ; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; This is the kernel's entry point. We could either call main here, ; or we can use this to setup the stack or other nice stuff, like ; perhaps setting up the GDT and segments. Please note that interrupts ; are disabled at this point: More on interrupts later! %include "hermit/config.asm" [BITS 64] extern kernel_start ; defined in linker script MSR_FS_BASE equ 0xc0000100 MSR_GS_BASE equ 0xc0000101 MSR_KERNEL_GS_BASE equ 0xc0000102 ; We use a special name to map this section at the begin of our kernel ; => Multiboot expects its magic number at the beginning of the kernel. SECTION .mboot global _start _start: jmp start64 align 4 global base global limit global cpu_freq global boot_processor global cpu_online global possible_cpus global current_boot_id global isle global possible_isles global phy_rcce_internals global phy_isle_locks global heap_phy_start_address global header_phy_start_address global heap_start_address global header_start_address global heap_size global header_size global disable_x2apic global mb_info global hbmem_base global hbmem_size global uhyve global image_size global uartport global cmdline global cmdsize global hcip global hcgateway global hcmask global tux_entry global tux_size global tux_gdb global tux_prof_samples global tux_prof_samples_num global minifs_enabled global tux_start_address global tux_ehdr_phoff global tux_ehdr_phnum global tux_ehdr_phentsize global epoch_offset base dq 0 limit dq 0 cpu_freq dd 0 boot_processor dd -1 cpu_online dd 0 possible_cpus dd 0 phy_rcce_internals dq 0 current_boot_id dd 0 isle dd -1 image_size dq 0 phy_isle_locks dq 0 heap_phy_start_address dq 0 header_phy_start_address dq 0 heap_size dd 0 header_size dd 0 possible_isles dd 1 heap_start_address dq 0 header_start_address dq 0 disable_x2apic dd 1 single_kernel dd 1 mb_info dq 0 hbmem_base dq 0 hbmem_size dq 0 uhyve dd 0 uartport dq 0 cmdline dq 0 cmdsize dq 0 hcip db 10,0,5,2 hcgateway db 10,0,5,1 hcmask db 255,255,255,0 align 8 tux_entry dq 0 tux_size dq 0 tux_gdb db 0 tux_prof_samples dq 0 tux_prof_samples_num dq 0 minifs_enabled db 0 tux_start_address dq 0 tux_ehdr_phoff dq 0 tux_ehdr_phnum dq 0 tux_ehdr_phentsize dq 0 epoch_offset dq 0 ; Bootstrap page tables are used during the initialization. align 4096 boot_pml4: DQ boot_pdpt + 0x27 ; PG_PRESENT | PG_RW | PG_USER | PG_ACCESSED times 510 DQ 0 ; PAGE_MAP_ENTRIES - 2 DQ boot_pml4 + 0x223 ; PG_PRESENT | PG_RW | PG_ACCESSED | PG_SELF (self-reference) boot_pdpt: DQ boot_pgd + 0x23 ; PG_PRESENT | PG_RW | PG_ACCESSED times 510 DQ 0 ; PAGE_MAP_ENTRIES - 2 DQ boot_pml4 + 0x223 ; PG_PRESENT | PG_RW | PG_ACCESSED | PG_SELF (self-reference) boot_pgd: DQ boot_pgt + 0x23 ; PG_PRESENT | PG_RW | PG_ACCESSED times 510 DQ 0 ; PAGE_MAP_ENTRIES - 2 DQ boot_pml4 + 0x223 ; PG_PRESENT | PG_RW | PG_ACCESSED | PG_SELF (self-reference) boot_pgt: times 512 DQ 0 SECTION .ktext align 4 start64: ; reset registers to kill any stale realmode selectors mov eax, 0x10 mov ds, eax mov ss, eax mov es, eax xor eax, eax mov fs, eax mov gs, eax ; clear DF flag => default value by entering a function ; => see ABI cld xor rax, rax mov eax, DWORD [cpu_online] cmp eax, 0 jne Lno_pml4_init ; store pointer to the multiboot information mov [mb_info], QWORD rdx ; relocate page tables mov rdi, boot_pml4 mov rax, QWORD [rdi] sub rax, kernel_start add rax, [base] mov QWORD [rdi], rax mov rax, QWORD [rdi+511*8] sub rax, kernel_start add rax, [base] mov QWORD [rdi+511*8], rax mov rdi, boot_pdpt mov rax, QWORD [rdi] sub rax, kernel_start add rax, [base] mov QWORD [rdi], rax mov rax, QWORD [rdi+511*8] sub rax, kernel_start add rax, [base] mov QWORD [rdi+511*8], rax mov rdi, boot_pgd mov rax, QWORD [rdi] sub rax, kernel_start add rax, [base] mov QWORD [rdi], rax mov rax, QWORD [rdi+511*8] sub rax, kernel_start add rax, [base] mov QWORD [rdi+511*8], rax ; map multiboot info mov rax, QWORD [mb_info] and rax, ~0xFFF ; page align lower half cmp rax, 0 je Lno_mbinfo mov rdi, rax shr rdi, 9 ; (edi >> 12) * 8 (index for boot_pgt) add rdi, boot_pgt or rax, 0x23 ; set present, accessed and writable bits mov QWORD [rdi], rax Lno_mbinfo: ; remap kernel mov rdi, kernel_start shr rdi, 18 ; (edi >> 21) * 8 (index for boot_pgd) add rdi, boot_pgd mov rax, [base] or rax, 0xA3 ; PG_GLOBAL isn't required because HermitCore is a single-address space OS xor rcx, rcx mov rsi, 510*0x200000 sub rsi, kernel_start mov r11, QWORD [image_size] Lremap: mov QWORD [rdi], rax add rax, 0x200000 add rcx, 0x200000 add rdi, 8 ; note: the whole code segement has to fit in the first pgd cmp rcx, rsi jnl Lno_pml4_init cmp rcx, r11 jl Lremap Lno_pml4_init: ; Set CR3 mov rax, boot_pml4 sub rax, kernel_start add rax, [base] or rax, (1 << 0) ; set present bit mov cr3, rax %if MAX_CORES > 1 mov eax, DWORD [cpu_online] cmp eax, 0 jne Lsmp_main %endif ; set default stack pointer mov rsp, boot_stack add rsp, KERNEL_STACK_SIZE-16 xor rax, rax mov eax, [boot_processor] cmp eax, -1 je L1 imul eax, KERNEL_STACK_SIZE add rsp, rax L1: mov rbp, rsp ; jump to the boot processors's C code extern hermit_main call hermit_main jmp $ %if MAX_CORES > 1 ALIGN 64 Lsmp_main: xor rax, rax mov eax, DWORD [current_boot_id] ; set default stack pointer imul rax, KERNEL_STACK_SIZE add rax, boot_stack add rax, KERNEL_STACK_SIZE-16 mov rsp, rax mov rbp, rsp extern smp_start call smp_start jmp $ %endif ALIGN 64 global gdt_flush extern gp ; This will set up our new segment registers and is declared in ; C as 'extern void gdt_flush();' gdt_flush: lgdt [gp] ; reload the segment descriptors mov eax, 0x10 mov ds, eax mov es, eax mov ss, eax xor eax, eax mov fs, eax mov gs, eax ; create pseudo interrupt to set cs push QWORD 0x10 ; SS push rsp ; RSP add QWORD [rsp], 0x08 ; => value of rsp before the creation of a pseudo interrupt pushfq ; RFLAGS push QWORD 0x08 ; CS push QWORD rollback ; RIP iretq ; The first 32 interrupt service routines (ISR) entries correspond to exceptions. ; Some exceptions will push an error code onto the stack which is specific to ; the exception caused. To decrease the complexity, we handle this by pushing a ; Dummy error code of 0 onto the stack for any ISR that doesn't push an error ; code already. ; ; ISRs are registered as "Interrupt Gate". ; Therefore, the interrupt flag (IF) is already cleared. ; NASM macro which pushs also an pseudo error code %macro isrstub_pseudo_error 1 global isr%1 align 64 isr%1: push byte 0 ; pseudo error code push byte %1 jmp common_stub %endmacro ; Similar to isrstub_pseudo_error, but without pushing ; a pseudo error code => The error code is already ; on the stack. %macro isrstub 1 global isr%1 align 64 isr%1: push byte %1 jmp common_stub %endmacro ; Create isr entries, where the number after the ; pseudo error code represents following interrupts: ; 0: Divide By Zero Exception ; 1: Debug Exception ; 2: Non Maskable Interrupt Exception ; 3: Int 3 Exception ; 4: INTO Exception ; 5: Out of Bounds Exception ; 6: Invalid Opcode Exception ; 7: Coprocessor Not Available Exception %assign i 0 %rep 8 isrstub_pseudo_error i %assign i i+1 %endrep ; 8: Double Fault Exception (With Error Code!) isrstub 8 ; 9: Coprocessor Segment Overrun Exception isrstub_pseudo_error 9 ; 10: Bad TSS Exception (With Error Code!) ; 11: Segment Not Present Exception (With Error Code!) ; 12: Stack Fault Exception (With Error Code!) ; 13: General Protection Fault Exception (With Error Code!) ; 14: Page Fault Exception (With Error Code!) %assign i 10 %rep 5 isrstub i %assign i i+1 %endrep ; 15: Reserved Exception ; 16: Floating Point Exception ; 17: Alignment Check Exception ; 18: Machine Check Exception ; 19-31: Reserved %assign i 15 %rep 17 isrstub_pseudo_error i %assign i i+1 %endrep ; NASM macro for asynchronous interrupts (no exceptions) %macro irqstub 1 global irq%1 align 64 irq%1: push byte 0 ; pseudo error code push byte 32+%1 jmp common_stub %endmacro ; Create entries for the interrupts 0 to 23 %assign i 0 %rep 24 irqstub i %assign i i+1 %endrep ; Create entries for the interrupts 80 to 82 %assign i 80 %rep 3 irqstub i %assign i i+1 %endrep global wakeup align 64 wakeup: push byte 0 ; pseudo error code push byte 121 jmp common_stub global mmnif_irq align 64 mmnif_irq: push byte 0 ; pseudo error code push byte 122 jmp common_stub global apic_timer align 64 apic_timer: push byte 0 ; pseudo error code push byte 123 jmp common_stub global apic_lint0 align 64 apic_lint0: push byte 0 ; pseudo error code push byte 124 jmp common_stub global apic_lint1 align 64 apic_lint1: push byte 0 ; pseudo error code push byte 125 jmp common_stub global apic_error align 64 apic_error: push byte 0 ; pseudo error code push byte 126 jmp common_stub global apic_svr align 64 apic_svr: push byte 0 ; pseudo error code push byte 127 jmp common_stub extern irq_handler extern get_current_stack extern finish_task_switch extern syscall_handler global isyscall isyscall: cli push rax push rcx push rdx push rbx sub rsp, 8 push rbp push rsi push rdi push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 push 0 ; dummy fs push 0 ; dummy gs ;swapgs ; Pierre: I believe this is not needed (it actually causes issues ; with SMP and threads created through clone task as gs becomes 0 ; on the first syscall when entering the kerne) ; set pointer at "struct state" as first argument mov rdi, rsp sti extern syscall_handler call syscall_handler cli ;swapgs ; Pierre: I think this is not needed add rsp, 16 pop r15 pop r14 pop r13 pop r12 pop r11 pop r10 pop r9 pop r8 pop rdi pop rsi pop rbp add rsp, 8 pop rbx pop rdx pop rcx pop rax push r11 popfq sti jmp rcx ;o64 sysret global getcontext align 64 getcontext: cli ; save general purpose regsiters mov QWORD [rdi + 0x00], r15 mov QWORD [rdi + 0x08], r14 mov QWORD [rdi + 0x10], r13 mov QWORD [rdi + 0x18], r12 mov QWORD [rdi + 0x20], r9 mov QWORD [rdi + 0x28], r8 mov QWORD [rdi + 0x30], rdi mov QWORD [rdi + 0x38], rsi mov QWORD [rdi + 0x40], rbp mov QWORD [rdi + 0x48], rbx mov QWORD [rdi + 0x50], rdx mov QWORD [rdi + 0x58], rcx lea rax, [rsp + 0x08] mov QWORD [rdi + 0x60], rax mov rax, QWORD [rsp] mov QWORD [rdi + 0x68], rax ; save FPU state fnstenv [rdi + 0x74] lea rax, [rdi + 0x70] stmxcsr [rax] xor rax, rax sti ret global setcontext align 64 setcontext: cli ; restore FPU state fldenv [rdi + 0x74] lea rax, [rdi + 0x70] ldmxcsr [rax] ; restore general purpose registers mov r15, QWORD [rdi + 0x00] mov r14, QWORD [rdi + 0x08] mov r13, QWORD [rdi + 0x10] mov r12, QWORD [rdi + 0x18] mov r9, QWORD [rdi + 0x20] mov r8, QWORD [rdi + 0x28] mov rdi, QWORD [rdi + 0x30] mov rsi, QWORD [rdi + 0x38] mov rbp, QWORD [rdi + 0x40] mov rbx, QWORD [rdi + 0x48] mov rdx, QWORD [rdi + 0x50] mov rcx, QWORD [rdi + 0x58] mov rsp, QWORD [rdi + 0x60] push QWORD [rdi + 0x68] xor rax, rax sti ret global __startcontext align 64 __startcontext: mov rsp, rbx pop rdi cmp rdi, 0 je Lno_context call setcontext Lno_context: extern exit call exit jmp $ global switch_context align 64 switch_context: ; by entering a function the DF flag has to be cleared => see ABI cld ; create on the stack a pseudo interrupt ; afterwards, we switch to the task with iret push QWORD 0x10 ; SS push rsp ; RSP add QWORD [rsp], 0x08 ; => value of rsp before the creation of a pseudo interrupt pushfq ; RFLAGS push QWORD 0x08 ; CS push QWORD rollback ; RIP push QWORD 0x00edbabe ; Error code push QWORD 0x00 ; Interrupt number push rax push rcx push rdx push rbx push QWORD [rsp+9*8] push rbp push rsi push rdi push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 ; push fs and gs registers global Lpatch0 Lpatch0: jmp short Lrdfsgs1 ; we patch later this jump to enable rdfsbase/rdgsbase rdfsbase rax rdgsbase rdx push rax push rdx jmp short Lgo1 Lrdfsgs1: mov ecx, MSR_FS_BASE rdmsr sub rsp, 8 mov DWORD [rsp+4], edx mov DWORD [rsp], eax mov ecx, MSR_GS_BASE rdmsr sub rsp, 8 mov DWORD [rsp+4], edx mov DWORD [rsp], eax Lgo1: mov rax, rdi ; rdi contains the address to store the old rsp jmp common_switch align 64 rollback: ret align 64 common_stub: push rax push rcx push rdx push rbx push QWORD [rsp+9*8] ; push user-space rsp, which is already on the stack push rbp push rsi push rdi push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 ; push fs and gs registers global Lpatch1 Lpatch1: jmp short Lrdfsgs2 ; we patch later this jump to enable rdfsbase/rdgsbase rdfsbase rax rdgsbase rdx push rax push rdx jmp short Lgo2 Lrdfsgs2: mov ecx, MSR_FS_BASE rdmsr sub rsp, 8 mov DWORD [rsp+4], edx mov DWORD [rsp], eax mov ecx, MSR_GS_BASE rdmsr sub rsp, 8 mov DWORD [rsp+4], edx mov DWORD [rsp], eax Lgo2: ; do we interrupt user-level code? cmp QWORD [rsp+24+18*8], 0x08 je short kernel_space1 swapgs ; set GS to the kernel selector kernel_space1: ; use the same handler for interrupts and exceptions mov rdi, rsp call irq_handler cmp rax, 0 je no_context_switch common_switch: mov QWORD [rax], rsp ; store old rsp call get_current_stack ; get new rsp mov rsp, rax %ifidn SAVE_FPU,ON ; set task switched flag mov rax, cr0 or rax, 8 mov cr0, rax %endif ; call cleanup code call finish_task_switch no_context_switch: ; do we interrupt user-level code? cmp QWORD [rsp+24+18*8], 0x08 je short kernel_space2 swapgs ; set GS to the user-level selector kernel_space2: ; restore fs / gs register global Lpatch2 Lpatch2: jmp short Lwrfsgs ; we patch later this jump to enable wrfsbase/wrgsbase pop r15 ; wrgsbase r15 ; currently, we don't use the gs register pop r15 wrfsbase r15 jmp short Lgo3 Lwrfsgs: ;mov ecx, MSR_GS_BASE ;mov edx, DWORD [rsp+4] ;mov eax, DWORD [rsp] add rsp, 8 ;wrmsr ; currently, we don't use the gs register mov ecx, MSR_FS_BASE mov edx, DWORD [rsp+4] mov eax, DWORD [rsp] ; TODO implement skip restore FS here add rsp, 8 wrmsr Lgo3: pop r15 pop r14 pop r13 pop r12 pop r11 pop r10 pop r9 pop r8 pop rdi pop rsi pop rbp add rsp, 8 pop rbx pop rdx pop rcx pop rax add rsp, 16 iretq global is_uhyve align 64 is_uhyve: mov eax, DWORD [uhyve] ret global is_single_kernel align 64 is_single_kernel: mov eax, DWORD [single_kernel] ret global sighandler_epilog sighandler_epilog: ; restore only those registers that might have changed between returning ; from IRQ and execution of signal handler add rsp, 2 * 8 ; ignore fs, gs pop r15 pop r14 pop r13 pop r12 pop r11 pop r10 pop r9 pop r8 pop rdi pop rsi pop rbp add rsp, 8 ; ignore rsp pop rbx pop rdx pop rcx pop rax add rsp, 4 * 8 ; ignore int_no, error, rip, cs popfq add rsp, 2 * 8 ; ignore userrsp, ss jmp [rsp - 5 * 8] ; jump to rip from saved state ; this is the return path after clone for the child thread. The parameter in ; rdi is a pointer to a struct state (see arch/x86/include/stddef.h ; representing the value of the registers when the clone syscall was made. ; Basically we simulate a return from syscall with a few differences: global __clone_entry __clone_entry: cli mov r15, [rdi+16] mov r14, [rdi+24] mov r13, [rdi+32] mov r12, [rdi+40] ; r11 destroyed by the kernel mov r10, [rdi+56] mov r9, [rdi+64] ; syscall success -> return 0 xor rax, rax mov rbx, [rdi+112] ; kernel destroys rcx (here we use it as a 'scratchpad') mov rdx, [rdi+120] mov rbp, [rdi+96] mov rsi, [rdi+88] ; The stack was given by user space in rsi (clone's 2nd parameter) mov rsp, [rdi+88] ; fs also provided by the user space mov rcx, [rdi+8] wrfsbase rcx ; finally jump to the entry point in rcx mov rcx, [rdi+128] mov rdi, [rdi+80] sti jmp rcx SECTION .data align 4096 global boot_stack boot_stack: TIMES (MAX_CORES*KERNEL_STACK_SIZE) DB 0xcd global boot_ist boot_ist: TIMES KERNEL_STACK_SIZE DB 0xcd ; add some hints to the ELF file SECTION .note.GNU-stack noalloc noexec nowrite progbits
/* * 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 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * The Original Code is Copyright (C) 2013 Blender Foundation * All rights reserved. */ /** \file * \ingroup RigidBody * \brief Rigid Body API implementation for Bullet */ /* * Bullet Continuous Collision Detection and Physics Library * Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ * * This software is provided 'as-is', without any express or implied warranty. In no event will the * authors be held liable for any damages arising from the use of this software. Permission is * granted to anyone to use this software for any purpose, including commercial applications, and * to alter it and redistribute it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the * original software. If you use this software in a product, an acknowledgment in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as * being the original software. * 3. This notice may not be removed or altered from any source distribution. */ /* This file defines the "RigidBody interface" for the * Bullet Physics Engine. This API is designed to be used * from C-code in Blender as part of the Rigid Body simulation * system. * * It is based on the Bullet C-API, but is heavily modified to * give access to more data types and to offer a nicer interface. * * -- Joshua Leung, June 2010 */ #include <stdio.h> #include <errno.h> #include "RBI_api.h" #include "btBulletDynamicsCommon.h" #include "LinearMath/btVector3.h" #include "LinearMath/btScalar.h" #include "LinearMath/btMatrix3x3.h" #include "LinearMath/btTransform.h" #include "LinearMath/btConvexHullComputer.h" #include "BulletCollision/Gimpact/btGImpactShape.h" #include "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h" #include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h" struct rbDynamicsWorld { btDiscreteDynamicsWorld *dynamicsWorld; btDefaultCollisionConfiguration *collisionConfiguration; btDispatcher *dispatcher; btBroadphaseInterface *pairCache; btConstraintSolver *constraintSolver; btOverlapFilterCallback *filterCallback; }; struct rbRigidBody { btRigidBody *body; int col_groups; }; struct rbVert { float x, y, z; }; struct rbTri { int v0, v1, v2; }; struct rbMeshData { btTriangleIndexVertexArray *index_array; rbVert *vertices; rbTri *triangles; int num_vertices; int num_triangles; }; struct rbCollisionShape { btCollisionShape *cshape; rbMeshData *mesh; rbCollisionShape **compoundChildShapes; int compoundChilds; }; struct rbFilterCallback : public btOverlapFilterCallback { virtual bool needBroadphaseCollision(btBroadphaseProxy *proxy0, btBroadphaseProxy *proxy1) const { rbRigidBody *rb0 = (rbRigidBody *)((btRigidBody *)proxy0->m_clientObject)->getUserPointer(); rbRigidBody *rb1 = (rbRigidBody *)((btRigidBody *)proxy1->m_clientObject)->getUserPointer(); bool collides; collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0; collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask); collides = collides && (rb0->col_groups & rb1->col_groups); return collides; } }; static inline void copy_v3_btvec3(float vec[3], const btVector3 &btvec) { vec[0] = (float)btvec[0]; vec[1] = (float)btvec[1]; vec[2] = (float)btvec[2]; } static inline void copy_quat_btquat(float quat[4], const btQuaternion &btquat) { quat[0] = btquat.getW(); quat[1] = btquat.getX(); quat[2] = btquat.getY(); quat[3] = btquat.getZ(); } /* ********************************** */ /* Dynamics World Methods */ /* Setup ---------------------------- */ rbDynamicsWorld *RB_dworld_new(const float gravity[3]) { rbDynamicsWorld *world = new rbDynamicsWorld; /* collision detection/handling */ world->collisionConfiguration = new btDefaultCollisionConfiguration(); world->dispatcher = new btCollisionDispatcher(world->collisionConfiguration); btGImpactCollisionAlgorithm::registerAlgorithm((btCollisionDispatcher *)world->dispatcher); world->pairCache = new btDbvtBroadphase(); world->filterCallback = new rbFilterCallback(); world->pairCache->getOverlappingPairCache()->setOverlapFilterCallback(world->filterCallback); /* constraint solving */ world->constraintSolver = new btSequentialImpulseConstraintSolver(); /* world */ world->dynamicsWorld = new btDiscreteDynamicsWorld( world->dispatcher, world->pairCache, world->constraintSolver, world->collisionConfiguration); RB_dworld_set_gravity(world, gravity); return world; } void RB_dworld_delete(rbDynamicsWorld *world) { /* bullet doesn't like if we free these in a different order */ delete world->dynamicsWorld; delete world->constraintSolver; delete world->pairCache; delete world->dispatcher; delete world->collisionConfiguration; delete world->filterCallback; delete world; } /* Settings ------------------------- */ /* Gravity */ void RB_dworld_get_gravity(rbDynamicsWorld *world, float g_out[3]) { copy_v3_btvec3(g_out, world->dynamicsWorld->getGravity()); } void RB_dworld_set_gravity(rbDynamicsWorld *world, const float g_in[3]) { world->dynamicsWorld->setGravity(btVector3(g_in[0], g_in[1], g_in[2])); } /* Constraint Solver */ void RB_dworld_set_solver_iterations(rbDynamicsWorld *world, int num_solver_iterations) { btContactSolverInfo &info = world->dynamicsWorld->getSolverInfo(); info.m_numIterations = num_solver_iterations; } /* Split Impulse */ void RB_dworld_set_split_impulse(rbDynamicsWorld *world, int split_impulse) { btContactSolverInfo &info = world->dynamicsWorld->getSolverInfo(); info.m_splitImpulse = split_impulse; } /* Simulation ----------------------- */ void RB_dworld_step_simulation(rbDynamicsWorld *world, float timeStep, int maxSubSteps, float timeSubStep) { world->dynamicsWorld->stepSimulation(timeStep, maxSubSteps, timeSubStep); } /* Export -------------------------- */ /** * Exports entire dynamics world to Bullet's "*.bullet" binary format * which is similar to Blender's SDNA system. * * \param world Dynamics world to write to file * \param filename Assumed to be a valid filename, with .bullet extension */ void RB_dworld_export(rbDynamicsWorld *world, const char *filename) { // create a large enough buffer. There is no method to pre-calculate the buffer size yet. int maxSerializeBufferSize = 1024 * 1024 * 5; btDefaultSerializer *serializer = new btDefaultSerializer(maxSerializeBufferSize); world->dynamicsWorld->serialize(serializer); FILE *file = fopen(filename, "wb"); if (file) { fwrite(serializer->getBufferPointer(), serializer->getCurrentBufferSize(), 1, file); fclose(file); } else { fprintf(stderr, "RB_dworld_export: %s\n", strerror(errno)); } } /* ********************************** */ /* Rigid Body Methods */ /* Setup ---------------------------- */ void RB_dworld_add_body(rbDynamicsWorld *world, rbRigidBody *object, int col_groups) { btRigidBody *body = object->body; object->col_groups = col_groups; world->dynamicsWorld->addRigidBody(body); } void RB_dworld_remove_body(rbDynamicsWorld *world, rbRigidBody *object) { btRigidBody *body = object->body; world->dynamicsWorld->removeRigidBody(body); } /* Collision detection */ void RB_world_convex_sweep_test(rbDynamicsWorld *world, rbRigidBody *object, const float loc_start[3], const float loc_end[3], float v_location[3], float v_hitpoint[3], float v_normal[3], int *r_hit) { btRigidBody *body = object->body; btCollisionShape *collisionShape = body->getCollisionShape(); /* only convex shapes are supported, but user can specify a non convex shape */ if (collisionShape->isConvex()) { btCollisionWorld::ClosestConvexResultCallback result( btVector3(loc_start[0], loc_start[1], loc_start[2]), btVector3(loc_end[0], loc_end[1], loc_end[2])); btQuaternion obRot = body->getWorldTransform().getRotation(); btTransform rayFromTrans; rayFromTrans.setIdentity(); rayFromTrans.setRotation(obRot); rayFromTrans.setOrigin(btVector3(loc_start[0], loc_start[1], loc_start[2])); btTransform rayToTrans; rayToTrans.setIdentity(); rayToTrans.setRotation(obRot); rayToTrans.setOrigin(btVector3(loc_end[0], loc_end[1], loc_end[2])); world->dynamicsWorld->convexSweepTest( (btConvexShape *)collisionShape, rayFromTrans, rayToTrans, result, 0); if (result.hasHit()) { *r_hit = 1; v_location[0] = result.m_convexFromWorld[0] + (result.m_convexToWorld[0] - result.m_convexFromWorld[0]) * result.m_closestHitFraction; v_location[1] = result.m_convexFromWorld[1] + (result.m_convexToWorld[1] - result.m_convexFromWorld[1]) * result.m_closestHitFraction; v_location[2] = result.m_convexFromWorld[2] + (result.m_convexToWorld[2] - result.m_convexFromWorld[2]) * result.m_closestHitFraction; v_hitpoint[0] = result.m_hitPointWorld[0]; v_hitpoint[1] = result.m_hitPointWorld[1]; v_hitpoint[2] = result.m_hitPointWorld[2]; v_normal[0] = result.m_hitNormalWorld[0]; v_normal[1] = result.m_hitNormalWorld[1]; v_normal[2] = result.m_hitNormalWorld[2]; } else { *r_hit = 0; } } else { /* we need to return a value if user passes non convex body, to report */ *r_hit = -2; } } /* ............ */ rbRigidBody *RB_body_new(rbCollisionShape *shape, const float loc[3], const float rot[4]) { rbRigidBody *object = new rbRigidBody; /* current transform */ btTransform trans; trans.setIdentity(); trans.setOrigin(btVector3(loc[0], loc[1], loc[2])); trans.setRotation(btQuaternion(rot[1], rot[2], rot[3], rot[0])); /* create motionstate, which is necessary for interpolation (includes reverse playback) */ btDefaultMotionState *motionState = new btDefaultMotionState(trans); /* make rigidbody */ btRigidBody::btRigidBodyConstructionInfo rbInfo(1.0f, motionState, shape->cshape); object->body = new btRigidBody(rbInfo); object->body->setUserPointer(object); return object; } void RB_body_delete(rbRigidBody *object) { btRigidBody *body = object->body; /* motion state */ btMotionState *ms = body->getMotionState(); if (ms) delete ms; /* collision shape is done elsewhere... */ /* body itself */ /* manually remove constraint refs of the rigid body, normally this happens when removing * constraints from the world * but since we delete everything when the world is rebult, we need to do it manually here */ for (int i = body->getNumConstraintRefs() - 1; i >= 0; i--) { btTypedConstraint *con = body->getConstraintRef(i); body->removeConstraintRef(con); } delete body; delete object; } /* Settings ------------------------- */ void RB_body_set_collision_shape(rbRigidBody *object, rbCollisionShape *shape) { btRigidBody *body = object->body; /* set new collision shape */ body->setCollisionShape(shape->cshape); /* recalculate inertia, since that depends on the collision shape... */ RB_body_set_mass(object, RB_body_get_mass(object)); } /* ............ */ float RB_body_get_mass(rbRigidBody *object) { btRigidBody *body = object->body; /* there isn't really a mass setting, but rather 'inverse mass' * which we convert back to mass by taking the reciprocal again */ float value = (float)body->getInvMass(); if (value) value = 1.0f / value; return value; } void RB_body_set_mass(rbRigidBody *object, float value) { btRigidBody *body = object->body; btVector3 localInertia(0, 0, 0); /* calculate new inertia if non-zero mass */ if (value) { btCollisionShape *shape = body->getCollisionShape(); shape->calculateLocalInertia(value, localInertia); } btVector3 minAabb, maxAabb; btTransform ident; ident.setIdentity(); body->getCollisionShape()->getAabb(ident, minAabb, maxAabb); body->setMassProps(value, localInertia); body->updateInertiaTensor(); } float RB_body_get_friction(rbRigidBody *object) { btRigidBody *body = object->body; return body->getFriction(); } void RB_body_set_friction(rbRigidBody *object, float value) { btRigidBody *body = object->body; body->setFriction(value); } float RB_body_get_restitution(rbRigidBody *object) { btRigidBody *body = object->body; return body->getRestitution(); } void RB_body_set_restitution(rbRigidBody *object, float value) { btRigidBody *body = object->body; body->setRestitution(value); } float RB_body_get_linear_damping(rbRigidBody *object) { btRigidBody *body = object->body; return body->getLinearDamping(); } void RB_body_set_linear_damping(rbRigidBody *object, float value) { RB_body_set_damping(object, value, RB_body_get_linear_damping(object)); } float RB_body_get_angular_damping(rbRigidBody *object) { btRigidBody *body = object->body; return body->getAngularDamping(); } void RB_body_set_angular_damping(rbRigidBody *object, float value) { RB_body_set_damping(object, RB_body_get_linear_damping(object), value); } void RB_body_set_damping(rbRigidBody *object, float linear, float angular) { btRigidBody *body = object->body; body->setDamping(linear, angular); } float RB_body_get_linear_sleep_thresh(rbRigidBody *object) { btRigidBody *body = object->body; return body->getLinearSleepingThreshold(); } void RB_body_set_linear_sleep_thresh(rbRigidBody *object, float value) { RB_body_set_sleep_thresh(object, value, RB_body_get_angular_sleep_thresh(object)); } float RB_body_get_angular_sleep_thresh(rbRigidBody *object) { btRigidBody *body = object->body; return body->getAngularSleepingThreshold(); } void RB_body_set_angular_sleep_thresh(rbRigidBody *object, float value) { RB_body_set_sleep_thresh(object, RB_body_get_linear_sleep_thresh(object), value); } void RB_body_set_sleep_thresh(rbRigidBody *object, float linear, float angular) { btRigidBody *body = object->body; body->setSleepingThresholds(linear, angular); } /* ............ */ void RB_body_get_linear_velocity(rbRigidBody *object, float v_out[3]) { btRigidBody *body = object->body; copy_v3_btvec3(v_out, body->getLinearVelocity()); } void RB_body_set_linear_velocity(rbRigidBody *object, const float v_in[3]) { btRigidBody *body = object->body; body->setLinearVelocity(btVector3(v_in[0], v_in[1], v_in[2])); } void RB_body_get_angular_velocity(rbRigidBody *object, float v_out[3]) { btRigidBody *body = object->body; copy_v3_btvec3(v_out, body->getAngularVelocity()); } void RB_body_set_angular_velocity(rbRigidBody *object, const float v_in[3]) { btRigidBody *body = object->body; body->setAngularVelocity(btVector3(v_in[0], v_in[1], v_in[2])); } void RB_body_set_linear_factor(rbRigidBody *object, float x, float y, float z) { btRigidBody *body = object->body; body->setLinearFactor(btVector3(x, y, z)); } void RB_body_set_angular_factor(rbRigidBody *object, float x, float y, float z) { btRigidBody *body = object->body; body->setAngularFactor(btVector3(x, y, z)); } /* ............ */ void RB_body_set_kinematic_state(rbRigidBody *object, int kinematic) { btRigidBody *body = object->body; if (kinematic) body->setCollisionFlags(body->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT); else body->setCollisionFlags(body->getCollisionFlags() & ~btCollisionObject::CF_KINEMATIC_OBJECT); } /* ............ */ void RB_body_set_activation_state(rbRigidBody *object, int use_deactivation) { btRigidBody *body = object->body; if (use_deactivation) body->forceActivationState(ACTIVE_TAG); else body->setActivationState(DISABLE_DEACTIVATION); } void RB_body_activate(rbRigidBody *object) { btRigidBody *body = object->body; body->setActivationState(ACTIVE_TAG); } void RB_body_deactivate(rbRigidBody *object) { btRigidBody *body = object->body; body->setActivationState(ISLAND_SLEEPING); } /* ............ */ /* Simulation ----------------------- */ /* The transform matrices Blender uses are OpenGL-style matrices, * while Bullet uses the Right-Handed coordinate system style instead. */ void RB_body_get_transform_matrix(rbRigidBody *object, float m_out[4][4]) { btRigidBody *body = object->body; btMotionState *ms = body->getMotionState(); btTransform trans; ms->getWorldTransform(trans); trans.getOpenGLMatrix((btScalar *)m_out); } void RB_body_set_loc_rot(rbRigidBody *object, const float loc[3], const float rot[4]) { btRigidBody *body = object->body; btMotionState *ms = body->getMotionState(); /* set transform matrix */ btTransform trans; trans.setIdentity(); trans.setOrigin(btVector3(loc[0], loc[1], loc[2])); trans.setRotation(btQuaternion(rot[1], rot[2], rot[3], rot[0])); ms->setWorldTransform(trans); } void RB_body_set_scale(rbRigidBody *object, const float scale[3]) { btRigidBody *body = object->body; /* apply scaling factor from matrix above to the collision shape */ btCollisionShape *cshape = body->getCollisionShape(); if (cshape) { cshape->setLocalScaling(btVector3(scale[0], scale[1], scale[2])); /* GIimpact shapes have to be updated to take scaling into account */ if (cshape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE) ((btGImpactMeshShape *)cshape)->updateBound(); } } /* ............ */ /* Read-only state info about status of simulation */ void RB_body_get_position(rbRigidBody *object, float v_out[3]) { btRigidBody *body = object->body; copy_v3_btvec3(v_out, body->getWorldTransform().getOrigin()); } void RB_body_get_orientation(rbRigidBody *object, float v_out[4]) { btRigidBody *body = object->body; copy_quat_btquat(v_out, body->getWorldTransform().getRotation()); } /* ............ */ /* Overrides for simulation */ void RB_body_apply_central_force(rbRigidBody *object, const float v_in[3]) { btRigidBody *body = object->body; body->applyCentralForce(btVector3(v_in[0], v_in[1], v_in[2])); } /* ********************************** */ /* Collision Shape Methods */ /* Setup (Standard Shapes) ----------- */ rbCollisionShape *RB_shape_new_box(float x, float y, float z) { rbCollisionShape *shape = new rbCollisionShape; shape->cshape = new btBoxShape(btVector3(x, y, z)); shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } rbCollisionShape *RB_shape_new_sphere(float radius) { rbCollisionShape *shape = new rbCollisionShape; shape->cshape = new btSphereShape(radius); shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } rbCollisionShape *RB_shape_new_capsule(float radius, float height) { rbCollisionShape *shape = new rbCollisionShape; shape->cshape = new btCapsuleShapeZ(radius, height); shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } rbCollisionShape *RB_shape_new_cone(float radius, float height) { rbCollisionShape *shape = new rbCollisionShape; shape->cshape = new btConeShapeZ(radius, height); shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } rbCollisionShape *RB_shape_new_cylinder(float radius, float height) { rbCollisionShape *shape = new rbCollisionShape; shape->cshape = new btCylinderShapeZ(btVector3(radius, radius, height)); shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } /* Setup (Convex Hull) ------------ */ rbCollisionShape *RB_shape_new_convex_hull( float *verts, int stride, int count, float margin, bool *can_embed) { btConvexHullComputer hull_computer = btConvexHullComputer(); // try to embed the margin, if that fails don't shrink the hull if (hull_computer.compute(verts, stride, count, margin, 0.0f) < 0.0f) { hull_computer.compute(verts, stride, count, 0.0f, 0.0f); *can_embed = false; } rbCollisionShape *shape = new rbCollisionShape; btConvexHullShape *hull_shape = new btConvexHullShape(&(hull_computer.vertices[0].getX()), hull_computer.vertices.size()); shape->cshape = hull_shape; shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } /* Setup (Triangle Mesh) ---------- */ /* Need to call RB_trimesh_finish() after creating triangle mesh and adding vertices and triangles */ rbMeshData *RB_trimesh_data_new(int num_tris, int num_verts) { rbMeshData *mesh = new rbMeshData; mesh->vertices = new rbVert[num_verts]; mesh->triangles = new rbTri[num_tris]; mesh->num_vertices = num_verts; mesh->num_triangles = num_tris; return mesh; } static void RB_trimesh_data_delete(rbMeshData *mesh) { delete mesh->index_array; delete[] mesh->vertices; delete[] mesh->triangles; delete mesh; } void RB_trimesh_add_vertices(rbMeshData *mesh, float *vertices, int num_verts, int vert_stride) { for (int i = 0; i < num_verts; i++) { float *vert = (float *)(((char *)vertices + i * vert_stride)); mesh->vertices[i].x = vert[0]; mesh->vertices[i].y = vert[1]; mesh->vertices[i].z = vert[2]; } } void RB_trimesh_add_triangle_indices(rbMeshData *mesh, int num, int index0, int index1, int index2) { mesh->triangles[num].v0 = index0; mesh->triangles[num].v1 = index1; mesh->triangles[num].v2 = index2; } void RB_trimesh_finish(rbMeshData *mesh) { mesh->index_array = new btTriangleIndexVertexArray(mesh->num_triangles, (int *)mesh->triangles, sizeof(rbTri), mesh->num_vertices, (float *)mesh->vertices, sizeof(rbVert)); } rbCollisionShape *RB_shape_new_trimesh(rbMeshData *mesh) { rbCollisionShape *shape = new rbCollisionShape; /* triangle-mesh we create is a BVH wrapper for triangle mesh data (for faster lookups) */ // RB_TODO perhaps we need to allow saving out this for performance when rebuilding? btBvhTriangleMeshShape *unscaledShape = new btBvhTriangleMeshShape( mesh->index_array, true, true); shape->cshape = new btScaledBvhTriangleMeshShape(unscaledShape, btVector3(1.0f, 1.0f, 1.0f)); shape->mesh = mesh; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } void RB_shape_trimesh_update(rbCollisionShape *shape, float *vertices, int num_verts, int vert_stride, float min[3], float max[3]) { if (shape->mesh == NULL || num_verts != shape->mesh->num_vertices) return; for (int i = 0; i < num_verts; i++) { float *vert = (float *)(((char *)vertices + i * vert_stride)); shape->mesh->vertices[i].x = vert[0]; shape->mesh->vertices[i].y = vert[1]; shape->mesh->vertices[i].z = vert[2]; } if (shape->cshape->getShapeType() == SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE) { btScaledBvhTriangleMeshShape *scaled_shape = (btScaledBvhTriangleMeshShape *)shape->cshape; btBvhTriangleMeshShape *mesh_shape = scaled_shape->getChildShape(); mesh_shape->refitTree(btVector3(min[0], min[1], min[2]), btVector3(max[0], max[1], max[2])); } else if (shape->cshape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE) { btGImpactMeshShape *mesh_shape = (btGImpactMeshShape *)shape->cshape; mesh_shape->updateBound(); } } rbCollisionShape *RB_shape_new_gimpact_mesh(rbMeshData *mesh) { rbCollisionShape *shape = new rbCollisionShape; btGImpactMeshShape *gimpactShape = new btGImpactMeshShape(mesh->index_array); gimpactShape->updateBound(); // TODO: add this to the update collision margin call? shape->cshape = gimpactShape; shape->mesh = mesh; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } /* Compound Shape ---------------- */ rbCollisionShape *RB_shape_new_compound() { rbCollisionShape *shape = new rbCollisionShape; btCompoundShape *compoundShape = new btCompoundShape(); shape->cshape = compoundShape; shape->mesh = NULL; shape->compoundChilds = 0; shape->compoundChildShapes = NULL; return shape; } void RB_compound_add_child_shape(rbCollisionShape *parentShape, rbCollisionShape *shape, const float loc[3], const float rot[4]) { /* set transform matrix */ btTransform trans; trans.setIdentity(); trans.setOrigin(btVector3(loc[0], loc[1], loc[2])); trans.setRotation(btQuaternion(rot[1], rot[2], rot[3], rot[0])); btCompoundShape *compoundShape = (btCompoundShape *)(parentShape->cshape); compoundShape->addChildShape(trans, shape->cshape); /* Store shapes for deletion later */ parentShape->compoundChildShapes = (rbCollisionShape **)(realloc( parentShape->compoundChildShapes, sizeof(rbCollisionShape *) * (++parentShape->compoundChilds))); parentShape->compoundChildShapes[parentShape->compoundChilds - 1] = shape; } /* Cleanup --------------------------- */ void RB_shape_delete(rbCollisionShape *shape) { if (shape->cshape->getShapeType() == SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE) { btBvhTriangleMeshShape *child_shape = ((btScaledBvhTriangleMeshShape *)shape->cshape)->getChildShape(); if (child_shape) delete child_shape; } if (shape->mesh) RB_trimesh_data_delete(shape->mesh); delete shape->cshape; /* Delete compound child shapes if there are any */ for (int i = 0; i < shape->compoundChilds; i++) { RB_shape_delete(shape->compoundChildShapes[i]); } if (shape->compoundChildShapes != NULL) { free(shape->compoundChildShapes); } delete shape; } /* Settings --------------------------- */ float RB_shape_get_margin(rbCollisionShape *shape) { return shape->cshape->getMargin(); } void RB_shape_set_margin(rbCollisionShape *shape, float value) { shape->cshape->setMargin(value); } /* ********************************** */ /* Constraints */ /* Setup ----------------------------- */ void RB_dworld_add_constraint(rbDynamicsWorld *world, rbConstraint *con, int disable_collisions) { btTypedConstraint *constraint = reinterpret_cast<btTypedConstraint *>(con); world->dynamicsWorld->addConstraint(constraint, disable_collisions); } void RB_dworld_remove_constraint(rbDynamicsWorld *world, rbConstraint *con) { btTypedConstraint *constraint = reinterpret_cast<btTypedConstraint *>(con); world->dynamicsWorld->removeConstraint(constraint); } /* ............ */ static void make_constraint_transforms(btTransform &transform1, btTransform &transform2, btRigidBody *body1, btRigidBody *body2, float pivot[3], float orn[4]) { btTransform pivot_transform = btTransform(); pivot_transform.setIdentity(); pivot_transform.setOrigin(btVector3(pivot[0], pivot[1], pivot[2])); pivot_transform.setRotation(btQuaternion(orn[1], orn[2], orn[3], orn[0])); transform1 = body1->getWorldTransform().inverse() * pivot_transform; transform2 = body2->getWorldTransform().inverse() * pivot_transform; } rbConstraint *RB_constraint_new_point(float pivot[3], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btVector3 pivot1 = body1->getWorldTransform().inverse() * btVector3(pivot[0], pivot[1], pivot[2]); btVector3 pivot2 = body2->getWorldTransform().inverse() * btVector3(pivot[0], pivot[1], pivot[2]); btTypedConstraint *con = new btPoint2PointConstraint(*body1, *body2, pivot1, pivot2); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_fixed(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btFixedConstraint *con = new btFixedConstraint(*body1, *body2, transform1, transform2); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_hinge(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btHingeConstraint *con = new btHingeConstraint(*body1, *body2, transform1, transform2); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_slider(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btSliderConstraint *con = new btSliderConstraint(*body1, *body2, transform1, transform2, true); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_piston(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btSliderConstraint *con = new btSliderConstraint(*body1, *body2, transform1, transform2, true); con->setUpperAngLimit(-1.0f); // unlock rotation axis return (rbConstraint *)con; } rbConstraint *RB_constraint_new_6dof(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btTypedConstraint *con = new btGeneric6DofConstraint( *body1, *body2, transform1, transform2, true); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_6dof_spring(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btTypedConstraint *con = new btGeneric6DofSpringConstraint( *body1, *body2, transform1, transform2, true); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_6dof_spring2(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btTypedConstraint *con = new btGeneric6DofSpring2Constraint( *body1, *body2, transform1, transform2); return (rbConstraint *)con; } rbConstraint *RB_constraint_new_motor(float pivot[3], float orn[4], rbRigidBody *rb1, rbRigidBody *rb2) { btRigidBody *body1 = rb1->body; btRigidBody *body2 = rb2->body; btTransform transform1; btTransform transform2; make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn); btGeneric6DofConstraint *con = new btGeneric6DofConstraint( *body1, *body2, transform1, transform2, true); /* unlock constraint axes */ for (int i = 0; i < 6; i++) { con->setLimit(i, 0.0f, -1.0f); } /* unlock motor axes */ con->getTranslationalLimitMotor()->m_upperLimit.setValue(-1.0f, -1.0f, -1.0f); return (rbConstraint *)con; } /* Cleanup ----------------------------- */ void RB_constraint_delete(rbConstraint *con) { btTypedConstraint *constraint = reinterpret_cast<btTypedConstraint *>(con); delete constraint; } /* Settings ------------------------- */ void RB_constraint_set_enabled(rbConstraint *con, int enabled) { btTypedConstraint *constraint = reinterpret_cast<btTypedConstraint *>(con); constraint->setEnabled(enabled); } void RB_constraint_set_limits_hinge(rbConstraint *con, float lower, float upper) { btHingeConstraint *constraint = reinterpret_cast<btHingeConstraint *>(con); // RB_TODO expose these float softness = 0.9f; float bias_factor = 0.3f; float relaxation_factor = 1.0f; constraint->setLimit(lower, upper, softness, bias_factor, relaxation_factor); } void RB_constraint_set_limits_slider(rbConstraint *con, float lower, float upper) { btSliderConstraint *constraint = reinterpret_cast<btSliderConstraint *>(con); constraint->setLowerLinLimit(lower); constraint->setUpperLinLimit(upper); } void RB_constraint_set_limits_piston( rbConstraint *con, float lin_lower, float lin_upper, float ang_lower, float ang_upper) { btSliderConstraint *constraint = reinterpret_cast<btSliderConstraint *>(con); constraint->setLowerLinLimit(lin_lower); constraint->setUpperLinLimit(lin_upper); constraint->setLowerAngLimit(ang_lower); constraint->setUpperAngLimit(ang_upper); } void RB_constraint_set_limits_6dof(rbConstraint *con, int axis, float lower, float upper) { btGeneric6DofConstraint *constraint = reinterpret_cast<btGeneric6DofConstraint *>(con); constraint->setLimit(axis, lower, upper); } void RB_constraint_set_limits_6dof_spring2(rbConstraint *con, int axis, float lower, float upper) { btGeneric6DofSpring2Constraint *constraint = reinterpret_cast<btGeneric6DofSpring2Constraint *>( con); constraint->setLimit(axis, lower, upper); } void RB_constraint_set_stiffness_6dof_spring(rbConstraint *con, int axis, float stiffness) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint *>( con); constraint->setStiffness(axis, stiffness); } void RB_constraint_set_damping_6dof_spring(rbConstraint *con, int axis, float damping) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint *>( con); // invert damping range so that 0 = no damping damping = (damping > 1.0f) ? 0.0f : 1.0f - damping; constraint->setDamping(axis, damping); } void RB_constraint_set_spring_6dof_spring(rbConstraint *con, int axis, int enable) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint *>( con); constraint->enableSpring(axis, enable); } void RB_constraint_set_equilibrium_6dof_spring(rbConstraint *con) { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint *>( con); constraint->setEquilibriumPoint(); } void RB_constraint_set_stiffness_6dof_spring2(rbConstraint *con, int axis, float stiffness) { btGeneric6DofSpring2Constraint *constraint = reinterpret_cast<btGeneric6DofSpring2Constraint *>( con); constraint->setStiffness(axis, stiffness); } void RB_constraint_set_damping_6dof_spring2(rbConstraint *con, int axis, float damping) { btGeneric6DofSpring2Constraint *constraint = reinterpret_cast<btGeneric6DofSpring2Constraint *>( con); constraint->setDamping(axis, damping); } void RB_constraint_set_spring_6dof_spring2(rbConstraint *con, int axis, int enable) { btGeneric6DofSpring2Constraint *constraint = reinterpret_cast<btGeneric6DofSpring2Constraint *>( con); constraint->enableSpring(axis, enable); } void RB_constraint_set_equilibrium_6dof_spring2(rbConstraint *con) { btGeneric6DofSpring2Constraint *constraint = reinterpret_cast<btGeneric6DofSpring2Constraint *>( con); constraint->setEquilibriumPoint(); } void RB_constraint_set_solver_iterations(rbConstraint *con, int num_solver_iterations) { btTypedConstraint *constraint = reinterpret_cast<btTypedConstraint *>(con); constraint->setOverrideNumSolverIterations(num_solver_iterations); } void RB_constraint_set_breaking_threshold(rbConstraint *con, float threshold) { btTypedConstraint *constraint = reinterpret_cast<btTypedConstraint *>(con); constraint->setBreakingImpulseThreshold(threshold); } void RB_constraint_set_enable_motor(rbConstraint *con, int enable_lin, int enable_ang) { btGeneric6DofConstraint *constraint = reinterpret_cast<btGeneric6DofConstraint *>(con); constraint->getTranslationalLimitMotor()->m_enableMotor[0] = enable_lin; constraint->getRotationalLimitMotor(0)->m_enableMotor = enable_ang; } void RB_constraint_set_max_impulse_motor(rbConstraint *con, float max_impulse_lin, float max_impulse_ang) { btGeneric6DofConstraint *constraint = reinterpret_cast<btGeneric6DofConstraint *>(con); constraint->getTranslationalLimitMotor()->m_maxMotorForce.setX(max_impulse_lin); constraint->getRotationalLimitMotor(0)->m_maxMotorForce = max_impulse_ang; } void RB_constraint_set_target_velocity_motor(rbConstraint *con, float velocity_lin, float velocity_ang) { btGeneric6DofConstraint *constraint = reinterpret_cast<btGeneric6DofConstraint *>(con); constraint->getTranslationalLimitMotor()->m_targetVelocity.setX(velocity_lin); constraint->getRotationalLimitMotor(0)->m_targetVelocity = velocity_ang; } /* ********************************** */
; A082388: a(1) = 1, a(2) = 2; further terms are defined by rules that for k >= 2, a(2^k-i) = a(2^k+i) for 1 <= i <= 2^k-1 and a(2^k) = a(2^(k-1)) + Sum_{i < 2^k} a(i). ; 1,2,1,6,1,2,1,20,1,2,1,6,1,2,1,68,1,2,1,6,1,2,1,20,1,2,1,6,1,2,1,232,1,2,1,6,1,2,1,20,1,2,1,6,1,2,1,68,1,2,1,6,1,2,1,20,1,2,1,6,1,2,1,792,1,2,1,6,1,2,1,20,1,2,1,6,1,2,1,68,1,2,1,6,1,2,1,20,1,2,1,6,1,2,1,232,1,2,1,6 lpb $0 sub $0,1 mul $0,2 dif $0,4 add $2,$1 mul $1,2 add $2,2 add $1,$2 lpe div $1,2 add $1,1 mov $0,$1
// // ip/impl/address_v4.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP #define BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #if !defined(BOOST_ASIO_NO_IOSTREAM) #include <boost/asio/detail/throw_error.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { namespace ip { template <typename Elem, typename Traits> std::basic_ostream<Elem, Traits>& operator<<( std::basic_ostream<Elem, Traits>& os, const address_v4& addr) { boost::system::error_code ec; std::string s = addr.to_string(ec); if (ec) { if (os.exceptions() & std::basic_ostream<Elem, Traits>::failbit) boost::asio::detail::throw_error(ec); else os.setstate(std::basic_ostream<Elem, Traits>::failbit); } else for (std::string::iterator i = s.begin(); i != s.end(); ++i) os << os.widen(*i); return os; } } // namespace ip } // namespace asio } // namespace boost #include <boost/asio/detail/pop_options.hpp> #endif // !defined(BOOST_ASIO_NO_IOSTREAM) #endif // BOOST_ASIO_IP_IMPL_ADDRESS_V4_HPP
dnl SPARC v9 32-bit mpn_udiv_qrnnd - division support for longlong.h. dnl Copyright 2002, 2003 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 2.1 of the License, or (at dnl your option) any later version. dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public dnl License for more details. dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. include(`../config.m4') C INPUT PARAMETERS C rem_ptr o0 C n1 o1 C n0 o2 C d o3 ASM_START() PROLOGUE(mpn_udiv_qrnnd) sllx %o1, 32, %g1 C shift upper dividend limb srl %o2, 0, %g2 C zero extend lower dividend limb srl %o3, 0, %g3 C zero extend divisor or %g2, %g1, %g1 C assemble 64-bit dividend udivx %g1, %g3, %g1 mulx %g1, %g3, %g4 sub %g2, %g4, %g2 st %g2, [%o0] C store remainder retl mov %g1, %o0 C return quotient EPILOGUE(mpn_udiv_qrnnd)
; A030428: a(n) = 0! * 1! * 2! * ... * n! - 1. ; Submitted by Jamie Morken ; 0,0,1,11,287,34559,24883199,125411327999,5056584744959999,1834933472251084799999,6658606584104736522239999999,265790267296391946810949631999999999,127313963299399416749559771247411199999999999 mov $1,1 mov $2,1 mov $3,1 lpb $0 sub $0,1 add $2,1 mul $3,$1 mul $1,$2 lpe mov $0,$3 sub $0,1
; A057570: Numbers of the form n*(7n+-1)/2. ; 0,3,4,13,15,30,33,54,58,85,90,123,129,168,175,220,228,279,288,345,355,418,429,498,510,585,598,679,693,780,795,888,904,1003,1020,1125,1143,1254,1273,1390,1410,1533,1554,1683,1705,1840,1863,2004,2028,2175,2200,2353,2379,2538,2565,2730,2758,2929,2958,3135,3165,3348,3379,3568,3600,3795,3828,4029,4063,4270,4305,4518,4554,4773,4810,5035,5073,5304,5343,5580,5620,5863,5904,6153,6195,6450,6493,6754,6798,7065,7110,7383,7429,7708,7755,8040,8088,8379,8428,8725 mov $2,$0 add $2,2 lpb $0 trn $0,2 add $1,$2 add $2,3 lpe mov $0,$1
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x9725, %rdi nop nop nop nop add %r13, %r13 movl $0x61626364, (%rdi) nop cmp $2636, %rcx lea addresses_D_ht+0x39f5, %rcx nop nop xor $27361, %rbp vmovups (%rcx), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r12 nop nop nop cmp %rdi, %rdi lea addresses_A_ht+0x1502f, %rsi lea addresses_UC_ht+0x54b5, %rdi nop nop nop nop nop add $40481, %r12 mov $102, %rcx rep movsq nop nop nop nop dec %rcx lea addresses_D_ht+0x1e8d5, %r12 nop nop sub %rbp, %rbp movl $0x61626364, (%r12) nop nop inc %rbp lea addresses_WC_ht+0x84b5, %rsi nop nop nop sub %r12, %r12 movw $0x6162, (%rsi) nop nop nop nop nop and $19093, %rsi lea addresses_D_ht+0x11acd, %rsi lea addresses_UC_ht+0x34b5, %rdi nop nop nop nop nop cmp $3914, %r9 mov $36, %rcx rep movsw nop nop nop nop nop and %r13, %r13 lea addresses_UC_ht+0x1e8b5, %rsi lea addresses_WC_ht+0x136e5, %rdi nop nop xor $34672, %rbp mov $38, %rcx rep movsb nop nop nop nop and %rcx, %rcx lea addresses_normal_ht+0x1b1f1, %rsi lea addresses_UC_ht+0x1c2d4, %rdi nop nop nop nop nop inc %r15 mov $2, %rcx rep movsw nop nop nop add $51750, %rbp pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r9 push %rax push %rbx // Faulty Load lea addresses_D+0x7cb5, %rax nop nop nop sub $57717, %rbx movups (%rax), %xmm4 vpextrq $0, %xmm4, %r9 lea oracles, %r11 and $0xff, %r9 shlq $12, %r9 mov (%r11,%r9,1), %r9 pop %rbx pop %rax pop %r9 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
; A131412: a(n) = n*(Fibonacci(n) - 1) + Fibonacci(n + 2) - 1. ; 1,2,7,15,32,62,117,214,385,683,1200,2092,3625,6250,10731,18359,31312,53258,90365,152990,258501,435987,734112,1234200,2072017,3474002,5817487,9730719,16258880,27139478,45258885,75408742,125538505,208828475,347119056,576580804,957085177,1587684538,2632173555,4361280455,7222280176,11953809122,19775163917,32698296110,54041857677,89277874467,147425850432,243347563824,401523371425,662264731298,1091931855895,1799734136367,2965347294560,4884300282350,8042547730581,13238967017974,21786533907217,35842639088843,58951330318320,96933264893020,159346048019401,261880061206282,430288310327547,706831320929495,1160844781754512,1906064202577082,3129022234722077,5135587787582654,8427224622978645 mov $1,1 mov $3,$0 mov $4,6 lpb $0 sub $0,1 mov $2,$1 add $2,6 sub $4,4 mov $1,$4 add $4,$2 add $4,$3 lpe
.data req: .asciiz "Nhap ky tu thuong" str1: .asciiz "\n Ky tu in hoa la: " str2: .asciiz "\n Ky tu khong hop le" str3: .asciiz "\n Ky tu lien truoc la " char: .asciiz .text main: #-----------------Nhap du lieu------------------------- # Yeu cau nhap ky tu (In request) li $v0,4 la $a0, req syscall #Nhap ky tu li $v0, 12 syscall # Luu du lieu move $s0, $v0 #---------------Xu ly du lieu------------------------- # Kiem tra ky tu thuong sge $t0, $s0, 97 sle $t1, $s0, 122 bne $t0, $t1 TH1 # Chuyen ky tu lien truoc sub $s1, $s0,1 # In str1 li $v0, 4 la $a0, str3 syscall #In ky tu ra man hinh li $v0, 11 move $a0, $s1 syscall # Chuyen ky tu hoa sub $s2, $s0,32 # In noi dung li $v0, 4 la $a0, str1 syscall #In ky tu ra man hinh li $v0, 11 move $a0, $s2 syscall j ket_thuc # TH1: #Ky tu hoa >= 65 va <= 90 sge $t0, $s0, 65 sle $t1, $s0, 90 bne $t0, $t1 TH2 # Chuyen ky tu lien truoc sub $s1, $s0,1 # In str1 li $v0, 4 la $a0, str3 syscall #In ky tu ra man hinh li $v0, 11 move $a0, $s1 syscall # In ky tu hoa li $v0, 4 la $a0, str1 syscall #In ky tu ra man hinh li $v0, 11 move $a0, $s0 syscall j ket_thuc # Du lieu khong hop le thi in ra chuoi str2 TH2: li $v0, 4 la $a0, str2 syscall j ket_thuc #Ket thuc chuong trinh ket_thuc: li $v0,10 syscall
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #include "hphp/runtime/ext/array/ext_array.h" #include "hphp/runtime/base/array-provenance.h" #include "hphp/runtime/base/array-data-defs.h" #include "hphp/runtime/base/array-init.h" #include "hphp/runtime/base/builtin-functions.h" #include "hphp/runtime/base/collections.h" #include "hphp/runtime/base/comparisons.h" #include "hphp/runtime/base/container-functions.h" #include "hphp/runtime/base/datatype.h" #include "hphp/runtime/base/double-to-int64.h" #include "hphp/runtime/base/mixed-array.h" #include "hphp/runtime/base/request-event-handler.h" #include "hphp/runtime/base/sort-flags.h" #include "hphp/runtime/base/request-info.h" #include "hphp/runtime/base/tv-refcount.h" #include "hphp/runtime/ext/collections/ext_collections-map.h" #include "hphp/runtime/ext/collections/ext_collections-pair.h" #include "hphp/runtime/ext/collections/ext_collections-set.h" #include "hphp/runtime/ext/collections/ext_collections-vector.h" #include "hphp/runtime/ext/generator/ext_generator.h" #include "hphp/runtime/ext/std/ext_std_closure.h" #include "hphp/runtime/ext/std/ext_std_function.h" #include "hphp/runtime/vm/class-meth-data-ref.h" #include "hphp/runtime/vm/jit/translator-inline.h" #include "hphp/runtime/vm/jit/translator.h" #include "hphp/util/logger.h" #include "hphp/util/rds-local.h" #include <vector> namespace HPHP { /////////////////////////////////////////////////////////////////////////////// #define SORT_DESC 3 #define SORT_ASC 4 const StaticString s_count("count"); enum class CaseMode { LOWER = 0, UPPER = 1, }; TypedValue HHVM_FUNCTION(array_change_key_case, const Variant& input, int64_t case_ /* = 0 */) { getCheckedContainer(input); return tvReturn(ArrayUtil::ChangeKeyCase(arr_input, (CaseMode)case_ == CaseMode::LOWER)); } TypedValue HHVM_FUNCTION(array_chunk, const Variant& input, int chunkSize, bool preserve_keys /* = false */) { const auto& cellInput = *input.asTypedValue(); if (UNLIKELY(!isClsMethCompactContainer(cellInput))) { raise_warning("Invalid operand type was used: %s expects " "an array or collection as argument 1", __FUNCTION__+2); return make_tv<KindOfNull>(); } if (chunkSize < 1) { raise_invalid_argument_warning("size: %d", chunkSize); return make_tv<KindOfNull>(); } const size_t inputSize = getClsMethCompactContainerSize(cellInput); PackedArrayInit ret((inputSize + chunkSize - 1) / chunkSize); Array chunk; int current = 0; for (ArrayIter iter(cellInput); iter; ++iter) { if (preserve_keys) { chunk.set(iter.first(), iter.secondValPlus(), true); } else { chunk.append(iter.secondValPlus()); } if ((++current % chunkSize) == 0) { ret.append(chunk); chunk.clear(); } } if (!chunk.empty()) { ret.append(chunk); } return tvReturn(ret.toVariant()); } static inline bool array_column_coerce_key(Variant &key, const char *name) { /* NULL has a special meaning for each field */ if (key.isNull()) { return true; } /* Custom coercion rules for key types */ if (key.isInteger() || key.isDouble()) { key = key.toInt64(); return true; } else if (key.isString() || key.isObject() || key.isFunc() || key.isClass()) { key = key.toString(); return true; } else { raise_warning("array_column(): The %s key should be either a string " "or an integer", name); return false; } } TypedValue HHVM_FUNCTION(array_column, const Variant& input, const Variant& val_in, const Variant& idx_in /* = uninit_variant */) { getCheckedContainer(input); Variant val = val_in, idx = idx_in; if (!array_column_coerce_key(val, "column") || !array_column_coerce_key(idx, "index")) { return make_tv<KindOfBoolean>(false); } ArrayInit ret(arr_input.size(), ArrayInit::Map{}); for (ArrayIter it(arr_input); it; ++it) { Array sub; if (UNLIKELY(RuntimeOption::PHP7_Builtins && it.second().isObject())) { sub = it.second().toObject().get()->toArray<IntishCast::Cast>(); } else if (it.second().isArray()) { sub = it.second().toArray(); } else { continue; } Variant elem; if (val.isNull()) { elem = sub; } else { auto const val_key = sub.convertKey<IntishCast::Cast>(val); if (sub.exists(val_key)) { elem = sub[val_key]; } else { // skip subarray without named element continue; } } if (idx.isNull()) { ret.append(elem); } else { auto const idx_key = sub.convertKey<IntishCast::Cast>(idx); if (!sub.exists(idx_key)) { ret.append(elem); } else if (sub[idx_key].isObject()) { ret.setUnknownKey<IntishCast::Cast>(sub[idx_key].toString(), elem); } else { ret.setUnknownKey<IntishCast::Cast>(sub[idx_key], elem); } } } return tvReturn(ret.toVariant()); } TypedValue HHVM_FUNCTION(array_combine, const Variant& keys, const Variant& values) { const auto& cell_keys = *keys.asTypedValue(); const auto& cell_values = *values.asTypedValue(); if (UNLIKELY(!isClsMethCompactContainer(cell_keys) || !isClsMethCompactContainer(cell_values))) { raise_warning("Invalid operand type was used: array_combine expects " "arrays or collections"); return make_tv<KindOfNull>(); } auto keys_size = getClsMethCompactContainerSize(cell_keys); if (UNLIKELY(keys_size != getClsMethCompactContainerSize(cell_values))) { raise_warning("array_combine(): Both parameters should have an equal " "number of elements"); return make_tv<KindOfBoolean>(false); } Array ret = Array::attach(MixedArray::MakeReserveMixed(keys_size)); for (ArrayIter iter1(cell_keys), iter2(cell_values); iter1; ++iter1, ++iter2) { auto const key = iter1.secondValPlus(); if (isIntType(type(key)) || isStringType(type(key))) { ret.set(ret.convertKey<IntishCast::Cast>(key), iter2.secondValPlus()); } else { ret.set(ret.convertKey<IntishCast::Cast>(tvCastToString(key)), iter2.secondValPlus()); } } return tvReturn(std::move(ret)); } TypedValue HHVM_FUNCTION(array_count_values, const Variant& input) { if (!isClsMethCompactContainer(input)) { raise_warning("array_count_values() expects parameter 1 to be array, " "%s given", getDataTypeString(input.getType()).c_str()); return make_tv<KindOfNull>(); } return tvReturn( ArrayUtil::CountValues( input.isClsMeth() ? input.toArray() : input.isArray() ? input.asCArrRef() // If this isn't exactly an Array, then it must be a hack collection, // so it is safe to get the object data : collections::toArray<IntishCast::Cast>( input.getObjectData() ))); } TypedValue HHVM_FUNCTION(array_fill_keys, const Variant& keys, const Variant& value) { folly::Optional<ArrayInit> ai; auto ok = IterateV( *keys.asTypedValue(), [&](ArrayData* adata) { ai.emplace(adata->size(), ArrayInit::Mixed{}); }, [&](TypedValue v) { if (isIntType(v.m_type) || isStringType(v.m_type)) { ai->setUnknownKey<IntishCast::Cast>(VarNR(v), value); } else { raise_hack_strict(RuntimeOption::StrictArrayFillKeys, "strict_array_fill_keys", "keys must be ints or strings"); ai->setUnknownKey<IntishCast::Cast>(tvCastToString(v), value); } }, [&](ObjectData* coll) { if (coll->collectionType() == CollectionType::Pair) { ai.emplace(2, ArrayInit::Mixed{}); } }, false ); if (!ok) { raise_warning("Invalid operand type was used: array_fill_keys expects " "an array or collection"); return make_tv<KindOfNull>(); } assertx(ai.has_value()); return tvReturn(ai->toVariant()); } TypedValue HHVM_FUNCTION(array_fill, int start_index, int num, const Variant& value) { if (num < 0) { raise_invalid_argument_warning("Number of elements can't be negative"); return make_tv<KindOfBoolean>(false); } else if (num == 0) { return tvReturn(start_index == 0 ? empty_varray() : empty_darray()); } if (start_index == 0) { VArrayInit vai(num); for (size_t k = 0; k < num; k++) { vai.append(value); } return make_array_like_tv(vai.create()); } else { DArrayInit ret(num, CheckAllocation{}); ret.set(start_index, value); for (int i = num - 1; i > 0; i--) { ret.append(value); } return make_array_like_tv(ret.create()); } } TypedValue HHVM_FUNCTION(array_flip, const Variant& trans) { auto const& transCell = *trans.asTypedValue(); if (UNLIKELY(!isClsMethCompactContainer(transCell))) { raise_warning("Invalid operand type was used: %s expects " "an array or collection", __FUNCTION__+2); return make_tv<KindOfNull>(); } ArrayInit ret(getClsMethCompactContainerSize(transCell), ArrayInit::Mixed{}); for (ArrayIter iter(transCell); iter; ++iter) { auto const inner = iter.secondValPlus(); if (isIntType(type(inner)) || isStringType(type(inner)) || isFuncType(type(inner))|| isClassType(type(inner))) { ret.setUnknownKey<IntishCast::Cast>(VarNR(inner), iter.first()); } else { raise_warning("Can only flip STRING and INTEGER values!"); } } return tvReturn(ret.toVariant()); } bool HHVM_FUNCTION(array_key_exists, const Variant& key, const Variant& search) { const ArrayData *ad; auto const searchCell = search.asTypedValue(); if (LIKELY(isArrayLikeType(searchCell->m_type))) { ad = searchCell->m_data.parr; } else if (searchCell->m_type == KindOfObject) { ObjectData* obj = searchCell->m_data.pobj; if (obj->isCollection()) { return collections::contains(obj, key); } else if (obj->instanceof(c_Closure::classof())) { return false; } return HHVM_FN(array_key_exists)(key, obj->toArray(false, true)); } else if (isClsMethType(searchCell->m_type)) { raiseClsMethToVecWarningHelper(__FUNCTION__+2); ad = clsMethToVecHelper(searchCell->m_data.pclsmeth).detach(); } else { raise_bad_type_warning("array_key_exists expects an array or an object; " "false returned."); return false; } auto const cell = key.asTypedValue(); auto const fail = [&] { if (!ad->useWeakKeys()) throwInvalidArrayKeyException(cell, ad); if (checkHACArrayKeyCast()) { raiseHackArrCompatImplicitArrayKey(cell); } raise_warning("Array key should be either a string or an integer"); return false; }; switch (cell->m_type) { case KindOfUninit: case KindOfNull: if (ad->isHackArrayType()) { throwInvalidArrayKeyException(cell, ad); } else if (checkHACArrayKeyCast() && ad->useWeakKeys()) { raiseHackArrCompatImplicitArrayKey(cell); } return ad->useWeakKeys() && ad->exists(staticEmptyString()); case KindOfClsMeth: raiseClsMethToVecWarningHelper(__FUNCTION__+2); // fallthrough case KindOfBoolean: case KindOfDouble: case KindOfPersistentVec: case KindOfVec: case KindOfPersistentDict: case KindOfDict: case KindOfPersistentKeyset: case KindOfKeyset: case KindOfPersistentDArray: case KindOfDArray: case KindOfPersistentVArray: case KindOfVArray: case KindOfPersistentArray: case KindOfArray: case KindOfObject: case KindOfResource: case KindOfRecord: return fail(); case KindOfFunc: if (!RO::EvalEnableFuncStringInterop) return fail(); return ad->exists(StrNR(funcToStringHelper(cell->m_data.pfunc))); case KindOfClass: return ad->exists(StrNR(classToStringHelper(cell->m_data.pclass))); case KindOfPersistentString: case KindOfString: { int64_t n = 0; if (ad->convertKey(cell->m_data.pstr, n)) { return ad->exists(n); } return ad->exists(StrNR(cell->m_data.pstr)); } case KindOfInt64: return ad->exists(cell->m_data.num); } not_reached(); } bool HHVM_FUNCTION(key_exists, const Variant& key, const Variant& search) { return HHVM_FN(array_key_exists)(key, search); } TypedValue HHVM_FUNCTION(array_keys, TypedValue input) { if (UNLIKELY(!isClsMethCompactContainer(input))) { raise_warning("array_keys() expects parameter 1 to be an array " "or collection"); return make_tv<KindOfNull>(); } VArrayInit ai(getClsMethCompactContainerSize(input)); IterateKV(input, [&](TypedValue k, TypedValue) { ai.append(k); }); return make_array_like_tv(ai.create()); } static bool couldRecur(const Variant& v, const ArrayData* arr) { return arr->kind() == ArrayData::kGlobalsKind; } static bool couldRecur(tv_lval lval, const ArrayData* arr) { return arr->kind() == ArrayData::kGlobalsKind; } using PointerSet = ArrayUtil::PointerSet; static void php_array_merge_recursive(PointerSet &seen, bool check, Array &arr1, const Array& arr2) { auto const arr1_ptr = arr1.get(); if (check) { if (seen.find(arr1_ptr) != seen.end()) { raise_warning("array_merge_recursive(): recursion detected"); return; } seen.insert(arr1_ptr); } for (ArrayIter iter(arr2); iter; ++iter) { Variant key(iter.first()); if (key.isNumeric()) { arr1.append(iter.secondVal()); } else if (arr1.exists(key, true)) { // There is no need to do toKey() conversion, for a key that is already // in the array. auto const arrkey = arr1.convertKey<IntishCast::Cast>(*key.asTypedValue()); auto const lval = arr1.lval(arrkey, AccessFlags::Key); auto subarr1 = tvCastToArrayLike<IntishCast::Cast>(lval.tv()) .toPHPArray(); php_array_merge_recursive( seen, couldRecur(lval, subarr1.get()), subarr1, tvCastToArrayLike<IntishCast::Cast>(iter.secondVal()) ); tvUnset(lval); // avoid contamination of the value that was strongly bound tvSet(make_array_like_tv(subarr1.get()), lval); } else { arr1.set(key, iter.secondVal(), true); } } if (check) { seen.erase(arr1_ptr); } } TypedValue HHVM_FUNCTION(array_map, const Variant& callback, const Variant& arr1, const Array& _argv) { VMRegGuard _; CallCtx ctx; ctx.func = nullptr; if (!callback.isNull()) { vm_decode_function(callback, ctx); } const auto& cell_arr1 = *arr1.asTypedValue(); if (UNLIKELY(!isClsMethCompactContainer(cell_arr1))) { raise_warning("array_map(): Argument #2 should be an array or collection"); return make_tv<KindOfNull>(); } if (LIKELY(_argv.empty())) { // Handle the common case where the caller passed two // params (a callback and a container) if (!ctx.func) { if (isArrayLikeType(cell_arr1.m_type)) { return tvReturn(arr1); } else { return tvReturn(arr1.toArray()); } } ArrayInit ret(getContainerSize(cell_arr1), ArrayInit::Map{}); bool keyConverted = isArrayLikeType(cell_arr1.m_type); if (!keyConverted) { auto col_type = cell_arr1.m_data.pobj->collectionType(); keyConverted = !collectionAllowsIntStringKeys(col_type); } for (ArrayIter iter(arr1); iter; ++iter) { auto const arg = iter.secondValPlus(); auto result = Variant::attach(g_context->invokeFuncFew(ctx, 1, &arg)); // if keyConverted is false, it's possible that ret will have fewer // elements than cell_arr1; keys int(1) and string('1') may both be // present ret.add(iter.first(), result, keyConverted); } return tvReturn(ret.toVariant()); } // Handle the uncommon case where the caller passed a callback // and two or more containers req::vector<ArrayIter> iters; iters.reserve(_argv.size() + 1); size_t maxLen = getContainerSize(cell_arr1); iters.emplace_back(cell_arr1); for (ArrayIter it(_argv); it; ++it) { auto const c = it.secondValPlus(); if (UNLIKELY(!isContainer(c))) { raise_warning("array_map(): Argument #%d should be an array or " "collection", (int)(iters.size() + 2)); iters.emplace_back(tvCastToArrayLike(c)); } else { iters.emplace_back(c); size_t len = getContainerSize(c); if (len > maxLen) maxLen = len; } } PackedArrayInit ret_ai(maxLen); for (size_t k = 0; k < maxLen; k++) { PackedArrayInit params_ai(iters.size()); for (auto& iter : iters) { if (iter) { params_ai.append(iter.secondValPlus()); ++iter; } else { params_ai.append(init_null_variant); } } Array params = params_ai.toArray(); if (ctx.func) { auto result = Variant::attach( g_context->invokeFunc(ctx, params) ); ret_ai.append(result); } else { ret_ai.append(params); } } return tvReturn(ret_ai.toVariant()); } TypedValue HHVM_FUNCTION(array_merge, const Variant& array1, const Array& arrays /* = null array */) { getCheckedContainer(array1); Array ret = Array::Create(); ret.merge(arr_array1); bool success = true; IterateV( arrays.get(), [&](TypedValue v) -> bool { if (!tvIsArrayLike(v)) { raise_expected_array_warning("array_merge"); success = false; return true; } ret.merge(asCArrRef(&v)); return false; } ); if (UNLIKELY(!success)) { return make_tv<KindOfNull>(); } return tvReturn(std::move(ret)); } TypedValue HHVM_FUNCTION(array_merge_recursive, const Variant& array1, const Array& arrays /* = null array */) { getCheckedArray(array1); Array ret = Array::Create(); PointerSet seen; php_array_merge_recursive(seen, false, ret, arr_array1); assertx(seen.empty()); bool success = true; IterateV( arrays.get(), [&](TypedValue v) -> bool { if (!tvIsArrayLike(v)) { raise_expected_array_warning("array_merge_recursive"); success = false; return true; } php_array_merge_recursive(seen, false, ret, asCArrRef(&v)); assertx(seen.empty()); return false; } ); if (UNLIKELY(!success)) { return make_tv<KindOfNull>(); } return tvReturn(std::move(ret)); } static void php_array_replace(Array &arr1, const Array& arr2) { for (ArrayIter iter(arr2); iter; ++iter) { Variant key = iter.first(); arr1.set(key, iter.secondVal(), true); } } static void php_array_replace_recursive(PointerSet &seen, bool check, Array &arr1, const Array& arr2) { if (arr1.get() == arr2.get()) { // This is an optimization; if the arrays are self recursive, this does // change the behavior slightly - it skips the "recursion detected" warning. return; } auto const arr1_ptr = arr1.get(); if (check) { if (seen.find(arr1_ptr) != seen.end()) { raise_warning("array_replace_recursive(): recursion detected"); return; } seen.insert(arr1_ptr); } for (ArrayIter iter(arr2); iter; ++iter) { const auto key = Variant::wrap(arr1.convertKey<IntishCast::Cast>(iter.first())); auto const tv = iter.secondVal(); if (arr1.exists(key, true) && isArrayLikeType(type(tv))) { auto const lval = arr1.lval(key, AccessFlags::Key); if (isArrayLikeType(lval.type())) { Array subarr1 = tvCastToArrayLike<IntishCast::Cast>( lval.tv() ).toPHPArrayIntishCast(); php_array_replace_recursive(seen, couldRecur(lval, subarr1.get()), subarr1, ArrNR(val(tv).parr)); tvSet(make_array_like_tv(subarr1.get()), lval); } else { arr1.set(key, iter.secondVal(), true); } } else { arr1.set(key, iter.secondVal(), true); } } if (check) { seen.erase(arr1_ptr); } } TypedValue HHVM_FUNCTION(array_replace, const Variant& array1, const Variant& array2 /* = uninit_variant */, const Array& args /* = null array */) { getCheckedArray(array1); Array ret = Array::Create(); php_array_replace(ret, arr_array1); if (UNLIKELY(array2.isNull() && args.empty())) { return tvReturn(std::move(ret)); } getCheckedArray(array2); php_array_replace(ret, arr_array2); for (ArrayIter iter(args); iter; ++iter) { auto const v = VarNR(iter.secondVal()); getCheckedArray(v); php_array_replace(ret, arr_v); } return tvReturn(std::move(ret)); } TypedValue HHVM_FUNCTION(array_replace_recursive, const Variant& array1, const Variant& array2 /* = uninit_variant */, const Array& args /* = null array */) { getCheckedArray(array1); Array ret = Array::Create(); PointerSet seen; php_array_replace_recursive(seen, false, ret, arr_array1); assertx(seen.empty()); if (UNLIKELY(array2.isNull() && args.empty())) { return tvReturn(std::move(ret)); } getCheckedArray(array2); php_array_replace_recursive(seen, false, ret, arr_array2); assertx(seen.empty()); for (ArrayIter iter(args); iter; ++iter) { auto const v = VarNR(iter.secondVal()); getCheckedArray(v); php_array_replace_recursive(seen, false, ret, arr_v); assertx(seen.empty()); } return tvReturn(std::move(ret)); } TypedValue HHVM_FUNCTION(array_pad, const Variant& input, int pad_size, const Variant& pad_value) { getCheckedArray(input); auto arr = [&](){ if (UNLIKELY(input.isDict() || input.isKeyset())) { return arr_input.toDArray(); } else if (UNLIKELY(input.isVecArray())) { return arr_input.toVArray(); } else { return arr_input; } }(); if (pad_size > 0) { return tvReturn(ArrayUtil::PadRight(arr, pad_value, pad_size)); } else { return tvReturn(ArrayUtil::PadLeft(arr, pad_value, -pad_size)); } } TypedValue HHVM_FUNCTION(array_pop, Variant& containerRef) { auto* container = castClsmethToContainerInplace(containerRef.asTypedValue()); if (UNLIKELY(!isMutableContainer(*container))) { raise_warning("array_pop() expects parameter 1 to be an " "array or mutable collection"); return make_tv<KindOfNull>(); } if (!getContainerSize(*container)) { return make_tv<KindOfNull>(); } if (isArrayLikeType(container->m_type)) { return tvReturn(containerRef.asArrRef().pop()); } assertx(container->m_type == KindOfObject); return tvReturn(collections::pop(container->m_data.pobj)); } TypedValue HHVM_FUNCTION(array_product, const Variant& input) { if (input.isClsMeth()) { raiseClsMethToVecWarningHelper(__FUNCTION__+2); return make_tv<KindOfNull>(); } if (UNLIKELY(!isContainer(input))) { raise_warning("Invalid operand type was used: %s expects " "an array or collection as argument 1", __FUNCTION__+2); return make_tv<KindOfNull>(); } int64_t i = 1; ArrayIter iter(input); for (; iter; ++iter) { auto const tv = iter.secondValPlus(); switch (type(tv)) { case KindOfUninit: case KindOfNull: case KindOfBoolean: case KindOfInt64: i *= tvToInt(tv); continue; case KindOfDouble: goto DOUBLE; case KindOfPersistentString: case KindOfString: { int64_t ti; double td; if (val(tv).pstr->isNumericWithVal(ti, td, 1) == KindOfInt64) { i *= ti; continue; } else { goto DOUBLE; } } case KindOfPersistentVec: case KindOfVec: case KindOfPersistentDict: case KindOfDict: case KindOfPersistentKeyset: case KindOfKeyset: case KindOfPersistentDArray: case KindOfDArray: case KindOfPersistentVArray: case KindOfVArray: case KindOfPersistentArray: case KindOfArray: case KindOfObject: case KindOfResource: case KindOfFunc: case KindOfClass: case KindOfClsMeth: case KindOfRecord: continue; } not_reached(); } return make_tv<KindOfInt64>(i); DOUBLE: double d = i; for (; iter; ++iter) { auto const tv = iter.secondValPlus(); switch (type(tv)) { DT_UNCOUNTED_CASE: case KindOfString: d *= tvCastToDouble(tv); case KindOfVec: case KindOfDict: case KindOfKeyset: case KindOfDArray: case KindOfVArray: case KindOfArray: case KindOfClsMeth: case KindOfObject: case KindOfResource: case KindOfRecord: continue; } not_reached(); } return make_tv<KindOfDouble>(d); } TypedValue HHVM_FUNCTION(array_push, Variant& container, const Variant& var, const Array& args /* = null array */) { if (LIKELY(container.isArray()) || container.isClsMeth()) { castClsmethToContainerInplace(container.asTypedValue()); /* * Important note: this *must* cast the parr in the inner cell to * the Array&---we can't copy it to the stack or anything because we * might escalate. */ Array& arr_array = container.asArrRef(); arr_array.append(var); for (ArrayIter iter(args); iter; ++iter) { arr_array.append(iter.second()); } return make_tv<KindOfInt64>(arr_array.size()); } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection()) { switch (obj->collectionType()) { case CollectionType::Vector: { c_Vector* vec = static_cast<c_Vector*>(obj); vec->reserve(vec->size() + args.size() + 1); vec->add(var); for (ArrayIter iter(args); iter; ++iter) { vec->add(iter.second()); } return make_tv<KindOfInt64>(vec->size()); } case CollectionType::Set: { c_Set* set = static_cast<c_Set*>(obj); set->reserve(set->size() + args.size() + 1); set->add(var); for (ArrayIter iter(args); iter; ++iter) { set->add(iter.second()); } return make_tv<KindOfInt64>(set->size()); } case CollectionType::Map: case CollectionType::Pair: case CollectionType::ImmVector: case CollectionType::ImmMap: case CollectionType::ImmSet: // other collection types are unsupported: // - mapping collections require a key // - immutable collections don't allow insertion break; } } } raise_expected_array_or_collection_warning("array_push"); return make_tv<KindOfNull>(); } TypedValue HHVM_FUNCTION(array_rand, const Variant& input, int num_req /* = 1 */) { getCheckedArray(input); return tvReturn(ArrayUtil::RandomKeys(arr_input, num_req)); } TypedValue HHVM_FUNCTION(array_reverse, const Variant& input, bool preserve_keys /* = false */) { getCheckedContainer(input); return tvReturn(ArrayUtil::Reverse(arr_input, preserve_keys)); } TypedValue HHVM_FUNCTION(array_shift, Variant& array) { auto* cell_array = castClsmethToContainerInplace(array.asTypedValue()); if (UNLIKELY(!isMutableContainer(*cell_array))) { raise_warning("array_shift() expects parameter 1 to be an " "array or mutable collection"); return make_tv<KindOfNull>(); } if (!getContainerSize(*cell_array)) { return make_tv<KindOfNull>(); } if (isArrayLikeType(cell_array->m_type)) { return tvReturn(array.asArrRef().dequeue()); } assertx(cell_array->m_type == KindOfObject); return tvReturn(collections::shift(cell_array->m_data.pobj)); } TypedValue HHVM_FUNCTION(array_slice, TypedValue cell_input, int64_t offset, const Variant& length /* = uninit_variant */, bool preserve_keys /* = false */) { if (UNLIKELY(!isClsMethCompactContainer(cell_input))) { raise_warning("Invalid operand type was used: %s expects " "an array or collection as argument 1", __FUNCTION__+2); return make_tv<KindOfNull>(); } int64_t len = length.isNull() ? 0x7FFFFFFF : length.toInt64(); const int64_t num_in = getClsMethCompactContainerSize(cell_input); if (offset > num_in) { offset = num_in; } else if (offset < 0 && (offset = (num_in + offset)) < 0) { offset = 0; } auto const maxLen = num_in - offset; if (len < 0) { len = maxLen + len; } else if (len > maxLen) { len = maxLen; } if (len <= 0) { return make_persistent_array_like_tv(ArrayData::Create()); } bool input_is_packed = isClsMethType(cell_input.m_type) || isPackedContainer(cell_input); // If the slice covers the entire input container, we can just nop when // preserve_keys is true, or when preserve_keys is false but the container // is packed so we know the keys already map to [0,N]. if (offset == 0 && len == num_in && (preserve_keys || input_is_packed)) { if (isArrayType(cell_input.m_type)) { return tvReturn(Variant{cell_input.m_data.parr}); } if (isClsMethType(cell_input.m_type)) { raiseClsMethToVecWarningHelper(__FUNCTION__+2); return tvReturn(clsMethToVecHelper(cell_input.m_data.pclsmeth)); } if (isArrayLikeType(cell_input.m_type)) { return tvReturn(ArrNR{cell_input.m_data.parr} .asArray().toPHPArrayIntishCast()); } return tvReturn(cell_input.m_data.pobj->toArray<IntishCast::Cast>()); } int pos = 0; ArrayIter iter(cell_input); for (; pos < offset && iter; ++pos, ++iter) {} if (input_is_packed && (offset == 0 || !preserve_keys)) { PackedArrayInit ret(len); for (; pos < (offset + len) && iter; ++pos, ++iter) { ret.append(iter.secondValPlus()); } return tvReturn(ret.toVariant()); } // Otherwise PackedArrayInit can't be used because non-numeric keys are // preserved even when preserve_keys is false bool is_php_array = isArrayType(cell_input.m_type); Array ret = Array::attach(PackedArray::MakeReserve(len)); for (; pos < (offset + len) && iter; ++pos, ++iter) { Variant key(iter.first()); if (!is_php_array && key.isString()) { int64_t n; if (key.asCStrRef().get()->isStrictlyInteger(n)) key = n; } if (!preserve_keys && key.isInteger()) { ret.append(iter.secondValPlus()); } else { ret.set(key, iter.secondValPlus(), true); } } return tvReturn(std::move(ret)); } Variant array_splice(Variant& input, int offset, const Variant& length, const Variant& replacement) { getCheckedArrayVariant(input); Array ret = Array::Create(); int64_t len = length.isNull() ? 0x7FFFFFFF : length.toInt64(); input = ArrayUtil::Splice(arr_input, offset, len, replacement, &ret); return ret; } TypedValue HHVM_FUNCTION(array_splice, Variant& input, int offset, const Variant& length, const Variant& replacement) { return tvReturn(array_splice(input, offset, length, replacement)); } TypedValue HHVM_FUNCTION(array_sum, const Variant& input) { if (input.isClsMeth()) { raiseClsMethToVecWarningHelper(__FUNCTION__+2); return make_tv<KindOfNull>(); } if (UNLIKELY(!isContainer(input))) { raise_warning("Invalid operand type was used: %s expects " "an array or collection as argument 1", __FUNCTION__+2); return make_tv<KindOfNull>(); } int64_t i = 0; ArrayIter iter(input); for (; iter; ++iter) { auto const tv = iter.secondValPlus(); switch (type(tv)) { case KindOfUninit: case KindOfNull: case KindOfBoolean: case KindOfInt64: i += tvToInt(tv); continue; case KindOfDouble: goto DOUBLE; case KindOfPersistentString: case KindOfString: { int64_t ti; double td; if (val(tv).pstr->isNumericWithVal(ti, td, 1) == KindOfInt64) { i += ti; continue; } else { goto DOUBLE; } } case KindOfPersistentVec: case KindOfVec: case KindOfPersistentDict: case KindOfDict: case KindOfPersistentKeyset: case KindOfKeyset: case KindOfPersistentDArray: case KindOfDArray: case KindOfPersistentVArray: case KindOfVArray: case KindOfPersistentArray: case KindOfArray: case KindOfObject: case KindOfResource: case KindOfFunc: case KindOfClass: case KindOfClsMeth: case KindOfRecord: continue; } not_reached(); } return make_tv<KindOfInt64>(i); DOUBLE: double d = i; for (; iter; ++iter) { auto const tv = iter.secondValPlus(); switch (type(tv)) { DT_UNCOUNTED_CASE: case KindOfString: d += tvCastToDouble(tv); case KindOfVec: case KindOfDict: case KindOfKeyset: case KindOfDArray: case KindOfVArray: case KindOfArray: case KindOfClsMeth: case KindOfObject: case KindOfResource: case KindOfRecord: continue; } not_reached(); } return make_tv<KindOfDouble>(d); } TypedValue HHVM_FUNCTION(array_unshift, Variant& array, const Variant& var, const Array& args /* = null array */) { auto* cell_array = castClsmethToContainerInplace(array.asTypedValue()); if (UNLIKELY(!isContainer(*cell_array))) { raise_warning("%s() expects parameter 1 to be an array, Vector, or Set", __FUNCTION__+2 /* remove the "f_" prefix */); return make_tv<KindOfNull>(); } auto const dt = type(cell_array); if (isArrayLikeType(dt)) { Array& arr_array = array.asArrRef(); if (cell_array->m_data.parr->isVectorData()) { if (!args.empty()) { auto pos_limit = args->iter_end(); for (ssize_t pos = args->iter_last(); pos != pos_limit; pos = args->iter_rewind(pos)) { arr_array.prepend(args->nvGetVal(pos)); } } arr_array.prepend(var); } else { // Non-vector-like arrays. PackedArrays and vecs are handled above. auto const ad = [&]{ auto const size = val(cell_array).parr->size(); if (isDictType(dt)) return MixedArray::MakeReserveDict(size); if (isKeysetType(dt)) return SetArray::MakeReserveSet(size); assertx(isPHPArrayType(dt)); return MixedArray::MakeReserveDArray(size); }(); auto newArray = Array::attach(ad); newArray.append(var); if (!args.empty()) { auto pos_limit = args->iter_end(); for (ssize_t pos = args->iter_begin(); pos != pos_limit; pos = args->iter_advance(pos)) { newArray.append(args->nvGetVal(pos)); } } if (isKeysetType(dt)) { for (ArrayIter iter(array.toArray()); iter; ++iter) { Variant key(iter.first()); newArray.append(key); } } else { for (ArrayIter iter(array.toArray()); iter; ++iter) { Variant key(iter.first()); if (key.isInteger()) { newArray.append(iter.secondVal()); } else { newArray.set(key, iter.secondVal(), true); } } } arr_array = std::move(newArray); arr_array->reset(); } return make_tv<KindOfInt64>(arr_array.size()); } // Handle collections assertx(cell_array->m_type == KindOfObject); auto* obj = cell_array->m_data.pobj; assertx(obj->isCollection()); switch (obj->collectionType()) { case CollectionType::Vector: { auto* vec = static_cast<c_Vector*>(obj); if (!args.empty()) { auto pos_limit = args->iter_end(); for (ssize_t pos = args->iter_last(); pos != pos_limit; pos = args->iter_rewind(pos)) { vec->addFront(args->nvGetVal(pos)); } } vec->addFront(*var.asTypedValue()); return make_tv<KindOfInt64>(vec->size()); } case CollectionType::Set: { auto* st = static_cast<c_Set*>(obj); if (!args.empty()) { auto pos_limit = args->iter_end(); for (ssize_t pos = args->iter_last(); pos != pos_limit; pos = args->iter_rewind(pos)) { st->addFront(args->nvGetVal(pos)); } } st->addFront(*var.asTypedValue()); return make_tv<KindOfInt64>(st->size()); } case CollectionType::Map: case CollectionType::Pair: case CollectionType::ImmVector: case CollectionType::ImmMap: case CollectionType::ImmSet: break; } raise_warning("%s() expects parameter 1 to be an array, Vector, or Set", __FUNCTION__+2 /* remove the "f_" prefix */); return make_tv<KindOfNull>(); } TypedValue HHVM_FUNCTION(array_values, const Variant& input) { if (input.isArray() || input.isClsMeth()) { return tvReturn(input.toVArray()); } folly::Optional<VArrayInit> ai; auto ok = IterateV(*input.asTypedValue(), [&](ArrayData* adata) { ai.emplace(adata->size()); }, [&](TypedValue v) { ai->append(v); }, [&](ObjectData* coll) { if (coll->collectionType() == CollectionType::Pair) { ai.emplace(2); } }, false); if (!ok) { raise_warning("array_values() expects parameter 1 to be an array " "or collection"); return make_tv<KindOfNull>(); } assertx(ai.has_value()); return tvReturn(ai->toArray()); } static int php_count_recursive(const Array& array) { long cnt = array.size(); for (ArrayIter iter(array); iter; ++iter) { Variant value = iter.second(); if (value.isArray()) { const Array& arr_value = value.asCArrRef(); check_recursion_throw(); cnt += php_count_recursive(arr_value); } } return cnt; } bool HHVM_FUNCTION(shuffle, Variant& array) { if (array.isClsMeth()) { raiseClsMethToVecWarningHelper(__FUNCTION__+2); return false; } if (!array.isArray()) { raise_expected_array_warning("shuffle"); return false; } array = ArrayUtil::Shuffle(array.asCArrRef()); return true; } enum class CountMode { NORMAL = 0, RECURSIVE = 1, }; int64_t HHVM_FUNCTION(count, const Variant& var, int64_t mode /* = 0 */) { switch (var.getType()) { case KindOfUninit: case KindOfNull: return 0; case KindOfBoolean: case KindOfInt64: case KindOfDouble: case KindOfPersistentString: case KindOfString: case KindOfResource: case KindOfFunc: case KindOfClass: return 1; case KindOfPersistentDArray: case KindOfDArray: case KindOfPersistentVArray: case KindOfVArray: case KindOfPersistentVec: case KindOfVec: case KindOfPersistentDict: case KindOfDict: case KindOfPersistentKeyset: case KindOfKeyset: case KindOfPersistentArray: case KindOfArray: if ((CountMode)mode == CountMode::RECURSIVE) { const Array& arr_var = var.asCArrRef(); return php_count_recursive(arr_var); } return var.getArrayData()->size(); case KindOfClsMeth: raiseClsMethToVecWarningHelper(); return 2; case KindOfObject: { Object obj = var.toObject(); if (obj->isCollection()) { return collections::getSize(obj.get()); } if (obj.instanceof(SystemLib::s_CountableClass)) { return obj->o_invoke_few_args(s_count, 0).toInt64(); } } return 1; case KindOfRecord: // TODO (T41258617) raise_error(Strings::RECORD_NOT_SUPPORTED); } not_reached(); } int64_t HHVM_FUNCTION(sizeof, const Variant& var) { return HHVM_FN(count)(var, 0); } namespace { enum class NoCow {}; template<class DoCow = void, class NonArrayRet, class OpPtr> static Variant iter_op_impl(Variant& refParam, OpPtr op, NonArrayRet nonArray, const std::string& fnName, bool(ArrayData::*pred)() const = &ArrayData::isInvalid) { auto& cell = *refParam.asTypedValue(); if (!isArrayLikeType(cell.m_type)) { raise_bad_type_warning("%s() expects array, was %s", fnName.c_str(), getDataTypeString(refParam.getType()).c_str()); return Variant(nonArray); } auto ad = cell.m_data.parr; auto constexpr doCow = !std::is_same<DoCow, NoCow>::value; if (doCow && ad->cowCheck() && !(ad->*pred)() && !ad->noCopyOnWrite()) { ad = ad->copy(); refParam = Variant::attach(ad); } return (ad->*op)(); } } Variant HHVM_FUNCTION(each, Variant& refParam) { return iter_op_impl( refParam, &ArrayData::each, Variant::NullInit(), "each" ); } Variant HHVM_FUNCTION(current, const Variant& refParam) { return iter_op_impl<NoCow>( // NoCow version never actually modifies refParam but // yet still requires non-const reference const_cast<Variant&>(refParam), &ArrayData::current, false, "current" ); } Variant HHVM_FUNCTION(key, const Variant& refParam) { return iter_op_impl<NoCow>( // NoCow version never actually modifies refParam but // yet still requires non-const reference const_cast<Variant&>(refParam), &ArrayData::key, false, "key" ); } Variant HHVM_FUNCTION(next, Variant& refParam) { return iter_op_impl( refParam, &ArrayData::next, false, "next" ); } Variant HHVM_FUNCTION(prev, Variant& refParam) { return iter_op_impl( refParam, &ArrayData::prev, false, "prev" ); } Variant HHVM_FUNCTION(reset, Variant& refParam) { return iter_op_impl( refParam, &ArrayData::reset, false, "reset", &ArrayData::isHead ); } Variant HHVM_FUNCTION(end, Variant& refParam) { return iter_op_impl( refParam, &ArrayData::end, false, "end", &ArrayData::isTail ); } bool HHVM_FUNCTION(in_array, const Variant& needle, const Variant& haystack, bool strict /* = false */) { bool ret = false; auto ok = strict ? IterateV(*haystack.asTypedValue(), [&](TypedValue v) -> bool { if (tvSame(v, *needle.asTypedValue())) { ret = true; return true; } return false; }) : IterateV(*haystack.asTypedValue(), [&](TypedValue v) -> bool { if (tvEqual(v, *needle.asTypedValue())) { ret = true; return true; } return false; }); if (UNLIKELY(!ok)) { raise_warning("in_array() expects parameter 2 to be an array " "or collection"); } return ret; } Variant array_search(const Variant& needle, const Variant& haystack, bool strict /* = false */) { Variant ret = false; auto ok = strict ? IterateKV(*haystack.asTypedValue(), [&](TypedValue k, TypedValue v) -> bool { if (tvSame(v, *needle.asTypedValue())) { ret = VarNR(k); return true; } return false; }) : IterateKV(*haystack.asTypedValue(), [&](TypedValue k, TypedValue v) -> bool { if (tvEqual(v, *needle.asTypedValue())) { ret = VarNR(k); return true; } return false; }); if (UNLIKELY(!ok)) { raise_warning("array_search() expects parameter 2 to be an array " "or collection"); return init_null(); } return ret; } TypedValue HHVM_FUNCTION(array_search, const Variant& needle, const Variant& haystack, bool strict /* = false */) { return tvReturn(array_search(needle, haystack, strict)); } TypedValue HHVM_FUNCTION(range, const Variant& low, const Variant& high, const Variant& step /* = 1 */) { bool is_step_double = false; double dstep = 1.0; if (step.isDouble()) { dstep = step.toDouble(); is_step_double = true; } else if (step.isString()) { int64_t sn; double sd; DataType stype = step.toString().get()->isNumericWithVal(sn, sd, 0); if (stype == KindOfDouble) { is_step_double = true; dstep = sd; } else if (stype == KindOfInt64) { dstep = (double)sn; } else { dstep = step.toDouble(); } } else { dstep = step.toDouble(); } /* We only want positive step values. */ if (dstep < 0.0) dstep *= -1; if (low.isString() && high.isString()) { String slow = low.toString(); String shigh = high.toString(); if (slow.size() >= 1 && shigh.size() >=1) { int64_t n1, n2; double d1, d2; DataType type1 = slow.get()->isNumericWithVal(n1, d1, 0); DataType type2 = shigh.get()->isNumericWithVal(n2, d2, 0); if (type1 == KindOfDouble || type2 == KindOfDouble || is_step_double) { if (type1 != KindOfDouble) d1 = slow.toDouble(); if (type2 != KindOfDouble) d2 = shigh.toDouble(); return tvReturn(ArrayUtil::Range(d1, d2, dstep)); } int64_t lstep = double_to_int64(dstep); if (type1 == KindOfInt64 || type2 == KindOfInt64) { if (type1 != KindOfInt64) n1 = slow.toInt64(); if (type2 != KindOfInt64) n2 = shigh.toInt64(); return tvReturn(ArrayUtil::Range(n1, n2, lstep)); } return tvReturn(ArrayUtil::Range((unsigned char)slow.charAt(0), (unsigned char)shigh.charAt(0), lstep)); } } if (low.is(KindOfDouble) || high.is(KindOfDouble) || is_step_double) { return tvReturn(ArrayUtil::Range(low.toDouble(), high.toDouble(), dstep)); } int64_t lstep = double_to_int64(dstep); return tvReturn(ArrayUtil::Range(low.toInt64(), high.toInt64(), lstep)); } /////////////////////////////////////////////////////////////////////////////// // diff/intersect helpers static int cmp_func(const Variant& v1, const Variant& v2, const void *data) { auto callback = static_cast<const Variant*>(data); return vm_call_user_func(*callback, make_vec_array(v1, v2)).toInt32(); } #define COMMA , #define diff_intersect_body(type, vararg, intersect_params) \ getCheckedArray(array1); \ if (!arr_array1.size()) { \ return tvReturn(empty_array()); \ } \ auto ret = arr_array1.type(array2, intersect_params); \ if (ret.size()) { \ for (ArrayIter iter(vararg); iter; ++iter) { \ ret = ret.type(iter.second(), intersect_params); \ if (!ret.size()) break; \ } \ } \ return tvReturn(std::move(ret)); /////////////////////////////////////////////////////////////////////////////// // diff functions static inline void addToSetHelper(const req::ptr<c_Set>& st, const TypedValue c, TypedValue* strTv, bool convertIntLikeStrs) { if (c.m_type == KindOfInt64) { st->add(c.m_data.num); } else { StringData* s; if (LIKELY(isStringType(c.m_type))) { s = c.m_data.pstr; } else { s = tvCastToStringData(c); decRefStr(strTv->m_data.pstr); strTv->m_data.pstr = s; } int64_t n; if (convertIntLikeStrs && s->isStrictlyInteger(n)) { st->add(n); } else { st->add(s); } } } static inline bool checkSetHelper(const req::ptr<c_Set>& st, const TypedValue c, TypedValue* strTv, bool convertIntLikeStrs) { if (c.m_type == KindOfInt64) { return st->contains(c.m_data.num); } StringData* s; if (LIKELY(isStringType(c.m_type))) { s = c.m_data.pstr; } else { s = tvCastToStringData(c); decRefStr(strTv->m_data.pstr); strTv->m_data.pstr = s; } int64_t n; if (convertIntLikeStrs && s->isStrictlyInteger(n)) { return st->contains(n); } return st->contains(s); } static void containerValuesToSetHelper(const req::ptr<c_Set>& st, const Variant& container) { Variant strHolder(empty_string_variant()); TypedValue* strTv = strHolder.asTypedValue(); for (ArrayIter iter(container); iter; ++iter) { auto const c = iter.secondValPlus(); addToSetHelper(st, c, strTv, true); } } static void containerKeysToSetHelper(const req::ptr<c_Set>& st, const Variant& container) { Variant strHolder(empty_string_variant()); TypedValue* strTv = strHolder.asTypedValue(); bool convertIntLikeStrs = !isArrayLikeType(container.asTypedValue()->m_type); for (ArrayIter iter(container); iter; ++iter) { addToSetHelper(st, *iter.first().asTypedValue(), strTv, convertIntLikeStrs); } } static inline void raiseIsClsMethWarning(const char* fn, int pos) { raise_warning( "%s() expects parameter %d to be an array or collection, clsmeth given", fn, pos); } static inline bool checkIsClsMethAndRaise( const char* fn, const Variant& arr1, int idx = 1) { if (arr1.isClsMeth()) { raiseIsClsMethWarning(fn, idx); return true; } return false; } static inline bool checkIsClsMethAndRaise( const char* fn, const Variant& arr1, const Variant& arr2) { if (checkIsClsMethAndRaise(fn, arr1, 1)) return true; if (checkIsClsMethAndRaise(fn, arr2, 2)) return true; return false; } TypedValue HHVM_FUNCTION(array_diff, const Variant& container1, const Variant& container2, const Array& args /* = null array */) { /* Check to make sure all inputs are containers */ const auto& c1 = *container1.asTypedValue(); const auto& c2 = *container2.asTypedValue(); if (isClsMethType(c1.m_type) || isClsMethType(c2.m_type)) { raiseIsClsMethWarning(__FUNCTION__+2, isClsMethType(c1.m_type) ? 1 : 2); return make_tv<KindOfNull>(); } if (UNLIKELY(!isContainer(c1) || !isContainer(c2))) { raise_warning("%s() expects parameter %d to be an array or collection", __FUNCTION__+2, /* remove the "f_" prefix */ isContainer(c1) ? 2 : 1); return make_tv<KindOfNull>(); } bool moreThanTwo = !args.empty(); size_t largestSize = getContainerSize(c2); if (UNLIKELY(moreThanTwo)) { int pos = 3; for (ArrayIter argvIter(args); argvIter; ++argvIter, ++pos) { auto const c = argvIter.secondVal(); if (!isContainer(c)) { raise_warning("%s() expects parameter %d to be an array or collection", __FUNCTION__+2, /* remove the "f_" prefix */ pos); return make_tv<KindOfNull>(); } size_t sz = getContainerSize(c); if (sz > largestSize) { largestSize = sz; } } } /* If container1 is empty, we can stop here and return the empty array */ if (!getContainerSize(c1)) { return make_persistent_array_like_tv(ArrayData::Create()); } /* If all of the containers (except container1) are empty, we can just return container1 (converting it to an array if needed) */ if (!largestSize) { if (isArrayLikeType(c1.m_type)) { return tvReturn(container1); } else { return tvReturn(container1.toArray<IntishCast::Cast>()); } } Array ret = Array::Create(); // Put all of the values from all the containers (except container1 into a // Set. All types aside from integer and string will be cast to string, and // we also convert int-like strings to integers. auto st = req::make<c_Set>(); st->reserve(largestSize); containerValuesToSetHelper(st, container2); if (UNLIKELY(moreThanTwo)) { for (ArrayIter argvIter(args); argvIter; ++argvIter) { containerValuesToSetHelper(st, VarNR(argvIter.secondVal())); } } // Loop over container1, only copying over key/value pairs where the value // is not present in the Set. When checking if a value is present in the // Set, any value that is not an integer or string is cast to a string, and // we convert int-like strings to integers. Variant strHolder(empty_string_variant()); TypedValue* strTv = strHolder.asTypedValue(); bool convertIntLikeStrs = !isArrayLikeType(c1.m_type); for (ArrayIter iter(container1); iter; ++iter) { auto const c = iter.secondValPlus(); if (checkSetHelper(st, c, strTv, true)) continue; auto const key = convertIntLikeStrs ? ret.convertKey<IntishCast::Cast>(iter.first()) : *iter.first().asTypedValue(); ret.set(key, iter.secondValPlus(), true); } return tvReturn(std::move(ret)); } namespace { template <typename T> ALWAYS_INLINE bool array_diff_intersect_key_inputs_ok(const TypedValue& c1, const TypedValue& c2, const ArrayData* args, const char* fname, T callback) { if (isClsMethType(c1.m_type) || isClsMethType(c2.m_type)) { raiseIsClsMethWarning(fname, isClsMethType(c1.m_type) ? 1 : 2); return false; } if (!isContainer(c1) || !isContainer(c2)) { raise_warning("%s() expects parameter %d to be an array or collection", fname, isContainer(c1) ? 2 : 1); return false; } callback(getContainerSize(c2)); bool ok = true; IterateKVNoInc(args, [&](TypedValue k, TypedValue v) { assertx(k.m_type == KindOfInt64); if (isClsMethType(v.m_type)) { raiseIsClsMethWarning(fname, k.m_data.num + 3); ok = false; return true; } if (!isContainer(v)) { raise_warning("%s() expects parameter %ld to be an array or collection", fname, k.m_data.num + 3); ok = false; return true; } callback(getContainerSize(v)); return false; }); return ok; } template <bool diff, bool coerceThis, bool coerceAd, typename SI, typename SS> ALWAYS_INLINE void array_diff_intersect_key_check_arr(ArrayData* ad, TypedValue k, TypedValue v, SI setInt, SS setStr) { if (k.m_type == KindOfInt64) { if (ad->exists(k.m_data.num)) { if (!diff) setInt(k.m_data.num, v); return; } if (coerceAd) { // Also need to check if ad has a key that will coerce to this int value. auto s = String::attach(buildStringData(k.m_data.num)); if (ad->exists(s.get())) { if (!diff) setInt(k.m_data.num, v); return; } } if (diff) setInt(k.m_data.num, v); return; } if (coerceThis) { int64_t n; if (k.m_data.pstr->isStrictlyInteger(n)) { if (ad->exists(n)) { if (!diff) setInt(n, v); return; } if (coerceAd) { // Also need to check if ad has a key that will coerce to this int // value (as did this key). if (ad->exists(k.m_data.pstr)) { if (!diff) setInt(n, v); return; } } if (diff) setInt(n, v); return; } } else if (coerceAd) { // We're coercing keys from ad, but not this. If this string key // isStrictlyInteger it can never match a key from ad after that key // is coerced. int64_t n; if (k.m_data.pstr->isStrictlyInteger(n)) { if (diff) setStr(k.m_data.pstr, v); return; } } if (ad->exists(k.m_data.pstr)) { if (!diff) setStr(k.m_data.pstr, v); } else { if (diff) setStr(k.m_data.pstr, v); } } template <bool diff, bool coerceThis, typename SI, typename SS> ALWAYS_INLINE void array_diff_intersect_key_check_pair(TypedValue k, TypedValue v, SI setInt, SS setStr) { if (k.m_type == KindOfInt64) { if (k.m_data.num == 0 || k.m_data.num == 1) { if (!diff) setInt(k.m_data.num, v); } else { if (diff) setInt(k.m_data.num, v); } return; } if (coerceThis) { int64_t n; if (k.m_data.pstr->isStrictlyInteger(n)) { if (n == 0 || n == 1) { if (!diff) setInt(n, v); } else { if (diff) setInt(n, v); } return; } } if (diff) setStr(k.m_data.pstr, v); } template <bool coerceThis, bool coerceAd, typename SP> ALWAYS_INLINE void array_intersect_key_check_pos(const ArrayData* ad, TypedValue k, SP setPos) { if (k.m_type == KindOfInt64) { setPos(ad->nvGetIntPos(k.m_data.num)); if (coerceAd) { auto const s = String::attach(buildStringData(k.m_data.num)); setPos(ad->nvGetStrPos(s.get())); } return; } if (coerceThis || coerceAd) { int64_t n; if (k.m_data.pstr->isStrictlyInteger(n)) { if (coerceThis) setPos(ad->nvGetIntPos(n)); // If we're only coercing keys on one side, then this isStrictlyInteger // key can't match as a string. if (coerceThis != coerceAd) return; } } setPos(ad->nvGetStrPos(k.m_data.pstr)); } } TypedValue HHVM_FUNCTION(array_diff_key, const Variant& container1, const Variant& container2, const Array& args /* = null array */) { const auto& c1 = *container1.asTypedValue(); const auto& c2 = *container2.asTypedValue(); size_t largestSize = 0; auto check_cb = [&] (size_t s) { if (s > largestSize) largestSize = s; }; if (!array_diff_intersect_key_inputs_ok(c1, c2, args.get(), "array_diff_key", check_cb)) { return make_tv<KindOfNull>(); } if (getContainerSize(c1) == 0) { return make_persistent_array_like_tv(ArrayData::Create()); } if (largestSize == 0) { if (isArrayLikeType(c1.m_type)) { return tvReturn(container1); } else { return tvReturn(container1.toArray<IntishCast::Cast>()); } } auto diff_step = [](TypedValue left, TypedValue right) { auto leftSize = getContainerSize(left); // If we have more than 2 args, the left input could end up empty if (leftSize == 0) return empty_array(); ArrayInit ret(leftSize, ArrayInit::Map{}); auto setInt = [&](int64_t k, TypedValue v) { ret.set(k, v); }; auto setStr = [&](StringData* k, TypedValue v) { ret.set(k, v); }; auto iterate_left_with = [&](auto test_key) { IterateKV(left, test_key); }; // rightAd will be the backing ArrayData for right, or nullptr if right // is a Pair auto rightAd = [&](){ if (isArrayLikeType(type(right))) return right.m_data.parr; return collections::asArray(right.m_data.pobj); }(); // For historical reasons, we coerce intish string keys only when they // came from a hack collection. We also need to do the lookup in the right // array differently if right was a Pair (and so rightAd is nullptr) if (!rightAd) { if (isArrayLikeType(type(left))) { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_pair<true, false>( k, v, setInt, setStr); }); } else { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_pair<true, true>( k, v, setInt, setStr); }); } } else { if (isArrayLikeType(type(left))) { if (isArrayLikeType(type(right))) { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<true, false, false>( rightAd, k, v, setInt, setStr); }); } else { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<true, false, true>( rightAd, k, v, setInt, setStr); }); } } else { if (isArrayLikeType(type(right))) { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<true, true, false>( rightAd, k, v, setInt, setStr); }); } else { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<true, true, true>( rightAd, k, v, setInt, setStr); }); } } } return ret.toArray(); }; auto ret = diff_step(c1, c2); IterateVNoInc(args.get(), [&](TypedValue v) { ret = diff_step(make_array_like_tv(ret.get()), v); }); return make_array_like_tv(ret.detach()); } TypedValue HHVM_FUNCTION(array_udiff, const Variant& array1, const Variant& array2, const Variant& data_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = data_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(diff, extra, false COMMA true COMMA NULL COMMA NULL COMMA cmp_func COMMA &func); } TypedValue HHVM_FUNCTION(array_diff_assoc, const Variant& array1, const Variant& array2, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } diff_intersect_body(diff, args, true COMMA true); } TypedValue HHVM_FUNCTION(array_diff_uassoc, const Variant& array1, const Variant& array2, const Variant& key_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = key_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(diff, extra, true COMMA true COMMA cmp_func COMMA &func); } TypedValue HHVM_FUNCTION(array_udiff_assoc, const Variant& array1, const Variant& array2, const Variant& data_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = data_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(diff, extra, true COMMA true COMMA NULL COMMA NULL COMMA cmp_func COMMA &func); } TypedValue HHVM_FUNCTION(array_udiff_uassoc, const Variant& array1, const Variant& array2, const Variant& data_compare_func, const Variant& key_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant data_func = data_compare_func; Variant key_func = key_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(key_func); extra.prepend(data_func); key_func = extra.pop(); data_func = extra.pop(); } diff_intersect_body(diff, extra, true COMMA true COMMA cmp_func COMMA &key_func COMMA cmp_func COMMA &data_func); } TypedValue HHVM_FUNCTION(array_diff_ukey, const Variant& array1, const Variant& array2, const Variant& key_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = key_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(diff, extra, true COMMA false COMMA cmp_func COMMA &func); } /////////////////////////////////////////////////////////////////////////////// // intersect functions static inline TypedValue* makeContainerListHelper(const Variant& a, const Array& argv, int count, int smallestPos) { assertx(count == argv.size() + 1); assertx(0 <= smallestPos); assertx(smallestPos < count); // Allocate a TypedValue array and copy 'a' and the contents of 'argv' TypedValue* containers = req::make_raw_array<TypedValue>(count); tvCopy(*a.asTypedValue(), containers[0]); int pos = 1; for (ArrayIter argvIter(argv); argvIter; ++argvIter, ++pos) { tvCopy(argvIter.secondVal(), containers[pos]); } // Perform a swap so that the smallest container occurs at the first // position in the TypedValue array; this helps improve the performance // of containerValuesIntersectHelper() if (smallestPos != 0) { TypedValue tmp; tvCopy(containers[0], tmp); tvCopy(containers[smallestPos], containers[0]); tvCopy(tmp, containers[smallestPos]); } return containers; } static inline void addToIntersectMapHelper(const req::ptr<c_Map>& mp, const TypedValue c, TypedValue* intOneTv, TypedValue* strTv, bool convertIntLikeStrs) { if (c.m_type == KindOfInt64) { mp->set(c.m_data.num, *intOneTv); } else { StringData* s; if (LIKELY(isStringType(c.m_type))) { s = c.m_data.pstr; } else { s = tvCastToStringData(c); decRefStr(strTv->m_data.pstr); strTv->m_data.pstr = s; } int64_t n; if (convertIntLikeStrs && s->isStrictlyInteger(n)) { mp->set(n, *intOneTv); } else { mp->set(s, *intOneTv); } } } static inline void updateIntersectMapHelper(const req::ptr<c_Map>& mp, const TypedValue c, int pos, TypedValue* strTv, bool convertIntLikeStrs) { if (c.m_type == KindOfInt64) { auto val = mp->get(c.m_data.num); if (val && val->m_data.num == pos) { assertx(val->m_type == KindOfInt64); ++val->m_data.num; } } else { StringData* s; if (LIKELY(isStringType(c.m_type))) { s = c.m_data.pstr; } else { s = tvCastToStringData(c); decRefStr(strTv->m_data.pstr); strTv->m_data.pstr = s; } int64_t n; if (convertIntLikeStrs && s->isStrictlyInteger(n)) { auto val = mp->get(n); if (val && val->m_data.num == pos) { assertx(val->m_type == KindOfInt64); ++val->m_data.num; } } else { auto val = mp->get(s); if (val && val->m_data.num == pos) { assertx(val->m_type == KindOfInt64); ++val->m_data.num; } } } } static void containerValuesIntersectHelper(const req::ptr<c_Set>& st, TypedValue* containers, int count) { assertx(count >= 2); auto mp = req::make<c_Map>(); Variant strHolder(empty_string_variant()); TypedValue* strTv = strHolder.asTypedValue(); TypedValue intOneTv = make_tv<KindOfInt64>(1); for (ArrayIter iter(tvAsCVarRef(&containers[0])); iter; ++iter) { auto const c = iter.secondValPlus(); // For each value v in containers[0], we add the key/value pair (v, 1) // to the map. If a value (after various conversions) occurs more than // once in the container, we'll simply overwrite the old entry and that's // fine. addToIntersectMapHelper(mp, c, &intOneTv, strTv, true); } for (int pos = 1; pos < count; ++pos) { for (ArrayIter iter(tvAsCVarRef(&containers[pos])); iter; ++iter) { auto const c = iter.secondValPlus(); // We check if the value is present as a key in the map. If an entry // exists and its value equals pos, we increment it, otherwise we do // nothing. This is essential so that we don't accidentally double-count // a key (after various conversions) that occurs in the container more // than once. updateIntersectMapHelper(mp, c, pos, strTv, true); } } for (ArrayIter iter(mp.get()); iter; ++iter) { // For each key in the map, we copy the key to the set if the // corresponding value is equal to pos exactly (which means it // was present in all of the containers). auto const tv = iter.secondValPlus(); assertx(type(tv) == KindOfInt64); if (val(tv).num == count) { st->add(*iter.first().asTypedValue()); } } } static void containerKeysIntersectHelper(const req::ptr<c_Set>& st, TypedValue* containers, int count) { assertx(count >= 2); auto mp = req::make<c_Map>(); Variant strHolder(empty_string_variant()); TypedValue* strTv = strHolder.asTypedValue(); TypedValue intOneTv = make_tv<KindOfInt64>(1); bool convertIntLikeStrs = !isArrayLikeType(containers[0].m_type); for (ArrayIter iter(tvAsCVarRef(&containers[0])); iter; ++iter) { auto key = iter.first(); const auto& c = *key.asTypedValue(); // For each key k in containers[0], we add the key/value pair (k, 1) // to the map. If a key (after various conversions) occurs more than // once in the container, we'll simply overwrite the old entry and // that's fine. addToIntersectMapHelper(mp, c, &intOneTv, strTv, convertIntLikeStrs); } for (int pos = 1; pos < count; ++pos) { convertIntLikeStrs = !isArrayLikeType(containers[pos].m_type); for (ArrayIter iter(tvAsCVarRef(&containers[pos])); iter; ++iter) { auto key = iter.first(); const auto& c = *key.asTypedValue(); updateIntersectMapHelper(mp, c, pos, strTv, convertIntLikeStrs); } } for (ArrayIter iter(mp.get()); iter; ++iter) { // For each key in the map, we copy the key to the set if the // corresponding value is equal to pos exactly (which means it // was present in all of the containers). auto const tv = iter.secondValPlus(); assertx(type(tv) == KindOfInt64); if (val(tv).num == count) { st->add(*iter.first().asTypedValue()); } } } TypedValue HHVM_FUNCTION(array_intersect, const Variant& container1, const Variant& container2, const Array& args /* = null array */) { /* Check to make sure all inputs are containers */ const auto& c1 = *container1.asTypedValue(); const auto& c2 = *container2.asTypedValue(); if (isClsMethType(c1.m_type) || isClsMethType(c2.m_type)) { raiseIsClsMethWarning(__FUNCTION__+2, isClsMethType(c1.m_type) ? 1 : 2); return make_tv<KindOfNull>(); } if (!isContainer(c1) || !isContainer(c2)) { raise_warning("%s() expects parameter %d to be an array or collection", __FUNCTION__+2, /* remove the "f_" prefix */ isContainer(c1) ? 2 : 1); return make_tv<KindOfNull>(); } bool moreThanTwo = !args.empty(); /* Keep track of which input container was the smallest (excluding container1) */ int smallestPos = 0; size_t smallestSize = getContainerSize(c2); if (UNLIKELY(moreThanTwo)) { int pos = 1; for (ArrayIter argvIter(args); argvIter; ++argvIter, ++pos) { auto const c = argvIter.secondVal(); if (!isContainer(c)) { raise_warning("%s() expects parameter %d to be an array or collection", __FUNCTION__+2, /* remove the "f_" prefix */ pos+2); return make_tv<KindOfNull>(); } size_t sz = getContainerSize(c); if (sz < smallestSize) { smallestSize = sz; smallestPos = pos; } } } /* If any of the containers were empty, we can stop here and return the empty array */ if (!getContainerSize(c1) || !smallestSize) { return make_persistent_array_like_tv(ArrayData::Create()); } Array ret = Array::Create(); // Build up a Set containing the values that are present in all the // containers (except container1) auto st = req::make<c_Set>(); if (LIKELY(!moreThanTwo)) { // There is only one container (not counting container1) so we can // just call containerValuesToSetHelper() to build the Set. containerValuesToSetHelper(st, container2); } else { // We're dealing with three or more containers. Copy all of the containers // (except the first) into a TypedValue array. int count = args.size() + 1; TypedValue* containers = makeContainerListHelper(container2, args, count, smallestPos); SCOPE_EXIT { req::free(containers); }; // Build a Set of the values that were present in all of the containers containerValuesIntersectHelper(st, containers, count); } // Loop over container1, only copying over key/value pairs where the value // is present in the Set. When checking if a value is present in the Set, // any value that is not an integer or string is cast to a string, and we // convert int-like strings to integers. Variant strHolder(empty_string_variant()); TypedValue* strTv = strHolder.asTypedValue(); bool convertIntLikeStrs = !isArrayLikeType(c1.m_type); for (ArrayIter iter(container1); iter; ++iter) { auto const c = iter.secondValPlus(); if (!checkSetHelper(st, c, strTv, true)) continue; const auto key = convertIntLikeStrs ? Variant::wrap(ret.convertKey<IntishCast::Cast>(iter.first())) : iter.first(); ret.set(key, iter.secondValPlus(), true); } return tvReturn(std::move(ret)); } TypedValue HHVM_FUNCTION(array_intersect_key, const Variant& container1, const Variant& container2, const Array& args /* = null array */) { const auto& c1 = *container1.asTypedValue(); const auto& c2 = *container2.asTypedValue(); bool empty_arg = false; auto check_cb = [&] (size_t s) { if (s == 0) empty_arg = true; }; if (!array_diff_intersect_key_inputs_ok(c1, c2, args.get(), "array_intersect_key", check_cb)) { return make_tv<KindOfNull>(); } if ((getContainerSize(c1) == 0) || empty_arg) { return make_persistent_array_like_tv(ArrayData::Create()); } auto intersect_step = [](TypedValue left, TypedValue right) { auto leftSize = getContainerSize(left); // If we have more than 2 args, the left input could end up empty if (leftSize == 0) return empty_array(); auto rightSize = getContainerSize(right); if (leftSize > rightSize + 2) { // left is bigger than right, so try to reduce the number of hash lookups // by iterating right and probing left auto leftAd = [&](){ if (isArrayLikeType(type(left))) return left.m_data.parr; return collections::asArray(left.m_data.pobj); }(); // we can't get a null leftAd because leftSize is at least 3 (which // precludes Pairs) assertx(leftAd); auto const left_end = leftAd->iter_end(); std::vector<ssize_t> positions; // we can technically end up with up to rightSize*2 entries due to // intish key casting, but that is unlikely positions.reserve(rightSize); auto setPos = [&](ssize_t pos) { if (pos != left_end) positions.push_back(pos); }; auto iterate_right_with = [&](auto test_key) { IterateKV(right, test_key); }; // For historical reasons, we coerce intish string keys only when they // came from a hack collection. auto coerceLeft = !isArrayLikeType(type(left)); auto coerceRight = !isArrayLikeType(type(right)); if (coerceLeft) { if (coerceRight) { iterate_right_with([&](TypedValue k, TypedValue) { array_intersect_key_check_pos<true, true>(leftAd, k, setPos); }); } else { iterate_right_with([&](TypedValue k, TypedValue) { array_intersect_key_check_pos<false, true>(leftAd, k, setPos); }); } } else { if (coerceRight) { iterate_right_with([&](TypedValue k, TypedValue) { array_intersect_key_check_pos<true, false>(leftAd, k, setPos); }); } else { iterate_right_with([&](TypedValue k, TypedValue) { array_intersect_key_check_pos<false, false>(leftAd, k, setPos); }); } } if (positions.empty()) return empty_array(); std::sort(positions.begin(), positions.end()); positions.erase( std::unique(positions.begin(), positions.end()), positions.end() ); assertx(positions.size() <= leftSize); if (positions.size() == leftSize) { if (coerceLeft) { return Array(leftAd).toPHPArrayIntishCast(); } else { return Array(leftAd).toPHPArray(); } } ArrayInit ret(positions.size(), ArrayInit::Map{}); if (coerceLeft) { for (auto pos : positions) { auto const k = leftAd->nvGetKey(pos); if (k.m_type == KindOfInt64) { ret.set(k.m_data.num, leftAd->nvGetVal(pos)); } else { int64_t n; if (k.m_data.pstr->isStrictlyInteger(n)) { ret.set(n, leftAd->nvGetVal(pos)); } else { ret.set(k.m_data.pstr, leftAd->nvGetVal(pos)); } } } } else { for (auto pos : positions) { ret.set(leftAd->nvGetKey(pos), leftAd->nvGetVal(pos)); } } return ret.toArray(); } ArrayInit ret(leftSize, ArrayInit::Map{}); auto setInt = [&](int64_t k, TypedValue v) { ret.set(k, v); }; auto setStr = [&](StringData* k, TypedValue v) { ret.set(k, v); }; auto iterate_left_with = [&](auto test_key) { IterateKV(left, test_key); }; // rightAd will be the backing ArrayData for right, or nullptr if right // is a Pair auto rightAd = [&](){ if (isArrayLikeType(type(right))) return right.m_data.parr; return collections::asArray(right.m_data.pobj); }(); // For historical reasons, we coerce intish string keys only when they // came from a hack collection. We also need to do the lookup in the right // array differently if right was a Pair (and so rightAd is nullptr) if (!rightAd) { if (isArrayLikeType(type(left))) { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_pair<false, false>( k, v, setInt, setStr); }); } else { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_pair<false, true>( k, v, setInt, setStr); }); } } else { if (isArrayLikeType(type(left))) { if (isArrayLikeType(type(right))) { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<false, false, false>( rightAd, k, v, setInt, setStr); }); } else { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<false, false, true>( rightAd, k, v, setInt, setStr); }); } } else { if (isArrayLikeType(type(right))) { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<false, true, false>( rightAd, k, v, setInt, setStr); }); } else { iterate_left_with([&](TypedValue k, TypedValue v) { array_diff_intersect_key_check_arr<false, true, true>( rightAd, k, v, setInt, setStr); }); } } } return ret.toArray(); }; auto ret = intersect_step(c1, c2); IterateVNoInc(args.get(), [&](TypedValue v) { ret = intersect_step(make_array_like_tv(ret.get()), v); }); return make_array_like_tv(ret.detach()); } TypedValue HHVM_FUNCTION(array_uintersect, const Variant& array1, const Variant& array2, const Variant& data_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = data_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(intersect, extra, false COMMA true COMMA NULL COMMA NULL COMMA cmp_func COMMA &func); } TypedValue HHVM_FUNCTION(array_intersect_assoc, const Variant& array1, const Variant& array2, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } diff_intersect_body(intersect, args, true COMMA true); } TypedValue HHVM_FUNCTION(array_intersect_uassoc, const Variant& array1, const Variant& array2, const Variant& key_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = key_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(intersect, extra, true COMMA true COMMA cmp_func COMMA &func); } TypedValue HHVM_FUNCTION(array_uintersect_assoc, const Variant& array1, const Variant& array2, const Variant& data_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = data_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(intersect, extra, true COMMA true COMMA NULL COMMA NULL COMMA cmp_func COMMA &func); } TypedValue HHVM_FUNCTION(array_uintersect_uassoc, const Variant& array1, const Variant& array2, const Variant& data_compare_func, const Variant& key_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant data_func = data_compare_func; Variant key_func = key_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(key_func); extra.prepend(data_func); key_func = extra.pop(); data_func = extra.pop(); } diff_intersect_body(intersect, extra, true COMMA true COMMA cmp_func COMMA &key_func COMMA cmp_func COMMA &data_func); } TypedValue HHVM_FUNCTION(array_intersect_ukey, const Variant& array1, const Variant& array2, const Variant& key_compare_func, const Array& args /* = null array */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array1, array2)) { return make_tv<KindOfNull>(); } Variant func = key_compare_func; Array extra = args; if (!extra.empty()) { extra.prepend(func); func = extra.pop(); } diff_intersect_body(intersect, extra, true COMMA false COMMA cmp_func COMMA &func); } /////////////////////////////////////////////////////////////////////////////// // sorting functions struct Collator final : RequestEventHandler { String getLocale() { return m_locale; } Intl::IntlError &getErrorRef() { return m_errcode; } bool setLocale(const String& locale) { if (m_locale.same(locale)) { return true; } if (m_ucoll) { ucol_close(m_ucoll); m_ucoll = NULL; } m_errcode.clearError(); UErrorCode error = U_ZERO_ERROR; m_ucoll = ucol_open(locale.data(), &error); if (m_ucoll == NULL) { raise_warning("failed to load %s locale from icu data", locale.data()); return false; } if (U_FAILURE(error)) { m_errcode.setError(error); ucol_close(m_ucoll); m_ucoll = NULL; return false; } m_locale = locale; return true; } UCollator *getCollator() { return m_ucoll; } bool setAttribute(int64_t attr, int64_t val) { if (!m_ucoll) { Logger::Verbose("m_ucoll is NULL"); return false; } m_errcode.clearError(); UErrorCode error = U_ZERO_ERROR; ucol_setAttribute(m_ucoll, (UColAttribute)attr, (UColAttributeValue)val, &error); if (U_FAILURE(error)) { m_errcode.setError(error); Logger::Verbose("Error setting attribute value"); return false; } return true; } bool setStrength(int64_t strength) { if (!m_ucoll) { Logger::Verbose("m_ucoll is NULL"); return false; } ucol_setStrength(m_ucoll, (UCollationStrength)strength); return true; } Variant getErrorCode() { if (!m_ucoll) { Logger::Verbose("m_ucoll is NULL"); return false; } return m_errcode.getErrorCode(); } void requestInit() override { m_locale = String(uloc_getDefault(), CopyString); m_errcode.clearError(); UErrorCode error = U_ZERO_ERROR; m_ucoll = ucol_open(m_locale.data(), &error); if (U_FAILURE(error)) { m_errcode.setError(error); } assertx(m_ucoll); } void requestShutdown() override { m_locale.reset(); m_errcode.clearError(false); if (m_ucoll) { ucol_close(m_ucoll); m_ucoll = NULL; } } private: String m_locale; UCollator *m_ucoll; Intl::IntlError m_errcode; }; IMPLEMENT_STATIC_REQUEST_LOCAL(Collator, s_collator); namespace { struct ArraySortTmp { ArraySortTmp(TypedValue* arr, SortFunction sf) : m_arr(arr) { m_ad = arr->m_data.parr->escalateForSort(sf); assertx(m_ad == val(arr).parr || m_ad->empty() || m_ad->hasExactlyOneRef()); } ~ArraySortTmp() { if (m_ad != val(m_arr).parr) { auto tmp = Array::attach(val(m_arr).parr); val(m_arr).parr = m_ad; type(m_arr) = m_ad->toDataType(); } } ArrayData* operator->() { return m_ad; } private: TypedValue* m_arr; ArrayData* m_ad; }; } static bool php_sort(Variant& container, int sort_flags, bool ascending) { if (container.isArray()) { SortFunction sf = getSortFunction(SORTFUNC_SORT, ascending); ArraySortTmp ast(container.asTypedValue(), sf); ast->sort(sort_flags, ascending); return true; } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection() && obj->collectionType() == CollectionType::Vector) { SortFunction sf = getSortFunction(SORTFUNC_SORT, ascending); c_Vector::SortTmp vst(static_cast<c_Vector*>(obj), sf); vst->sort(sort_flags, ascending); return true; } // other collections are not supported: // - Maps and Sets require associative sort // - Immutable collections are not to be modified } raise_expected_array_or_collection_warning(ascending ? "sort" : "rsort"); return false; } static bool php_asort(Variant& container, int sort_flags, bool ascending) { if (container.isArray()) { SortFunction sf = getSortFunction(SORTFUNC_ASORT, ascending); ArraySortTmp ast(container.asTypedValue(), sf); ast->asort(sort_flags, ascending); return true; } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection()) { auto type = obj->collectionType(); if (type == CollectionType::Map || type == CollectionType::Set) { SortFunction sf = getSortFunction(SORTFUNC_ASORT, ascending); HashCollection::SortTmp hst(static_cast<HashCollection*>(obj), sf); hst->asort(sort_flags, ascending); return true; } } } raise_expected_array_or_collection_warning(ascending ? "asort" : "arsort"); return false; } static bool php_ksort(Variant& container, int sort_flags, bool ascending) { if (container.isArray()) { SortFunction sf = getSortFunction(SORTFUNC_KSORT, ascending); ArraySortTmp ast(container.asTypedValue(), sf); ast->ksort(sort_flags, ascending); return true; } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection()) { auto type = obj->collectionType(); if (type == CollectionType::Map || type == CollectionType::Set) { SortFunction sf = getSortFunction(SORTFUNC_KSORT, ascending); HashCollection::SortTmp hst(static_cast<HashCollection*>(obj), sf); hst->ksort(sort_flags, ascending); return true; } } } raise_expected_array_or_collection_warning(ascending ? "ksort" : "krsort"); return false; } bool HHVM_FUNCTION(sort, Variant& array, int sort_flags /* = 0 */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_sort(array, sort_flags, true); } bool HHVM_FUNCTION(rsort, Variant& array, int sort_flags /* = 0 */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_sort(array, sort_flags, false); } bool HHVM_FUNCTION(asort, Variant& array, int sort_flags /* = 0 */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_asort(array, sort_flags, true); } bool HHVM_FUNCTION(arsort, Variant& array, int sort_flags /* = 0 */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_asort(array, sort_flags, false); } bool HHVM_FUNCTION(ksort, Variant& array, int sort_flags /* = 0 */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_ksort(array, sort_flags, true); } bool HHVM_FUNCTION(krsort, Variant& array, int sort_flags /* = 0 */) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_ksort(array, sort_flags, false); } bool HHVM_FUNCTION(natsort, Variant& array) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_asort(array, SORT_NATURAL, true); } bool HHVM_FUNCTION(natcasesort, Variant& array) { if (checkIsClsMethAndRaise( __FUNCTION__+2, array)) return false; return php_asort(array, SORT_NATURAL_CASE, true); } bool HHVM_FUNCTION(usort, Variant& container, const Variant& cmp_function) { if (checkIsClsMethAndRaise( __FUNCTION__+2, container)) return false; if (container.isArray()) { ArraySortTmp ast(container.asTypedValue(), SORTFUNC_USORT); return ast->usort(cmp_function); } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection()) { if (obj->collectionType() == CollectionType::Vector) { c_Vector::SortTmp vst(static_cast<c_Vector*>(obj), SORTFUNC_USORT); return vst->usort(cmp_function); } } // other collections are not supported: // - Maps and Sets require associative sort // - Immutable collections are not to be modified } raise_expected_array_or_collection_warning("usort"); return false; } bool HHVM_FUNCTION(uasort, Variant& container, const Variant& cmp_function) { if (checkIsClsMethAndRaise( __FUNCTION__+2, container)) return false; if (container.isArray()) { ArraySortTmp ast(container.asTypedValue(), SORTFUNC_UASORT); return ast->uasort(cmp_function); } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection()) { auto type = obj->collectionType(); if (type == CollectionType::Map || type == CollectionType::Set) { HashCollection::SortTmp hst(static_cast<HashCollection*>(obj), SORTFUNC_UASORT); return hst->uasort(cmp_function); } } // other collections are not supported: // - Vectors require a non-associative sort // - Immutable collections are not to be modified } raise_expected_array_or_collection_warning("uasort"); return false; } bool HHVM_FUNCTION(uksort, Variant& container, const Variant& cmp_function) { if (checkIsClsMethAndRaise( __FUNCTION__+2, container)) return false; if (container.isArray()) { ArraySortTmp ast(container.asTypedValue(), SORTFUNC_UKSORT); return ast->uksort(cmp_function); } if (container.isObject()) { ObjectData* obj = container.getObjectData(); if (obj->isCollection()) { auto type = obj->collectionType(); if (type == CollectionType::Map || type == CollectionType::Set) { HashCollection::SortTmp hst(static_cast<HashCollection*>(obj), SORTFUNC_UKSORT); return hst->uksort(cmp_function); } } // other collections are not supported: // - Vectors require a non-associative sort // - Immutable collections are not to be modified } raise_expected_array_or_collection_warning("uksort"); return false; } TypedValue HHVM_FUNCTION(array_unique, const Variant& array, int sort_flags /* = 2 */) { getCheckedArray(array); switch (sort_flags) { case SORT_STRING: case SORT_LOCALE_STRING: return tvReturn(ArrayUtil::StringUnique(arr_array)); case SORT_NUMERIC: return tvReturn(ArrayUtil::NumericUnique(arr_array)); case SORT_REGULAR: default: return tvReturn(ArrayUtil::RegularSortUnique(arr_array)); } } String HHVM_FUNCTION(i18n_loc_get_default) { return s_collator->getLocale(); } bool HHVM_FUNCTION(i18n_loc_set_default, const String& locale) { return s_collator->setLocale(locale); } bool HHVM_FUNCTION(i18n_loc_set_attribute, int64_t attr, int64_t val) { return s_collator->setAttribute(attr, val); } bool HHVM_FUNCTION(i18n_loc_set_strength, int64_t strength) { return s_collator->setStrength(strength); } Variant HHVM_FUNCTION(i18n_loc_get_error_code) { return s_collator->getErrorCode(); } TypedValue HHVM_FUNCTION(hphp_array_idx, const Variant& search, const Variant& key, const Variant& def) { if (!key.isNull()) { if (LIKELY(search.isArray())) { ArrayData *arr = search.getArrayData(); auto const index = key.toKey(arr).tv(); if (!isNullType(index.m_type)) { auto const ret = arr->get(index, false); return tvReturn(ret.is_init() ? tvAsCVarRef(ret) : def); } } else { raise_error("hphp_array_idx: search must be an array"); } } return tvReturn(def); } static Array::PFUNC_CMP get_cmp_func(int sort_flags, bool ascending) { switch (sort_flags) { case SORT_NATURAL: return ascending ? Array::SortNaturalAscending : Array::SortNaturalDescending; case SORT_NATURAL_CASE: return ascending ? Array::SortNaturalCaseAscending: Array::SortNaturalCaseDescending; case SORT_NUMERIC: return ascending ? Array::SortNumericAscending : Array::SortNumericDescending; case SORT_STRING: return ascending ? Array::SortStringAscending : Array::SortStringDescending; case SORT_STRING_CASE: return ascending ? Array::SortStringAscendingCase : Array::SortStringDescendingCase; case SORT_LOCALE_STRING: return ascending ? Array::SortLocaleStringAscending : Array::SortLocaleStringDescending; case SORT_REGULAR: default: return ascending ? Array::SortRegularAscending : Array::SortRegularDescending; } } namespace { bool array_multisort_impl( Variant* arg1, Variant* arg2 = nullptr, Variant* arg3 = nullptr, Variant* arg4 = nullptr, Variant* arg5 = nullptr, Variant* arg6 = nullptr, Variant* arg7 = nullptr, Variant* arg8 = nullptr, Variant* arg9 = nullptr ) { if (!arg1->isPHPArray()) { if (arg1->isClsMeth()) { raiseIsClsMethWarning("array_multisort", 1); return false; } raise_expected_array_warning("array_multisort"); return false; } std::vector<Array::SortData> data; std::vector<Array> arrays; arrays.reserve(9); // so no resize would happen Array::SortData sd; sd.original = arg1; arrays.push_back(Array(sd.original->getArrayData())); sd.array = &arrays.back(); sd.by_key = false; int sort_flags = SORT_REGULAR; bool ascending = true; auto const handleArg = [&] (Variant* arg) { if (!arg || arg->isNull()) return; if (arg->isArray()) { sd.cmp_func = get_cmp_func(sort_flags, ascending); data.push_back(sd); sort_flags = SORT_REGULAR; ascending = true; sd.original = arg; arrays.push_back(Array(sd.original->getArrayData())); sd.array = &arrays.back(); } else { int n = arg->toInt64(); if (n == SORT_ASC) { } else if (n == SORT_DESC) { ascending = false; } else { sort_flags = n; } } }; handleArg(arg2); handleArg(arg3); handleArg(arg4); handleArg(arg5); handleArg(arg6); handleArg(arg7); handleArg(arg8); handleArg(arg9); sd.cmp_func = get_cmp_func(sort_flags, ascending); data.push_back(sd); return Array::MultiSort(data); } } // anonymous namespace bool HHVM_FUNCTION(array_multisort1, Variant& arg1) { return array_multisort_impl(&arg1); } bool HHVM_FUNCTION(array_multisort2, Variant& arg1, Variant& arg2) { return array_multisort_impl(&arg1, &arg2); } bool HHVM_FUNCTION(array_multisort3, Variant& arg1, Variant& arg2, Variant& arg3) { return array_multisort_impl(&arg1, &arg2, &arg3); } bool HHVM_FUNCTION(array_multisort4, Variant& arg1, Variant& arg2, Variant& arg3, Variant& arg4) { return array_multisort_impl(&arg1, &arg2, &arg3, &arg4); } bool HHVM_FUNCTION(array_multisort5, Variant& arg1, Variant& arg2, Variant& arg3, Variant& arg4, Variant& arg5) { return array_multisort_impl(&arg1, &arg2, &arg3, &arg4, &arg5); } bool HHVM_FUNCTION(array_multisort6, Variant& arg1, Variant& arg2, Variant& arg3, Variant& arg4, Variant& arg5, Variant& arg6) { return array_multisort_impl(&arg1, &arg2, &arg3, &arg4, &arg5, &arg6); } bool HHVM_FUNCTION(array_multisort7, Variant& arg1, Variant& arg2, Variant& arg3, Variant& arg4, Variant& arg5, Variant& arg6, Variant& arg7) { return array_multisort_impl(&arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7); } bool HHVM_FUNCTION(array_multisort8, Variant& arg1, Variant& arg2, Variant& arg3, Variant& arg4, Variant& arg5, Variant& arg6, Variant& arg7, Variant& arg8) { return array_multisort_impl( &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7, &arg8); } bool HHVM_FUNCTION(array_multisort9, Variant& arg1, Variant& arg2, Variant& arg3, Variant& arg4, Variant& arg5, Variant& arg6, Variant& arg7, Variant& arg8, Variant& arg9) { return array_multisort_impl( &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7, &arg8, &arg9); } // HH\\dict Array HHVM_FUNCTION(HH_dict, const Variant& input) { return input.toDict(); } // HH\\keyset Array HHVM_FUNCTION(HH_keyset, const Variant& input) { return input.toKeyset(); } // HH\\vec Array HHVM_FUNCTION(HH_vec, const Variant& input) { return input.toVecArray(); } // HH\\varray Array HHVM_FUNCTION(HH_varray, const Variant& input) { return input.toVArray(); } // HH\\darray Array HHVM_FUNCTION(HH_darray, const Variant& input) { return input.toDArray(); } TypedValue HHVM_FUNCTION(HH_array_key_cast, const Variant& input) { switch (input.getType()) { case KindOfPersistentString: case KindOfString: { int64_t n; auto const& str = input.asCStrRef(); if (str.get()->isStrictlyInteger(n)) { return tvReturn(n); } return tvReturn(str); } case KindOfFunc: if (!RO::EvalEnableFuncStringInterop) { SystemLib::throwInvalidArgumentExceptionObject( "Funcs cannot be cast to an array-key" ); } return tvReturn(StrNR(funcToStringHelper(input.toFuncVal()))); case KindOfClass: return tvReturn(StrNR(classToStringHelper(input.toClassVal()))); case KindOfInt64: case KindOfBoolean: case KindOfDouble: case KindOfResource: return tvReturn(input.toInt64()); case KindOfUninit: case KindOfNull: return tvReturn(staticEmptyString()); case KindOfPersistentVec: case KindOfVec: SystemLib::throwInvalidArgumentExceptionObject( "Vecs cannot be cast to an array-key" ); case KindOfPersistentDict: case KindOfDict: SystemLib::throwInvalidArgumentExceptionObject( "Dicts cannot be cast to an array-key" ); case KindOfPersistentKeyset: case KindOfKeyset: SystemLib::throwInvalidArgumentExceptionObject( "Keysets cannot be cast to an array-key" ); case KindOfPersistentDArray: case KindOfDArray: case KindOfPersistentVArray: case KindOfVArray: case KindOfPersistentArray: case KindOfArray: SystemLib::throwInvalidArgumentExceptionObject( "Arrays cannot be cast to an array-key" ); case KindOfClsMeth: SystemLib::throwInvalidArgumentExceptionObject( "ClsMeths cannot be cast to an array-key" ); case KindOfObject: SystemLib::throwInvalidArgumentExceptionObject( "Objects cannot be cast to an array-key" ); case KindOfRecord: SystemLib::throwInvalidArgumentExceptionObject( "Records cannot be cast to an array-key" ); } not_reached(); } String HHVM_FUNCTION(HH_get_provenance, const Variant& in) { if (!isArrayLikeType(in.getType())) return ""; if (!RuntimeOption::EvalArrayProvenance) return ""; auto const& arr = in.asCArrRef(); auto const tag = arrprov::getTag(arr.get()); if (tag.valid()) { return tag.toString(); } else { return "<none>"; } } TypedValue HHVM_FUNCTION(HH_tag_provenance_here, TypedValue in, int64_t flags) { return arrprov::tagTvRecursively(in, flags); } Array HHVM_FUNCTION(merge_xhp_attr_declarations, const Array& arr1, const Array& arr2, const Array& rest) { auto ret = Array::CreateDArray(); IterateKV(arr1.get(), [&](TypedValue k, TypedValue v) { ret.set(k, v); }); IterateKV(arr2.get(), [&](TypedValue k, TypedValue v) { ret.set(k, v); }); int idx = 2; IterateV( rest.get(), [&](TypedValue arr) { if (!tvIsArray(arr)) { raise_param_type_warning("__SystemLib\\merge_xhp_attr_declarations", idx+1, "array", arr); ret = Array{}; return true; } IterateKV(arr.m_data.parr, [&](TypedValue k, TypedValue v) { ret.set(k, v); }); ++idx; return false; } ); return ret; } /////////////////////////////////////////////////////////////////////////////// struct ArrayExtension final : Extension { ArrayExtension() : Extension("array") {} void moduleInit() override { HHVM_RC_INT_SAME(UCOL_DEFAULT); HHVM_RC_INT_SAME(UCOL_PRIMARY); HHVM_RC_INT_SAME(UCOL_SECONDARY); HHVM_RC_INT_SAME(UCOL_TERTIARY); HHVM_RC_INT_SAME(UCOL_DEFAULT_STRENGTH); HHVM_RC_INT_SAME(UCOL_QUATERNARY); HHVM_RC_INT_SAME(UCOL_IDENTICAL); HHVM_RC_INT_SAME(UCOL_OFF); HHVM_RC_INT_SAME(UCOL_ON); HHVM_RC_INT_SAME(UCOL_SHIFTED); HHVM_RC_INT_SAME(UCOL_NON_IGNORABLE); HHVM_RC_INT_SAME(UCOL_LOWER_FIRST); HHVM_RC_INT_SAME(UCOL_UPPER_FIRST); HHVM_RC_INT_SAME(UCOL_FRENCH_COLLATION); HHVM_RC_INT_SAME(UCOL_ALTERNATE_HANDLING); HHVM_RC_INT_SAME(UCOL_CASE_FIRST); HHVM_RC_INT_SAME(UCOL_CASE_LEVEL); HHVM_RC_INT_SAME(UCOL_NORMALIZATION_MODE); HHVM_RC_INT_SAME(UCOL_STRENGTH); HHVM_RC_INT_SAME(UCOL_HIRAGANA_QUATERNARY_MODE); HHVM_RC_INT_SAME(UCOL_NUMERIC_COLLATION); HHVM_RC_INT(ARRAY_FILTER_USE_BOTH, 1); HHVM_RC_INT(ARRAY_FILTER_USE_KEY, 2); HHVM_RC_INT(CASE_LOWER, static_cast<int64_t>(CaseMode::LOWER)); HHVM_RC_INT(CASE_UPPER, static_cast<int64_t>(CaseMode::UPPER)); HHVM_RC_INT(COUNT_NORMAL, static_cast<int64_t>(CountMode::NORMAL)); HHVM_RC_INT(COUNT_RECURSIVE, static_cast<int64_t>(CountMode::RECURSIVE)); HHVM_RC_INT_SAME(SORT_ASC); HHVM_RC_INT_SAME(SORT_DESC); HHVM_RC_INT_SAME(SORT_FLAG_CASE); HHVM_RC_INT_SAME(SORT_LOCALE_STRING); HHVM_RC_INT_SAME(SORT_NATURAL); HHVM_RC_INT_SAME(SORT_NUMERIC); HHVM_RC_INT_SAME(SORT_REGULAR); HHVM_RC_INT_SAME(SORT_STRING); HHVM_RC_INT( TAG_PROVENANCE_HERE_DONT_WARN_ON_OBJECTS, arrprov::TagTVFlags::DONT_WARN_ON_OBJECTS ); HHVM_FE(array_change_key_case); HHVM_FE(array_chunk); HHVM_FE(array_column); HHVM_FE(array_combine); HHVM_FE(array_count_values); HHVM_FE(array_fill_keys); HHVM_FE(array_fill); HHVM_FE(array_flip); HHVM_FE(array_key_exists); HHVM_FE(key_exists); HHVM_FE(array_keys); HHVM_FALIAS(__SystemLib\\array_map, array_map); HHVM_FE(array_merge_recursive); HHVM_FE(array_merge); HHVM_FE(array_replace_recursive); HHVM_FE(array_replace); HHVM_FE(array_pad); HHVM_FE(array_pop); HHVM_FE(array_product); HHVM_FE(array_push); HHVM_FE(array_rand); HHVM_FE(array_reverse); HHVM_FE(array_search); HHVM_FE(array_shift); HHVM_FE(array_slice); HHVM_FE(array_splice); HHVM_FE(array_sum); HHVM_FE(array_unique); HHVM_FE(array_unshift); HHVM_FE(array_values); HHVM_FE(shuffle); HHVM_FE(count); HHVM_FE(sizeof); HHVM_FE(each); HHVM_FE(current); HHVM_FE(next); HHVM_FE(prev); HHVM_FE(reset); HHVM_FE(end); HHVM_FE(key); HHVM_FE(in_array); HHVM_FE(range); HHVM_FE(array_diff); HHVM_FE(array_udiff); HHVM_FE(array_diff_assoc); HHVM_FE(array_diff_uassoc); HHVM_FE(array_udiff_assoc); HHVM_FE(array_udiff_uassoc); HHVM_FE(array_diff_key); HHVM_FE(array_diff_ukey); HHVM_FE(array_intersect); HHVM_FE(array_uintersect); HHVM_FE(array_intersect_assoc); HHVM_FE(array_intersect_uassoc); HHVM_FE(array_uintersect_assoc); HHVM_FE(array_uintersect_uassoc); HHVM_FE(array_intersect_key); HHVM_FE(array_intersect_ukey); HHVM_FE(sort); HHVM_FE(rsort); HHVM_FE(asort); HHVM_FE(arsort); HHVM_FE(ksort); HHVM_FE(krsort); HHVM_FE(usort); HHVM_FE(uasort); HHVM_FE(uksort); HHVM_FE(natsort); HHVM_FE(natcasesort); HHVM_FE(i18n_loc_get_default); HHVM_FE(i18n_loc_set_default); HHVM_FE(i18n_loc_set_attribute); HHVM_FE(i18n_loc_set_strength); HHVM_FE(i18n_loc_get_error_code); HHVM_FE(hphp_array_idx); HHVM_FE(array_multisort1); HHVM_FE(array_multisort2); HHVM_FE(array_multisort3); HHVM_FE(array_multisort4); HHVM_FE(array_multisort5); HHVM_FE(array_multisort6); HHVM_FE(array_multisort7); HHVM_FE(array_multisort8); HHVM_FE(array_multisort9); HHVM_FALIAS(HH\\dict, HH_dict); HHVM_FALIAS(HH\\vec, HH_vec); HHVM_FALIAS(HH\\keyset, HH_keyset); HHVM_FALIAS(HH\\varray, HH_varray); HHVM_FALIAS(HH\\darray, HH_darray); HHVM_FALIAS(HH\\array_key_cast, HH_array_key_cast); HHVM_FALIAS(HH\\get_provenance, HH_get_provenance); HHVM_FALIAS(HH\\tag_provenance_here, HH_tag_provenance_here); HHVM_FALIAS(__SystemLib\\merge_xhp_attr_declarations, merge_xhp_attr_declarations); loadSystemlib(); } } s_array_extension; }
; A282057: Odd numbers n such that for all k >= 1 the numbers n*4^k - 1 and n*4^k + 1 do not form a twin prime pair. ; 5,7,9,11,13,17,19,21,23,25,29,31,35,37,39,41,43,47,49,51,53,55,59,61,65,67,69,71,73,77,79,81,83,85,89,91,95,97,99,101,103,107,109,111,113,115,119,121 mov $3,$0 mov $5,$0 lpb $0 add $1,$0 mul $3,$0 mod $0,2 div $3,3 add $4,4 mod $3,$4 sub $1,$3 div $1,4 sub $4,2 mul $1,$4 lpe add $1,5 mov $2,$5 mul $2,2 add $1,$2 mov $0,$1
; A128936: a(n) = binomial(n, sum_digits_n). ; 1,1,1,1,1,1,1,1,1,1,10,55,220,715,2002,5005,11440,24310,48620,92378,190,1330,7315,33649,134596,480700,1562275,4686825,13123110,34597290,4060,31465,201376,1107568,5379616,23535820,94143280,348330136,1203322288,3910797436,91390,749398,5245786,32224114,177232627,886163135,4076350421,17417133617,69668534468,262596783764,2118760,18009460,133784560,886322710,5317936260,29248649430,148902215280,707285522580,3155581562280,13298522298180,50063860,436270780,3381098545,23667689815,151473214816,895068996640,4922879481520,25371763481680,123234279768160,566877686933536,1198774720,10639125640,85113005120,621324937376,4179822305984,26123889412400,152724276564800,839983521106400,4367914309753280 mov $1,$0 cal $0,209685 ; Sum of last two digits of n. bin $1,$0
db 0 ; species ID placeholder db 75, 125, 60, 95, 80, 65 ; hp atk def spd sat sdf db WATER, FIGHTING ; type db 75 ; catch rate db 175 ; base exp db NO_ITEM, NO_ITEM ; items db GENDER_F50 ; gender ratio db 100 ; unknown 1 db 20 ; step cycles to hatch db 5 ; unknown 2 INCBIN "gfx/pokemon/jabetta/front.dimensions" db 0, 0, 0, 0 ; padding db GROWTH_MEDIUM_SLOW ; growth rate dn EGG_WATER_1, EGG_HUMANSHAPE ; egg groups ; tm/hm learnset tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, THIEF, STRENGTH ; end
; A276857: First differences of the Beatty sequence A022841 for sqrt(7). ; 2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,3,2,3 mov $3,$0 mov $5,2 lpb $5,1 mov $0,$3 sub $5,1 add $0,$5 pow $0,2 mul $0,7 mov $4,3 lpb $0,1 trn $0,$4 add $4,2 lpe mov $2,$5 sub $4,6 div $4,2 add $4,2 lpb $2,1 mov $1,$4 sub $2,1 lpe lpe lpb $3,1 sub $1,$4 mov $3,0 lpe
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r8 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x15b74, %r14 cmp $48962, %rbx movb $0x61, (%r14) cmp %r13, %r13 lea addresses_UC_ht+0xc3cb, %rsi lea addresses_UC_ht+0x13f0b, %rdi nop nop nop nop cmp %r8, %r8 mov $22, %rcx rep movsb nop nop nop add $35384, %rsi lea addresses_WC_ht+0x228b, %rsi lea addresses_D_ht+0x1490d, %rdi nop nop and $36179, %rbx mov $114, %rcx rep movsq nop cmp $22848, %r14 lea addresses_WC_ht+0x4b, %rsi nop nop nop nop cmp %rcx, %rcx mov (%rsi), %r8 nop nop nop nop xor %rbx, %rbx lea addresses_UC_ht+0xfd0b, %r13 nop sub $25182, %r14 mov $0x6162636465666768, %rax movq %rax, %xmm5 vmovups %ymm5, (%r13) nop nop nop nop cmp %r13, %r13 lea addresses_normal_ht+0x1a6eb, %rsi lea addresses_WC_ht+0x17acb, %rdi nop xor $64678, %r8 mov $125, %rcx rep movsq nop and %rcx, %rcx lea addresses_A_ht+0x19029, %rsi lea addresses_WT_ht+0xfc8b, %rdi xor $39793, %r14 mov $52, %rcx rep movsw nop sub %r8, %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %rbp push %rcx // Faulty Load mov $0x2b05f000000048b, %rcx nop add $21171, %r14 vmovups (%rcx), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $1, %xmm0, %r8 lea oracles, %rcx and $0xff, %r8 shlq $12, %r8 mov (%rcx,%r8,1), %r8 pop %rcx pop %rbp pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_NC', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}} {'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}} {'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'45': 7325, '44': 900, '00': 322, '48': 301} 00 00 00 45 45 45 00 45 45 48 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 44 45 45 45 44 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 44 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 44 45 44 44 45 45 44 45 45 44 45 45 45 44 45 45 45 45 44 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 44 45 48 45 45 44 45 44 45 45 45 45 45 45 00 45 45 45 45 45 44 45 45 45 45 45 45 48 45 45 45 45 45 45 45 45 45 45 45 44 45 45 44 45 45 45 44 45 45 44 45 45 45 45 45 44 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 44 48 45 45 45 44 45 45 45 45 45 44 45 45 45 45 48 45 45 45 44 45 45 45 45 45 44 44 48 45 45 45 45 00 45 45 45 45 45 45 44 45 45 45 45 45 45 45 48 45 45 45 45 44 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 44 45 45 45 45 45 44 45 45 45 44 45 45 45 45 48 48 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 44 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 44 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 44 45 45 45 45 45 45 45 44 45 45 45 45 48 45 45 45 45 45 44 45 45 45 45 44 45 45 45 45 45 44 45 45 45 45 45 45 00 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 44 44 45 45 44 45 45 45 45 48 44 45 44 44 45 45 45 45 45 45 45 44 45 48 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 45 00 45 45 45 45 48 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 44 45 45 45 45 45 45 00 45 45 45 45 45 45 45 44 45 45 45 44 44 45 45 44 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 44 45 45 45 45 45 45 44 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 44 45 00 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 44 45 44 45 45 45 45 45 44 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 44 44 45 45 45 45 44 45 45 45 45 45 45 45 45 44 45 45 48 45 00 45 45 45 45 45 45 45 00 45 48 45 45 45 45 45 48 45 44 45 45 45 44 45 45 45 44 44 45 45 45 45 45 45 45 45 45 45 44 45 00 45 45 45 45 48 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 44 45 48 45 45 44 45 45 45 45 48 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 48 45 45 45 45 45 45 48 45 45 45 45 45 48 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 48 45 45 45 44 45 44 45 45 45 45 45 45 45 45 45 45 45 00 45 45 44 44 45 45 45 45 45 45 48 44 45 45 45 45 45 45 44 45 45 45 45 44 45 45 45 45 45 45 45 00 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 45 45 45 45 44 45 45 45 45 45 45 44 45 45 45 45 45 44 45 45 44 45 45 45 45 44 45 45 45 45 48 45 45 45 45 45 45 45 45 44 45 45 44 45 45 45 45 45 45 44 44 45 45 45 45 45 45 45 44 45 48 45 45 45 45 45 45 45 45 44 45 45 45 45 45 45 45 45 45 */
; A022322: a(n) = a(n-1) + a(n-2) + 1, with a(0) = 1 and a(1) = 8. ; 1,8,10,19,30,50,81,132,214,347,562,910,1473,2384,3858,6243,10102,16346,26449,42796,69246,112043,181290,293334,474625,767960,1242586,2010547,3253134,5263682,8516817,13780500,22297318,36077819,58375138,94452958,152828097,247281056,400109154,647390211,1047499366,1694889578,2742388945,4437278524,7179667470,11616945995,18796613466,30413559462,49210172929,79623732392,128833905322,208457637715,337291543038,545749180754,883040723793,1428789904548,2311830628342,3740620532891,6052451161234,9793071694126,15845522855361,25638594549488,41484117404850,67122711954339,108606829359190,175729541313530,284336370672721,460065911986252,744402282658974,1204468194645227,1948870477304202,3153338671949430,5102209149253633,8255547821203064 add $0,2 mov $3,6 lpb $0 sub $0,1 mov $1,$3 add $2,1 mov $3,$2 add $2,$1 lpe
user/_grep: file format elf64-littleriscv Disassembly of section .text: 0000000000000000 <matchstar>: 0: 7179 addi sp,sp,-48 2: f406 sd ra,40(sp) 4: f022 sd s0,32(sp) 6: ec26 sd s1,24(sp) 8: e84a sd s2,16(sp) a: e44e sd s3,8(sp) c: e052 sd s4,0(sp) e: 1800 addi s0,sp,48 10: 892a mv s2,a0 12: 89ae mv s3,a1 14: 84b2 mv s1,a2 16: 02e00a13 li s4,46 1a: 85a6 mv a1,s1 1c: 854e mv a0,s3 1e: 00000097 auipc ra,0x0 22: 030080e7 jalr 48(ra) # 4e <matchhere> 26: e919 bnez a0,3c <matchstar+0x3c> 28: 0004c783 lbu a5,0(s1) 2c: cb89 beqz a5,3e <matchstar+0x3e> 2e: 0485 addi s1,s1,1 30: 2781 sext.w a5,a5 32: ff2784e3 beq a5,s2,1a <matchstar+0x1a> 36: ff4902e3 beq s2,s4,1a <matchstar+0x1a> 3a: a011 j 3e <matchstar+0x3e> 3c: 4505 li a0,1 3e: 70a2 ld ra,40(sp) 40: 7402 ld s0,32(sp) 42: 64e2 ld s1,24(sp) 44: 6942 ld s2,16(sp) 46: 69a2 ld s3,8(sp) 48: 6a02 ld s4,0(sp) 4a: 6145 addi sp,sp,48 4c: 8082 ret 000000000000004e <matchhere>: 4e: 00054703 lbu a4,0(a0) 52: cb3d beqz a4,c8 <matchhere+0x7a> 54: 1141 addi sp,sp,-16 56: e406 sd ra,8(sp) 58: e022 sd s0,0(sp) 5a: 0800 addi s0,sp,16 5c: 87aa mv a5,a0 5e: 00154683 lbu a3,1(a0) 62: 02a00613 li a2,42 66: 02c68563 beq a3,a2,90 <matchhere+0x42> 6a: 02400613 li a2,36 6e: 02c70a63 beq a4,a2,a2 <matchhere+0x54> 72: 0005c683 lbu a3,0(a1) 76: 4501 li a0,0 78: ca81 beqz a3,88 <matchhere+0x3a> 7a: 02e00613 li a2,46 7e: 02c70d63 beq a4,a2,b8 <matchhere+0x6a> 82: 4501 li a0,0 84: 02d70a63 beq a4,a3,b8 <matchhere+0x6a> 88: 60a2 ld ra,8(sp) 8a: 6402 ld s0,0(sp) 8c: 0141 addi sp,sp,16 8e: 8082 ret 90: 862e mv a2,a1 92: 00250593 addi a1,a0,2 96: 853a mv a0,a4 98: 00000097 auipc ra,0x0 9c: f68080e7 jalr -152(ra) # 0 <matchstar> a0: b7e5 j 88 <matchhere+0x3a> a2: c691 beqz a3,ae <matchhere+0x60> a4: 0005c683 lbu a3,0(a1) a8: fee9 bnez a3,82 <matchhere+0x34> aa: 4501 li a0,0 ac: bff1 j 88 <matchhere+0x3a> ae: 0005c503 lbu a0,0(a1) b2: 00153513 seqz a0,a0 b6: bfc9 j 88 <matchhere+0x3a> b8: 0585 addi a1,a1,1 ba: 00178513 addi a0,a5,1 be: 00000097 auipc ra,0x0 c2: f90080e7 jalr -112(ra) # 4e <matchhere> c6: b7c9 j 88 <matchhere+0x3a> c8: 4505 li a0,1 ca: 8082 ret 00000000000000cc <match>: cc: 1101 addi sp,sp,-32 ce: ec06 sd ra,24(sp) d0: e822 sd s0,16(sp) d2: e426 sd s1,8(sp) d4: e04a sd s2,0(sp) d6: 1000 addi s0,sp,32 d8: 892a mv s2,a0 da: 84ae mv s1,a1 dc: 00054703 lbu a4,0(a0) e0: 05e00793 li a5,94 e4: 00f70e63 beq a4,a5,100 <match+0x34> e8: 85a6 mv a1,s1 ea: 854a mv a0,s2 ec: 00000097 auipc ra,0x0 f0: f62080e7 jalr -158(ra) # 4e <matchhere> f4: ed01 bnez a0,10c <match+0x40> f6: 0485 addi s1,s1,1 f8: fff4c783 lbu a5,-1(s1) fc: f7f5 bnez a5,e8 <match+0x1c> fe: a801 j 10e <match+0x42> 100: 0505 addi a0,a0,1 102: 00000097 auipc ra,0x0 106: f4c080e7 jalr -180(ra) # 4e <matchhere> 10a: a011 j 10e <match+0x42> 10c: 4505 li a0,1 10e: 60e2 ld ra,24(sp) 110: 6442 ld s0,16(sp) 112: 64a2 ld s1,8(sp) 114: 6902 ld s2,0(sp) 116: 6105 addi sp,sp,32 118: 8082 ret 000000000000011a <grep>: 11a: 711d addi sp,sp,-96 11c: ec86 sd ra,88(sp) 11e: e8a2 sd s0,80(sp) 120: e4a6 sd s1,72(sp) 122: e0ca sd s2,64(sp) 124: fc4e sd s3,56(sp) 126: f852 sd s4,48(sp) 128: f456 sd s5,40(sp) 12a: f05a sd s6,32(sp) 12c: ec5e sd s7,24(sp) 12e: e862 sd s8,16(sp) 130: e466 sd s9,8(sp) 132: e06a sd s10,0(sp) 134: 1080 addi s0,sp,96 136: 89aa mv s3,a0 138: 8bae mv s7,a1 13a: 4a01 li s4,0 13c: 3ff00c13 li s8,1023 140: 00001b17 auipc s6,0x1 144: 970b0b13 addi s6,s6,-1680 # ab0 <buf> 148: 8d5a mv s10,s6 14a: 4aa9 li s5,10 14c: 8cda mv s9,s6 14e: a099 j 194 <grep+0x7a> 150: 01548023 sb s5,0(s1) 154: 00148613 addi a2,s1,1 158: 4126063b subw a2,a2,s2 15c: 85ca mv a1,s2 15e: 4505 li a0,1 160: 00000097 auipc ra,0x0 164: 3e4080e7 jalr 996(ra) # 544 <write> 168: 00148913 addi s2,s1,1 16c: 45a9 li a1,10 16e: 854a mv a0,s2 170: 00000097 auipc ra,0x0 174: 1d6080e7 jalr 470(ra) # 346 <strchr> 178: 84aa mv s1,a0 17a: c919 beqz a0,190 <grep+0x76> 17c: 00048023 sb zero,0(s1) 180: 85ca mv a1,s2 182: 854e mv a0,s3 184: 00000097 auipc ra,0x0 188: f48080e7 jalr -184(ra) # cc <match> 18c: dd71 beqz a0,168 <grep+0x4e> 18e: b7c9 j 150 <grep+0x36> 190: 03404563 bgtz s4,1ba <grep+0xa0> 194: 414c063b subw a2,s8,s4 198: 014b05b3 add a1,s6,s4 19c: 855e mv a0,s7 19e: 00000097 auipc ra,0x0 1a2: 39e080e7 jalr 926(ra) # 53c <read> 1a6: 02a05663 blez a0,1d2 <grep+0xb8> 1aa: 00aa0a3b addw s4,s4,a0 1ae: 014b07b3 add a5,s6,s4 1b2: 00078023 sb zero,0(a5) 1b6: 8966 mv s2,s9 1b8: bf55 j 16c <grep+0x52> 1ba: 416907b3 sub a5,s2,s6 1be: 40fa0a3b subw s4,s4,a5 1c2: 8652 mv a2,s4 1c4: 85ca mv a1,s2 1c6: 856a mv a0,s10 1c8: 00000097 auipc ra,0x0 1cc: 2a6080e7 jalr 678(ra) # 46e <memmove> 1d0: b7d1 j 194 <grep+0x7a> 1d2: 60e6 ld ra,88(sp) 1d4: 6446 ld s0,80(sp) 1d6: 64a6 ld s1,72(sp) 1d8: 6906 ld s2,64(sp) 1da: 79e2 ld s3,56(sp) 1dc: 7a42 ld s4,48(sp) 1de: 7aa2 ld s5,40(sp) 1e0: 7b02 ld s6,32(sp) 1e2: 6be2 ld s7,24(sp) 1e4: 6c42 ld s8,16(sp) 1e6: 6ca2 ld s9,8(sp) 1e8: 6d02 ld s10,0(sp) 1ea: 6125 addi sp,sp,96 1ec: 8082 ret 00000000000001ee <main>: 1ee: 7139 addi sp,sp,-64 1f0: fc06 sd ra,56(sp) 1f2: f822 sd s0,48(sp) 1f4: f426 sd s1,40(sp) 1f6: f04a sd s2,32(sp) 1f8: ec4e sd s3,24(sp) 1fa: e852 sd s4,16(sp) 1fc: e456 sd s5,8(sp) 1fe: 0080 addi s0,sp,64 200: 4785 li a5,1 202: 04a7de63 bge a5,a0,25e <main+0x70> 206: 0085ba03 ld s4,8(a1) 20a: 4789 li a5,2 20c: 06a7d763 bge a5,a0,27a <main+0x8c> 210: 01058913 addi s2,a1,16 214: ffd5099b addiw s3,a0,-3 218: 1982 slli s3,s3,0x20 21a: 0209d993 srli s3,s3,0x20 21e: 098e slli s3,s3,0x3 220: 05e1 addi a1,a1,24 222: 99ae add s3,s3,a1 224: 4581 li a1,0 226: 00093503 ld a0,0(s2) 22a: 00000097 auipc ra,0x0 22e: 33a080e7 jalr 826(ra) # 564 <open> 232: 84aa mv s1,a0 234: 04054e63 bltz a0,290 <main+0xa2> 238: 85aa mv a1,a0 23a: 8552 mv a0,s4 23c: 00000097 auipc ra,0x0 240: ede080e7 jalr -290(ra) # 11a <grep> 244: 8526 mv a0,s1 246: 00000097 auipc ra,0x0 24a: 306080e7 jalr 774(ra) # 54c <close> 24e: 0921 addi s2,s2,8 250: fd391ae3 bne s2,s3,224 <main+0x36> 254: 4501 li a0,0 256: 00000097 auipc ra,0x0 25a: 2ce080e7 jalr 718(ra) # 524 <exit> 25e: 00000597 auipc a1,0x0 262: 7f258593 addi a1,a1,2034 # a50 <malloc+0xe6> 266: 4509 li a0,2 268: 00000097 auipc ra,0x0 26c: 616080e7 jalr 1558(ra) # 87e <fprintf> 270: 4505 li a0,1 272: 00000097 auipc ra,0x0 276: 2b2080e7 jalr 690(ra) # 524 <exit> 27a: 4581 li a1,0 27c: 8552 mv a0,s4 27e: 00000097 auipc ra,0x0 282: e9c080e7 jalr -356(ra) # 11a <grep> 286: 4501 li a0,0 288: 00000097 auipc ra,0x0 28c: 29c080e7 jalr 668(ra) # 524 <exit> 290: 00093583 ld a1,0(s2) 294: 00000517 auipc a0,0x0 298: 7dc50513 addi a0,a0,2012 # a70 <malloc+0x106> 29c: 00000097 auipc ra,0x0 2a0: 610080e7 jalr 1552(ra) # 8ac <printf> 2a4: 4505 li a0,1 2a6: 00000097 auipc ra,0x0 2aa: 27e080e7 jalr 638(ra) # 524 <exit> 00000000000002ae <strcpy>: 2ae: 1141 addi sp,sp,-16 2b0: e422 sd s0,8(sp) 2b2: 0800 addi s0,sp,16 2b4: 87aa mv a5,a0 2b6: 0585 addi a1,a1,1 2b8: 0785 addi a5,a5,1 2ba: fff5c703 lbu a4,-1(a1) 2be: fee78fa3 sb a4,-1(a5) 2c2: fb75 bnez a4,2b6 <strcpy+0x8> 2c4: 6422 ld s0,8(sp) 2c6: 0141 addi sp,sp,16 2c8: 8082 ret 00000000000002ca <strcmp>: 2ca: 1141 addi sp,sp,-16 2cc: e422 sd s0,8(sp) 2ce: 0800 addi s0,sp,16 2d0: 00054783 lbu a5,0(a0) 2d4: cb91 beqz a5,2e8 <strcmp+0x1e> 2d6: 0005c703 lbu a4,0(a1) 2da: 00f71763 bne a4,a5,2e8 <strcmp+0x1e> 2de: 0505 addi a0,a0,1 2e0: 0585 addi a1,a1,1 2e2: 00054783 lbu a5,0(a0) 2e6: fbe5 bnez a5,2d6 <strcmp+0xc> 2e8: 0005c503 lbu a0,0(a1) 2ec: 40a7853b subw a0,a5,a0 2f0: 6422 ld s0,8(sp) 2f2: 0141 addi sp,sp,16 2f4: 8082 ret 00000000000002f6 <strlen>: 2f6: 1141 addi sp,sp,-16 2f8: e422 sd s0,8(sp) 2fa: 0800 addi s0,sp,16 2fc: 00054783 lbu a5,0(a0) 300: cf91 beqz a5,31c <strlen+0x26> 302: 0505 addi a0,a0,1 304: 87aa mv a5,a0 306: 4685 li a3,1 308: 9e89 subw a3,a3,a0 30a: 00f6853b addw a0,a3,a5 30e: 0785 addi a5,a5,1 310: fff7c703 lbu a4,-1(a5) 314: fb7d bnez a4,30a <strlen+0x14> 316: 6422 ld s0,8(sp) 318: 0141 addi sp,sp,16 31a: 8082 ret 31c: 4501 li a0,0 31e: bfe5 j 316 <strlen+0x20> 0000000000000320 <memset>: 320: 1141 addi sp,sp,-16 322: e422 sd s0,8(sp) 324: 0800 addi s0,sp,16 326: ce09 beqz a2,340 <memset+0x20> 328: 87aa mv a5,a0 32a: fff6071b addiw a4,a2,-1 32e: 1702 slli a4,a4,0x20 330: 9301 srli a4,a4,0x20 332: 0705 addi a4,a4,1 334: 972a add a4,a4,a0 336: 00b78023 sb a1,0(a5) 33a: 0785 addi a5,a5,1 33c: fee79de3 bne a5,a4,336 <memset+0x16> 340: 6422 ld s0,8(sp) 342: 0141 addi sp,sp,16 344: 8082 ret 0000000000000346 <strchr>: 346: 1141 addi sp,sp,-16 348: e422 sd s0,8(sp) 34a: 0800 addi s0,sp,16 34c: 00054783 lbu a5,0(a0) 350: cb99 beqz a5,366 <strchr+0x20> 352: 00f58763 beq a1,a5,360 <strchr+0x1a> 356: 0505 addi a0,a0,1 358: 00054783 lbu a5,0(a0) 35c: fbfd bnez a5,352 <strchr+0xc> 35e: 4501 li a0,0 360: 6422 ld s0,8(sp) 362: 0141 addi sp,sp,16 364: 8082 ret 366: 4501 li a0,0 368: bfe5 j 360 <strchr+0x1a> 000000000000036a <gets>: 36a: 711d addi sp,sp,-96 36c: ec86 sd ra,88(sp) 36e: e8a2 sd s0,80(sp) 370: e4a6 sd s1,72(sp) 372: e0ca sd s2,64(sp) 374: fc4e sd s3,56(sp) 376: f852 sd s4,48(sp) 378: f456 sd s5,40(sp) 37a: f05a sd s6,32(sp) 37c: ec5e sd s7,24(sp) 37e: 1080 addi s0,sp,96 380: 8baa mv s7,a0 382: 8a2e mv s4,a1 384: 892a mv s2,a0 386: 4481 li s1,0 388: 4aa9 li s5,10 38a: 4b35 li s6,13 38c: 89a6 mv s3,s1 38e: 2485 addiw s1,s1,1 390: 0344d863 bge s1,s4,3c0 <gets+0x56> 394: 4605 li a2,1 396: faf40593 addi a1,s0,-81 39a: 4501 li a0,0 39c: 00000097 auipc ra,0x0 3a0: 1a0080e7 jalr 416(ra) # 53c <read> 3a4: 00a05e63 blez a0,3c0 <gets+0x56> 3a8: faf44783 lbu a5,-81(s0) 3ac: 00f90023 sb a5,0(s2) 3b0: 01578763 beq a5,s5,3be <gets+0x54> 3b4: 0905 addi s2,s2,1 3b6: fd679be3 bne a5,s6,38c <gets+0x22> 3ba: 89a6 mv s3,s1 3bc: a011 j 3c0 <gets+0x56> 3be: 89a6 mv s3,s1 3c0: 99de add s3,s3,s7 3c2: 00098023 sb zero,0(s3) 3c6: 855e mv a0,s7 3c8: 60e6 ld ra,88(sp) 3ca: 6446 ld s0,80(sp) 3cc: 64a6 ld s1,72(sp) 3ce: 6906 ld s2,64(sp) 3d0: 79e2 ld s3,56(sp) 3d2: 7a42 ld s4,48(sp) 3d4: 7aa2 ld s5,40(sp) 3d6: 7b02 ld s6,32(sp) 3d8: 6be2 ld s7,24(sp) 3da: 6125 addi sp,sp,96 3dc: 8082 ret 00000000000003de <stat>: 3de: 1101 addi sp,sp,-32 3e0: ec06 sd ra,24(sp) 3e2: e822 sd s0,16(sp) 3e4: e426 sd s1,8(sp) 3e6: e04a sd s2,0(sp) 3e8: 1000 addi s0,sp,32 3ea: 892e mv s2,a1 3ec: 4581 li a1,0 3ee: 00000097 auipc ra,0x0 3f2: 176080e7 jalr 374(ra) # 564 <open> 3f6: 02054563 bltz a0,420 <stat+0x42> 3fa: 84aa mv s1,a0 3fc: 85ca mv a1,s2 3fe: 00000097 auipc ra,0x0 402: 17e080e7 jalr 382(ra) # 57c <fstat> 406: 892a mv s2,a0 408: 8526 mv a0,s1 40a: 00000097 auipc ra,0x0 40e: 142080e7 jalr 322(ra) # 54c <close> 412: 854a mv a0,s2 414: 60e2 ld ra,24(sp) 416: 6442 ld s0,16(sp) 418: 64a2 ld s1,8(sp) 41a: 6902 ld s2,0(sp) 41c: 6105 addi sp,sp,32 41e: 8082 ret 420: 597d li s2,-1 422: bfc5 j 412 <stat+0x34> 0000000000000424 <atoi>: 424: 1141 addi sp,sp,-16 426: e422 sd s0,8(sp) 428: 0800 addi s0,sp,16 42a: 00054603 lbu a2,0(a0) 42e: fd06079b addiw a5,a2,-48 432: 0ff7f793 andi a5,a5,255 436: 4725 li a4,9 438: 02f76963 bltu a4,a5,46a <atoi+0x46> 43c: 86aa mv a3,a0 43e: 4501 li a0,0 440: 45a5 li a1,9 442: 0685 addi a3,a3,1 444: 0025179b slliw a5,a0,0x2 448: 9fa9 addw a5,a5,a0 44a: 0017979b slliw a5,a5,0x1 44e: 9fb1 addw a5,a5,a2 450: fd07851b addiw a0,a5,-48 454: 0006c603 lbu a2,0(a3) 458: fd06071b addiw a4,a2,-48 45c: 0ff77713 andi a4,a4,255 460: fee5f1e3 bgeu a1,a4,442 <atoi+0x1e> 464: 6422 ld s0,8(sp) 466: 0141 addi sp,sp,16 468: 8082 ret 46a: 4501 li a0,0 46c: bfe5 j 464 <atoi+0x40> 000000000000046e <memmove>: 46e: 1141 addi sp,sp,-16 470: e422 sd s0,8(sp) 472: 0800 addi s0,sp,16 474: 02b57663 bgeu a0,a1,4a0 <memmove+0x32> 478: 02c05163 blez a2,49a <memmove+0x2c> 47c: fff6079b addiw a5,a2,-1 480: 1782 slli a5,a5,0x20 482: 9381 srli a5,a5,0x20 484: 0785 addi a5,a5,1 486: 97aa add a5,a5,a0 488: 872a mv a4,a0 48a: 0585 addi a1,a1,1 48c: 0705 addi a4,a4,1 48e: fff5c683 lbu a3,-1(a1) 492: fed70fa3 sb a3,-1(a4) 496: fee79ae3 bne a5,a4,48a <memmove+0x1c> 49a: 6422 ld s0,8(sp) 49c: 0141 addi sp,sp,16 49e: 8082 ret 4a0: 00c50733 add a4,a0,a2 4a4: 95b2 add a1,a1,a2 4a6: fec05ae3 blez a2,49a <memmove+0x2c> 4aa: fff6079b addiw a5,a2,-1 4ae: 1782 slli a5,a5,0x20 4b0: 9381 srli a5,a5,0x20 4b2: fff7c793 not a5,a5 4b6: 97ba add a5,a5,a4 4b8: 15fd addi a1,a1,-1 4ba: 177d addi a4,a4,-1 4bc: 0005c683 lbu a3,0(a1) 4c0: 00d70023 sb a3,0(a4) 4c4: fee79ae3 bne a5,a4,4b8 <memmove+0x4a> 4c8: bfc9 j 49a <memmove+0x2c> 00000000000004ca <memcmp>: 4ca: 1141 addi sp,sp,-16 4cc: e422 sd s0,8(sp) 4ce: 0800 addi s0,sp,16 4d0: ca05 beqz a2,500 <memcmp+0x36> 4d2: fff6069b addiw a3,a2,-1 4d6: 1682 slli a3,a3,0x20 4d8: 9281 srli a3,a3,0x20 4da: 0685 addi a3,a3,1 4dc: 96aa add a3,a3,a0 4de: 00054783 lbu a5,0(a0) 4e2: 0005c703 lbu a4,0(a1) 4e6: 00e79863 bne a5,a4,4f6 <memcmp+0x2c> 4ea: 0505 addi a0,a0,1 4ec: 0585 addi a1,a1,1 4ee: fed518e3 bne a0,a3,4de <memcmp+0x14> 4f2: 4501 li a0,0 4f4: a019 j 4fa <memcmp+0x30> 4f6: 40e7853b subw a0,a5,a4 4fa: 6422 ld s0,8(sp) 4fc: 0141 addi sp,sp,16 4fe: 8082 ret 500: 4501 li a0,0 502: bfe5 j 4fa <memcmp+0x30> 0000000000000504 <memcpy>: 504: 1141 addi sp,sp,-16 506: e406 sd ra,8(sp) 508: e022 sd s0,0(sp) 50a: 0800 addi s0,sp,16 50c: 00000097 auipc ra,0x0 510: f62080e7 jalr -158(ra) # 46e <memmove> 514: 60a2 ld ra,8(sp) 516: 6402 ld s0,0(sp) 518: 0141 addi sp,sp,16 51a: 8082 ret 000000000000051c <fork>: # generated by usys.pl - do not edit #include "kernel/syscall.h" .global fork fork: li a7, SYS_fork 51c: 4885 li a7,1 ecall 51e: 00000073 ecall ret 522: 8082 ret 0000000000000524 <exit>: .global exit exit: li a7, SYS_exit 524: 4889 li a7,2 ecall 526: 00000073 ecall ret 52a: 8082 ret 000000000000052c <wait>: .global wait wait: li a7, SYS_wait 52c: 488d li a7,3 ecall 52e: 00000073 ecall ret 532: 8082 ret 0000000000000534 <pipe>: .global pipe pipe: li a7, SYS_pipe 534: 4891 li a7,4 ecall 536: 00000073 ecall ret 53a: 8082 ret 000000000000053c <read>: .global read read: li a7, SYS_read 53c: 4895 li a7,5 ecall 53e: 00000073 ecall ret 542: 8082 ret 0000000000000544 <write>: .global write write: li a7, SYS_write 544: 48c1 li a7,16 ecall 546: 00000073 ecall ret 54a: 8082 ret 000000000000054c <close>: .global close close: li a7, SYS_close 54c: 48d5 li a7,21 ecall 54e: 00000073 ecall ret 552: 8082 ret 0000000000000554 <kill>: .global kill kill: li a7, SYS_kill 554: 4899 li a7,6 ecall 556: 00000073 ecall ret 55a: 8082 ret 000000000000055c <exec>: .global exec exec: li a7, SYS_exec 55c: 489d li a7,7 ecall 55e: 00000073 ecall ret 562: 8082 ret 0000000000000564 <open>: .global open open: li a7, SYS_open 564: 48bd li a7,15 ecall 566: 00000073 ecall ret 56a: 8082 ret 000000000000056c <mknod>: .global mknod mknod: li a7, SYS_mknod 56c: 48c5 li a7,17 ecall 56e: 00000073 ecall ret 572: 8082 ret 0000000000000574 <unlink>: .global unlink unlink: li a7, SYS_unlink 574: 48c9 li a7,18 ecall 576: 00000073 ecall ret 57a: 8082 ret 000000000000057c <fstat>: .global fstat fstat: li a7, SYS_fstat 57c: 48a1 li a7,8 ecall 57e: 00000073 ecall ret 582: 8082 ret 0000000000000584 <link>: .global link link: li a7, SYS_link 584: 48cd li a7,19 ecall 586: 00000073 ecall ret 58a: 8082 ret 000000000000058c <mkdir>: .global mkdir mkdir: li a7, SYS_mkdir 58c: 48d1 li a7,20 ecall 58e: 00000073 ecall ret 592: 8082 ret 0000000000000594 <chdir>: .global chdir chdir: li a7, SYS_chdir 594: 48a5 li a7,9 ecall 596: 00000073 ecall ret 59a: 8082 ret 000000000000059c <dup>: .global dup dup: li a7, SYS_dup 59c: 48a9 li a7,10 ecall 59e: 00000073 ecall ret 5a2: 8082 ret 00000000000005a4 <getpid>: .global getpid getpid: li a7, SYS_getpid 5a4: 48ad li a7,11 ecall 5a6: 00000073 ecall ret 5aa: 8082 ret 00000000000005ac <sbrk>: .global sbrk sbrk: li a7, SYS_sbrk 5ac: 48b1 li a7,12 ecall 5ae: 00000073 ecall ret 5b2: 8082 ret 00000000000005b4 <sleep>: .global sleep sleep: li a7, SYS_sleep 5b4: 48b5 li a7,13 ecall 5b6: 00000073 ecall ret 5ba: 8082 ret 00000000000005bc <uptime>: .global uptime uptime: li a7, SYS_uptime 5bc: 48b9 li a7,14 ecall 5be: 00000073 ecall ret 5c2: 8082 ret 00000000000005c4 <set_priority>: .global set_priority set_priority: li a7, SYS_set_priority 5c4: 48d9 li a7,22 ecall 5c6: 00000073 ecall ret 5ca: 8082 ret 00000000000005cc <trace>: .global trace trace: li a7, SYS_trace 5cc: 48dd li a7,23 ecall 5ce: 00000073 ecall ret 5d2: 8082 ret 00000000000005d4 <putc>: 5d4: 1101 addi sp,sp,-32 5d6: ec06 sd ra,24(sp) 5d8: e822 sd s0,16(sp) 5da: 1000 addi s0,sp,32 5dc: feb407a3 sb a1,-17(s0) 5e0: 4605 li a2,1 5e2: fef40593 addi a1,s0,-17 5e6: 00000097 auipc ra,0x0 5ea: f5e080e7 jalr -162(ra) # 544 <write> 5ee: 60e2 ld ra,24(sp) 5f0: 6442 ld s0,16(sp) 5f2: 6105 addi sp,sp,32 5f4: 8082 ret 00000000000005f6 <printint>: 5f6: 7139 addi sp,sp,-64 5f8: fc06 sd ra,56(sp) 5fa: f822 sd s0,48(sp) 5fc: f426 sd s1,40(sp) 5fe: f04a sd s2,32(sp) 600: ec4e sd s3,24(sp) 602: 0080 addi s0,sp,64 604: 84aa mv s1,a0 606: c299 beqz a3,60c <printint+0x16> 608: 0805c863 bltz a1,698 <printint+0xa2> 60c: 2581 sext.w a1,a1 60e: 4881 li a7,0 610: fc040693 addi a3,s0,-64 614: 4701 li a4,0 616: 2601 sext.w a2,a2 618: 00000517 auipc a0,0x0 61c: 47850513 addi a0,a0,1144 # a90 <digits> 620: 883a mv a6,a4 622: 2705 addiw a4,a4,1 624: 02c5f7bb remuw a5,a1,a2 628: 1782 slli a5,a5,0x20 62a: 9381 srli a5,a5,0x20 62c: 97aa add a5,a5,a0 62e: 0007c783 lbu a5,0(a5) 632: 00f68023 sb a5,0(a3) 636: 0005879b sext.w a5,a1 63a: 02c5d5bb divuw a1,a1,a2 63e: 0685 addi a3,a3,1 640: fec7f0e3 bgeu a5,a2,620 <printint+0x2a> 644: 00088b63 beqz a7,65a <printint+0x64> 648: fd040793 addi a5,s0,-48 64c: 973e add a4,a4,a5 64e: 02d00793 li a5,45 652: fef70823 sb a5,-16(a4) 656: 0028071b addiw a4,a6,2 65a: 02e05863 blez a4,68a <printint+0x94> 65e: fc040793 addi a5,s0,-64 662: 00e78933 add s2,a5,a4 666: fff78993 addi s3,a5,-1 66a: 99ba add s3,s3,a4 66c: 377d addiw a4,a4,-1 66e: 1702 slli a4,a4,0x20 670: 9301 srli a4,a4,0x20 672: 40e989b3 sub s3,s3,a4 676: fff94583 lbu a1,-1(s2) 67a: 8526 mv a0,s1 67c: 00000097 auipc ra,0x0 680: f58080e7 jalr -168(ra) # 5d4 <putc> 684: 197d addi s2,s2,-1 686: ff3918e3 bne s2,s3,676 <printint+0x80> 68a: 70e2 ld ra,56(sp) 68c: 7442 ld s0,48(sp) 68e: 74a2 ld s1,40(sp) 690: 7902 ld s2,32(sp) 692: 69e2 ld s3,24(sp) 694: 6121 addi sp,sp,64 696: 8082 ret 698: 40b005bb negw a1,a1 69c: 4885 li a7,1 69e: bf8d j 610 <printint+0x1a> 00000000000006a0 <vprintf>: 6a0: 7119 addi sp,sp,-128 6a2: fc86 sd ra,120(sp) 6a4: f8a2 sd s0,112(sp) 6a6: f4a6 sd s1,104(sp) 6a8: f0ca sd s2,96(sp) 6aa: ecce sd s3,88(sp) 6ac: e8d2 sd s4,80(sp) 6ae: e4d6 sd s5,72(sp) 6b0: e0da sd s6,64(sp) 6b2: fc5e sd s7,56(sp) 6b4: f862 sd s8,48(sp) 6b6: f466 sd s9,40(sp) 6b8: f06a sd s10,32(sp) 6ba: ec6e sd s11,24(sp) 6bc: 0100 addi s0,sp,128 6be: 0005c903 lbu s2,0(a1) 6c2: 18090f63 beqz s2,860 <vprintf+0x1c0> 6c6: 8aaa mv s5,a0 6c8: 8b32 mv s6,a2 6ca: 00158493 addi s1,a1,1 6ce: 4981 li s3,0 6d0: 02500a13 li s4,37 6d4: 06400c13 li s8,100 6d8: 06c00c93 li s9,108 6dc: 07800d13 li s10,120 6e0: 07000d93 li s11,112 6e4: 00000b97 auipc s7,0x0 6e8: 3acb8b93 addi s7,s7,940 # a90 <digits> 6ec: a839 j 70a <vprintf+0x6a> 6ee: 85ca mv a1,s2 6f0: 8556 mv a0,s5 6f2: 00000097 auipc ra,0x0 6f6: ee2080e7 jalr -286(ra) # 5d4 <putc> 6fa: a019 j 700 <vprintf+0x60> 6fc: 01498f63 beq s3,s4,71a <vprintf+0x7a> 700: 0485 addi s1,s1,1 702: fff4c903 lbu s2,-1(s1) 706: 14090d63 beqz s2,860 <vprintf+0x1c0> 70a: 0009079b sext.w a5,s2 70e: fe0997e3 bnez s3,6fc <vprintf+0x5c> 712: fd479ee3 bne a5,s4,6ee <vprintf+0x4e> 716: 89be mv s3,a5 718: b7e5 j 700 <vprintf+0x60> 71a: 05878063 beq a5,s8,75a <vprintf+0xba> 71e: 05978c63 beq a5,s9,776 <vprintf+0xd6> 722: 07a78863 beq a5,s10,792 <vprintf+0xf2> 726: 09b78463 beq a5,s11,7ae <vprintf+0x10e> 72a: 07300713 li a4,115 72e: 0ce78663 beq a5,a4,7fa <vprintf+0x15a> 732: 06300713 li a4,99 736: 0ee78e63 beq a5,a4,832 <vprintf+0x192> 73a: 11478863 beq a5,s4,84a <vprintf+0x1aa> 73e: 85d2 mv a1,s4 740: 8556 mv a0,s5 742: 00000097 auipc ra,0x0 746: e92080e7 jalr -366(ra) # 5d4 <putc> 74a: 85ca mv a1,s2 74c: 8556 mv a0,s5 74e: 00000097 auipc ra,0x0 752: e86080e7 jalr -378(ra) # 5d4 <putc> 756: 4981 li s3,0 758: b765 j 700 <vprintf+0x60> 75a: 008b0913 addi s2,s6,8 75e: 4685 li a3,1 760: 4629 li a2,10 762: 000b2583 lw a1,0(s6) 766: 8556 mv a0,s5 768: 00000097 auipc ra,0x0 76c: e8e080e7 jalr -370(ra) # 5f6 <printint> 770: 8b4a mv s6,s2 772: 4981 li s3,0 774: b771 j 700 <vprintf+0x60> 776: 008b0913 addi s2,s6,8 77a: 4681 li a3,0 77c: 4629 li a2,10 77e: 000b2583 lw a1,0(s6) 782: 8556 mv a0,s5 784: 00000097 auipc ra,0x0 788: e72080e7 jalr -398(ra) # 5f6 <printint> 78c: 8b4a mv s6,s2 78e: 4981 li s3,0 790: bf85 j 700 <vprintf+0x60> 792: 008b0913 addi s2,s6,8 796: 4681 li a3,0 798: 4641 li a2,16 79a: 000b2583 lw a1,0(s6) 79e: 8556 mv a0,s5 7a0: 00000097 auipc ra,0x0 7a4: e56080e7 jalr -426(ra) # 5f6 <printint> 7a8: 8b4a mv s6,s2 7aa: 4981 li s3,0 7ac: bf91 j 700 <vprintf+0x60> 7ae: 008b0793 addi a5,s6,8 7b2: f8f43423 sd a5,-120(s0) 7b6: 000b3983 ld s3,0(s6) 7ba: 03000593 li a1,48 7be: 8556 mv a0,s5 7c0: 00000097 auipc ra,0x0 7c4: e14080e7 jalr -492(ra) # 5d4 <putc> 7c8: 85ea mv a1,s10 7ca: 8556 mv a0,s5 7cc: 00000097 auipc ra,0x0 7d0: e08080e7 jalr -504(ra) # 5d4 <putc> 7d4: 4941 li s2,16 7d6: 03c9d793 srli a5,s3,0x3c 7da: 97de add a5,a5,s7 7dc: 0007c583 lbu a1,0(a5) 7e0: 8556 mv a0,s5 7e2: 00000097 auipc ra,0x0 7e6: df2080e7 jalr -526(ra) # 5d4 <putc> 7ea: 0992 slli s3,s3,0x4 7ec: 397d addiw s2,s2,-1 7ee: fe0914e3 bnez s2,7d6 <vprintf+0x136> 7f2: f8843b03 ld s6,-120(s0) 7f6: 4981 li s3,0 7f8: b721 j 700 <vprintf+0x60> 7fa: 008b0993 addi s3,s6,8 7fe: 000b3903 ld s2,0(s6) 802: 02090163 beqz s2,824 <vprintf+0x184> 806: 00094583 lbu a1,0(s2) 80a: c9a1 beqz a1,85a <vprintf+0x1ba> 80c: 8556 mv a0,s5 80e: 00000097 auipc ra,0x0 812: dc6080e7 jalr -570(ra) # 5d4 <putc> 816: 0905 addi s2,s2,1 818: 00094583 lbu a1,0(s2) 81c: f9e5 bnez a1,80c <vprintf+0x16c> 81e: 8b4e mv s6,s3 820: 4981 li s3,0 822: bdf9 j 700 <vprintf+0x60> 824: 00000917 auipc s2,0x0 828: 26490913 addi s2,s2,612 # a88 <malloc+0x11e> 82c: 02800593 li a1,40 830: bff1 j 80c <vprintf+0x16c> 832: 008b0913 addi s2,s6,8 836: 000b4583 lbu a1,0(s6) 83a: 8556 mv a0,s5 83c: 00000097 auipc ra,0x0 840: d98080e7 jalr -616(ra) # 5d4 <putc> 844: 8b4a mv s6,s2 846: 4981 li s3,0 848: bd65 j 700 <vprintf+0x60> 84a: 85d2 mv a1,s4 84c: 8556 mv a0,s5 84e: 00000097 auipc ra,0x0 852: d86080e7 jalr -634(ra) # 5d4 <putc> 856: 4981 li s3,0 858: b565 j 700 <vprintf+0x60> 85a: 8b4e mv s6,s3 85c: 4981 li s3,0 85e: b54d j 700 <vprintf+0x60> 860: 70e6 ld ra,120(sp) 862: 7446 ld s0,112(sp) 864: 74a6 ld s1,104(sp) 866: 7906 ld s2,96(sp) 868: 69e6 ld s3,88(sp) 86a: 6a46 ld s4,80(sp) 86c: 6aa6 ld s5,72(sp) 86e: 6b06 ld s6,64(sp) 870: 7be2 ld s7,56(sp) 872: 7c42 ld s8,48(sp) 874: 7ca2 ld s9,40(sp) 876: 7d02 ld s10,32(sp) 878: 6de2 ld s11,24(sp) 87a: 6109 addi sp,sp,128 87c: 8082 ret 000000000000087e <fprintf>: 87e: 715d addi sp,sp,-80 880: ec06 sd ra,24(sp) 882: e822 sd s0,16(sp) 884: 1000 addi s0,sp,32 886: e010 sd a2,0(s0) 888: e414 sd a3,8(s0) 88a: e818 sd a4,16(s0) 88c: ec1c sd a5,24(s0) 88e: 03043023 sd a6,32(s0) 892: 03143423 sd a7,40(s0) 896: fe843423 sd s0,-24(s0) 89a: 8622 mv a2,s0 89c: 00000097 auipc ra,0x0 8a0: e04080e7 jalr -508(ra) # 6a0 <vprintf> 8a4: 60e2 ld ra,24(sp) 8a6: 6442 ld s0,16(sp) 8a8: 6161 addi sp,sp,80 8aa: 8082 ret 00000000000008ac <printf>: 8ac: 711d addi sp,sp,-96 8ae: ec06 sd ra,24(sp) 8b0: e822 sd s0,16(sp) 8b2: 1000 addi s0,sp,32 8b4: e40c sd a1,8(s0) 8b6: e810 sd a2,16(s0) 8b8: ec14 sd a3,24(s0) 8ba: f018 sd a4,32(s0) 8bc: f41c sd a5,40(s0) 8be: 03043823 sd a6,48(s0) 8c2: 03143c23 sd a7,56(s0) 8c6: 00840613 addi a2,s0,8 8ca: fec43423 sd a2,-24(s0) 8ce: 85aa mv a1,a0 8d0: 4505 li a0,1 8d2: 00000097 auipc ra,0x0 8d6: dce080e7 jalr -562(ra) # 6a0 <vprintf> 8da: 60e2 ld ra,24(sp) 8dc: 6442 ld s0,16(sp) 8de: 6125 addi sp,sp,96 8e0: 8082 ret 00000000000008e2 <free>: 8e2: 1141 addi sp,sp,-16 8e4: e422 sd s0,8(sp) 8e6: 0800 addi s0,sp,16 8e8: ff050693 addi a3,a0,-16 8ec: 00000797 auipc a5,0x0 8f0: 1bc7b783 ld a5,444(a5) # aa8 <freep> 8f4: a805 j 924 <free+0x42> 8f6: 4618 lw a4,8(a2) 8f8: 9db9 addw a1,a1,a4 8fa: feb52c23 sw a1,-8(a0) 8fe: 6398 ld a4,0(a5) 900: 6318 ld a4,0(a4) 902: fee53823 sd a4,-16(a0) 906: a091 j 94a <free+0x68> 908: ff852703 lw a4,-8(a0) 90c: 9e39 addw a2,a2,a4 90e: c790 sw a2,8(a5) 910: ff053703 ld a4,-16(a0) 914: e398 sd a4,0(a5) 916: a099 j 95c <free+0x7a> 918: 6398 ld a4,0(a5) 91a: 00e7e463 bltu a5,a4,922 <free+0x40> 91e: 00e6ea63 bltu a3,a4,932 <free+0x50> 922: 87ba mv a5,a4 924: fed7fae3 bgeu a5,a3,918 <free+0x36> 928: 6398 ld a4,0(a5) 92a: 00e6e463 bltu a3,a4,932 <free+0x50> 92e: fee7eae3 bltu a5,a4,922 <free+0x40> 932: ff852583 lw a1,-8(a0) 936: 6390 ld a2,0(a5) 938: 02059713 slli a4,a1,0x20 93c: 9301 srli a4,a4,0x20 93e: 0712 slli a4,a4,0x4 940: 9736 add a4,a4,a3 942: fae60ae3 beq a2,a4,8f6 <free+0x14> 946: fec53823 sd a2,-16(a0) 94a: 4790 lw a2,8(a5) 94c: 02061713 slli a4,a2,0x20 950: 9301 srli a4,a4,0x20 952: 0712 slli a4,a4,0x4 954: 973e add a4,a4,a5 956: fae689e3 beq a3,a4,908 <free+0x26> 95a: e394 sd a3,0(a5) 95c: 00000717 auipc a4,0x0 960: 14f73623 sd a5,332(a4) # aa8 <freep> 964: 6422 ld s0,8(sp) 966: 0141 addi sp,sp,16 968: 8082 ret 000000000000096a <malloc>: 96a: 7139 addi sp,sp,-64 96c: fc06 sd ra,56(sp) 96e: f822 sd s0,48(sp) 970: f426 sd s1,40(sp) 972: f04a sd s2,32(sp) 974: ec4e sd s3,24(sp) 976: e852 sd s4,16(sp) 978: e456 sd s5,8(sp) 97a: e05a sd s6,0(sp) 97c: 0080 addi s0,sp,64 97e: 02051493 slli s1,a0,0x20 982: 9081 srli s1,s1,0x20 984: 04bd addi s1,s1,15 986: 8091 srli s1,s1,0x4 988: 0014899b addiw s3,s1,1 98c: 0485 addi s1,s1,1 98e: 00000517 auipc a0,0x0 992: 11a53503 ld a0,282(a0) # aa8 <freep> 996: c515 beqz a0,9c2 <malloc+0x58> 998: 611c ld a5,0(a0) 99a: 4798 lw a4,8(a5) 99c: 02977f63 bgeu a4,s1,9da <malloc+0x70> 9a0: 8a4e mv s4,s3 9a2: 0009871b sext.w a4,s3 9a6: 6685 lui a3,0x1 9a8: 00d77363 bgeu a4,a3,9ae <malloc+0x44> 9ac: 6a05 lui s4,0x1 9ae: 000a0b1b sext.w s6,s4 9b2: 004a1a1b slliw s4,s4,0x4 9b6: 00000917 auipc s2,0x0 9ba: 0f290913 addi s2,s2,242 # aa8 <freep> 9be: 5afd li s5,-1 9c0: a88d j a32 <malloc+0xc8> 9c2: 00000797 auipc a5,0x0 9c6: 4ee78793 addi a5,a5,1262 # eb0 <base> 9ca: 00000717 auipc a4,0x0 9ce: 0cf73f23 sd a5,222(a4) # aa8 <freep> 9d2: e39c sd a5,0(a5) 9d4: 0007a423 sw zero,8(a5) 9d8: b7e1 j 9a0 <malloc+0x36> 9da: 02e48b63 beq s1,a4,a10 <malloc+0xa6> 9de: 4137073b subw a4,a4,s3 9e2: c798 sw a4,8(a5) 9e4: 1702 slli a4,a4,0x20 9e6: 9301 srli a4,a4,0x20 9e8: 0712 slli a4,a4,0x4 9ea: 97ba add a5,a5,a4 9ec: 0137a423 sw s3,8(a5) 9f0: 00000717 auipc a4,0x0 9f4: 0aa73c23 sd a0,184(a4) # aa8 <freep> 9f8: 01078513 addi a0,a5,16 9fc: 70e2 ld ra,56(sp) 9fe: 7442 ld s0,48(sp) a00: 74a2 ld s1,40(sp) a02: 7902 ld s2,32(sp) a04: 69e2 ld s3,24(sp) a06: 6a42 ld s4,16(sp) a08: 6aa2 ld s5,8(sp) a0a: 6b02 ld s6,0(sp) a0c: 6121 addi sp,sp,64 a0e: 8082 ret a10: 6398 ld a4,0(a5) a12: e118 sd a4,0(a0) a14: bff1 j 9f0 <malloc+0x86> a16: 01652423 sw s6,8(a0) a1a: 0541 addi a0,a0,16 a1c: 00000097 auipc ra,0x0 a20: ec6080e7 jalr -314(ra) # 8e2 <free> a24: 00093503 ld a0,0(s2) a28: d971 beqz a0,9fc <malloc+0x92> a2a: 611c ld a5,0(a0) a2c: 4798 lw a4,8(a5) a2e: fa9776e3 bgeu a4,s1,9da <malloc+0x70> a32: 00093703 ld a4,0(s2) a36: 853e mv a0,a5 a38: fef719e3 bne a4,a5,a2a <malloc+0xc0> a3c: 8552 mv a0,s4 a3e: 00000097 auipc ra,0x0 a42: b6e080e7 jalr -1170(ra) # 5ac <sbrk> a46: fd5518e3 bne a0,s5,a16 <malloc+0xac> a4a: 4501 li a0,0 a4c: bf45 j 9fc <malloc+0x92>
#ifndef FORMATS_OSM_OSMDATAVISITOR_HPP_DEFINED #define FORMATS_OSM_OSMDATAVISITOR_HPP_DEFINED #include "BoundingBox.hpp" #include "GeoCoordinate.hpp" #include "entities/Element.hpp" #include "formats/FormatTypes.hpp" #include "formats/osm/OsmDataContext.hpp" #include "index/StringTable.hpp" #include <functional> #include <string> #include <vector> #include <unordered_map> namespace utymap { namespace formats { class OsmDataVisitor final { public: OsmDataVisitor(utymap::index::StringTable& stringTable, std::function<bool(utymap::entities::Element&)> add); void visitBounds(utymap::BoundingBox bbox); void visitNode(std::uint64_t id, utymap::GeoCoordinate& coordinate, utymap::formats::Tags& tags); void visitWay(std::uint64_t id, std::vector<std::uint64_t>& nodeIds, utymap::formats::Tags& tags); void visitRelation(std::uint64_t id, utymap::formats::RelationMembers& members, utymap::formats::Tags& tags); void add(utymap::entities::Element& element); void complete(); private: bool hasTag(const std::string& key, const std::string& value, const std::vector<utymap::entities::Tag>& tags) const; void resolve(utymap::entities::Relation& relation); utymap::index::StringTable& stringTable_; std::function<bool(utymap::entities::Element&)> add_; utymap::formats::OsmDataContext context_; std::unordered_map<std::uint64_t, utymap::formats::RelationMembers> relationMembers_; }; }} #endif // FORMATS_OSM_OSMDATAVISITOR_HPP_DEFINED
; A161587: a(n) = 13n^2 + 10n + 1. ; 1,24,73,148,249,376,529,708,913,1144,1401,1684,1993,2328,2689,3076,3489,3928,4393,4884,5401,5944,6513,7108,7729,8376,9049,9748,10473,11224,12001,12804,13633,14488,15369,16276,17209,18168,19153,20164,21201,22264,23353,24468,25609,26776,27969,29188,30433,31704,33001,34324,35673,37048,38449,39876,41329,42808,44313,45844,47401,48984,50593,52228,53889,55576,57289,59028,60793,62584,64401,66244,68113,70008,71929,73876,75849,77848,79873,81924,84001,86104,88233,90388,92569,94776,97009,99268,101553 mov $1,13 mul $1,$0 add $1,10 mul $1,$0 add $1,1 mov $0,$1
db "LIZARD@" ; species name db "If it's healthy," next "the flame on the" next "tip of its tail" page "will burn vigor-" next "ously, even if it" next "gets a bit wet.@"
; A033587: a(n) = 2*n*(4*n + 3). ; 0,14,44,90,152,230,324,434,560,702,860,1034,1224,1430,1652,1890,2144,2414,2700,3002,3320,3654,4004,4370,4752,5150,5564,5994,6440,6902,7380,7874,8384,8910,9452,10010,10584,11174,11780,12402,13040,13694,14364,15050,15752,16470,17204,17954,18720,19502,20300,21114,21944,22790,23652,24530,25424,26334,27260,28202,29160,30134,31124,32130,33152,34190,35244,36314,37400,38502,39620,40754,41904,43070,44252,45450,46664,47894,49140,50402,51680,52974,54284,55610,56952,58310,59684,61074,62480,63902,65340 mov $1,8 mul $1,$0 add $1,6 mul $1,$0 mov $0,$1
/* * Copyright (c) 1997 - 2001 Hansj. Malthaner * * This file is part of the Simutrans project under the artistic license. * (see license.txt) */ /* * Stations for Simutrans * 03.2000 moved from simfab.cc * * Hj. Malthaner */ #include <algorithm> #include "freight_list_sorter.h" #include "simcity.h" #include "simcolor.h" #include "simconvoi.h" #include "simdebug.h" #include "simfab.h" #include "simhalt.h" #include "simintr.h" #include "simline.h" #include "simmem.h" #include "simmesg.h" #include "simplan.h" #include "player/simplay.h" #include "gui/simwin.h" #include "simworld.h" #include "simware.h" #include "bauer/hausbauer.h" #include "bauer/goods_manager.h" #include "descriptor/goods_desc.h" #include "descriptor/tunnel_desc.h" #include "boden/boden.h" #include "boden/grund.h" #include "boden/wasser.h" #include "boden/wege/strasse.h" #include "dataobj/settings.h" #include "dataobj/schedule.h" #include "dataobj/loadsave.h" #include "dataobj/translator.h" #include "dataobj/environment.h" #include "obj/gebaeude.h" #include "obj/label.h" #include "obj/tunnel.h" #include "obj/wayobj.h" #include "gui/halt_info.h" #include "gui/minimap.h" #include "utils/simrandom.h" #include "utils/simstring.h" #include "vehicle/simpeople.h" karte_ptr_t haltestelle_t::welt; vector_tpl<halthandle_t> haltestelle_t::alle_haltestellen; stringhashtable_tpl<halthandle_t> haltestelle_t::all_names; // hash table only used during loading inthashtable_tpl<sint32,halthandle_t> *haltestelle_t::all_koords = NULL; // since size_x*size_y < 0x1000000, we have just to shift the high bits #define get_halt_key(k,width) ( ((k).x*(width)+(k).y) /*+ ((k).z << 25)*/ ) uint8 haltestelle_t::status_step = 0; uint8 haltestelle_t::reconnect_counter = 0; static vector_tpl<convoihandle_t>stale_convois; static vector_tpl<linehandle_t>stale_lines; void haltestelle_t::reset_routing() { reconnect_counter = welt->get_schedule_counter()-1; } void haltestelle_t::step_all() { // tell all stale convois to reroute their goods if( !stale_convois.empty() ) { convoihandle_t cnv = stale_convois.pop_back(); if( cnv.is_bound() ) { cnv->check_freight(); } } // same for stale lines if( !stale_lines.empty() ) { linehandle_t line = stale_lines.pop_back(); if( line.is_bound() ) { line->check_freight(); } } static vector_tpl<halthandle_t>::iterator iter( alle_haltestellen.begin() ); if (alle_haltestellen.empty()) { return; } const uint8 schedule_counter = welt->get_schedule_counter(); if (reconnect_counter != schedule_counter) { // always start with reconnection, re-routing will happen after complete reconnection status_step = RECONNECTING; reconnect_counter = schedule_counter; iter = alle_haltestellen.begin(); } sint16 units_remaining = 128; for (; iter != alle_haltestellen.end(); ++iter) { if (units_remaining <= 0) return; // iterate until the specified number of units were handled if( !(*iter)->step(status_step, units_remaining) ) { // too much rerouted => needs to continue at next round! return; } } if (status_step == RECONNECTING) { // reconnecting finished, compute connected components in one sweep rebuild_connected_components(); // reroute in next call status_step = REROUTING; } else if (status_step == REROUTING) { status_step = 0; } iter = alle_haltestellen.begin(); } void haltestelle_t::start_load_game() { all_koords = new inthashtable_tpl<sint32,halthandle_t>; } void haltestelle_t::end_load_game() { delete all_koords; all_koords = NULL; } /** * return an index to a halt; it is only used for old games * by default create a new halt if none found */ halthandle_t haltestelle_t::get_halt_koord_index(koord k) { if(!welt->is_within_limits(k)) { return halthandle_t(); } // check in hashtable halthandle_t h; const sint32 n = get_halt_key(koord3d(k,-128), welt->get_size().y); assert(all_koords); h = all_koords->get( n ); if( !h.is_bound() ) { // No halts found => create one h = haltestelle_t::create(k, NULL ); all_koords->set( n, h ); } return h; } /* we allow only for a single stop per grund * this will only return something if this stop belongs to same player or is public, or is a dock (when on water) */ halthandle_t haltestelle_t::get_halt(const koord3d pos, const player_t *player ) { const grund_t *gr = welt->lookup(pos); if(gr) { if(gr->get_halt().is_bound() && player_t::check_owner(player,gr->get_halt()->get_owner()) ) { return gr->get_halt(); } // no halt? => we do the water check if(gr->is_water()) { // may catch bus stops close to water ... const planquadrat_t *plan = welt->access(pos.get_2d()); const uint8 cnt = plan->get_haltlist_count(); // first check for own stop for( uint8 i=0; i<cnt; i++ ) { halthandle_t halt = plan->get_haltlist()[i]; if( halt->get_owner()==player && halt->get_station_type()&dock ) { return halt; } } // then for public stop for( uint8 i=0; i<cnt; i++ ) { halthandle_t halt = plan->get_haltlist()[i]; if( halt->get_owner()==welt->get_public_player() && halt->get_station_type()&dock ) { return halt; } } // so: nothing found } } return halthandle_t(); } koord haltestelle_t::get_basis_pos() const { return get_basis_pos3d().get_2d(); } koord3d haltestelle_t::get_basis_pos3d() const { if (tiles.empty()) { return koord3d::invalid; } assert(tiles.front().grund->get_pos().get_2d() == init_pos); return tiles.front().grund->get_pos(); } // returns tile closest to this coordinate grund_t *haltestelle_t::get_ground_closest_to( const koord here ) const { uint32 distance = 0x7FFFFFFFu; grund_t *closest = NULL; FOR(slist_tpl<tile_t>, const& i, tiles) { uint32 dist = shortest_distance( i.grund->get_pos().get_2d(), here ); if( dist < distance ) { distance = dist; closest = i.grund; if( distance == 0 ) { break; } } } return closest; } /* return the closest square that belongs to this halt * @author prissi */ koord haltestelle_t::get_next_pos( koord start ) const { if( grund_t *gr=get_ground_closest_to(start) ) { return gr->get_pos().get_2d(); } return koord::invalid; } /* Calculate and set basis position of this station * It is the avarage of all tiles' coordinate weighed by level of the building */ void haltestelle_t::recalc_basis_pos() { sint64 cent_x, cent_y; cent_x = cent_y = 0; uint64 level_sum; level_sum = 0; FOR(slist_tpl<tile_t>, const& i, tiles) { if( gebaeude_t* const gb = i.grund->find<gebaeude_t>() ) { uint32 lv; lv = gb->get_tile()->get_desc()->get_level() + 1; cent_x += gb->get_pos().get_2d().x * lv; cent_y += gb->get_pos().get_2d().y * lv; level_sum += lv; } } koord cent; cent = koord((sint16)(cent_x/level_sum),(sint16)(cent_y/level_sum)); if ( level_sum > 0 ) { grund_t *new_center = get_ground_closest_to( cent ); if( new_center != tiles.front().grund && new_center->get_text()==NULL ) { // move the name to new center, if there is not yet a name on it new_center->set_text( tiles.front().grund->get_text() ); tiles.front().grund->set_text(NULL); tiles.remove( new_center ); tiles.insert( new_center ); init_pos = new_center->get_pos().get_2d(); } } return; } /** * Station factory method. Returns handles instead of pointers. * @author Hj. Malthaner */ halthandle_t haltestelle_t::create(koord pos, player_t *player) { haltestelle_t * p = new haltestelle_t(pos, player); return p->self; } /* * removes a ground tile from a station * @author prissi */ bool haltestelle_t::remove(player_t *player, koord3d pos) { grund_t *bd = welt->lookup(pos); // wrong ground? if(bd==NULL) { dbg->error("haltestelle_t::remove()","illegal ground at %d,%d,%d", pos.x, pos.y, pos.z); return false; } halthandle_t halt = bd->get_halt(); if(!halt.is_bound()) { dbg->error("haltestelle_t::remove()","no halt at %d,%d,%d", pos.x, pos.y, pos.z); return false; } DBG_MESSAGE("haltestelle_t::remove()","removing segment from %d,%d,%d", pos.x, pos.y, pos.z); // otherwise there will be marked tiles left ... halt->mark_unmark_coverage(false); // only try to remove connected buildings, when still in list to avoid infinite loops if( halt->rem_grund(bd) ) { // remove station building? gebaeude_t* gb = bd->find<gebaeude_t>(); if(gb) { DBG_MESSAGE("haltestelle_t::remove()", "removing building" ); hausbauer_t::remove( player, gb ); bd = NULL; // no need to recalc image // removing the building could have destroyed this halt already if (!halt.is_bound()){ return true; } } } if(!halt->existiert_in_welt()) { DBG_DEBUG("haltestelle_t::remove()","remove last"); // all deleted? DBG_DEBUG("haltestelle_t::remove()","destroy"); haltestelle_t::destroy( halt ); } else { halt->recalc_basis_pos(); } // if building was removed this is false! if(bd) { bd->calc_image(); minimap_t::get_instance()->calc_map_pixel(pos.get_2d()); } return true; } /** * Station factory method. Returns handles instead of pointers. * @author Hj. Malthaner */ halthandle_t haltestelle_t::create(loadsave_t *file) { haltestelle_t *p = new haltestelle_t(file); return p->self; } /** * Station destruction method. * @author Hj. Malthaner */ void haltestelle_t::destroy(halthandle_t const halt) { delete halt.get_rep(); } /** * Station destruction method. * Da destroy() alle_haltestellen modifiziert kann kein Iterator benutzt * werden! V. Meyer * @author Hj. Malthaner */ void haltestelle_t::destroy_all() { while (!alle_haltestellen.empty()) { halthandle_t halt = alle_haltestellen.back(); destroy(halt); } delete all_koords; all_koords = NULL; status_step = 0; } haltestelle_t::haltestelle_t(loadsave_t* file) { last_loading_step = welt->get_steps(); cargo = (vector_tpl<ware_t> **)calloc( goods_manager_t::get_max_catg_index(), sizeof(vector_tpl<ware_t> *) ); all_links = new link_t[ goods_manager_t::get_max_catg_index() ]; status_color = SYSCOL_TEXT_UNUSED; last_status_color = color_idx_to_rgb(COL_PURPLE); last_bar_count = 0; reconnect_counter = welt->get_schedule_counter()-1; enables = NOT_ENABLED; // @author hsiegeln sortierung = freight_list_sorter_t::by_name; resort_freight_info = true; rdwr(file); markers[ self.get_id() ] = current_marker; alle_haltestellen.append(self); } haltestelle_t::haltestelle_t(koord k, player_t* player) { self = halthandle_t(this); assert( !alle_haltestellen.is_contained(self) ); alle_haltestellen.append(self); markers[ self.get_id() ] = current_marker; last_loading_step = welt->get_steps(); this->init_pos = k; owner = player; enables = NOT_ENABLED; // force total re-routing reconnect_counter = welt->get_schedule_counter()-1; last_catg_index = 255; cargo = (vector_tpl<ware_t> **)calloc( goods_manager_t::get_max_catg_index(), sizeof(vector_tpl<ware_t> *) ); all_links = new link_t[ goods_manager_t::get_max_catg_index() ]; status_color = SYSCOL_TEXT_UNUSED; last_status_color = color_idx_to_rgb(COL_PURPLE); last_bar_count = 0; sortierung = freight_list_sorter_t::by_name; init_financial_history(); } haltestelle_t::~haltestelle_t() { assert(self.is_bound()); // first: remove halt from all lists int i=0; while(alle_haltestellen.is_contained(self)) { alle_haltestellen.remove(self); i++; } if (i != 1) { dbg->error("haltestelle_t::~haltestelle_t()", "handle %i found %i times in haltlist!", self.get_id(), i ); } // free name set_name(NULL); // remove from ground and planquadrat (tile) haltlists koord ul(32767,32767); koord lr(0,0); while( !tiles.empty() ) { grund_t *gr = tiles.remove_first().grund; koord pos = gr->get_pos().get_2d(); gr->set_halt( halthandle_t() ); // bounding box for adjustments ul.clip_max(pos); lr.clip_min(pos); } // remove from all haltlists uint16 const cov = welt->get_settings().get_station_coverage(); ul.x = max(0, ul.x - cov); ul.y = max(0, ul.y - cov); lr.x = min(welt->get_size().x, lr.x + 1 + cov); lr.y = min(welt->get_size().y, lr.y + 1 + cov); for( int y=ul.y; y<lr.y; y++ ) { for( int x=ul.x; x<lr.x; x++ ) { planquadrat_t *plan = welt->access(x,y); if(plan->get_haltlist_count()>0) { plan->remove_from_haltlist(self); } } } destroy_win( magic_halt_info + self.get_id() ); // finally detach handle // before it is needed for clearing up the planqudrat and tiles self.detach(); for(unsigned i=0; i<goods_manager_t::get_max_catg_index(); i++) { if (cargo[i]) { FOR(vector_tpl<ware_t>, const &w, *cargo[i]) { fabrik_t::update_transit(&w, false); } delete cargo[i]; cargo[i] = NULL; } } free( cargo ); delete[] all_links; // routes may have changed without this station ... verbinde_fabriken(); } void haltestelle_t::rotate90( const sint16 y_size ) { init_pos.rotate90( y_size ); // rotate cargo (good) destinations // iterate over all different categories for(unsigned i=0; i<goods_manager_t::get_max_catg_index(); i++) { if(cargo[i]) { vector_tpl<ware_t>& warray = *cargo[i]; for (size_t j = warray.get_count(); j-- != 0;) { ware_t& ware = warray[j]; if(ware.menge>0) { ware.rotate90(y_size); } else { // empty => remove warray.remove_at(j); } } } } // re-linking factories verbinde_fabriken(); } const char* haltestelle_t::get_name() const { const char *name = "Unknown"; if (tiles.empty()) { name = "Unnamed"; } else { grund_t* bd = welt->lookup(get_basis_pos3d()); if(bd && bd->get_flag(grund_t::has_text)) { name = bd->get_text(); } } return name; } /** * Sets the name. Creates a copy of name. * @author Hj. Malthaner */ void haltestelle_t::set_name(const char *new_name) { grund_t *gr = welt->lookup(get_basis_pos3d()); if(gr) { if(gr->get_flag(grund_t::has_text)) { halthandle_t h = all_names.remove(gr->get_text()); if(h!=self) { DBG_MESSAGE("haltestelle_t::set_name()","removing name %s already used!",gr->get_text()); } } if(!gr->find<label_t>()) { gr->set_text( new_name ); if(new_name && all_names.set(gr->get_text(),self).is_bound() ) { DBG_MESSAGE("haltestelle_t::set_name()","name %s already used!",new_name); } } halt_info_t *const info_frame = dynamic_cast<halt_info_t *>( win_get_magic( magic_halt_info + self.get_id() ) ); if( info_frame ) { info_frame->set_name( get_name() ); } } } // returns the number of % in a printf string .... static int count_printf_param( const char *str ) { int count = 0; while( *str!=0 ) { if( *str=='%' ) { str++; if( *str!='%' ) { count++; } } str ++; } return count; } // creates stops with unique! names char* haltestelle_t::create_name(koord const k, char const* const typ) { int const lang = welt->get_settings().get_name_language_id(); stadt_t *stadt = welt->find_nearest_city(k); const char *stop = translator::translate(typ,lang); cbuffer_t buf; // this fails only, if there are no towns at all! if(stadt==NULL) { for( uint32 i=1; i<65536; i++ ) { // get a default name buf.printf( translator::translate("land stop %i %s",lang), i, stop ); if( !all_names.get(buf).is_bound() ) { return strdup(buf); } buf.clear(); } return strdup("Unnamed"); } // now we have a city const char *city_name = stadt->get_name(); sint16 li_gr = stadt->get_linksoben().x - 2; sint16 re_gr = stadt->get_rechtsunten().x + 2; sint16 ob_gr = stadt->get_linksoben().y - 2; sint16 un_gr = stadt->get_rechtsunten().y + 2; // strings for intown / outside of town const bool inside = (li_gr < k.x && re_gr > k.x && ob_gr < k.y && un_gr > k.y); const bool suburb = !inside && (li_gr - 6 < k.x && re_gr + 6 > k.x && ob_gr - 6 < k.y && un_gr + 6 > k.y); if (!welt->get_settings().get_numbered_stations()) { static const koord next_building[24] = { koord( 0, -1), // north koord( 1, 0), // east koord( 0, 1), // south koord(-1, 0), // west koord( 1, -1), // northeast koord( 1, 1), // southeast koord(-1, 1), // southwest koord(-1, -1), // northwest koord( 0, -2), // double nswo koord( 2, 0), koord( 0, 2), koord(-2, 0), koord( 1, -2), // all the remaining 3s koord( 2, -1), koord( 2, 1), koord( 1, 2), koord(-1, 2), koord(-2, 1), koord(-2, -1), koord(-1, -2), koord( 2, -2), // and now all buildings with distance 4 koord( 2, 2), koord(-2, 2), koord(-2, -2) }; // standard names: // order: factory, attraction, direction, normal name // prissi: first we try a factory name // is there a translation for factory defined? const char *fab_base_text = "%s factory %s %s"; const char *fab_base = translator::translate(fab_base_text,lang); if( fab_base_text != fab_base ) { slist_tpl<fabrik_t *>fabs; if (self.is_bound()) { // first factories (so with same distance, they have priority) int this_distance = 999; FOR(slist_tpl<fabrik_t*>, const f, get_fab_list()) { int distance = koord_distance(f->get_pos().get_2d(), k); if( distance < this_distance ) { fabs.insert(f); this_distance = distance; } else { fabs.append(f); } } } else { // since the distance are presorted, we can just append for a good choice ... for( int test=0; test<24; test++ ) { fabrik_t *fab = fabrik_t::get_fab(k+next_building[test]); if(fab && fabs.is_contained(fab)) { fabs.append(fab); } } } // are there fabs? FOR(slist_tpl<fabrik_t*>, const f, fabs) { // with factories buf.printf(fab_base, city_name, f->get_name(), stop); if( !all_names.get(buf).is_bound() ) { return strdup(buf); } buf.clear(); } } // no fabs or all names used up already // is there a translation for buildings defined? const char *building_base_text = "%s building %s %s"; const char *building_base = translator::translate(building_base_text,lang); if( building_base_text != building_base ) { // check for other special building (townhall, monument, tourist attraction) for (int i=0; i<24; i++) { grund_t *gr = welt->lookup_kartenboden( next_building[i] + k); if(gr==NULL || gr->get_typ()!=grund_t::fundament) { // no building here continue; } // since closes coordinates are tested first, we do not need to not sort this const char *building_name = NULL; const gebaeude_t* gb = gr->find<gebaeude_t>(); if(gb==NULL) { // field may have foundations but no building continue; } // now we have a building here if (gb->is_monument()) { building_name = translator::translate(gb->get_name(),lang); } else if (gb->is_townhall() || gb->get_tile()->get_desc()->get_type() == building_desc_t::attraction_land || // land attraction gb->get_tile()->get_desc()->get_type() == building_desc_t::attraction_city) { // town attraction building_name = make_single_line_string(translator::translate(gb->get_tile()->get_desc()->get_name(),lang), 2); } else { // normal town house => not suitable for naming continue; } // now we have a name: try it buf.printf( building_base, city_name, building_name, stop ); if( !all_names.get(buf).is_bound() ) { return strdup(buf); } buf.clear(); } } // if there are street names, use them if( inside || suburb ) { const vector_tpl<char*>& street_names( translator::get_street_name_list() ); // make sure we do only ONE random call regardless of how many names are available (to avoid desyncs in network games) if( const uint32 count = street_names.get_count() ) { uint32 idx = simrand( count ); static const uint32 some_primes[] = { 19, 31, 109, 199, 409, 571, 631, 829, 1489, 1999, 2341, 2971, 3529, 4621, 4789, 7039, 7669, 8779, 9721 }; // find prime that does not divide count uint32 offset = 1; for(uint8 i=0; i<lengthof(some_primes); i++) { if (count % some_primes[i]!=0) { offset = some_primes[i]; break; } } // as count % offset != 0 we are guaranteed to test all street names for(uint32 i=0; i<count; i++) { buf.clear(); if (cbuffer_t::check_format_strings("%s %s", street_names[idx])) { buf.printf( street_names[idx], city_name, stop ); if( !all_names.get(buf).is_bound() ) { return strdup(buf); } } idx = (idx+offset) % count; } buf.clear(); } else { /* the one random call to avoid desyncs */ simrand(5); } } // still all names taken => then try the normal naming scheme ... char numbername[10]; if(inside) { strcpy( numbername, "0center" ); } else if(suburb) { // close to the city we use a different scheme, with suburbs strcpy( numbername, "0suburb" ); } else { strcpy( numbername, "0extern" ); } const char *dirname = NULL; static const char *diagonal_name[4] = { "nordwest", "nordost", "suedost", "suedwest" }; static const char *direction_name[4] = { "nord", "ost", "sued", "west" }; uint8 const rot = welt->get_settings().get_rotation(); if (k.y < ob_gr || (inside && k.y*3 < (un_gr+ob_gr+ob_gr)) ) { if (k.x < li_gr) { dirname = diagonal_name[(4 - rot) % 4]; } else if (k.x > re_gr) { dirname = diagonal_name[(5 - rot) % 4]; } else { dirname = direction_name[(4 - rot) % 4]; } } else if (k.y > un_gr || (inside && k.y*3 > (un_gr+un_gr+ob_gr)) ) { if (k.x < li_gr) { dirname = diagonal_name[(3 - rot) % 4]; } else if (k.x > re_gr) { dirname = diagonal_name[(6 - rot) % 4]; } else { dirname = direction_name[(6 - rot) % 4]; } } else { if (k.x <= stadt->get_pos().x) { dirname = direction_name[(3 - rot) % 4]; } else { dirname = direction_name[(5 - rot) % 4]; } } dirname = translator::translate(dirname,lang); // Try everything to get a unique name while(true) { // well now try them all from "0..." over "9..." to "A..." to "Z..." for( int i=0; i<10+26; i++ ) { numbername[0] = i<10 ? '0'+i : 'A'+i-10; const char *base_name = translator::translate(numbername,lang); if(base_name==numbername) { // not translated ... try next continue; } // allow for names without direction uint8 count_s = count_printf_param( base_name ); if(count_s==3) { if (cbuffer_t::check_format_strings("%s %s %s", base_name) ) { // ok, try this name, if free ... buf.printf( base_name, city_name, dirname, stop ); } } else { if (cbuffer_t::check_format_strings("%s %s", base_name) ) { // ok, try this name, if free ... buf.printf( base_name, city_name, stop ); } } if( buf.len()>0 && !all_names.get(buf).is_bound() ) { return strdup(buf); } buf.clear(); } // here we did not find a suitable name ... // ok, no suitable city names, try the suburb ones ... if( strcmp(numbername+1,"center")==0 ) { strcpy( numbername, "0suburb" ); } // ok, no suitable suburb names, try the external ones (if not inside city) ... else if( strcmp(numbername+1,"suburb")==0 && !inside ) { strcpy( numbername, "0extern" ); } else { // no suitable unique name found at all ... break; } } } /* so far we did not found a matching station name * as a last resort, we will try numbered names * (or the user requested this anyway) */ // strings for intown / outside of town const char *base_name = translator::translate( inside ? "%s city %d %s" : "%s land %d %s", lang); // finally: is there a stop with this name already? for( uint32 i=1; i<65536; i++ ) { buf.printf( base_name, city_name, i, stop ); if( !all_names.get(buf).is_bound() ) { return strdup(buf); } buf.clear(); } // emergency measure: But before we should run out of handles anyway ... assert(0); return strdup("Unnamed"); } // add convoi to loading void haltestelle_t::request_loading( convoihandle_t cnv ) { if( !loading_here.is_contained( cnv ) ) { loading_here.append( cnv ); } if( last_loading_step != welt->get_steps() ) { last_loading_step = welt->get_steps(); // now iterate over all convois for( slist_tpl<convoihandle_t>::iterator i = loading_here.begin(), end = loading_here.end(); i != end; ) { convoihandle_t const c = *i; if (c.is_bound() && c->get_state() == convoi_t::LOADING) { // now we load into convoi c->hat_gehalten(self); } if (c.is_bound() && c->get_state() == convoi_t::LOADING) { ++i; } else { i = loading_here.erase( i ); } } } } bool haltestelle_t::step(uint8 what, sint16 &units_remaining) { switch(what) { case RECONNECTING: units_remaining -= (rebuild_connections()/256)+2; break; case REROUTING: if( !reroute_goods(units_remaining) ) { return false; } recalc_status(); break; default: break; } return true; } /** * Called every month * @author Hj. Malthaner */ void haltestelle_t::new_month() { if( welt->get_active_player()==owner && status_color==color_idx_to_rgb(COL_RED) ) { cbuffer_t buf; buf.printf( translator::translate("%s\nis crowded."), get_name() ); welt->get_message()->add_message(buf, get_basis_pos(),message_t::full, PLAYER_FLAG|owner->get_player_nr(), IMG_EMPTY ); enables &= (PAX|POST|WARE); } // hsiegeln: roll financial history for (int j = 0; j<MAX_HALT_COST; j++) { for (int k = MAX_MONTHS-1; k>0; k--) { financial_history[k][j] = financial_history[k-1][j]; } financial_history[0][j] = 0; } // number of waiting should be constant ... financial_history[0][HALT_WAITING] = financial_history[1][HALT_WAITING]; } /** * Called after schedule calculation of all stations is finished * will distribute the goods to changed routes (if there are any) * returns true upon completion * @author Hj. Malthaner */ bool haltestelle_t::reroute_goods(sint16 &units_remaining) { if( last_catg_index==255 ) { last_catg_index = 0; } for( ; last_catg_index<goods_manager_t::get_max_catg_index(); last_catg_index++) { if( units_remaining<=0 ) { return false; } if(cargo[last_catg_index]) { // first: clean out the array vector_tpl<ware_t> * warray = cargo[last_catg_index]; vector_tpl<ware_t> * new_warray = new vector_tpl<ware_t>(warray->get_count()); for (size_t j = warray->get_count(); j-- != 0;) { ware_t & ware = (*warray)[j]; if(ware.menge==0) { continue; } // since also the factory halt list is added to the ground, we can use just this ... if( welt->access(ware.get_zielpos())->is_connected(self) ) { // we are already there! if( ware.to_factory ) { liefere_an_fabrik(ware); } continue; } // add to new array new_warray->append( ware ); } // delete, if nothing connects here if( new_warray->empty() ) { if( all_links[last_catg_index].connections.empty() ) { // no connections from here => delete delete new_warray; new_warray = NULL; } } // replace the array delete cargo[last_catg_index]; cargo[last_catg_index] = new_warray; // if something left // re-route goods to adapt to changes in world layout, // remove all goods whose destination was removed from the map if (cargo[last_catg_index] && !cargo[last_catg_index]->empty()) { vector_tpl<ware_t> &warray = *cargo[last_catg_index]; uint32 last_goods_index = 0; units_remaining -= warray.get_count(); while( last_goods_index<warray.get_count() ) { search_route_resumable(warray[last_goods_index]); if( warray[last_goods_index].get_ziel()==halthandle_t() ) { // remove invalid destinations fabrik_t::update_transit( &warray[last_goods_index], false); warray.remove_at(last_goods_index); } else { ++last_goods_index; } } } } } // likely the display must be updated after this resort_freight_info = true; last_catg_index = 255; // all categories are rerouted return true; // all updated ... } /* * connects a factory to a halt */ void haltestelle_t::verbinde_fabriken() { // unlink all FOR(slist_tpl<fabrik_t*>, const f, fab_list) { f->unlink_halt(self); } fab_list.clear(); // then reconnect FOR(slist_tpl<tile_t>, const& i, tiles) { koord const p = i.grund->get_pos().get_2d(); uint16 const cov = welt->get_settings().get_station_coverage(); FOR(vector_tpl<fabrik_t*>, const fab, fabrik_t::sind_da_welche(p - koord(cov, cov), p + koord(cov, cov))) { if(!fab_list.is_contained(fab)) { // water factories can only connect to docks if( fab->get_desc()->get_placement() != factory_desc_t::Water || (station_type & dock) > 0 ) { // do no link to oil rigs via stations ... fab_list.insert(fab); fab->link_halt(self); } } } } } /* * removes factory to a halt */ void haltestelle_t::remove_fabriken(fabrik_t *fab) { fab_list.remove(fab); } /** * Rebuilds the list of connections to directly reachable halts * Returns the number of stops considered * @author Hj. Malthaner */ #define WEIGHT_WAIT (8) #define WEIGHT_HALT (1) // the minimum weight of a connection from a transfer halt #define WEIGHT_MIN (WEIGHT_WAIT+WEIGHT_HALT) sint32 haltestelle_t::rebuild_connections() { // Knightly : halts which either immediately precede or succeed self halt in serving schedules static vector_tpl<halthandle_t> consecutive_halts[256]; // Dwachs : halts which either immediately precede or succeed self halt in currently processed schedule static vector_tpl<halthandle_t> consecutive_halts_schedule[256]; // remember max number of consecutive halts for one schedule uint8 max_consecutive_halts_schedule[256]; MEMZERON(max_consecutive_halts_schedule, goods_manager_t::get_max_catg_index()); // Knightly : previous halt supporting the ware categories of the serving line static halthandle_t previous_halt[256]; // Hajo: first, remove all old entries for( uint8 i=0; i<goods_manager_t::get_max_catg_index(); i++ ){ all_links[i].clear(); consecutive_halts[i].clear(); } resort_freight_info = true; // might result in error in routing last_catg_index = 255; // must reroute everything sint32 connections_searched = 0; // DBG_MESSAGE("haltestelle_t::rebuild_destinations()", "Adding new table entries"); const player_t *owner; schedule_t *schedule; const minivec_tpl<uint8> *goods_catg_index; minivec_tpl<uint8> supported_catg_index(32); /* * In the first loops: * lines==true => search for lines * After this: * lines==false => search for single convoys without lines */ bool lines = true; uint32 current_index = 0; while( lines || current_index < registered_convoys.get_count() ) { // Now, collect the "schedule", "owner" and "add_catg_index" from line resp. convoy. if( lines ) { if( current_index >= registered_lines.get_count() ) { // We have looped over all lines. lines = false; current_index = 0; // Knightly : start over for registered lineless convoys continue; } const linehandle_t line = registered_lines[current_index]; ++current_index; owner = line->get_owner(); schedule = line->get_schedule(); goods_catg_index = &line->get_goods_catg_index(); } else { const convoihandle_t cnv = registered_convoys[current_index]; ++current_index; owner = cnv->get_owner(); schedule = cnv->get_schedule(); goods_catg_index = &cnv->get_goods_catg_index(); } // find the index from which to start processing uint8 start_index = 0; while( start_index < schedule->get_count() && get_halt( schedule->entries[start_index].pos, owner ) != self ) { ++start_index; } ++start_index; // the next index after self halt; it's okay to be out-of-range // determine goods category indices supported by this halt supported_catg_index.clear(); FOR(minivec_tpl<uint8>, const catg_index, *goods_catg_index) { if( is_enabled(catg_index) ) { supported_catg_index.append(catg_index); previous_halt[catg_index] = self; consecutive_halts_schedule[catg_index].clear(); } } if( supported_catg_index.empty() ) { // this halt does not support the goods categories handled by the line/lineless convoy continue; } INT_CHECK("simhalt.cc 612"); // now we add the schedule to the connection array uint16 aggregate_weight = WEIGHT_WAIT; for( uint8 j=0; j<schedule->get_count(); ++j ) { halthandle_t current_halt = get_halt(schedule->entries[(start_index+j)%schedule->get_count()].pos, owner ); if( !current_halt.is_bound() ) { // ignore way points continue; } if( current_halt == self ) { // Knightly : check for consecutive halts which precede self halt FOR(minivec_tpl<uint8>, const catg_index, supported_catg_index) { if( previous_halt[catg_index]!=self ) { consecutive_halts[catg_index].append_unique(previous_halt[catg_index]); consecutive_halts_schedule[catg_index].append_unique(previous_halt[catg_index]); previous_halt[catg_index] = self; } } // reset aggregate weight aggregate_weight = WEIGHT_WAIT; continue; } aggregate_weight += WEIGHT_HALT; FOR(minivec_tpl<uint8>, const catg_index, supported_catg_index) { if( current_halt->is_enabled(catg_index) ) { // Knightly : check for consecutive halts which succeed self halt if( previous_halt[catg_index] == self ) { consecutive_halts[catg_index].append_unique(current_halt); consecutive_halts_schedule[catg_index].append_unique(current_halt); } previous_halt[catg_index] = current_halt; // either add a new connection or update the weight of an existing connection where necessary connection_t *const existing_connection = all_links[catg_index].connections.insert_unique_ordered( connection_t( current_halt, aggregate_weight ), connection_t::compare ); if( existing_connection && aggregate_weight<existing_connection->weight ) { existing_connection->weight = aggregate_weight; } } } } FOR(minivec_tpl<uint8>, const catg_index, supported_catg_index) { if( consecutive_halts_schedule[catg_index].get_count() > max_consecutive_halts_schedule[catg_index] ) { max_consecutive_halts_schedule[catg_index] = consecutive_halts_schedule[catg_index].get_count(); } } connections_searched += schedule->get_count(); } for( uint8 i=0; i<goods_manager_t::get_max_catg_index(); i++ ){ if( !consecutive_halts[i].empty() ) { if( consecutive_halts[i].get_count() == max_consecutive_halts_schedule[i] ) { // one schedule reaches all consecutive halts -> this is not transfer halt } else { all_links[i].is_transfer = true; } } } return connections_searched; } void haltestelle_t::rebuild_linked_connections() { vector_tpl<halthandle_t> all; // all halts connected to this halt for( uint8 i=0; i<goods_manager_t::get_max_catg_index(); i++ ){ vector_tpl<connection_t>& connections = all_links[i].connections; FOR(vector_tpl<connection_t>, &c, connections) { all.append_unique( c.halt ); } } FOR(vector_tpl<halthandle_t>, h, all) { h->rebuild_connections(); } } void haltestelle_t::fill_connected_component(uint8 catg_idx, uint16 comp) { if (all_links[catg_idx].catg_connected_component != UNDECIDED_CONNECTED_COMPONENT) { // already connected return; } all_links[catg_idx].catg_connected_component = comp; FOR(vector_tpl<connection_t>, &c, all_links[catg_idx].connections) { c.halt->fill_connected_component(catg_idx, comp); // cache the is_transfer value c.is_transfer = c.halt->is_transfer(catg_idx); } } void haltestelle_t::rebuild_connected_components() { for(uint8 catg_idx = 0; catg_idx<goods_manager_t::get_max_catg_index(); catg_idx++) { FOR(vector_tpl<halthandle_t>, halt, alle_haltestellen) { if (halt->all_links[catg_idx].catg_connected_component == UNDECIDED_CONNECTED_COMPONENT) { // start recursion halt->fill_connected_component(catg_idx, halt.get_id()); } } } } sint8 haltestelle_t::is_connected(halthandle_t halt, uint8 catg_index) const { if (!halt.is_bound()) { return 0; // not connected } const link_t& linka = all_links[catg_index]; const link_t& linkb = halt->all_links[catg_index]; if (linka.connections.empty() || linkb.connections.empty()) { return 0; // empty connections -> not connected } if (linka.catg_connected_component == UNDECIDED_CONNECTED_COMPONENT || linkb.catg_connected_component == UNDECIDED_CONNECTED_COMPONENT) { return -1; // undecided - try later } // now check whether both halts are in the same component return linka.catg_connected_component == linkb.catg_connected_component ? 1 : 0; } /** * Data for route searching */ haltestelle_t::halt_data_t haltestelle_t::halt_data[65536]; binary_heap_tpl<haltestelle_t::route_node_t> haltestelle_t::open_list; uint8 haltestelle_t::markers[65536]; uint8 haltestelle_t::current_marker = 0; /** * Data for resumable route search */ halthandle_t haltestelle_t::last_search_origin; uint8 haltestelle_t::last_search_ware_catg_idx = 255; /** * This routine tries to find a route for a good packet (ware) * it will be called for * - new goods (either from simcity.cc or simfab.cc) * - goods that transfer and cannot be joined with other goods * - during re-routing * Therefore this routine eats up most of the performance in * later games. So all changes should be done with this in mind! * * If no route is found, ziel and zwischenziel are unbound handles. * If next_to_ziel in not NULL, it will get the koordinate of the stop * previous to target. Can be used to create passengers/mail back the * same route back * * if USE_ROUTE_SLIST_TPL is defined, the list template will be used. * However, this is about 50% slower. * * @author Hj. Malthaner/prissi/gerw/Knightly */ int haltestelle_t::search_route( const halthandle_t *const start_halts, const uint16 start_halt_count, const bool no_routing_over_overcrowding, ware_t &ware, ware_t *const return_ware ) { const uint8 ware_catg_idx = ware.get_desc()->get_catg_index(); const uint8 ware_idx = ware.get_desc()->get_index(); // since also the factory halt list is added to the ground, we can use just this ... const planquadrat_t *const plan = welt->access( ware.get_zielpos() ); const halthandle_t *const halt_list = plan->get_haltlist(); // but we can only use a subset of these static vector_tpl<halthandle_t> end_halts(16); end_halts.clear(); // target halts are in these connected components // we start from halts only in the same components static vector_tpl<uint16> end_conn_comp(16); end_conn_comp.clear(); // if one target halt is undefined, we have to start search from all halts bool end_conn_comp_undefined = false; for( uint32 h=0; h<plan->get_haltlist_count(); ++h ) { halthandle_t halt = halt_list[h]; if( halt.is_bound() && halt->is_enabled(ware_catg_idx) ) { // check if this is present in the list of start halts for( uint16 s=0; s<start_halt_count; ++s ) { if( halt==start_halts[s] ) { // destination halt is also a start halt -> within walking distance ware.set_ziel( start_halts[s] ); ware.set_zwischenziel( halthandle_t() ); if( return_ware ) { return_ware->set_ziel( start_halts[s] ); return_ware->set_zwischenziel( halthandle_t() ); } return ROUTE_WALK; } } end_halts.append(halt); // check connected component of target halt uint16 endhalt_conn_comp = halt->all_links[ware_catg_idx].catg_connected_component; if (endhalt_conn_comp == UNDECIDED_CONNECTED_COMPONENT) { // undefined: all start halts are probably connected to this target end_conn_comp_undefined = true; } else { // store connected component if (!end_conn_comp_undefined) { end_conn_comp.append_unique( endhalt_conn_comp ); } } } } if( end_halts.empty() ) { // no end halt found ware.set_ziel( halthandle_t() ); ware.set_zwischenziel( halthandle_t() ); if( return_ware ) { return_ware->set_ziel( halthandle_t() ); return_ware->set_zwischenziel( halthandle_t() ); } return NO_ROUTE; } // invalidate search history last_search_origin = halthandle_t(); // set current marker ++current_marker; if( current_marker==0 ) { MEMZERON(markers, halthandle_t::get_size()); current_marker = 1u; } // initialisations for end halts => save some checking inside search loop FOR(vector_tpl<halthandle_t>, const e, end_halts) { uint16 const halt_id = e.get_id(); halt_data[ halt_id ].best_weight = 65535u; halt_data[ halt_id ].destination = 1u; halt_data[ halt_id ].depth = 1u; // to distinct them from start halts markers[ halt_id ] = current_marker; } uint16 const max_transfers = welt->get_settings().get_max_transfers(); uint16 const max_hops = welt->get_settings().get_max_hops(); uint16 allocation_pointer = 0; uint16 best_destination_weight = 65535u; // best weight among all destinations open_list.clear(); uint32 overcrowded_nodes = 0; // initialise the origin node(s) for( ; allocation_pointer<start_halt_count; ++allocation_pointer ) { halthandle_t start_halt = start_halts[allocation_pointer]; uint16 start_conn_comp = start_halt->all_links[ware_catg_idx].catg_connected_component; if (!end_conn_comp_undefined && start_conn_comp != UNDECIDED_CONNECTED_COMPONENT && !end_conn_comp.is_contained( start_conn_comp )){ // this start halt will not lead to any target continue; } open_list.insert( route_node_t(start_halt, 0) ); halt_data_t & start_data = halt_data[ start_halt.get_id() ]; start_data.best_weight = 65535u; start_data.destination = 0; start_data.depth = 0; start_data.overcrowded = false; // start halt overcrowding is handled by routines calling this one start_data.transfer = halthandle_t(); markers[ start_halt.get_id() ] = current_marker; } // here the normal routing with overcrowded stops is done while (!open_list.empty()) { if( overcrowded_nodes == open_list.get_count() ) { // all unexplored routes go over overcrowded stations return ROUTE_OVERCROWDED; } // take node out of open list route_node_t current_node = open_list.pop(); // do not use aggregate_weight as it is _not_ the weight of the current_node // there might be a heuristic weight added const uint16 current_halt_id = current_node.halt.get_id(); halt_data_t & current_halt_data = halt_data[ current_halt_id ]; overcrowded_nodes -= current_halt_data.overcrowded; if( current_halt_data.destination ) { // destination found ware.set_ziel( current_node.halt ); assert(current_halt_data.transfer.get_id() != 0); if( return_ware ) { // next transfer for the reverse route // if the end halt and its connections contain more than one transfer halt then // the transfer halt may not be the last transfer of the forward route // (the re-routing will happen in haltestelle_t::fetch_goods) return_ware->set_zwischenziel(current_halt_data.transfer); // count the connected transfer halts (including end halt) uint8 t = current_node.halt->is_transfer(ware_catg_idx); FOR(vector_tpl<connection_t>, const& i, current_node.halt->all_links[ware_catg_idx].connections) { if (t > 1) { break; } t += i.halt.is_bound() && i.is_transfer; } return_ware->set_zwischenziel( t<=1 ? current_halt_data.transfer : halthandle_t()); } // find the next transfer halthandle_t transfer_halt = current_node.halt; while( halt_data[ transfer_halt.get_id() ].depth > 1 ) { transfer_halt = halt_data[ transfer_halt.get_id() ].transfer; } ware.set_zwischenziel(transfer_halt); if( return_ware ) { // return ware's destination halt is the start halt of the forward trip assert( halt_data[ transfer_halt.get_id() ].transfer.get_id() ); return_ware->set_ziel( halt_data[ transfer_halt.get_id() ].transfer ); } return current_halt_data.overcrowded ? ROUTE_OVERCROWDED : ROUTE_OK; } // check if the current halt is already in closed list if( current_halt_data.best_weight==0 ) { // shortest path to the current halt has already been found earlier continue; } if( current_halt_data.depth > max_transfers ) { // maximum transfer limit is reached -> do not add reachable halts to open list continue; } FOR(vector_tpl<connection_t>, const& current_conn, current_node.halt->all_links[ware_catg_idx].connections) { // halt may have been deleted or joined => test if still valid if( !current_conn.halt.is_bound() ) { // removal seems better though ... continue; } // since these are pre-calculated, they should be always pointing to a valid ground // (if not, we were just under construction, and will be fine after 16 steps) const uint16 reachable_halt_id = current_conn.halt.get_id(); if( markers[ reachable_halt_id ]!=current_marker ) { // Case : not processed before // indicate that this halt has been processed markers[ reachable_halt_id ] = current_marker; if( current_conn.halt.is_bound() && current_conn.is_transfer && allocation_pointer<max_hops ) { // Case : transfer halt const uint16 total_weight = current_halt_data.best_weight + current_conn.weight; if( total_weight < best_destination_weight ) { const bool overcrowded_transfer = no_routing_over_overcrowding && ( current_halt_data.overcrowded || current_conn.halt->is_overcrowded( ware_idx ) ); halt_data[ reachable_halt_id ].best_weight = total_weight; halt_data[ reachable_halt_id ].destination = 0; halt_data[ reachable_halt_id ].depth = current_halt_data.depth + 1u; halt_data[ reachable_halt_id ].transfer = current_node.halt; halt_data[ reachable_halt_id ].overcrowded = overcrowded_transfer; overcrowded_nodes += overcrowded_transfer; allocation_pointer++; // as the next halt is not a destination add WEIGHT_MIN open_list.insert( route_node_t(current_conn.halt, total_weight + WEIGHT_MIN) ); } else { // Case: non-optimal transfer halt -> put in closed list halt_data[ reachable_halt_id ].best_weight = 0; } } else { // Case: halt is removed / no transfer halt -> put in closed list halt_data[ reachable_halt_id ].best_weight = 0; } } // if not processed before else if( halt_data[ reachable_halt_id ].best_weight!=0 && halt_data[ reachable_halt_id ].depth>0) { // Case : processed before but not in closed list : that is, in open list // --> can only be destination halt or transfer halt // or start halt (filter the latter out with the condition depth>0) uint16 total_weight = current_halt_data.best_weight + current_conn.weight; if( total_weight<halt_data[ reachable_halt_id ].best_weight && total_weight<best_destination_weight && allocation_pointer<max_hops ) { // new weight is lower than lowest weight --> create new node and update halt data const bool overcrowded_transfer = no_routing_over_overcrowding && ( current_halt_data.overcrowded || ( !halt_data[reachable_halt_id].destination && current_conn.halt->is_overcrowded( ware_idx ) ) ); halt_data[ reachable_halt_id ].best_weight = total_weight; // no need to update destination, as halt nature (as destination or transfer) will not change halt_data[ reachable_halt_id ].depth = current_halt_data.depth + 1u; halt_data[ reachable_halt_id ].transfer = current_node.halt; halt_data[ reachable_halt_id ].overcrowded = overcrowded_transfer; overcrowded_nodes += overcrowded_transfer; if( halt_data[reachable_halt_id].destination ) { best_destination_weight = total_weight; } else { // as the next halt is not a destination add WEIGHT_MIN total_weight += WEIGHT_MIN; } allocation_pointer++; open_list.insert( route_node_t(current_conn.halt, total_weight) ); } } // else if not in closed list } // for each connection entry // indicate that the current halt is in closed list current_halt_data.best_weight = 0; } // if the loop ends, nothing was found ware.set_ziel( halthandle_t() ); ware.set_zwischenziel( halthandle_t() ); if( return_ware ) { return_ware->set_ziel( halthandle_t() ); return_ware->set_zwischenziel( halthandle_t() ); } return NO_ROUTE; } void haltestelle_t::search_route_resumable( ware_t &ware ) { const uint8 ware_catg_idx = ware.get_desc()->get_catg_index(); // continue search if start halt and good category did not change const bool resume_search = last_search_origin == self && ware_catg_idx == last_search_ware_catg_idx; if (!resume_search) { last_search_origin = self; last_search_ware_catg_idx = ware_catg_idx; open_list.clear(); // set current marker ++current_marker; if( current_marker==0 ) { MEMZERON(markers, halthandle_t::get_size()); current_marker = 1u; } } // remember destination nodes, to reset them before returning static vector_tpl<uint16> dest_indices(16); dest_indices.clear(); uint16 best_destination_weight = 65535u; // reset next transfer and destination halt to null -> if they remain null after search, no route can be found ware.set_ziel( halthandle_t() ); ware.set_zwischenziel( halthandle_t() ); // find suitable destination halts for the ware packet's target position const planquadrat_t *const plan = welt->access( ware.get_zielpos() ); const halthandle_t *const halt_list = plan->get_haltlist(); // check halt list for presence of current halt for( uint8 h = 0; h<plan->get_haltlist_count(); ++h ) { if (halt_list[h] == self) { // a destination halt is the same as the current halt -> no route searching is necessary ware.set_ziel( self ); return; } } // check explored connection if (resume_search) { for( uint8 h=0; h<plan->get_haltlist_count(); ++h ) { const halthandle_t halt = halt_list[h]; if (markers[ halt.get_id() ]==current_marker && halt_data[ halt.get_id() ].best_weight < best_destination_weight && halt.is_bound()) { best_destination_weight = halt_data[ halt.get_id() ].best_weight; ware.set_ziel( halt ); ware.set_zwischenziel( halt_data[ halt.get_id() ].transfer ); } } // for all halts with halt_data.weight < explored_weight one of the best routes is found const uint16 explored_weight = open_list.empty() ? 65535u : open_list.front().aggregate_weight; if (best_destination_weight <= explored_weight && best_destination_weight < 65535u) { // we explored best route to this destination in last run // (any other not yet explored connection will have larger weight) // no need to search route for this ware return; } } // we start in this connected component uint16 const conn_comp = all_links[ ware_catg_idx ].catg_connected_component; // find suitable destination halt(s), if any for( uint8 h=0; h<plan->get_haltlist_count(); ++h ) { const halthandle_t halt = halt_list[h]; if( halt.is_bound() && halt->is_enabled(ware_catg_idx) ) { // test for connected component uint16 const dest_comp = halt->all_links[ ware_catg_idx ].catg_connected_component; if (dest_comp != UNDECIDED_CONNECTED_COMPONENT && conn_comp != UNDECIDED_CONNECTED_COMPONENT && conn_comp != dest_comp) { continue; } // initialisations for destination halts => save some checking inside search loop if( markers[ halt.get_id() ]!=current_marker ) { // first time -> initialise marker and all halt data markers[ halt.get_id() ] = current_marker; halt_data[ halt.get_id() ].best_weight = 65535u; halt_data[ halt.get_id() ].destination = true; } else { // initialised before -> only update destination bit set halt_data[ halt.get_id() ].destination = true; } dest_indices.append(halt.get_id()); } } if( dest_indices.empty() ) { // no destination halt found or current halt is the same as (all) the destination halt(s) return; } uint16 const max_transfers = welt->get_settings().get_max_transfers(); uint16 const max_hops = welt->get_settings().get_max_hops(); static uint16 allocation_pointer; if (!resume_search) { // initialise the origin node allocation_pointer = 1u; open_list.insert( route_node_t(self, 0) ); halt_data_t & start_data = halt_data[ self.get_id() ]; start_data.best_weight = 0; start_data.destination = 0; start_data.depth = 0; start_data.transfer = halthandle_t(); markers[ self.get_id() ] = current_marker; } while( !open_list.empty() ) { if (best_destination_weight <= open_list.front().aggregate_weight) { // best route to destination found already break; } route_node_t current_node = open_list.pop(); const uint16 current_halt_id = current_node.halt.get_id(); const uint16 current_weight = current_node.aggregate_weight; halt_data_t & current_halt_data = halt_data[ current_halt_id ]; // check if the current halt is already in closed list (or removed) if( !current_node.halt.is_bound() ) { continue; } else if( current_halt_data.best_weight < current_weight) { // shortest path to the current halt has already been found earlier // assert(markers[ current_halt_id ]==current_marker); continue; } else { // no need to update weight, as it is already the right one // assert(current_halt_data.best_weight == current_weight); } if( current_halt_data.destination ) { // destination found ware.set_ziel( current_node.halt ); ware.set_zwischenziel( current_halt_data.transfer ); // update best_destination_weight to leave loop due to first check above best_destination_weight = current_weight; // if this destination halt is not a transfer halt -> do not proceed to process its reachable halt(s) if( !current_node.halt->is_transfer(ware_catg_idx) ) { continue; } } // not start halt, not transfer halt -> do not expand further if( current_halt_data.depth > 0 && !current_node.halt->is_transfer(ware_catg_idx) ) { continue; } if( current_halt_data.depth > max_transfers ) { // maximum transfer limit is reached -> do not add reachable halts to open list continue; } FOR(vector_tpl<connection_t>, const& current_conn, current_node.halt->all_links[ware_catg_idx].connections) { const uint16 reachable_halt_id = current_conn.halt.get_id(); const uint16 total_weight = current_weight + current_conn.weight; if( !current_conn.halt.is_bound() ) { // Case: halt removed -> make sure we never visit it again markers[ reachable_halt_id ] = current_marker; halt_data[ reachable_halt_id ].best_weight = 0; } else if( markers[ reachable_halt_id ]!=current_marker ) { // Case : not processed before and not destination // indicate that this halt has been processed markers[ reachable_halt_id ] = current_marker; // update data halt_data[ reachable_halt_id ].best_weight = total_weight; halt_data[ reachable_halt_id ].destination = false; // reset necessary if this was set by search_route halt_data[ reachable_halt_id ].depth = current_halt_data.depth + 1u; halt_data[ reachable_halt_id ].transfer = current_halt_data.transfer.get_id() ? current_halt_data.transfer : current_conn.halt; if( current_conn.is_transfer && allocation_pointer<max_hops ) { // Case : transfer halt allocation_pointer++; open_list.insert( route_node_t(current_conn.halt, total_weight) ); } } // if not processed before else { // Case : processed before (or destination halt) // -> need to check whether we can reach it with smaller weight if( total_weight<halt_data[ reachable_halt_id ].best_weight ) { // new weight is lower than lowest weight --> update halt data halt_data[ reachable_halt_id ].best_weight = total_weight; halt_data[ reachable_halt_id ].transfer = current_halt_data.transfer.get_id() ? current_halt_data.transfer : current_conn.halt; // for transfer/destination nodes create new node if ( (halt_data[ reachable_halt_id ].destination || current_conn.is_transfer ) && allocation_pointer<max_hops ) { halt_data[ reachable_halt_id ].depth = current_halt_data.depth + 1u; allocation_pointer++; open_list.insert( route_node_t(current_conn.halt, total_weight) ); } } } // else processed before } // for each connection entry } // clear destinations since we may want to do another search with the same current_marker FOR(vector_tpl<uint16>, const i, dest_indices) { halt_data[i].destination = false; if (halt_data[i].best_weight == 65535u) { // not processed -> reset marker --markers[i]; } } } /** * Found route and station uncrowded * @author Hj. Malthaner */ void haltestelle_t::add_pax_happy(int n) { book(n, HALT_HAPPY); recalc_status(); } /** * Station in walking distance * @author Hj. Malthaner */ void haltestelle_t::add_pax_walked(int n) { book(n, HALT_WALKED); } /** * Station crowded * @author Hj. Malthaner */ void haltestelle_t::add_pax_unhappy(int n) { book(n, HALT_UNHAPPY); recalc_status(); } /** * Found no route * @author Hj. Malthaner */ void haltestelle_t::add_pax_no_route(int n) { book(n, HALT_NOROUTE); } void haltestelle_t::liefere_an_fabrik(const ware_t& ware) const { fabrik_t *const factory = fabrik_t::get_fab(ware.get_zielpos() ); if( factory ) { factory->liefere_an(ware.get_desc(), ware.menge); } } /* retrieves a ware packet for any destination in the list * needed, if the factory in question wants to remove something */ bool haltestelle_t::recall_ware( ware_t& w, uint32 menge ) { w.menge = 0; vector_tpl<ware_t> *warray = cargo[w.get_desc()->get_catg_index()]; if(warray!=NULL) { FOR(vector_tpl<ware_t>, & tmp, *warray) { // skip empty entries if(tmp.menge==0 || w.get_index()!=tmp.get_index() || w.get_zielpos()!=tmp.get_zielpos()) { continue; } // not too much? if(tmp.menge > menge) { // not all can be loaded tmp.menge -= menge; w.menge = menge; } else { // leave an empty entry => joining will more often work w.menge = tmp.menge; tmp.menge = 0; } book(w.menge, HALT_ARRIVED); fabrik_t::update_transit( &w, false ); resort_freight_info = true; return true; } } // nothing to take out return false; } void haltestelle_t::fetch_goods( slist_tpl<ware_t> &load, const goods_desc_t *good_category, uint32 requested_amount, const vector_tpl<halthandle_t>& destination_halts) { // prissi: first iterate over the next stop, then over the ware // might be a little slower, but ensures that passengers to nearest stop are served first // this allows for separate high speed and normal service vector_tpl<ware_t> *warray = cargo[good_category->get_catg_index()]; if( warray && !warray->empty() ) { for( uint32 i=0; i < destination_halts.get_count(); i++ ) { halthandle_t plan_halt = destination_halts[i]; // The random offset will ensure that all goods have an equal chance to be loaded. uint32 offset = simrand(warray->get_count()); for( uint32 i=0; i<warray->get_count(); i++ ) { ware_t &tmp = (*warray)[ i+offset ]; // prevent overflow (faster than division) if( i+offset+1>=warray->get_count() ) { offset -= warray->get_count(); } // skip empty entries if(tmp.menge==0) { continue; } // goods without route -> returning passengers/mail if( !tmp.get_zwischenziel().is_bound() ) { search_route_resumable(tmp); if (!tmp.get_ziel().is_bound()) { // no route anymore tmp.menge = 0; continue; } } // compatible car and right target stop? if( tmp.get_zwischenziel()==plan_halt ) { if( plan_halt->is_overcrowded( tmp.get_index() ) ) { if (welt->get_settings().is_avoid_overcrowding() && tmp.get_ziel() != plan_halt) { // do not go for transfer to overcrowded transfer stop continue; } } // not too much? ware_t neu(tmp); if( tmp.menge > requested_amount ) { // not all can be loaded neu.menge = requested_amount; tmp.menge -= requested_amount; requested_amount = 0; } else { requested_amount -= tmp.menge; // leave an empty entry => joining will more often work tmp.menge = 0; } load.insert(neu); book(neu.menge, HALT_DEPARTED); resort_freight_info = true; if (requested_amount==0) { return; } } } // nothing there to load } } } uint32 haltestelle_t::get_ware_summe(const goods_desc_t *wtyp) const { int sum = 0; const vector_tpl<ware_t> * warray = cargo[wtyp->get_catg_index()]; if(warray!=NULL) { FOR(vector_tpl<ware_t>, const& i, *warray) { if (wtyp->get_index() == i.get_index()) { sum += i.menge; } } } return sum; } uint32 haltestelle_t::get_ware_fuer_zielpos(const goods_desc_t *wtyp, const koord zielpos) const { const vector_tpl<ware_t> * warray = cargo[wtyp->get_catg_index()]; if(warray!=NULL) { FOR(vector_tpl<ware_t>, const& ware, *warray) { if(wtyp->get_index()==ware.get_index() && ware.get_zielpos()==zielpos) { return ware.menge; } } } return 0; } uint32 haltestelle_t::get_ware_fuer_zwischenziel(const goods_desc_t *wtyp, const halthandle_t zwischenziel) const { uint32 sum = 0; const vector_tpl<ware_t> * warray = cargo[wtyp->get_catg_index()]; if(warray!=NULL) { for(unsigned i=0; i<warray->get_count(); i++ ) { const ware_t &ware = (*warray)[i]; if(wtyp->get_index()==ware.get_index() && ware.get_zwischenziel()==zwischenziel) { sum += ware.menge; } } } return sum; } bool haltestelle_t::vereinige_waren(const ware_t &ware) { // pruefen ob die ware mit bereits wartender ware vereinigt werden kann vector_tpl<ware_t> * warray = cargo[ware.get_desc()->get_catg_index()]; if(warray!=NULL) { FOR(vector_tpl<ware_t>, & tmp, *warray) { // join packets with same destination if(ware.same_destination(tmp)) { if( ware.get_zwischenziel().is_bound() && ware.get_zwischenziel()!=self ) { // update route if there is newer route tmp.set_zwischenziel( ware.get_zwischenziel() ); } tmp.menge += ware.menge; resort_freight_info = true; return true; } } } return false; } // put the ware into the internal storage // take care of all allocation necessary void haltestelle_t::add_ware_to_halt(ware_t ware) { // now we have to add the ware to the stop vector_tpl<ware_t> * warray = cargo[ware.get_desc()->get_catg_index()]; if(warray==NULL) { // this type was not stored here before ... warray = new vector_tpl<ware_t>(4); cargo[ware.get_desc()->get_catg_index()] = warray; } // the ware will be put into the first entry with menge==0 resort_freight_info = true; FOR(vector_tpl<ware_t>, & i, *warray) { if (i.menge == 0) { i = ware; return; } } // here, if no free entries found warray->append(ware); } /* same as liefere an, but there will be no route calculated, * since it hase be calculated just before * (execption: route contains us as intermediate stop) * @author prissi */ uint32 haltestelle_t::starte_mit_route(ware_t ware) { if(ware.get_ziel()==self) { if( ware.to_factory ) { // muss an factory geliefert werden liefere_an_fabrik(ware); } // already there: finished (may be happen with overlapping areas and returning passengers) return ware.menge; } // no valid next stops? Or we are the next stop? if(ware.get_zwischenziel()==self) { dbg->error("haltestelle_t::starte_mit_route()","route cannot contain us as first transfer stop => recalc route!"); if( search_route( &self, 1u, false, ware )==NO_ROUTE ) { // no route found? dbg->error("haltestelle_t::starte_mit_route()","no route found!"); return ware.menge; } } // passt das zu bereits wartender ware ? if(vereinige_waren(ware)) { // dann sind wir schon fertig; return ware.menge; } // add to internal storage add_ware_to_halt(ware); return ware.menge; } /* Receives ware and tries to route it further on * if no route is found, it will be removed * @author prissi */ uint32 haltestelle_t::liefere_an(ware_t ware) { // no valid next stops? if(!ware.get_ziel().is_bound() || !ware.get_zwischenziel().is_bound()) { // write a log entry and discard the goods dbg->warning("haltestelle_t::liefere_an()","%d %s delivered to %s have no longer a route to their destination!", ware.menge, translator::translate(ware.get_name()), get_name() ); return ware.menge; } // did we arrived? if( welt->access(ware.get_zielpos())->is_connected(self) ) { if( ware.to_factory ) { // muss an factory geliefert werden liefere_an_fabrik(ware); } else if( ware.get_desc() == goods_manager_t::passengers ) { // arriving passenger may create pedestrians if( welt->get_settings().get_show_pax() ) { int menge = ware.menge; FOR( slist_tpl<tile_t>, const& i, tiles ) { if (menge <= 0) { break; } menge = generate_pedestrians(i.grund->get_pos(), menge); } INT_CHECK("simhalt 938"); } } return ware.menge; } // do we have already something going in this direction here? if( vereinige_waren(ware) ) { return ware.menge; } // not near enough => we need to do a re-routing halthandle_t old_target = ware.get_ziel(); search_route_resumable(ware); if (!ware.get_ziel().is_bound()) { // target halt no longer there => delete and remove from fab in transit fabrik_t::update_transit( &ware, false ); return ware.menge; } // try to join with existing freight only if target has changed if(old_target != ware.get_ziel() && vereinige_waren(ware)) { return ware.menge; } // add to internal storage add_ware_to_halt(ware); return ware.menge; } /** * @param buf the buffer to fill * @return Goods description text (buf) * @author Hj. Malthaner */ void haltestelle_t::get_freight_info(cbuffer_t & buf) { if(resort_freight_info) { // resort only inf absolutely needed ... resort_freight_info = false; buf.clear(); for(unsigned i=0; i<goods_manager_t::get_max_catg_index(); i++) { const vector_tpl<ware_t> * warray = cargo[i]; if(warray) { freight_list_sorter_t::sort_freight(*warray, buf, (freight_list_sorter_t::sort_mode_t)sortierung, NULL, "waiting"); } } } } void haltestelle_t::get_short_freight_info(cbuffer_t & buf) const { bool got_one = false; for(unsigned int i=0; i<goods_manager_t::get_count(); i++) { const goods_desc_t *wtyp = goods_manager_t::get_info(i); if(gibt_ab(wtyp)) { // ignore goods with sum=zero const int summe=get_ware_summe(wtyp); if(summe>0) { if(got_one) { buf.append(", "); } buf.printf("%d%s %s", summe, translator::translate(wtyp->get_mass()), translator::translate(wtyp->get_name())); got_one = true; } } } if(got_one) { buf.append(" "); buf.append(translator::translate("waiting")); buf.append("\n"); } else { buf.append(translator::translate("no goods waiting")); buf.append("\n"); } } void haltestelle_t::open_info_window() { create_win( new halt_info_t(self), w_info, magic_halt_info + self.get_id() ); } sint64 haltestelle_t::calc_maintenance() const { sint64 maintenance = 0; FOR( slist_tpl<tile_t>, const& i, tiles ) { if( gebaeude_t* const gb = i.grund->find<gebaeude_t>() ) { maintenance += welt->get_settings().maint_building * gb->get_tile()->get_desc()->get_level(); } } return maintenance; } // changes this to a public transfer exchange stop void haltestelle_t::change_owner( player_t *player ) { // check if already public if( owner == player ) { return; } // process every tile of stop slist_tpl<halthandle_t> joining; FOR(slist_tpl<tile_t>, const& i, tiles) { grund_t* const gr = i.grund; if( gebaeude_t* gb = gr->find<gebaeude_t>() ) { // change ownership player_t *gbplayer =gb->get_owner(); gb->set_owner(player); gb->set_flag(obj_t::dirty); sint64 const monthly_costs = welt->get_settings().maint_building * gb->get_tile()->get_desc()->get_level(); waytype_t const costs_type = gb->get_waytype(); player_t::add_maintenance(gbplayer, -monthly_costs, costs_type); player_t::add_maintenance(player, monthly_costs, costs_type); // cost is computed as cst_make_public_months sint64 const cost = -welt->scale_with_month_length(monthly_costs * welt->get_settings().cst_make_public_months); player_t::book_construction_costs(gbplayer, cost, get_basis_pos(), costs_type); player_t::book_construction_costs(player, -cost, koord::invalid, costs_type); } // change way ownership for( int j=0; j<2; j++ ) { if( weg_t *w=gr->get_weg_nr(j) ) { // change ownership of way... player_t *wplayer = w->get_owner(); if( player!=wplayer ) { w->set_owner( welt->get_public_player() ); w->set_flag(obj_t::dirty); sint32 cost = w->get_desc()->get_maintenance(); // of tunnel... if( tunnel_t *t=gr->find<tunnel_t>() ) { t->set_owner( welt->get_public_player() ); t->set_flag(obj_t::dirty); cost = t->get_desc()->get_maintenance(); } waytype_t const financetype = w->get_desc()->get_finance_waytype(); player_t::add_maintenance( wplayer, -cost, financetype); player_t::add_maintenance( welt->get_public_player(), cost, financetype); // multiplayer notification message if( player != welt->get_public_player() && env_t::networkmode ) { cbuffer_t buf; buf.printf( translator::translate("(%s) now public way."), w->get_pos().get_str() ); welt->get_message()->add_message( buf, w->get_pos().get_2d(), message_t::ai, PLAYER_FLAG|player->get_player_nr(), IMG_EMPTY ); } cost = -welt->scale_with_month_length(cost * welt->get_settings().cst_make_public_months); player_t::book_construction_costs(wplayer, cost, koord::invalid, financetype); } } } // make way object public if any suitable for( uint8 i = 1; i < gr->get_top(); i++ ) { if( wayobj_t *const wo = obj_cast<wayobj_t>(gr->obj_bei(i)) ) { player_t *woplayer = wo->get_owner(); if( player!=woplayer ) { sint32 const cost = wo->get_desc()->get_maintenance(); // change ownership wo->set_owner( player ); wo->set_flag(obj_t::dirty); waytype_t const financetype = wo->get_desc()->get_waytype(); player_t::add_maintenance( woplayer, -cost, financetype); player_t::add_maintenance( player, cost, financetype); player_t::book_construction_costs( woplayer, cost, koord::invalid, financetype); } } } } // now finally change owner owner = player; rebuild_connections(); rebuild_linked_connections(); // tell the world of it ... if( player == welt->get_public_player() && env_t::networkmode ) { cbuffer_t buf; buf.printf( translator::translate("%s at (%i,%i) now public stop."), get_name(), get_basis_pos().x, get_basis_pos().y ); welt->get_message()->add_message( buf, get_basis_pos(), message_t::ai, PLAYER_FLAG|player->get_player_nr(), IMG_EMPTY ); } } // merge stop void haltestelle_t::merge_halt( halthandle_t halt_merged ) { if( halt_merged == self || !halt_merged.is_bound() ) { return; } halt_merged->change_owner( owner ); // add statistics for( int month=0; month<MAX_MONTHS; month++ ) { for( int type=0; type<MAX_HALT_COST; type++ ) { financial_history[month][type] += halt_merged->financial_history[month][type]; halt_merged->financial_history[month][type] = 0; } } slist_tpl<tile_t> tiles_to_join; FOR(slist_tpl<tile_t>, const& i, halt_merged->get_tiles()) { tiles_to_join.append(i); } while( !tiles_to_join.empty() ) { // ATTENTION: Anz convoi reservation to this tile will be lost! grund_t *gr = tiles_to_join.remove_first().grund; // transfer tiles to us halt_merged->rem_grund(gr); add_grund(gr); } assert(!halt_merged->existiert_in_welt()); // transfer goods halt_merged->transfer_goods(self); destroy(halt_merged); recalc_basis_pos(); // also rebuild our connections recalc_station_type(); rebuild_connections(); rebuild_linked_connections(); } void haltestelle_t::transfer_goods(halthandle_t halt) { if (!self.is_bound() || !halt.is_bound()) { return; } // transfer goods to halt for(uint8 i=0; i<goods_manager_t::get_max_catg_index(); i++) { const vector_tpl<ware_t> * warray = cargo[i]; if (warray) { FOR(vector_tpl<ware_t>, const& j, *warray) { halt->add_ware_to_halt(j); } delete cargo[i]; cargo[i] = NULL; } } } // private helper function for recalc_station_type() void haltestelle_t::add_to_station_type( grund_t *gr ) { // init in any case ... if( tiles.empty() ) { capacity[0] = 0; capacity[1] = 0; capacity[2] = 0; enables &= CROWDED; // clear flags station_type = invalid; } const gebaeude_t* gb = gr->find<gebaeude_t>(); const building_desc_t *desc=gb?gb->get_tile()->get_desc():NULL; if( gr->is_water() && gb ) { // may happen around oil rigs and so on station_type |= dock; // for water factories if(desc) { // enabled the matching types enables |= desc->get_enabled(); if (welt->get_settings().is_separate_halt_capacities()) { if(desc->get_enabled()&1) { capacity[0] += desc->get_capacity(); } if(desc->get_enabled()&2) { capacity[1] += desc->get_capacity(); } if(desc->get_enabled()&4) { capacity[2] += desc->get_capacity(); } } else { // no separate capacities: sum up all capacity[0] += desc->get_capacity(); capacity[2] = capacity[1] = capacity[0]; } } return; } if( desc==NULL ) { // no desc, but solid ground?!? dbg->error("haltestelle_t::get_station_type()","ground belongs to halt but no desc?"); return; } // there is only one loading bay ... switch (desc->get_type()) { case building_desc_t::dock: case building_desc_t::flat_dock: station_type |= dock; break; // two ways on ground can only happen for tram tracks on streets, there buses and trams can stop case building_desc_t::generic_stop: switch (desc->get_extra()) { case road_wt: station_type |= (desc->get_enabled()&3)!=0 ? busstop : loadingbay; if (gr->has_two_ways()) { // tram track on street station_type |= tramstop; } break; case water_wt: station_type |= dock; break; case air_wt: station_type |= airstop; break; case monorail_wt: station_type |= monorailstop; break; case track_wt: station_type |= railstation; break; case tram_wt: station_type |= tramstop; if (gr->has_two_ways()) { // tram track on street station_type |= (desc->get_enabled()&3)!=0 ? busstop : loadingbay; } break; case maglev_wt: station_type |= maglevstop; break; case narrowgauge_wt: station_type |= narrowgaugestop; break; default: ; } break; default: ; } // enabled the matching types enables |= desc->get_enabled(); if (welt->get_settings().is_separate_halt_capacities()) { if(desc->get_enabled()&1) { capacity[0] += desc->get_capacity(); } if(desc->get_enabled()&2) { capacity[1] += desc->get_capacity(); } if(desc->get_enabled()&4) { capacity[2] += desc->get_capacity(); } } else { // no separate capacities: sum up all capacity[0] += desc->get_capacity(); capacity[2] = capacity[1] = capacity[0]; } } /* * recalculated the station type(s) * since it iterates over all ground, this is better not done too often, because line management and station list * queries this information regularly; Thus, we do this, when adding new ground * This recalculates also the capacity from the building levels ... * @author Weber/prissi */ void haltestelle_t::recalc_station_type() { capacity[0] = 0; capacity[1] = 0; capacity[2] = 0; enables &= CROWDED; // clear flags station_type = invalid; // iterate over all tiles FOR(slist_tpl<tile_t>, const& i, tiles) { grund_t* const gr = i.grund; add_to_station_type( gr ); } // and set halt info again FOR(slist_tpl<tile_t>, const& i, tiles) { i.grund->set_halt( self ); } recalc_status(); } int haltestelle_t::generate_pedestrians(koord3d pos, int count) { pedestrian_t::generate_pedestrians_at(pos, count); for(int i=0; i<4 && count>0; i++) { pedestrian_t::generate_pedestrians_at(pos+koord::nsew[i], count); } return count; } // necessary to load pre0.99.13 savegames void warenziel_rdwr(loadsave_t *file) { koord ziel; ziel.rdwr(file); char tn[256]; file->rdwr_str(tn, lengthof(tn)); } void haltestelle_t::rdwr(loadsave_t *file) { xml_tag_t h( file, "haltestelle_t" ); sint32 owner_n; koord3d k; // will restore halthandle_t after loading if(file->is_version_atleast(110, 6)) { if(file->is_saving()) { uint16 halt_id = self.is_bound() ? self.get_id() : 0; file->rdwr_short(halt_id); } else { uint16 halt_id; file->rdwr_short(halt_id); self.set_id(halt_id); self = halthandle_t(this, halt_id); } } else { if (file->is_loading()) { self = halthandle_t(this); } } if(file->is_saving()) { owner_n = welt->sp2num( owner ); } if(file->is_version_less(99, 8)) { init_pos.rdwr( file ); } file->rdwr_long(owner_n); if(file->is_version_less(88, 6)) { bool dummy; file->rdwr_bool(dummy); // pax file->rdwr_bool(dummy); // mail file->rdwr_bool(dummy); // ware } if(file->is_loading()) { owner = welt->get_player(owner_n); k.rdwr( file ); while(k!=koord3d::invalid) { grund_t *gr = welt->lookup(k); if(!gr) { dbg->error("haltestelle_t::rdwr()", "invalid position %s", k.get_str() ); gr = welt->lookup_kartenboden(k.get_2d()); dbg->error("haltestelle_t::rdwr()", "setting to %s", gr->get_pos().get_str() ); } // during loading and saving halts will be referred by their base position // so we may already be defined ... if(gr->get_halt().is_bound()) { dbg->warning( "haltestelle_t::rdwr()", "bound to ground twice at (%i,%i)!", k.x, k.y ); } // prissi: now check, if there is a building -> we allow no longer ground without building! const gebaeude_t* gb = gr->find<gebaeude_t>(); const building_desc_t *desc=gb?gb->get_tile()->get_desc():NULL; if(desc) { add_grund( gr, false /*do not relink factories now*/ ); // verbinde_fabriken will be called in finish_rd } else { dbg->warning("haltestelle_t::rdwr()", "will no longer add ground without building at %s!", k.get_str() ); } k.rdwr( file ); } } else { FOR(slist_tpl<tile_t>, const& i, tiles) { k = i.grund->get_pos(); k.rdwr( file ); } k = koord3d::invalid; k.rdwr( file ); } init_pos = tiles.empty() ? koord::invalid : tiles.front().grund->get_pos().get_2d(); if(file->is_saving()) { const char *s; for(unsigned i=0; i<goods_manager_t::get_max_catg_index(); i++) { vector_tpl<ware_t> *warray = cargo[i]; if(warray) { s = "y"; // needs to be non-empty file->rdwr_str(s); if( file->is_version_less(112, 3) ) { uint16 count = warray->get_count(); file->rdwr_short(count); } else { uint32 count = warray->get_count(); file->rdwr_long(count); } FOR(vector_tpl<ware_t>, & ware, *warray) { ware.rdwr(file); } } } s = ""; file->rdwr_str(s); } else { // restoring all goods in the station char s[256]; file->rdwr_str(s, lengthof(s)); while(*s) { uint32 count; if( file->is_version_less(112, 3) ) { uint16 scount; file->rdwr_short(scount); count = scount; } else { file->rdwr_long(count); } if(count>0) { for( uint32 i = 0; i < count; i++ ) { // add to internal storage (use this function, since the old categories were different) ware_t ware(file); if( ware.get_desc() && ware.menge>0 && welt->is_within_limits(ware.get_zielpos()) ) { add_ware_to_halt(ware); // restore in-transit information fabrik_t::update_transit( &ware, true ); } else if( ware.menge>0 ) { if( ware.get_desc() ) { dbg->error( "haltestelle_t::rdwr()", "%i of %s to %s ignored!", ware.menge, ware.get_name(), ware.get_zielpos().get_str() ); } else { dbg->error( "haltestelle_t::rdwr()", "%i of unknown to %s ignored!", ware.menge, ware.get_zielpos().get_str() ); } } } } file->rdwr_str(s, lengthof(s)); } // old games save the list with stations // however, we have to rebuilt them anyway for the new format if(file->is_version_less(99, 13)) { uint16 count; file->rdwr_short(count); for(int i=0; i<count; i++) { warenziel_rdwr(file); } } } if( file->is_version_atleast(111, 1) ) { for (int j = 0; j<MAX_HALT_COST; j++) { for (size_t k = MAX_MONTHS; k-- != 0;) { file->rdwr_longlong(financial_history[k][j]); } } } else { // old history did not know about walked pax for (int j = 0; j<7; j++) { for (size_t k = MAX_MONTHS; k-- != 0;) { file->rdwr_longlong(financial_history[k][j]); } } for (size_t k = MAX_MONTHS; k-- != 0;) { financial_history[k][HALT_WALKED] = 0; } } } void haltestelle_t::finish_rd() { verbinde_fabriken(); stale_convois.clear(); stale_lines.clear(); // fix good destination coordinates for(unsigned i=0; i<goods_manager_t::get_max_catg_index(); i++) { if(cargo[i]) { vector_tpl<ware_t> * warray = cargo[i]; FOR(vector_tpl<ware_t>, & j, *warray) { j.finish_rd(welt); } // merge identical entries (should only happen with old games) for(unsigned j=0; j<warray->get_count(); j++) { if( (*warray)[j].menge==0 ) { continue; } for(unsigned k=j+1; k<warray->get_count(); k++) { if( (*warray)[k].menge>0 && (*warray)[j].same_destination( (*warray)[k] ) ) { (*warray)[j].menge += (*warray)[k].menge; (*warray)[k].menge = 0; } } } } } // what kind of station here? recalc_station_type(); // handle name for old stations which don't exist in kartenboden grund_t* bd = welt->lookup(get_basis_pos3d()); if(bd!=NULL && !bd->get_flag(grund_t::has_text) ) { // restore label and bridges grund_t* bd_old = welt->lookup_kartenboden(get_basis_pos()); if(bd_old) { // transfer name (if there) const char *name = bd->get_text(); if(name) { set_name( name ); bd_old->set_text( NULL ); } else { set_name( "Unknown" ); } } } else { const char *current_name = bd->get_text(); if( all_names.get(current_name).is_bound() && fabrik_t::get_fab(get_basis_pos())==NULL ) { // try to get a new name ... const char *new_name; if( station_type & airstop ) { new_name = create_name( get_basis_pos(), "Airport" ); } else if( station_type & dock ) { new_name = create_name( get_basis_pos(), "Dock" ); } else if( station_type & (railstation|monorailstop|maglevstop|narrowgaugestop) ) { new_name = create_name( get_basis_pos(), "BF" ); } else { new_name = create_name( get_basis_pos(), "H" ); } dbg->warning("haltestelle_t::set_name()","name already used: \'%s\' -> \'%s\'", current_name, new_name ); bd->set_text( new_name ); current_name = new_name; } all_names.set( current_name, self ); } recalc_status(); reconnect_counter = welt->get_schedule_counter()-1; } void haltestelle_t::book(sint64 amount, int cost_type) { assert(cost_type <= MAX_HALT_COST); financial_history[0][cost_type] += amount; } void haltestelle_t::init_financial_history() { for (int j = 0; j<MAX_HALT_COST; j++) { for (size_t k = MAX_MONTHS; k-- != 0;) { financial_history[k][j] = 0; } } } /** * Calculates a status color for status bars * @author Hj. Malthaner */ void haltestelle_t::recalc_status() { status_color = color_idx_to_rgb(financial_history[0][HALT_CONVOIS_ARRIVED] > 0 ? COL_GREEN : COL_YELLOW); // since the status is ordered ... uint8 status_bits = 0; MEMZERO(overcrowded); uint64 total_sum = 0; if(get_pax_enabled()) { const uint32 max_ware = get_capacity(0); total_sum += get_ware_summe(goods_manager_t::passengers); if(total_sum>max_ware) { overcrowded[0] |= 1; } if(get_pax_unhappy() > 40 ) { status_bits = (total_sum>max_ware+200 || (total_sum>max_ware && get_pax_unhappy()>200)) ? 2 : 1; } else if(total_sum>max_ware) { status_bits = total_sum>max_ware+200 ? 2 : 1; } } if(get_mail_enabled()) { const uint32 max_ware = get_capacity(1); const uint32 mail = get_ware_summe(goods_manager_t::mail); total_sum += mail; if(mail>max_ware) { status_bits |= mail>max_ware+200 ? 2 : 1; overcrowded[0] |= 2; } } // now for all goods if(status_color!=color_idx_to_rgb(COL_RED) && get_ware_enabled()) { const uint8 count = goods_manager_t::get_count(); const uint32 max_ware = get_capacity(2); for( uint32 i = 3; i < count; i++ ) { goods_desc_t const* const wtyp = goods_manager_t::get_info(i); const uint32 ware_sum = get_ware_summe(wtyp); total_sum += ware_sum; if(ware_sum>max_ware) { status_bits |= ware_sum > max_ware + 32 /*|| enables & CROWDED*/ ? 2 : 1; // for now report only serious overcrowding on transfer stops overcrowded[wtyp->get_index()/8] |= 1<<(wtyp->get_index()%8); } } } // take the worst color for status if( status_bits ) { status_color = color_idx_to_rgb(status_bits&2 ? COL_RED : COL_ORANGE); } else { status_color = color_idx_to_rgb((financial_history[0][HALT_WAITING]+financial_history[0][HALT_DEPARTED] == 0) ? COL_YELLOW : COL_GREEN); } financial_history[0][HALT_WAITING] = total_sum; } /** * Draws some nice colored bars giving some status information * @author Hj. Malthaner */ void haltestelle_t::display_status(KOORD_VAL xpos, KOORD_VAL ypos) { // ignore freight that cannot reach to this station sint16 count = 0; for( uint16 i = 0; i < goods_manager_t::get_count(); i++ ) { if( i == 2 ) { continue; // ignore freight none } if( gibt_ab( goods_manager_t::get_info(i) ) ) { count++; } } if( count != last_bar_count ) { // bars will shift x positions, mark entire station bar region dirty KOORD_VAL max_bar_height = 0; for( sint16 i = 0; i < last_bar_count; i++ ) { if( last_bar_height[i] > max_bar_height ) { max_bar_height = last_bar_height[i]; } } const KOORD_VAL x = xpos - (last_bar_count * 4 - get_tile_raster_width()) / 2; mark_rect_dirty_wc( x - 1 - 4, ypos - 11 - max_bar_height - 6, x + last_bar_count * 4 + 12 - 2, ypos - 11 ); // reset bar heights for new count last_bar_height.clear(); last_bar_height.resize( count ); for( sint16 i = 0; i < count; i++ ) { last_bar_height.append(0); } last_bar_count = count; } ypos -= 11; xpos -= (count * 4 - get_tile_raster_width()) / 2; const KOORD_VAL x = xpos; sint16 bar_height_index = 0; uint32 max_capacity; for( uint8 i = 0; i < goods_manager_t::get_count(); i++ ) { if( i == 2 ) { continue; // ignore freight none } const goods_desc_t *wtyp = goods_manager_t::get_info(i); if( gibt_ab( wtyp ) ) { if( i < 2 ) { max_capacity = get_capacity(i); } else { max_capacity = get_capacity(2); } const uint32 sum = get_ware_summe( wtyp ); uint32 v = min( sum, max_capacity ); if( max_capacity > 512 ) { v = 2 + (v * 128) / max_capacity; } else { v = (v / 4) + 2; } display_fillbox_wh_clip_rgb( xpos, ypos - v - 1, 1, v, color_idx_to_rgb(COL_GREY4), false); display_fillbox_wh_clip_rgb( xpos + 1, ypos - v - 1, 2, v, wtyp->get_color(), false); display_fillbox_wh_clip_rgb( xpos + 3, ypos - v - 1, 1, v, color_idx_to_rgb(COL_GREY1), false); // Hajo: show up arrow for capped values if( sum > max_capacity ) { display_fillbox_wh_clip_rgb( xpos + 1, ypos - v - 6, 2, 4, color_idx_to_rgb(COL_WHITE), false); display_fillbox_wh_clip_rgb( xpos, ypos - v - 5, 4, 1, color_idx_to_rgb(COL_WHITE), false); v += 5; // for marking dirty } if( last_bar_height[bar_height_index] != (KOORD_VAL)v ) { if( (KOORD_VAL)v > last_bar_height[bar_height_index] ) { // bar will be longer, mark new height dirty mark_rect_dirty_wc( xpos, ypos - v - 1, xpos + 3, ypos - 1); } else { // bar will be shorter, mark old height dirty mark_rect_dirty_wc( xpos, ypos - last_bar_height[bar_height_index] - 1, xpos + 3, ypos - 1); } last_bar_height[bar_height_index] = v; } bar_height_index++; xpos += 4; } } // status color box below bool dirty = false; if( get_status_farbe() != last_status_color ) { last_status_color = get_status_farbe(); dirty = true; } display_fillbox_wh_clip_rgb( x - 1 - 4, ypos, count * 4 + 12 - 2, 4, get_status_farbe(), dirty ); } bool haltestelle_t::add_grund(grund_t *gr, bool relink_factories) { assert(gr!=NULL); // new halt? if( tiles.is_contained(gr) ) { return false; } koord pos = gr->get_pos().get_2d(); add_to_station_type( gr ); gr->set_halt( self ); tiles.append( gr ); // add to hashtable if (all_koords) { sint32 n = get_halt_key( gr->get_pos(), welt->get_size().y ); all_koords->set( n, self ); } // appends this to the ground // after that, the surrounding ground will know of this station bool insert_unsorted = !relink_factories; uint16 const cov = welt->get_settings().get_station_coverage(); for (int y = -cov; y <= cov; y++) { for (int x = -cov; x <= cov; x++) { koord p=pos+koord(x,y); planquadrat_t *plan = welt->access(p); if(plan) { plan->add_to_haltlist( self, insert_unsorted); plan->get_kartenboden()->set_flag(grund_t::dirty); } } } // since suddenly other factories may be connect to us too if (relink_factories) { verbinde_fabriken(); } // check if we have to register line(s) and/or lineless convoy(s) which serve this halt vector_tpl<linehandle_t> check_line(0); // public halt: must iterate over all players lines / convoys bool public_halt = get_owner() == welt->get_public_player(); uint8 const pl_min = public_halt ? 0 : get_owner()->get_player_nr(); uint8 const pl_max = public_halt ? MAX_PLAYER_COUNT : get_owner()->get_player_nr()+1; // iterate over all lines (public halt: all lines, other: only player's lines) for( uint8 i=pl_min; i<pl_max; i++ ) { if( player_t *player = welt->get_player(i) ) { player->simlinemgmt.get_lines(simline_t::line, &check_line); FOR( vector_tpl<linehandle_t>, const j, check_line ) { // only add unknown lines if( !registered_lines.is_contained(j) && j->count_convoys() > 0 ) { FOR( minivec_tpl<schedule_entry_t>, const& k, j->get_schedule()->entries ) { if( get_halt(k.pos, player) == self ) { registered_lines.append(j); break; } } } } } } // Knightly : iterate over all convoys FOR(vector_tpl<convoihandle_t>, const cnv, welt->convoys()) { // only check lineless convoys which have matching ownership and which are not yet registered if( !cnv->get_line().is_bound() && (public_halt || cnv->get_owner()==get_owner()) && !registered_convoys.is_contained(cnv) ) { if( const schedule_t *const schedule = cnv->get_schedule() ) { FOR(minivec_tpl<schedule_entry_t>, const& k, schedule->entries) { if (get_halt(k.pos, cnv->get_owner()) == self) { registered_convoys.append(cnv); break; } } } } } // This entire loop is just for the assertion below. // Consider deleting the assertion --neroden bool grund_is_where_it_should_be = false; const planquadrat_t* plan = welt->access(pos); for( uint8 i=0; i < plan->get_boden_count(); i++ ) { const grund_t* found_gr = plan->get_boden_bei(i); if (found_gr == gr) { grund_is_where_it_should_be = true; break; } } if ( !grund_is_where_it_should_be || gr->get_halt() != self || !gr->is_halt() ) { dbg->error( "haltestelle_t::add_grund()", "no ground added to (%s)", gr->get_pos().get_str() ); } init_pos = tiles.front().grund->get_pos().get_2d(); welt->set_schedule_counter(); return true; } bool haltestelle_t::rem_grund(grund_t *gr) { // namen merken if(!gr) { return false; } slist_tpl<tile_t>::iterator i = std::find(tiles.begin(), tiles.end(), gr); if (i == tiles.end()) { // was not part of station => do nothing dbg->error("haltestelle_t::rem_grund()","removed illegal ground from halt"); return false; } // first tile => remove name from this tile ... char buf[256]; const char* station_name_to_transfer = NULL; if (i == tiles.begin() && i->grund->get_name()) { tstrncpy(buf, get_name(), lengthof(buf)); station_name_to_transfer = buf; set_name(NULL); } // now remove tile from list tiles.erase(i); welt->set_schedule_counter(); init_pos = tiles.empty() ? koord::invalid : tiles.front().grund->get_pos().get_2d(); // re-add name if (station_name_to_transfer != NULL && !tiles.empty()) { label_t *lb = tiles.front().grund->find<label_t>(); delete lb; set_name( station_name_to_transfer ); } bool remove_halt = true; planquadrat_t *pl = welt->access( gr->get_pos().get_2d() ); if(pl) { // no longer present on this level gr->set_halt(halthandle_t()); // still connected elsewhere? for(unsigned i=0; i<pl->get_boden_count(); i++ ) { if(pl->get_boden_bei(i)->get_halt()==self) { // still connected with other ground => do not remove from plan ... remove_halt = false; break; } } } if (remove_halt) { // otherwise remove from plan ... if (pl) { pl->get_kartenboden()->set_flag(grund_t::dirty); } uint16 const cov = welt->get_settings().get_station_coverage(); for (int y = -cov; y <= cov; y++) { for (int x = -cov; x <= cov; x++) { planquadrat_t *pl = welt->access( gr->get_pos().get_2d()+koord(x,y) ); if(pl) { pl->remove_from_haltlist(self); pl->get_kartenboden()->set_flag(grund_t::dirty); } } } // factory reach may have been changed ... verbinde_fabriken(); } // needs to be done, if this was a dock recalc_station_type(); // remove lines eventually for( size_t j = registered_lines.get_count(); j-- != 0; ) { bool ok = false; FOR( minivec_tpl<schedule_entry_t>, const& k, registered_lines[j]->get_schedule()->entries ) { if( get_halt(k.pos, registered_lines[j]->get_owner()) == self ) { ok = true; break; } } // need removal? if(!ok) { stale_lines.append_unique( registered_lines[j] ); registered_lines.remove_at(j); } } // Knightly : remove registered lineless convoys as well for( size_t j = registered_convoys.get_count(); j-- != 0; ) { bool ok = false; FOR( minivec_tpl<schedule_entry_t>, const& k, registered_convoys[j]->get_schedule()->entries ) { if( get_halt(k.pos, registered_convoys[j]->get_owner()) == self ) { ok = true; break; } } // need removal? if( !ok ) { stale_convois.append_unique( registered_convoys[j] ); registered_convoys.remove_at(j); } } return true; } bool haltestelle_t::existiert_in_welt() const { return !tiles.empty(); } /* marks a coverage area * @author prissi */ void haltestelle_t::mark_unmark_coverage(const bool mark) const { // iterate over all tiles uint16 const cov = welt->get_settings().get_station_coverage(); koord const size(cov * 2 + 1, cov * 2 + 1); FOR(slist_tpl<tile_t>, const& i, tiles) { welt->mark_area(i.grund->get_pos() - size / 2, size, mark); } } /* Find a tile where this type of vehicle could stop * @author prissi */ const grund_t *haltestelle_t::find_matching_position(const waytype_t w) const { // iterate over all tiles FOR(slist_tpl<tile_t>, const& i, tiles) { if (i.grund->hat_weg(w)) { return i.grund; } } return NULL; } /* checks, if there is an unoccupied loading bay for this kind of thing * @author prissi */ bool haltestelle_t::find_free_position(const waytype_t w,convoihandle_t cnv,const obj_t::typ d) const { // iterate over all tiles FOR(slist_tpl<tile_t>, const& i, tiles) { if (i.reservation == cnv || !i.reservation.is_bound()) { // not reserved grund_t* const gr = i.grund; assert(gr); // found a stop for this waytype but without object d ... if(gr->hat_weg(w) && gr->suche_obj(d)==NULL) { // not occupied return true; } } } return false; } /* reserves a position (caution: railblocks work differently! * @author prissi */ bool haltestelle_t::reserve_position(grund_t *gr,convoihandle_t cnv) { slist_tpl<tile_t>::iterator i = std::find(tiles.begin(), tiles.end(), gr); if (i != tiles.end()) { if (i->reservation == cnv) { //DBG_MESSAGE("haltestelle_t::reserve_position()","gr=%d,%d already reserved by cnv=%d",gr->get_pos().x,gr->get_pos().y,cnv.get_id()); return true; } // not reserved if (!i->reservation.is_bound()) { grund_t* gr = i->grund; if(gr) { // found a stop for this waytype but without object d ... vehicle_t const& v = *cnv->front(); if (gr->hat_weg(v.get_waytype()) && !gr->suche_obj(v.get_typ())) { // not occupied //DBG_MESSAGE("haltestelle_t::reserve_position()","success for gr=%i,%i cnv=%d",gr->get_pos().x,gr->get_pos().y,cnv.get_id()); i->reservation = cnv; return true; } } } } //DBG_MESSAGE("haltestelle_t::reserve_position()","failed for gr=%i,%i, cnv=%d",gr->get_pos().x,gr->get_pos().y,cnv.get_id()); return false; } /* frees a reserved position (caution: railblocks work differently! * @author prissi */ bool haltestelle_t::unreserve_position(grund_t *gr, convoihandle_t cnv) { slist_tpl<tile_t>::iterator i = std::find(tiles.begin(), tiles.end(), gr); if (i != tiles.end()) { if (i->reservation == cnv) { i->reservation = convoihandle_t(); return true; } } DBG_MESSAGE("haltestelle_t::unreserve_position()","failed for gr=%p",gr); return false; } /* can a convoi reserve this position? * @author prissi */ bool haltestelle_t::is_reservable(const grund_t *gr, convoihandle_t cnv) const { FOR(slist_tpl<tile_t>, const& i, tiles) { if (gr == i.grund) { if (i.reservation == cnv) { DBG_MESSAGE("haltestelle_t::is_reservable()","gr=%d,%d already reserved by cnv=%d",gr->get_pos().x,gr->get_pos().y,cnv.get_id()); return true; } // not reserved if (!i.reservation.is_bound()) { // found a stop for this waytype but without object d ... vehicle_t const& v = *cnv->front(); if (gr->hat_weg(v.get_waytype()) && !gr->suche_obj(v.get_typ())) { // not occupied return true; } } return false; } } DBG_MESSAGE("haltestelle_t::reserve_position()","failed for gr=%i,%i, cnv=%d",gr->get_pos().x,gr->get_pos().y,cnv.get_id()); return false; } /* deletes factory references so map rotation won't segfault */ void haltestelle_t::release_factory_links() { FOR(slist_tpl<fabrik_t*>, const f, fab_list) { f->unlink_halt(self); } fab_list.clear(); } /* check if the station given is covered by this station */ bool haltestelle_t::is_halt_covered(const halthandle_t &halt) const { uint16 const cov = welt->get_settings().get_station_coverage(); FOR(slist_tpl<tile_t>, const& i, halt->get_tiles()) { if( gebaeude_t* const gb = i.grund->find<gebaeude_t>() ) { if ( koord_distance( gb->get_pos().get_2d(), get_next_pos( gb->get_pos().get_2d() )) <= cov ) { return true; } } } return false; }
; example of indexed addressing and a loop ; 10 SYS (49152) *=$0801 BYTE $0E, $08, $0A, $00, $9E, $20, $28, $34, $39, $31, $35, $32, $29, $00, $00, $00 *=$c000 jsr $e544 ldx #0 ldy #1 start tya sta 55296,x txa sta 1024,x inx cpx #255 bne start rts
#include <stdlib.h> #include "matmul.h" #include <stdio.h> Matrix Allocate2ndMatrix(int height, int width, int init); void matmul( float*, const float*, const float*, unsigned int, unsigned int, unsigned int); //////////////////////////////////////////////////////////////////////////////// //! C = A * B //! @param C result matrix //! @param A matrix A //! @param B matrix B //! @param hA height of matrix A //! @param wB width of matrix B //////////////////////////////////////////////////////////////////////////////// // Write a 16x16 floating point matrix to file void PrintMatTest(Matrix M) { /*** Print results ***/ fprintf(stderr,"Printing Matrix:\n"); for (unsigned int i=0; i<M.height; i++) { for (unsigned int j=0; j<M.width; j++) fprintf(stdout, "%.2f ", M.elements[i*M.width+j]); fprintf(stdout, "\n"); } fprintf(stderr,"******************************************************\n"); } void matmul(float* C, const float* A, const float* B, unsigned int hA, unsigned int wA, unsigned int wB) { for (unsigned int i = 0; i < hA; ++i) for (unsigned int j = 0; j < wB; ++j) { double sum = 0; for (unsigned int k = 0; k < wA; ++k) { double a = A[i * wA + k]; double b = B[k + j * wA]; sum += a * b; } C[i * wA + j] = (float)sum; } } // Allocate a matrix of dimensions height*width Matrix Allocate2ndMatrix(int height, int width) { Matrix M; M.width = M.pitch = width; M.height = height; int size = M.width * M.height; M.elements = NULL; M.elements = (float*) malloc(size*sizeof(float)); for(unsigned int i = 0; i < M.height; i++) { for(unsigned int j = 0; j < M.width; j++) { M.elements[i + j*M.width] = (rand() / (float)RAND_MAX); } } return M; }
; ; jidctflt.asm - floating-point IDCT (64-bit SSE & SSE2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2009, 2016, D. R. Commander. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; This file contains a floating-point implementation of the inverse DCT ; (Discrete Cosine Transform). The following code is based directly on ; the IJG's original jidctflt.c; see the jidctflt.c for more details. %include "jsimdext.inc" %include "jdct.inc" ; -------------------------------------------------------------------------- %macro unpcklps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(0 1 4 5) shufps %1, %2, 0x44 %endmacro %macro unpckhps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(2 3 6 7) shufps %1, %2, 0xEE %endmacro ; -------------------------------------------------------------------------- SECTION SEG_CONST alignz 32 GLOBAL_DATA(jconst_idct_float_sse2) EXTN(jconst_idct_float_sse2): PD_1_414 times 4 dd 1.414213562373095048801689 PD_1_847 times 4 dd 1.847759065022573512256366 PD_1_082 times 4 dd 1.082392200292393968799446 PD_M2_613 times 4 dd -2.613125929752753055713286 PD_RNDINT_MAGIC times 4 dd 100663296.0 ; (float)(0x00C00000 << 3) PB_CENTERJSAMP times 16 db CENTERJSAMPLE alignz 32 ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 64 ; ; Perform dequantization and inverse DCT on one block of coefficients. ; ; GLOBAL(void) ; jsimd_idct_float_sse2(void *dct_table, JCOEFPTR coef_block, ; JSAMPARRAY output_buf, JDIMENSION output_col) ; ; r10 = void *dct_table ; r11 = JCOEFPTR coef_block ; r12 = JSAMPARRAY output_buf ; r13d = JDIMENSION output_col %define original_rbp rbp + 0 %define wk(i) rbp - (WK_NUM - (i)) * SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 2 %define workspace wk(0) - DCTSIZE2 * SIZEOF_FAST_FLOAT ; FAST_FLOAT workspace[DCTSIZE2] align 32 GLOBAL_FUNCTION(jsimd_idct_float_sse2) EXTN(jsimd_idct_float_sse2): push rbp mov rax, rsp ; rax = original rbp sub rsp, byte 4 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [rsp], rax mov rbp, rsp ; rbp = aligned rbp lea rsp, [workspace] collect_args 4 push rbx ; ---- Pass 1: process columns from input, store into work array. mov rdx, r10 ; quantptr mov rsi, r11 ; inptr lea rdi, [workspace] ; FAST_FLOAT *wsptr mov rcx, DCTSIZE/4 ; ctr .columnloop: %ifndef NO_ZERO_COLUMN_TEST_FLOAT_SSE mov eax, dword [DWBLOCK(1,0,rsi,SIZEOF_JCOEF)] or eax, dword [DWBLOCK(2,0,rsi,SIZEOF_JCOEF)] jnz near .columnDCT movq xmm1, XMM_MMWORD [MMBLOCK(1,0,rsi,SIZEOF_JCOEF)] movq xmm2, XMM_MMWORD [MMBLOCK(2,0,rsi,SIZEOF_JCOEF)] movq xmm3, XMM_MMWORD [MMBLOCK(3,0,rsi,SIZEOF_JCOEF)] movq xmm4, XMM_MMWORD [MMBLOCK(4,0,rsi,SIZEOF_JCOEF)] movq xmm5, XMM_MMWORD [MMBLOCK(5,0,rsi,SIZEOF_JCOEF)] movq xmm6, XMM_MMWORD [MMBLOCK(6,0,rsi,SIZEOF_JCOEF)] movq xmm7, XMM_MMWORD [MMBLOCK(7,0,rsi,SIZEOF_JCOEF)] por xmm1, xmm2 por xmm3, xmm4 por xmm5, xmm6 por xmm1, xmm3 por xmm5, xmm7 por xmm1, xmm5 packsswb xmm1, xmm1 movd eax, xmm1 test rax, rax jnz short .columnDCT ; -- AC terms all zero movq xmm0, XMM_MMWORD [MMBLOCK(0,0,rsi,SIZEOF_JCOEF)] punpcklwd xmm0, xmm0 ; xmm0=(00 00 01 01 02 02 03 03) psrad xmm0, (DWORD_BIT-WORD_BIT) ; xmm0=in0=(00 01 02 03) cvtdq2ps xmm0, xmm0 ; xmm0=in0=(00 01 02 03) mulps xmm0, XMMWORD [XMMBLOCK(0,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] movaps xmm1, xmm0 movaps xmm2, xmm0 movaps xmm3, xmm0 shufps xmm0, xmm0, 0x00 ; xmm0=(00 00 00 00) shufps xmm1, xmm1, 0x55 ; xmm1=(01 01 01 01) shufps xmm2, xmm2, 0xAA ; xmm2=(02 02 02 02) shufps xmm3, xmm3, 0xFF ; xmm3=(03 03 03 03) movaps XMMWORD [XMMBLOCK(0,0,rdi,SIZEOF_FAST_FLOAT)], xmm0 movaps XMMWORD [XMMBLOCK(0,1,rdi,SIZEOF_FAST_FLOAT)], xmm0 movaps XMMWORD [XMMBLOCK(1,0,rdi,SIZEOF_FAST_FLOAT)], xmm1 movaps XMMWORD [XMMBLOCK(1,1,rdi,SIZEOF_FAST_FLOAT)], xmm1 movaps XMMWORD [XMMBLOCK(2,0,rdi,SIZEOF_FAST_FLOAT)], xmm2 movaps XMMWORD [XMMBLOCK(2,1,rdi,SIZEOF_FAST_FLOAT)], xmm2 movaps XMMWORD [XMMBLOCK(3,0,rdi,SIZEOF_FAST_FLOAT)], xmm3 movaps XMMWORD [XMMBLOCK(3,1,rdi,SIZEOF_FAST_FLOAT)], xmm3 jmp near .nextcolumn %endif .columnDCT: ; -- Even part movq xmm0, XMM_MMWORD [MMBLOCK(0,0,rsi,SIZEOF_JCOEF)] movq xmm1, XMM_MMWORD [MMBLOCK(2,0,rsi,SIZEOF_JCOEF)] movq xmm2, XMM_MMWORD [MMBLOCK(4,0,rsi,SIZEOF_JCOEF)] movq xmm3, XMM_MMWORD [MMBLOCK(6,0,rsi,SIZEOF_JCOEF)] punpcklwd xmm0, xmm0 ; xmm0=(00 00 01 01 02 02 03 03) punpcklwd xmm1, xmm1 ; xmm1=(20 20 21 21 22 22 23 23) psrad xmm0, (DWORD_BIT-WORD_BIT) ; xmm0=in0=(00 01 02 03) psrad xmm1, (DWORD_BIT-WORD_BIT) ; xmm1=in2=(20 21 22 23) cvtdq2ps xmm0, xmm0 ; xmm0=in0=(00 01 02 03) cvtdq2ps xmm1, xmm1 ; xmm1=in2=(20 21 22 23) punpcklwd xmm2, xmm2 ; xmm2=(40 40 41 41 42 42 43 43) punpcklwd xmm3, xmm3 ; xmm3=(60 60 61 61 62 62 63 63) psrad xmm2, (DWORD_BIT-WORD_BIT) ; xmm2=in4=(40 41 42 43) psrad xmm3, (DWORD_BIT-WORD_BIT) ; xmm3=in6=(60 61 62 63) cvtdq2ps xmm2, xmm2 ; xmm2=in4=(40 41 42 43) cvtdq2ps xmm3, xmm3 ; xmm3=in6=(60 61 62 63) mulps xmm0, XMMWORD [XMMBLOCK(0,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm1, XMMWORD [XMMBLOCK(2,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm2, XMMWORD [XMMBLOCK(4,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm3, XMMWORD [XMMBLOCK(6,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] movaps xmm4, xmm0 movaps xmm5, xmm1 subps xmm0, xmm2 ; xmm0=tmp11 subps xmm1, xmm3 addps xmm4, xmm2 ; xmm4=tmp10 addps xmm5, xmm3 ; xmm5=tmp13 mulps xmm1, [rel PD_1_414] subps xmm1, xmm5 ; xmm1=tmp12 movaps xmm6, xmm4 movaps xmm7, xmm0 subps xmm4, xmm5 ; xmm4=tmp3 subps xmm0, xmm1 ; xmm0=tmp2 addps xmm6, xmm5 ; xmm6=tmp0 addps xmm7, xmm1 ; xmm7=tmp1 movaps XMMWORD [wk(1)], xmm4 ; tmp3 movaps XMMWORD [wk(0)], xmm0 ; tmp2 ; -- Odd part movq xmm2, XMM_MMWORD [MMBLOCK(1,0,rsi,SIZEOF_JCOEF)] movq xmm3, XMM_MMWORD [MMBLOCK(3,0,rsi,SIZEOF_JCOEF)] movq xmm5, XMM_MMWORD [MMBLOCK(5,0,rsi,SIZEOF_JCOEF)] movq xmm1, XMM_MMWORD [MMBLOCK(7,0,rsi,SIZEOF_JCOEF)] punpcklwd xmm2, xmm2 ; xmm2=(10 10 11 11 12 12 13 13) punpcklwd xmm3, xmm3 ; xmm3=(30 30 31 31 32 32 33 33) psrad xmm2, (DWORD_BIT-WORD_BIT) ; xmm2=in1=(10 11 12 13) psrad xmm3, (DWORD_BIT-WORD_BIT) ; xmm3=in3=(30 31 32 33) cvtdq2ps xmm2, xmm2 ; xmm2=in1=(10 11 12 13) cvtdq2ps xmm3, xmm3 ; xmm3=in3=(30 31 32 33) punpcklwd xmm5, xmm5 ; xmm5=(50 50 51 51 52 52 53 53) punpcklwd xmm1, xmm1 ; xmm1=(70 70 71 71 72 72 73 73) psrad xmm5, (DWORD_BIT-WORD_BIT) ; xmm5=in5=(50 51 52 53) psrad xmm1, (DWORD_BIT-WORD_BIT) ; xmm1=in7=(70 71 72 73) cvtdq2ps xmm5, xmm5 ; xmm5=in5=(50 51 52 53) cvtdq2ps xmm1, xmm1 ; xmm1=in7=(70 71 72 73) mulps xmm2, XMMWORD [XMMBLOCK(1,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm3, XMMWORD [XMMBLOCK(3,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm5, XMMWORD [XMMBLOCK(5,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm1, XMMWORD [XMMBLOCK(7,0,rdx,SIZEOF_FLOAT_MULT_TYPE)] movaps xmm4, xmm2 movaps xmm0, xmm5 addps xmm2, xmm1 ; xmm2=z11 addps xmm5, xmm3 ; xmm5=z13 subps xmm4, xmm1 ; xmm4=z12 subps xmm0, xmm3 ; xmm0=z10 movaps xmm1, xmm2 subps xmm2, xmm5 addps xmm1, xmm5 ; xmm1=tmp7 mulps xmm2, [rel PD_1_414] ; xmm2=tmp11 movaps xmm3, xmm0 addps xmm0, xmm4 mulps xmm0, [rel PD_1_847] ; xmm0=z5 mulps xmm3, [rel PD_M2_613] ; xmm3=(z10 * -2.613125930) mulps xmm4, [rel PD_1_082] ; xmm4=(z12 * 1.082392200) addps xmm3, xmm0 ; xmm3=tmp12 subps xmm4, xmm0 ; xmm4=tmp10 ; -- Final output stage subps xmm3, xmm1 ; xmm3=tmp6 movaps xmm5, xmm6 movaps xmm0, xmm7 addps xmm6, xmm1 ; xmm6=data0=(00 01 02 03) addps xmm7, xmm3 ; xmm7=data1=(10 11 12 13) subps xmm5, xmm1 ; xmm5=data7=(70 71 72 73) subps xmm0, xmm3 ; xmm0=data6=(60 61 62 63) subps xmm2, xmm3 ; xmm2=tmp5 movaps xmm1, xmm6 ; transpose coefficients(phase 1) unpcklps xmm6, xmm7 ; xmm6=(00 10 01 11) unpckhps xmm1, xmm7 ; xmm1=(02 12 03 13) movaps xmm3, xmm0 ; transpose coefficients(phase 1) unpcklps xmm0, xmm5 ; xmm0=(60 70 61 71) unpckhps xmm3, xmm5 ; xmm3=(62 72 63 73) movaps xmm7, XMMWORD [wk(0)] ; xmm7=tmp2 movaps xmm5, XMMWORD [wk(1)] ; xmm5=tmp3 movaps XMMWORD [wk(0)], xmm0 ; wk(0)=(60 70 61 71) movaps XMMWORD [wk(1)], xmm3 ; wk(1)=(62 72 63 73) addps xmm4, xmm2 ; xmm4=tmp4 movaps xmm0, xmm7 movaps xmm3, xmm5 addps xmm7, xmm2 ; xmm7=data2=(20 21 22 23) addps xmm5, xmm4 ; xmm5=data4=(40 41 42 43) subps xmm0, xmm2 ; xmm0=data5=(50 51 52 53) subps xmm3, xmm4 ; xmm3=data3=(30 31 32 33) movaps xmm2, xmm7 ; transpose coefficients(phase 1) unpcklps xmm7, xmm3 ; xmm7=(20 30 21 31) unpckhps xmm2, xmm3 ; xmm2=(22 32 23 33) movaps xmm4, xmm5 ; transpose coefficients(phase 1) unpcklps xmm5, xmm0 ; xmm5=(40 50 41 51) unpckhps xmm4, xmm0 ; xmm4=(42 52 43 53) movaps xmm3, xmm6 ; transpose coefficients(phase 2) unpcklps2 xmm6, xmm7 ; xmm6=(00 10 20 30) unpckhps2 xmm3, xmm7 ; xmm3=(01 11 21 31) movaps xmm0, xmm1 ; transpose coefficients(phase 2) unpcklps2 xmm1, xmm2 ; xmm1=(02 12 22 32) unpckhps2 xmm0, xmm2 ; xmm0=(03 13 23 33) movaps xmm7, XMMWORD [wk(0)] ; xmm7=(60 70 61 71) movaps xmm2, XMMWORD [wk(1)] ; xmm2=(62 72 63 73) movaps XMMWORD [XMMBLOCK(0,0,rdi,SIZEOF_FAST_FLOAT)], xmm6 movaps XMMWORD [XMMBLOCK(1,0,rdi,SIZEOF_FAST_FLOAT)], xmm3 movaps XMMWORD [XMMBLOCK(2,0,rdi,SIZEOF_FAST_FLOAT)], xmm1 movaps XMMWORD [XMMBLOCK(3,0,rdi,SIZEOF_FAST_FLOAT)], xmm0 movaps xmm6, xmm5 ; transpose coefficients(phase 2) unpcklps2 xmm5, xmm7 ; xmm5=(40 50 60 70) unpckhps2 xmm6, xmm7 ; xmm6=(41 51 61 71) movaps xmm3, xmm4 ; transpose coefficients(phase 2) unpcklps2 xmm4, xmm2 ; xmm4=(42 52 62 72) unpckhps2 xmm3, xmm2 ; xmm3=(43 53 63 73) movaps XMMWORD [XMMBLOCK(0,1,rdi,SIZEOF_FAST_FLOAT)], xmm5 movaps XMMWORD [XMMBLOCK(1,1,rdi,SIZEOF_FAST_FLOAT)], xmm6 movaps XMMWORD [XMMBLOCK(2,1,rdi,SIZEOF_FAST_FLOAT)], xmm4 movaps XMMWORD [XMMBLOCK(3,1,rdi,SIZEOF_FAST_FLOAT)], xmm3 .nextcolumn: add rsi, byte 4*SIZEOF_JCOEF ; coef_block add rdx, byte 4*SIZEOF_FLOAT_MULT_TYPE ; quantptr add rdi, 4*DCTSIZE*SIZEOF_FAST_FLOAT ; wsptr dec rcx ; ctr jnz near .columnloop ; -- Prefetch the next coefficient block prefetchnta [rsi + (DCTSIZE2-8)*SIZEOF_JCOEF + 0*32] prefetchnta [rsi + (DCTSIZE2-8)*SIZEOF_JCOEF + 1*32] prefetchnta [rsi + (DCTSIZE2-8)*SIZEOF_JCOEF + 2*32] prefetchnta [rsi + (DCTSIZE2-8)*SIZEOF_JCOEF + 3*32] ; ---- Pass 2: process rows from work array, store into output array. mov rax, [original_rbp] lea rsi, [workspace] ; FAST_FLOAT *wsptr mov rdi, r12 ; (JSAMPROW *) mov eax, r13d mov rcx, DCTSIZE/4 ; ctr .rowloop: ; -- Even part movaps xmm0, XMMWORD [XMMBLOCK(0,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm1, XMMWORD [XMMBLOCK(2,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm2, XMMWORD [XMMBLOCK(4,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm3, XMMWORD [XMMBLOCK(6,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm4, xmm0 movaps xmm5, xmm1 subps xmm0, xmm2 ; xmm0=tmp11 subps xmm1, xmm3 addps xmm4, xmm2 ; xmm4=tmp10 addps xmm5, xmm3 ; xmm5=tmp13 mulps xmm1, [rel PD_1_414] subps xmm1, xmm5 ; xmm1=tmp12 movaps xmm6, xmm4 movaps xmm7, xmm0 subps xmm4, xmm5 ; xmm4=tmp3 subps xmm0, xmm1 ; xmm0=tmp2 addps xmm6, xmm5 ; xmm6=tmp0 addps xmm7, xmm1 ; xmm7=tmp1 movaps XMMWORD [wk(1)], xmm4 ; tmp3 movaps XMMWORD [wk(0)], xmm0 ; tmp2 ; -- Odd part movaps xmm2, XMMWORD [XMMBLOCK(1,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm3, XMMWORD [XMMBLOCK(3,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm5, XMMWORD [XMMBLOCK(5,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm1, XMMWORD [XMMBLOCK(7,0,rsi,SIZEOF_FAST_FLOAT)] movaps xmm4, xmm2 movaps xmm0, xmm5 addps xmm2, xmm1 ; xmm2=z11 addps xmm5, xmm3 ; xmm5=z13 subps xmm4, xmm1 ; xmm4=z12 subps xmm0, xmm3 ; xmm0=z10 movaps xmm1, xmm2 subps xmm2, xmm5 addps xmm1, xmm5 ; xmm1=tmp7 mulps xmm2, [rel PD_1_414] ; xmm2=tmp11 movaps xmm3, xmm0 addps xmm0, xmm4 mulps xmm0, [rel PD_1_847] ; xmm0=z5 mulps xmm3, [rel PD_M2_613] ; xmm3=(z10 * -2.613125930) mulps xmm4, [rel PD_1_082] ; xmm4=(z12 * 1.082392200) addps xmm3, xmm0 ; xmm3=tmp12 subps xmm4, xmm0 ; xmm4=tmp10 ; -- Final output stage subps xmm3, xmm1 ; xmm3=tmp6 movaps xmm5, xmm6 movaps xmm0, xmm7 addps xmm6, xmm1 ; xmm6=data0=(00 10 20 30) addps xmm7, xmm3 ; xmm7=data1=(01 11 21 31) subps xmm5, xmm1 ; xmm5=data7=(07 17 27 37) subps xmm0, xmm3 ; xmm0=data6=(06 16 26 36) subps xmm2, xmm3 ; xmm2=tmp5 movaps xmm1, [rel PD_RNDINT_MAGIC] ; xmm1=[rel PD_RNDINT_MAGIC] pcmpeqd xmm3, xmm3 psrld xmm3, WORD_BIT ; xmm3={0xFFFF 0x0000 0xFFFF 0x0000 ..} addps xmm6, xmm1 ; xmm6=roundint(data0/8)=(00 ** 10 ** 20 ** 30 **) addps xmm7, xmm1 ; xmm7=roundint(data1/8)=(01 ** 11 ** 21 ** 31 **) addps xmm0, xmm1 ; xmm0=roundint(data6/8)=(06 ** 16 ** 26 ** 36 **) addps xmm5, xmm1 ; xmm5=roundint(data7/8)=(07 ** 17 ** 27 ** 37 **) pand xmm6, xmm3 ; xmm6=(00 -- 10 -- 20 -- 30 --) pslld xmm7, WORD_BIT ; xmm7=(-- 01 -- 11 -- 21 -- 31) pand xmm0, xmm3 ; xmm0=(06 -- 16 -- 26 -- 36 --) pslld xmm5, WORD_BIT ; xmm5=(-- 07 -- 17 -- 27 -- 37) por xmm6, xmm7 ; xmm6=(00 01 10 11 20 21 30 31) por xmm0, xmm5 ; xmm0=(06 07 16 17 26 27 36 37) movaps xmm1, XMMWORD [wk(0)] ; xmm1=tmp2 movaps xmm3, XMMWORD [wk(1)] ; xmm3=tmp3 addps xmm4, xmm2 ; xmm4=tmp4 movaps xmm7, xmm1 movaps xmm5, xmm3 addps xmm1, xmm2 ; xmm1=data2=(02 12 22 32) addps xmm3, xmm4 ; xmm3=data4=(04 14 24 34) subps xmm7, xmm2 ; xmm7=data5=(05 15 25 35) subps xmm5, xmm4 ; xmm5=data3=(03 13 23 33) movaps xmm2, [rel PD_RNDINT_MAGIC] ; xmm2=[rel PD_RNDINT_MAGIC] pcmpeqd xmm4, xmm4 psrld xmm4, WORD_BIT ; xmm4={0xFFFF 0x0000 0xFFFF 0x0000 ..} addps xmm3, xmm2 ; xmm3=roundint(data4/8)=(04 ** 14 ** 24 ** 34 **) addps xmm7, xmm2 ; xmm7=roundint(data5/8)=(05 ** 15 ** 25 ** 35 **) addps xmm1, xmm2 ; xmm1=roundint(data2/8)=(02 ** 12 ** 22 ** 32 **) addps xmm5, xmm2 ; xmm5=roundint(data3/8)=(03 ** 13 ** 23 ** 33 **) pand xmm3, xmm4 ; xmm3=(04 -- 14 -- 24 -- 34 --) pslld xmm7, WORD_BIT ; xmm7=(-- 05 -- 15 -- 25 -- 35) pand xmm1, xmm4 ; xmm1=(02 -- 12 -- 22 -- 32 --) pslld xmm5, WORD_BIT ; xmm5=(-- 03 -- 13 -- 23 -- 33) por xmm3, xmm7 ; xmm3=(04 05 14 15 24 25 34 35) por xmm1, xmm5 ; xmm1=(02 03 12 13 22 23 32 33) movdqa xmm2, [rel PB_CENTERJSAMP] ; xmm2=[rel PB_CENTERJSAMP] packsswb xmm6, xmm3 ; xmm6=(00 01 10 11 20 21 30 31 04 05 14 15 24 25 34 35) packsswb xmm1, xmm0 ; xmm1=(02 03 12 13 22 23 32 33 06 07 16 17 26 27 36 37) paddb xmm6, xmm2 paddb xmm1, xmm2 movdqa xmm4, xmm6 ; transpose coefficients(phase 2) punpcklwd xmm6, xmm1 ; xmm6=(00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33) punpckhwd xmm4, xmm1 ; xmm4=(04 05 06 07 14 15 16 17 24 25 26 27 34 35 36 37) movdqa xmm7, xmm6 ; transpose coefficients(phase 3) punpckldq xmm6, xmm4 ; xmm6=(00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17) punpckhdq xmm7, xmm4 ; xmm7=(20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37) pshufd xmm5, xmm6, 0x4E ; xmm5=(10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07) pshufd xmm3, xmm7, 0x4E ; xmm3=(30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27) mov rdx, JSAMPROW [rdi+0*SIZEOF_JSAMPROW] mov rbx, JSAMPROW [rdi+2*SIZEOF_JSAMPROW] movq XMM_MMWORD [rdx+rax*SIZEOF_JSAMPLE], xmm6 movq XMM_MMWORD [rbx+rax*SIZEOF_JSAMPLE], xmm7 mov rdx, JSAMPROW [rdi+1*SIZEOF_JSAMPROW] mov rbx, JSAMPROW [rdi+3*SIZEOF_JSAMPROW] movq XMM_MMWORD [rdx+rax*SIZEOF_JSAMPLE], xmm5 movq XMM_MMWORD [rbx+rax*SIZEOF_JSAMPLE], xmm3 add rsi, byte 4*SIZEOF_FAST_FLOAT ; wsptr add rdi, byte 4*SIZEOF_JSAMPROW dec rcx ; ctr jnz near .rowloop pop rbx uncollect_args 4 mov rsp, rbp ; rsp <- aligned rbp pop rsp ; rsp <- original rbp pop rbp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
; A004522: Generalized nim sum n + n in base 12. ; 0,2,4,6,8,10,0,2,4,6,8,10,24,26,28,30,32,34,24,26,28,30,32,34,48,50,52,54,56,58,48,50,52,54,56,58,72,74,76,78,80,82,72,74,76,78,80,82,96,98,100,102,104,106,96,98,100 mov $1,$0 div $0,6 mod $0,2 mul $0,6 add $1,1 mov $2,3 lpb $0,1 mov $0,4 sub $1,$2 sub $1,3 lpe sub $1,1 mul $1,2
/********************************************************************* * NAN - Native Abstractions for Node.js * * Copyright (c) 2015 NAN contributors * * MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md> ********************************************************************/ #include <nan.h> void Init (v8::Handle<v8::Object> target) { target->Set(NanNew<v8::String>("key"), NanNew<v8::String>("a property")); } NODE_MODULE(symbols, Init)
/* * @file elongation_simulation_processor.cpp * * @brief manager class to process parallel simulations output and save its results * * @author Fabio Hedayioglu * Contact: fheday@gmail.com * */ #include "elongation_simulation_processor.h" #include <fstream> #include <iostream> #if defined(COMIPLE_PYTHON_MODULE) || defined(TRANSLATIONSIMULATOR) #include <pybind11/pybind11.h> #include <pybind11/stl.h> namespace py = pybind11; void init_simulation_processor(py::module &mod) { py::class_<Simulations::SimulationProcessor>(mod, "SimulationProcessor") .def(py::init<std::string>()) // constructor .def("getClock", &Simulations::SimulationProcessor::getClock) .def("getRibosomes", &Simulations::SimulationProcessor::getRibosomes) .def("removeRibosomePositions", &Simulations::SimulationProcessor::removeRibosomePositions) .def("calculateRibosomeCollisions", &Simulations::SimulationProcessor::calculateRibosomeCollisions) .def("getCollidingRibosomes", &Simulations::SimulationProcessor::getCollidingRibosomes) .def("getStalledRibosomes", &Simulations::SimulationProcessor::getStalledRibosomes) .def("packData", &Simulations::SimulationProcessor::packData) .def("save", &Simulations::SimulationProcessor::save); } #endif Simulations::SimulationProcessor::SimulationProcessor(std::string file_name) { configuration_file_name = file_name; std::ifstream config_doc(file_name, std::ifstream::binary); Json::Value root; // the json document. config_doc >> root; parseJson(root); } Simulations::SimulationProcessor::SimulationProcessor(Json::Value root, std::string file_name) { configuration_file_name = file_name; parseJson(root); } void Simulations::SimulationProcessor::parseJson(Json::Value& root) { if (root.isMember("fasta_file")) fasta_file = root.get("fasta_file", "").asString(); if (root.isMember("initiation_rate")) initiation_rate = root.get("initiation_rate", -1).asFloat(); if (root.isMember("termination_rate")) termination_rate = root.get("termination_rate", -1).asFloat(); if (!root.isMember("clock")) { std::cout<<"Error. simulation file has no clock information.\n"; return; } if (!root.isMember("elongating_ribosomes")) { std::cout<<"Error. simulation file has no ribosomes position information.\n"; return; } if (root.isMember("clock")){ for (unsigned int i = 0; i < root["clock"].size(); ++i) { clock.emplace_back(root["clock"][i].asFloat()); } } if (root.isMember("elongating_ribosomes")){ for (unsigned int i = 0; i < root["elongating_ribosomes"].size(); ++i) { std::vector<int> entry(root["elongating_ribosomes"][i].size()); for (unsigned int j = 0; j < root["elongating_ribosomes"][i].size(); ++j) { entry[j] = root["elongating_ribosomes"][i][j].asInt(); } elongating_ribosomes.emplace_back(entry); } } if (root.isMember("colliding_ribosomes")) { for (unsigned int i = 0; i < root["colliding_ribosomes"].size(); ++i) { std::vector<int> entry(root["colliding_ribosomes"][i].size()); for (unsigned int j = 0; j < root["colliding_ribosomes"][i].size(); ++j) { entry[j] = root["colliding_ribosomes"][i][j].asInt(); } colliding_ribosomes.emplace_back(entry); } } if (root.isMember("stalling_ribosomes")) { for (unsigned int i = 0; i < root["stalling_ribosomes"].size(); ++i) { std::vector<int> entry(root["stalling_ribosomes"][i].size()); for (unsigned int j = 0; j < root["stalling_ribosomes"][i].size(); ++j) { entry[j] = root["stalling_ribosomes"][i][j].asInt(); } stalled_ribosomes.emplace_back(entry); } } } std::vector<float>& Simulations::SimulationProcessor::getClock() { return clock; } std::vector<std::vector<int>>& Simulations::SimulationProcessor::getRibosomes() { return elongating_ribosomes; } void Simulations::SimulationProcessor::removeRibosomePositions() { elongating_ribosomes.clear(); } void Simulations::SimulationProcessor::calculateRibosomeCollisions() { for (auto ribosomes_positions:elongating_ribosomes) { std::vector<int> collision_entry; std::vector<int> stall_entry; for (std::size_t i = 0; i < ribosomes_positions.size() - 1; i++) { if (ribosomes_positions[i + 1] - ribosomes_positions[i] == 10) { // colliding ribosome: collision with the next ribosome detected. collision_entry.emplace_back(ribosomes_positions[i]); } else if (!collision_entry.empty() && ribosomes_positions[i] - collision_entry.back() == 10) { //stalled ribosome: no collision with next ribosome, //but collision with previous ribosome detected. stall_entry.emplace_back(ribosomes_positions[i]); } } // check last entry. it can only stall. if (!collision_entry.empty() && ribosomes_positions.back() - collision_entry.back() == 10) { //stalled ribosome: no collision with next ribosome, //but collision with previous ribosome detected. stall_entry.emplace_back(ribosomes_positions.back()); } colliding_ribosomes.emplace_back(collision_entry); stalled_ribosomes.emplace_back(stall_entry); } } void Simulations::SimulationProcessor::packData() { //if we don't have ribosome position data, //then we can only keep entries where there is change //in collision. if (elongating_ribosomes.empty()) { std::vector<float> new_clock; std::vector<std::vector<int>> new_stalled; std::vector<std::vector<int>> new_collisions; // 1st entry is always added. new_clock.emplace_back(clock.front()); new_stalled.emplace_back(stalled_ribosomes.front()); new_collisions.emplace_back(colliding_ribosomes.front()); for (std::size_t i = 1; i < stalled_ribosomes.size(); i++) { //compare with the back of new lists. bool equals = true; auto &last_stalled_ribosomes = new_stalled.back(); if (stalled_ribosomes[i].size() == last_stalled_ribosomes.size()) { //check deeper. for (std::size_t j = 0; j < stalled_ribosomes[i].size(); j++) { if (stalled_ribosomes[i][j] != last_stalled_ribosomes[j]) { equals = false; break; } } // std::cout<<"\n"; } else { equals = false; } if (!equals) { // its a new entry. record. new_clock.emplace_back(clock[i]); new_stalled.emplace_back(stalled_ribosomes[i]); new_collisions.emplace_back(colliding_ribosomes[i]); } } //replace lists. clock = new_clock; stalled_ribosomes = new_stalled; colliding_ribosomes = new_collisions; } } std::vector<std::vector<int>>& Simulations::SimulationProcessor::getCollidingRibosomes() { return colliding_ribosomes; } std::vector<std::vector<int>>& Simulations::SimulationProcessor::getStalledRibosomes() { return stalled_ribosomes; } void Simulations::SimulationProcessor::save() { Json::Value newjson; newjson["fasta_file"] = fasta_file; newjson["initiation_rate"] = initiation_rate; newjson["termination_rate"] = termination_rate; auto generate_json_vector_of_vector = [&](auto data_vector) { Json::Value json_value; for (auto entry:data_vector){ Json::Value entry_vector; for (auto element:entry) entry_vector.append(element); json_value.append(entry_vector); } return json_value; }; for (auto time:clock) newjson["clock"].append(time); newjson["elongating_ribosomes"] = generate_json_vector_of_vector(elongating_ribosomes); newjson["colliding_ribosomes"] = generate_json_vector_of_vector(colliding_ribosomes); newjson["stalling_ribosomes"] = generate_json_vector_of_vector(stalled_ribosomes); // std::ifstream file_stream(configuration_file_name, std::ifstream::binary); // write in a nice readible way Json::StreamWriterBuilder builder; builder["commentStyle"] = "None"; // no comments. builder["indentation"] = " "; // four spaces identation std::unique_ptr<Json::StreamWriter> writer(builder.newStreamWriter()); std::ofstream config_doc_writer(configuration_file_name, std::ifstream::binary); writer->write(newjson, &config_doc_writer); return; }
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: clang-8 // <numeric> // Became constexpr in C++20 // template<class InputIterator, class OutputIterator, class T, // class BinaryOperation, class UnaryOperation> // OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, T init, // BinaryOperation binary_op, // UnaryOperation unary_op); #include <numeric> #include <algorithm> #include <array> #include <cassert> #include <functional> #include <iterator> #include "test_macros.h" #include "test_iterators.h" struct add_one { template <typename T> constexpr auto operator()(T x) const noexcept { return static_cast<T>(x + 1); } }; template <class Iter1, class BOp, class UOp, class T> TEST_CONSTEXPR_CXX20 void test(Iter1 first, Iter1 last, BOp bop, UOp uop, T init, const T *rFirst, const T *rLast) { assert((rLast - rFirst) <= 5); // or else increase the size of "out" T out[5]; // Not in place T *end = std::transform_exclusive_scan(first, last, out, init, bop, uop); assert(std::equal(out, end, rFirst, rLast)); // In place std::copy(first, last, out); end = std::transform_exclusive_scan(out, end, out, init, bop, uop); assert(std::equal(out, end, rFirst, rLast)); } template <class Iter> TEST_CONSTEXPR_CXX20 void test() { int ia[] = { 1, 3, 5, 7, 9 }; const int pResI0[] = { 0, 2, 6, 12, 20 }; // with add_one const int mResI0[] = { 0, 0, 0, 0, 0 }; const int pResN0[] = { 0, -1, -4, -9, -16 }; // with negate const int mResN0[] = { 0, 0, 0, 0, 0 }; const int pResI2[] = { 2, 4, 8, 14, 22 }; // with add_one const int mResI2[] = { 2, 4, 16, 96, 768 }; const int pResN2[] = { 2, 1, -2, -7, -14 }; // with negate const int mResN2[] = { 2, -2, 6, -30, 210 }; const unsigned sa = sizeof(ia) / sizeof(ia[0]); static_assert(sa == sizeof(pResI0) / sizeof(pResI0[0])); // just to be sure static_assert(sa == sizeof(mResI0) / sizeof(mResI0[0])); // just to be sure static_assert(sa == sizeof(pResN0) / sizeof(pResN0[0])); // just to be sure static_assert(sa == sizeof(mResN0) / sizeof(mResN0[0])); // just to be sure static_assert(sa == sizeof(pResI2) / sizeof(pResI2[0])); // just to be sure static_assert(sa == sizeof(mResI2) / sizeof(mResI2[0])); // just to be sure static_assert(sa == sizeof(pResN2) / sizeof(pResN2[0])); // just to be sure static_assert(sa == sizeof(mResN2) / sizeof(mResN2[0])); // just to be sure for (unsigned int i = 0; i < sa; ++i ) { test(Iter(ia), Iter(ia + i), std::plus<>(), add_one{}, 0, pResI0, pResI0 + i); test(Iter(ia), Iter(ia + i), std::multiplies<>(), add_one{}, 0, mResI0, mResI0 + i); test(Iter(ia), Iter(ia + i), std::plus<>(), std::negate<>(), 0, pResN0, pResN0 + i); test(Iter(ia), Iter(ia + i), std::multiplies<>(), std::negate<>(), 0, mResN0, mResN0 + i); test(Iter(ia), Iter(ia + i), std::plus<>(), add_one{}, 2, pResI2, pResI2 + i); test(Iter(ia), Iter(ia + i), std::multiplies<>(), add_one{}, 2, mResI2, mResI2 + i); test(Iter(ia), Iter(ia + i), std::plus<>(), std::negate<>(), 2, pResN2, pResN2 + i); test(Iter(ia), Iter(ia + i), std::multiplies<>(), std::negate<>(), 2, mResN2, mResN2 + i); } } constexpr size_t triangle(size_t n) { return n*(n+1)/2; } // Basic sanity TEST_CONSTEXPR_CXX20 void basic_tests() { { std::array<size_t, 10> v; std::fill(v.begin(), v.end(), 3); std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{50}, std::plus<>(), add_one{}); for (size_t i = 0; i < v.size(); ++i) assert(v[i] == 50 + i * 4); } { std::array<size_t, 10> v; std::iota(v.begin(), v.end(), 0); std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{30}, std::plus<>(), add_one{}); for (size_t i = 0; i < v.size(); ++i) assert(v[i] == 30 + triangle(i - 1) + i); } { std::array<size_t, 10> v; std::iota(v.begin(), v.end(), 1); std::transform_exclusive_scan(v.begin(), v.end(), v.begin(), size_t{40}, std::plus<>(), add_one{}); for (size_t i = 0; i < v.size(); ++i) assert(v[i] == 40 + triangle(i) + i); } { std::array<size_t, 0> v, res; std::transform_exclusive_scan(v.begin(), v.end(), res.begin(), size_t{40}, std::plus<>(), add_one{}); assert(res.empty()); } // Make sure that the calculations are done using the init typedef { std::array<unsigned char, 10> v; std::iota(v.begin(), v.end(), static_cast<unsigned char>(1)); std::array<size_t, 10> res; std::transform_exclusive_scan(v.begin(), v.end(), res.begin(), size_t{1}, std::multiplies<>(), add_one{}); assert(res.size() == 10); size_t j = 1; assert(res[0] == 1); for (size_t i = 1; i < res.size(); ++i) { j *= i + 1; assert(res[i] == j); } } } TEST_CONSTEXPR_CXX20 bool test() { basic_tests(); // All the iterator categories test<cpp17_input_iterator <const int*> >(); test<forward_iterator <const int*> >(); test<bidirectional_iterator<const int*> >(); test<random_access_iterator<const int*> >(); test<const int*>(); test< int*>(); return true; } int main(int, char**) { test(); #if TEST_STD_VER > 17 static_assert(test()); #endif return 0; }
; A070804: Number of primes not exceeding phi(n). ; 0,0,1,1,2,1,3,2,3,2,4,2,5,3,4,4,6,3,7,4,5,4,8,4,8,5,7,5,9,4,10,6,8,6,9,5,11,7,9,6,12,5,13,8,9,8,14,6,13,8,11,9,15,7,12,9,11,9,16,6,17,10,11,11,15,8,18,11,14,9,19,9,20,11,12,11,17,9,21,11,16,12,22,9,18,13,16,12,23,9,20,14,17,14,20,11,24,13,17,12,25,11,26,15,15,15,27,11,28,12,20,15,29,11,23,16,20,16,24,11,29,17,22,17,25,11,30,18,23,15,31,12,28,18,20,18,32,14,33,15,24,19,30,15,29,20,23,20,34,12,35,20,24,17,30,15,36,21,27,18,32,16,37,22,22,22,38,15,36,18,28,23,39,16,30,22,30,23,40,15,41,20,30,23,34,17,37,24,28,20,42,18,43,24,24,23,44,17,45,22,32,25,39,18,37,26,32,24,41,15,46,27,34,27,39,20,41,28,34,22,43,20,47,24,30,29,48,20,49,23,30,29,50,20,42,30,36,24,51,18,52,29,37,30,39,22,47,30,38,25 cal $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n. cal $0,230980 ; Number of primes <= n, starting at n=0. mov $1,$0
; DO NOT MODIFY THIS FILE DIRECTLY! ; author: @TinySecEx ; shadowssdt asm stub for 10.0.10586-sp0-windows-10-th2-1511 i386 .686 .mmx .xmm .model flat,stdcall option casemap:none option prologue:none option epilogue:none .code ; ULONG __stdcall NtUserGetOwnerTransformedMonitorRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetOwnerTransformedMonitorRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4096 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetOwnerTransformedMonitorRect ENDP ; ULONG __stdcall NtUserYieldTask( ); NtUserYieldTask PROC STDCALL mov eax , 4097 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserYieldTask ENDP ; ULONG __stdcall NtUserSetSensorPresence( ULONG arg_01 ); NtUserSetSensorPresence PROC STDCALL arg_01:DWORD mov eax , 4098 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetSensorPresence ENDP ; ULONG __stdcall NtGdiWidenPath( ULONG arg_01 ); NtGdiWidenPath PROC STDCALL arg_01:DWORD mov eax , 4099 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiWidenPath ENDP ; ULONG __stdcall NtGdiUpdateColors( ULONG arg_01 ); NtGdiUpdateColors PROC STDCALL arg_01:DWORD mov eax , 4100 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiUpdateColors ENDP ; ULONG __stdcall NtGdiUnrealizeObject( ULONG arg_01 ); NtGdiUnrealizeObject PROC STDCALL arg_01:DWORD mov eax , 4101 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiUnrealizeObject ENDP ; ULONG __stdcall NtGdiUnmapMemFont( ULONG arg_01 ); NtGdiUnmapMemFont PROC STDCALL arg_01:DWORD mov eax , 4102 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiUnmapMemFont ENDP ; ULONG __stdcall NtGdiUnloadPrinterDriver( ULONG arg_01 , ULONG arg_02 ); NtGdiUnloadPrinterDriver PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4103 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiUnloadPrinterDriver ENDP ; ULONG __stdcall NtGdiTransparentBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiTransparentBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4104 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiTransparentBlt ENDP ; ULONG __stdcall NtGdiTransformPoints( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiTransformPoints PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4105 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiTransformPoints ENDP ; ULONG __stdcall NtGdiSwapBuffers( ULONG arg_01 ); NtGdiSwapBuffers PROC STDCALL arg_01:DWORD mov eax , 4106 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSwapBuffers ENDP ; ULONG __stdcall NtGdiStrokePath( ULONG arg_01 ); NtGdiStrokePath PROC STDCALL arg_01:DWORD mov eax , 4107 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiStrokePath ENDP ; ULONG __stdcall NtGdiStrokeAndFillPath( ULONG arg_01 ); NtGdiStrokeAndFillPath PROC STDCALL arg_01:DWORD mov eax , 4108 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiStrokeAndFillPath ENDP ; ULONG __stdcall NtGdiStretchDIBitsInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); NtGdiStretchDIBitsInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 4109 call _label_sysenter ret 64 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiStretchDIBitsInternal ENDP ; ULONG __stdcall NtGdiStretchBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); NtGdiStretchBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 4110 call _label_sysenter ret 48 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiStretchBlt ENDP ; ULONG __stdcall NtGdiStartPage( ULONG arg_01 ); NtGdiStartPage PROC STDCALL arg_01:DWORD mov eax , 4111 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiStartPage ENDP ; ULONG __stdcall NtGdiStartDoc( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiStartDoc PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4112 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiStartDoc ENDP ; ULONG __stdcall NtGdiSetSizeDevice( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetSizeDevice PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4113 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetSizeDevice ENDP ; ULONG __stdcall NtGdiSetVirtualResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiSetVirtualResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4114 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetVirtualResolution ENDP ; ULONG __stdcall NtGdiSetTextJustification( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetTextJustification PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4115 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetTextJustification ENDP ; ULONG __stdcall NtGdiSetSystemPaletteUse( ULONG arg_01 , ULONG arg_02 ); NtGdiSetSystemPaletteUse PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4116 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetSystemPaletteUse ENDP ; ULONG __stdcall NtGdiSetRectRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiSetRectRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4117 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetRectRgn ENDP ; ULONG __stdcall NtGdiSetPixelFormat( ULONG arg_01 , ULONG arg_02 ); NtGdiSetPixelFormat PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4118 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetPixelFormat ENDP ; ULONG __stdcall NtGdiSetPixel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetPixel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4119 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetPixel ENDP ; ULONG __stdcall NtGdiSetOPMSigningKeyAndSequenceNumbers( ULONG arg_01 , ULONG arg_02 ); NtGdiSetOPMSigningKeyAndSequenceNumbers PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4120 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetOPMSigningKeyAndSequenceNumbers ENDP ; ULONG __stdcall NtGdiSetLayout( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetLayout PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4121 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetLayout ENDP ; ULONG __stdcall NtGdiMirrorWindowOrg( ULONG arg_01 ); NtGdiMirrorWindowOrg PROC STDCALL arg_01:DWORD mov eax , 4122 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMirrorWindowOrg ENDP ; ULONG __stdcall NtGdiGetDeviceWidth( ULONG arg_01 ); NtGdiGetDeviceWidth PROC STDCALL arg_01:DWORD mov eax , 4123 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDeviceWidth ENDP ; ULONG __stdcall NtGdiSetMiterLimit( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetMiterLimit PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4124 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetMiterLimit ENDP ; ULONG __stdcall NtGdiSetMetaRgn( ULONG arg_01 ); NtGdiSetMetaRgn PROC STDCALL arg_01:DWORD mov eax , 4125 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetMetaRgn ENDP ; ULONG __stdcall NtGdiSetMagicColors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetMagicColors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4126 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetMagicColors ENDP ; ULONG __stdcall NtGdiSetLinkedUFIs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetLinkedUFIs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4127 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetLinkedUFIs ENDP ; ULONG __stdcall NtGdiSetIcmMode( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetIcmMode PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4128 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetIcmMode ENDP ; ULONG __stdcall NtGdiSetFontXform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetFontXform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4129 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetFontXform ENDP ; ULONG __stdcall NtGdiSetFontEnumeration( ULONG arg_01 ); NtGdiSetFontEnumeration PROC STDCALL arg_01:DWORD mov eax , 4130 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetFontEnumeration ENDP ; ULONG __stdcall NtGdiSetDIBitsToDeviceInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); NtGdiSetDIBitsToDeviceInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 4131 call _label_sysenter ret 64 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetDIBitsToDeviceInternal ENDP ; ULONG __stdcall NtGdiSetDeviceGammaRamp( ULONG arg_01 , ULONG arg_02 ); NtGdiSetDeviceGammaRamp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4132 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetDeviceGammaRamp ENDP ; ULONG __stdcall NtGdiSetColorSpace( ULONG arg_01 , ULONG arg_02 ); NtGdiSetColorSpace PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4133 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetColorSpace ENDP ; ULONG __stdcall NtGdiSetColorAdjustment( ULONG arg_01 , ULONG arg_02 ); NtGdiSetColorAdjustment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4134 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetColorAdjustment ENDP ; ULONG __stdcall NtGdiSetBrushOrg( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetBrushOrg PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4135 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetBrushOrg ENDP ; ULONG __stdcall NtGdiSetBrushAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiSetBrushAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4136 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetBrushAttributes ENDP ; ULONG __stdcall NtGdiSetBoundsRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetBoundsRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4137 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetBoundsRect ENDP ; ULONG __stdcall NtGdiSetBitmapDimension( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetBitmapDimension PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4138 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetBitmapDimension ENDP ; ULONG __stdcall NtGdiSetBitmapBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSetBitmapBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4139 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetBitmapBits ENDP ; ULONG __stdcall NtGdiSetBitmapAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiSetBitmapAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4140 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetBitmapAttributes ENDP ; ULONG __stdcall NtGdiSelectPen( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectPen PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4141 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSelectPen ENDP ; ULONG __stdcall NtGdiSelectFont( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectFont PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4142 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSelectFont ENDP ; ULONG __stdcall NtGdiSelectClipPath( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectClipPath PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4143 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSelectClipPath ENDP ; ULONG __stdcall NtGdiSelectBrush( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4144 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSelectBrush ENDP ; ULONG __stdcall NtGdiSelectBitmap( ULONG arg_01 , ULONG arg_02 ); NtGdiSelectBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4145 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSelectBitmap ENDP ; ULONG __stdcall NtGdiScaleWindowExtEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiScaleWindowExtEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4146 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiScaleWindowExtEx ENDP ; ULONG __stdcall NtGdiScaleViewportExtEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiScaleViewportExtEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4147 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiScaleViewportExtEx ENDP ; ULONG __stdcall NtGdiSaveDC( ULONG arg_01 ); NtGdiSaveDC PROC STDCALL arg_01:DWORD mov eax , 4148 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSaveDC ENDP ; ULONG __stdcall NtGdiRoundRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiRoundRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4149 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRoundRect ENDP ; ULONG __stdcall NtGdiRestoreDC( ULONG arg_01 , ULONG arg_02 ); NtGdiRestoreDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4150 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRestoreDC ENDP ; ULONG __stdcall NtGdiResizePalette( ULONG arg_01 , ULONG arg_02 ); NtGdiResizePalette PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4151 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiResizePalette ENDP ; ULONG __stdcall NtGdiResetDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiResetDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4152 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiResetDC ENDP ; ULONG __stdcall NtGdiRemoveFontMemResourceEx( ULONG arg_01 ); NtGdiRemoveFontMemResourceEx PROC STDCALL arg_01:DWORD mov eax , 4153 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRemoveFontMemResourceEx ENDP ; ULONG __stdcall NtGdiRemoveFontResourceW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiRemoveFontResourceW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4154 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRemoveFontResourceW ENDP ; ULONG __stdcall NtGdiRectVisible( ULONG arg_01 , ULONG arg_02 ); NtGdiRectVisible PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4155 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRectVisible ENDP ; ULONG __stdcall NtGdiRectInRegion( ULONG arg_01 , ULONG arg_02 ); NtGdiRectInRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4156 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRectInRegion ENDP ; ULONG __stdcall NtGdiRectangle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiRectangle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4157 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRectangle ENDP ; ULONG __stdcall NtGdiQueryFontAssocInfo( ULONG arg_01 ); NtGdiQueryFontAssocInfo PROC STDCALL arg_01:DWORD mov eax , 4158 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiQueryFontAssocInfo ENDP ; ULONG __stdcall NtGdiQueryFonts( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiQueryFonts PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4159 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiQueryFonts ENDP ; ULONG __stdcall NtGdiPtVisible( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiPtVisible PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4160 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPtVisible ENDP ; ULONG __stdcall NtGdiPtInRegion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiPtInRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4161 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPtInRegion ENDP ; ULONG __stdcall NtGdiPolyTextOutW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiPolyTextOutW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4162 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPolyTextOutW ENDP ; ULONG __stdcall NtGdiPolyPolyDraw( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiPolyPolyDraw PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4163 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPolyPolyDraw ENDP ; ULONG __stdcall NtGdiPolyDraw( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiPolyDraw PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4164 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPolyDraw ENDP ; ULONG __stdcall NtGdiPlgBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiPlgBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4165 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPlgBlt ENDP ; ULONG __stdcall NtGdiPathToRegion( ULONG arg_01 ); NtGdiPathToRegion PROC STDCALL arg_01:DWORD mov eax , 4166 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPathToRegion ENDP ; ULONG __stdcall NtGdiPolyPatBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiPolyPatBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4167 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPolyPatBlt ENDP ; ULONG __stdcall NtGdiPatBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiPatBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4168 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPatBlt ENDP ; ULONG __stdcall NtGdiOpenDCW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiOpenDCW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4169 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiOpenDCW ENDP ; ULONG __stdcall NtGdiOffsetRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiOffsetRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4170 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiOffsetRgn ENDP ; ULONG __stdcall NtGdiOffsetClipRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiOffsetClipRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4171 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiOffsetClipRgn ENDP ; ULONG __stdcall NtGdiMoveTo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiMoveTo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4172 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMoveTo ENDP ; ULONG __stdcall NtGdiMonoBitmap( ULONG arg_01 ); NtGdiMonoBitmap PROC STDCALL arg_01:DWORD mov eax , 4173 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMonoBitmap ENDP ; ULONG __stdcall NtGdiModifyWorldTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiModifyWorldTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4174 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiModifyWorldTransform ENDP ; ULONG __stdcall NtGdiMaskBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 ); NtGdiMaskBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD mov eax , 4175 call _label_sysenter ret 52 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMaskBlt ENDP ; ULONG __stdcall NtGdiMakeInfoDC( ULONG arg_01 , ULONG arg_02 ); NtGdiMakeInfoDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4176 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMakeInfoDC ENDP ; ULONG __stdcall NtGdiMakeFontDir( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiMakeFontDir PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4177 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMakeFontDir ENDP ; ULONG __stdcall NtGdiLineTo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiLineTo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4178 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiLineTo ENDP ; ULONG __stdcall NtGdiInvertRgn( ULONG arg_01 , ULONG arg_02 ); NtGdiInvertRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4179 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiInvertRgn ENDP ; ULONG __stdcall NtGdiIntersectClipRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiIntersectClipRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4180 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiIntersectClipRect ENDP ; ULONG __stdcall NtGdiInitSpool( ); NtGdiInitSpool PROC STDCALL mov eax , 4181 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiInitSpool ENDP ; ULONG __stdcall NtGdiInit( ); NtGdiInit PROC STDCALL mov eax , 4182 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiInit ENDP ; ULONG __stdcall NtGdiIcmBrushInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiIcmBrushInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4183 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiIcmBrushInfo ENDP ; ULONG __stdcall NtGdiHfontCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiHfontCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4184 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiHfontCreate ENDP ; ULONG __stdcall NtGdiGradientFill( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGradientFill PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4185 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGradientFill ENDP ; ULONG __stdcall NtGdiGetWidthTable( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetWidthTable PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4186 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetWidthTable ENDP ; ULONG __stdcall NtGdiGetFontUnicodeRanges( ULONG arg_01 , ULONG arg_02 ); NtGdiGetFontUnicodeRanges PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4187 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetFontUnicodeRanges ENDP ; ULONG __stdcall NtGdiAddEmbFontToDC( ULONG arg_01 , ULONG arg_02 ); NtGdiAddEmbFontToDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4188 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAddEmbFontToDC ENDP ; ULONG __stdcall NtGdiChangeGhostFont( ULONG arg_01 , ULONG arg_02 ); NtGdiChangeGhostFont PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4189 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiChangeGhostFont ENDP ; ULONG __stdcall NtGdiGetEmbedFonts( ); NtGdiGetEmbedFonts PROC STDCALL mov eax , 4190 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetEmbedFonts ENDP ; ULONG __stdcall NtGdiGetUFIPathname( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiGetUFIPathname PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4191 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetUFIPathname ENDP ; ULONG __stdcall NtGdiGetEmbUFI( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetEmbUFI PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4192 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetEmbUFI ENDP ; ULONG __stdcall NtGdiGetUFI( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetUFI PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4193 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetUFI ENDP ; ULONG __stdcall NtGdiGetTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4194 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetTransform ENDP ; ULONG __stdcall NtGdiGetTextMetricsW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetTextMetricsW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4195 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetTextMetricsW ENDP ; ULONG __stdcall NtGdiGetTextFaceW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetTextFaceW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4196 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetTextFaceW ENDP ; ULONG __stdcall NtGdiGetTextExtentExW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiGetTextExtentExW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4197 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetTextExtentExW ENDP ; ULONG __stdcall NtGdiGetTextExtent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetTextExtent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4198 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetTextExtent ENDP ; ULONG __stdcall NtGdiGetTextCharsetInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetTextCharsetInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4199 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetTextCharsetInfo ENDP ; ULONG __stdcall NtGdiGetSystemPaletteUse( ULONG arg_01 ); NtGdiGetSystemPaletteUse PROC STDCALL arg_01:DWORD mov eax , 4200 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetSystemPaletteUse ENDP ; ULONG __stdcall NtGdiGetSuggestedOPMProtectedOutputArraySize( ULONG arg_01 , ULONG arg_02 ); NtGdiGetSuggestedOPMProtectedOutputArraySize PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4201 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetSuggestedOPMProtectedOutputArraySize ENDP ; ULONG __stdcall NtGdiGetStringBitmapW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetStringBitmapW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4202 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetStringBitmapW ENDP ; ULONG __stdcall NtGdiGetStockObject( ULONG arg_01 ); NtGdiGetStockObject PROC STDCALL arg_01:DWORD mov eax , 4203 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetStockObject ENDP ; ULONG __stdcall NtGdiGetStats( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetStats PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4204 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetStats ENDP ; ULONG __stdcall NtGdiGetSpoolMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetSpoolMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4205 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetSpoolMessage ENDP ; ULONG __stdcall NtGdiGetServerMetaFileBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetServerMetaFileBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4206 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetServerMetaFileBits ENDP ; ULONG __stdcall NtGdiGetRgnBox( ULONG arg_01 , ULONG arg_02 ); NtGdiGetRgnBox PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4207 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetRgnBox ENDP ; ULONG __stdcall NtGdiGetRegionData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetRegionData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4208 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetRegionData ENDP ; ULONG __stdcall NtGdiGetRealizationInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetRealizationInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4209 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetRealizationInfo ENDP ; ULONG __stdcall NtGdiGetRasterizerCaps( ULONG arg_01 , ULONG arg_02 ); NtGdiGetRasterizerCaps PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4210 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetRasterizerCaps ENDP ; ULONG __stdcall NtGdiGetRandomRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetRandomRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4211 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetRandomRgn ENDP ; ULONG __stdcall NtGdiGetPixel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetPixel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4212 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetPixel ENDP ; ULONG __stdcall NtGdiGetPath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetPath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4213 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetPath ENDP ; ULONG __stdcall NtGdiGetOutlineTextMetricsInternalW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetOutlineTextMetricsInternalW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4214 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetOutlineTextMetricsInternalW ENDP ; ULONG __stdcall NtGdiGetOPMRandomNumber( ULONG arg_01 , ULONG arg_02 ); NtGdiGetOPMRandomNumber PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4215 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetOPMRandomNumber ENDP ; ULONG __stdcall NtGdiGetObjectBitmapHandle( ULONG arg_01 , ULONG arg_02 ); NtGdiGetObjectBitmapHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4216 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetObjectBitmapHandle ENDP ; ULONG __stdcall NtGdiGetNearestPaletteIndex( ULONG arg_01 , ULONG arg_02 ); NtGdiGetNearestPaletteIndex PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4217 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetNearestPaletteIndex ENDP ; ULONG __stdcall NtGdiGetNearestColor( ULONG arg_01 , ULONG arg_02 ); NtGdiGetNearestColor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4218 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetNearestColor ENDP ; ULONG __stdcall NtGdiGetMonitorID( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetMonitorID PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4219 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetMonitorID ENDP ; ULONG __stdcall NtGdiGetMiterLimit( ULONG arg_01 , ULONG arg_02 ); NtGdiGetMiterLimit PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4220 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetMiterLimit ENDP ; ULONG __stdcall NtGdiGetLinkedUFIs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetLinkedUFIs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4221 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetLinkedUFIs ENDP ; ULONG __stdcall NtGdiGetKerningPairs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetKerningPairs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4222 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetKerningPairs ENDP ; ULONG __stdcall NtGdiGetOPMInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetOPMInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4223 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetOPMInformation ENDP ; ULONG __stdcall NtGdiGetGlyphOutline( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiGetGlyphOutline PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4224 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetGlyphOutline ENDP ; ULONG __stdcall NtGdiGetGlyphIndicesWInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetGlyphIndicesWInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4225 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetGlyphIndicesWInternal ENDP ; ULONG __stdcall NtGdiGetGlyphIndicesW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetGlyphIndicesW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4226 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetGlyphIndicesW ENDP ; ULONG __stdcall NtGdiGetFontResourceInfoInternalW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiGetFontResourceInfoInternalW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4227 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetFontResourceInfoInternalW ENDP ; ULONG __stdcall NtGdiGetFontFileInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetFontFileInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4228 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetFontFileInfo ENDP ; ULONG __stdcall NtGdiGetFontFileData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetFontFileData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4229 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetFontFileData ENDP ; ULONG __stdcall NtGdiGetFontData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiGetFontData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4230 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetFontData ENDP ; ULONG __stdcall NtGdiGetEudcTimeStampEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetEudcTimeStampEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4231 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetEudcTimeStampEx ENDP ; ULONG __stdcall NtGdiGetETM( ULONG arg_01 , ULONG arg_02 ); NtGdiGetETM PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4232 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetETM ENDP ; ULONG __stdcall NtGdiGetDIBitsInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiGetDIBitsInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4233 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDIBitsInternal ENDP ; ULONG __stdcall NtGdiGetDeviceCapsAll( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDeviceCapsAll PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4234 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDeviceCapsAll ENDP ; ULONG __stdcall NtGdiGetDeviceGammaRamp( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDeviceGammaRamp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4235 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDeviceGammaRamp ENDP ; ULONG __stdcall NtGdiGetDeviceCaps( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDeviceCaps PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4236 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDeviceCaps ENDP ; ULONG __stdcall NtGdiGetDCPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetDCPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4237 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDCPoint ENDP ; ULONG __stdcall NtGdiGetDCObject( ULONG arg_01 , ULONG arg_02 ); NtGdiGetDCObject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4238 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDCObject ENDP ; ULONG __stdcall NtGdiGetDCforBitmap( ULONG arg_01 ); NtGdiGetDCforBitmap PROC STDCALL arg_01:DWORD mov eax , 4239 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDCforBitmap ENDP ; ULONG __stdcall NtGdiGetDCDword( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetDCDword PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4240 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDCDword ENDP ; ULONG __stdcall NtGdiGetCurrentDpiInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetCurrentDpiInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4241 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCurrentDpiInfo ENDP ; ULONG __stdcall NtGdiGetCOPPCompatibleOPMInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetCOPPCompatibleOPMInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4242 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCOPPCompatibleOPMInformation ENDP ; ULONG __stdcall NtGdiGetColorSpaceforBitmap( ULONG arg_01 ); NtGdiGetColorSpaceforBitmap PROC STDCALL arg_01:DWORD mov eax , 4243 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetColorSpaceforBitmap ENDP ; ULONG __stdcall NtGdiGetColorAdjustment( ULONG arg_01 , ULONG arg_02 ); NtGdiGetColorAdjustment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4244 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetColorAdjustment ENDP ; ULONG __stdcall NtGdiGetCharWidthInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetCharWidthInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4245 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCharWidthInfo ENDP ; ULONG __stdcall NtGdiGetCharWidthW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetCharWidthW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4246 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCharWidthW ENDP ; ULONG __stdcall NtGdiGetCharSet( ULONG arg_01 ); NtGdiGetCharSet PROC STDCALL arg_01:DWORD mov eax , 4247 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCharSet ENDP ; ULONG __stdcall NtGdiGetCharacterPlacementW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetCharacterPlacementW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4248 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCharacterPlacementW ENDP ; ULONG __stdcall NtGdiGetCharABCWidthsW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiGetCharABCWidthsW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4249 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCharABCWidthsW ENDP ; ULONG __stdcall NtGdiGetCertificateSize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetCertificateSize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4250 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCertificateSize ENDP ; ULONG __stdcall NtGdiGetCertificate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetCertificate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4251 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCertificate ENDP ; ULONG __stdcall NtGdiGetCertificateSizeByHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetCertificateSizeByHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4252 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCertificateSizeByHandle ENDP ; ULONG __stdcall NtGdiGetCertificateByHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetCertificateByHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4253 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetCertificateByHandle ENDP ; ULONG __stdcall NtGdiGetBoundsRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetBoundsRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4254 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetBoundsRect ENDP ; ULONG __stdcall NtGdiGetBitmapDimension( ULONG arg_01 , ULONG arg_02 ); NtGdiGetBitmapDimension PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4255 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetBitmapDimension ENDP ; ULONG __stdcall NtGdiGetBitmapBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetBitmapBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4256 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetBitmapBits ENDP ; ULONG __stdcall NtGdiGetAppClipBox( ULONG arg_01 , ULONG arg_02 ); NtGdiGetAppClipBox PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4257 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetAppClipBox ENDP ; ULONG __stdcall NtGdiGetAndSetDCDword( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetAndSetDCDword PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4258 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetAndSetDCDword ENDP ; ULONG __stdcall NtGdiFullscreenControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiFullscreenControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4259 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFullscreenControl ENDP ; ULONG __stdcall NtGdiFrameRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiFrameRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4260 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFrameRgn ENDP ; ULONG __stdcall NtGdiForceUFIMapping( ULONG arg_01 , ULONG arg_02 ); NtGdiForceUFIMapping PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4261 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiForceUFIMapping ENDP ; ULONG __stdcall NtGdiFlush( ); NtGdiFlush PROC STDCALL mov eax , 4262 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFlush ENDP ; ULONG __stdcall NtGdiFlattenPath( ULONG arg_01 ); NtGdiFlattenPath PROC STDCALL arg_01:DWORD mov eax , 4263 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFlattenPath ENDP ; ULONG __stdcall NtGdiFillRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiFillRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4264 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFillRgn ENDP ; ULONG __stdcall NtGdiFillPath( ULONG arg_01 ); NtGdiFillPath PROC STDCALL arg_01:DWORD mov eax , 4265 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFillPath ENDP ; ULONG __stdcall NtGdiExtTextOutW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiExtTextOutW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4266 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtTextOutW ENDP ; ULONG __stdcall NtGdiExtSelectClipRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiExtSelectClipRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4267 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtSelectClipRgn ENDP ; ULONG __stdcall NtGdiExtGetObjectW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiExtGetObjectW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4268 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtGetObjectW ENDP ; ULONG __stdcall NtGdiExtFloodFill( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiExtFloodFill PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4269 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtFloodFill ENDP ; ULONG __stdcall NtGdiExtEscape( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiExtEscape PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4270 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtEscape ENDP ; ULONG __stdcall NtGdiExtCreateRegion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiExtCreateRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4271 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtCreateRegion ENDP ; ULONG __stdcall NtGdiExtCreatePen( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiExtCreatePen PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4272 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExtCreatePen ENDP ; ULONG __stdcall NtGdiExcludeClipRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiExcludeClipRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4273 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiExcludeClipRect ENDP ; ULONG __stdcall NtGdiEudcLoadUnloadLink( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiEudcLoadUnloadLink PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4274 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEudcLoadUnloadLink ENDP ; ULONG __stdcall NtGdiEqualRgn( ULONG arg_01 , ULONG arg_02 ); NtGdiEqualRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4275 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEqualRgn ENDP ; ULONG __stdcall NtGdiEnumObjects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEnumObjects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4276 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEnumObjects ENDP ; ULONG __stdcall NtGdiEnumFonts( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiEnumFonts PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4277 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEnumFonts ENDP ; ULONG __stdcall NtGdiEndPath( ULONG arg_01 ); NtGdiEndPath PROC STDCALL arg_01:DWORD mov eax , 4278 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEndPath ENDP ; ULONG __stdcall NtGdiEndPage( ULONG arg_01 ); NtGdiEndPage PROC STDCALL arg_01:DWORD mov eax , 4279 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEndPage ENDP ; ULONG __stdcall NtGdiEndGdiRendering( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEndGdiRendering PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4280 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEndGdiRendering ENDP ; ULONG __stdcall NtGdiEndDoc( ULONG arg_01 ); NtGdiEndDoc PROC STDCALL arg_01:DWORD mov eax , 4281 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEndDoc ENDP ; ULONG __stdcall NtGdiEnableEudc( ULONG arg_01 ); NtGdiEnableEudc PROC STDCALL arg_01:DWORD mov eax , 4282 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEnableEudc ENDP ; ULONG __stdcall NtGdiEllipse( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiEllipse PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4283 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEllipse ENDP ; ULONG __stdcall NtGdiDrawEscape( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDrawEscape PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4284 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDrawEscape ENDP ; ULONG __stdcall NtGdiDoPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiDoPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4285 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDoPalette ENDP ; ULONG __stdcall NtGdiDoBanding( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDoBanding PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4286 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDoBanding ENDP ; ULONG __stdcall NtGdiGetPerBandInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiGetPerBandInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4287 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetPerBandInfo ENDP ; ULONG __stdcall NtGdiDestroyOPMProtectedOutput( ULONG arg_01 ); NtGdiDestroyOPMProtectedOutput PROC STDCALL arg_01:DWORD mov eax , 4288 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDestroyOPMProtectedOutput ENDP ; ULONG __stdcall NtGdiDescribePixelFormat( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDescribePixelFormat PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4289 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDescribePixelFormat ENDP ; ULONG __stdcall NtGdiDeleteObjectApp( ULONG arg_01 ); NtGdiDeleteObjectApp PROC STDCALL arg_01:DWORD mov eax , 4290 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDeleteObjectApp ENDP ; ULONG __stdcall NtGdiDeleteColorTransform( ULONG arg_01 , ULONG arg_02 ); NtGdiDeleteColorTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4291 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDeleteColorTransform ENDP ; ULONG __stdcall NtGdiDeleteColorSpace( ULONG arg_01 ); NtGdiDeleteColorSpace PROC STDCALL arg_01:DWORD mov eax , 4292 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDeleteColorSpace ENDP ; ULONG __stdcall NtGdiDeleteClientObj( ULONG arg_01 ); NtGdiDeleteClientObj PROC STDCALL arg_01:DWORD mov eax , 4293 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDeleteClientObj ENDP ; ULONG __stdcall NtGdiDxgGenericThunk( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiDxgGenericThunk PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4294 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDxgGenericThunk ENDP ; ULONG __stdcall NtGdiDvpReleaseNotification( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpReleaseNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4295 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpReleaseNotification ENDP ; ULONG __stdcall NtGdiDvpAcquireNotification( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDvpAcquireNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4296 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpAcquireNotification ENDP ; ULONG __stdcall NtGdiDvpWaitForVideoPortSync( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpWaitForVideoPortSync PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4297 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpWaitForVideoPortSync ENDP ; ULONG __stdcall NtGdiDvpUpdateVideoPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDvpUpdateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4298 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpUpdateVideoPort ENDP ; ULONG __stdcall NtGdiDvpGetVideoSignalStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoSignalStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4299 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoSignalStatus ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortConnectInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortConnectInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4300 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortConnectInfo ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortOutputFormats( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortOutputFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4301 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortOutputFormats ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortLine( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortLine PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4302 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortLine ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortInputFormats( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortInputFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4303 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortInputFormats ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortFlipStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortFlipStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4304 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortFlipStatus ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortField( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortField PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4305 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortField ENDP ; ULONG __stdcall NtGdiDvpGetVideoPortBandwidth( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpGetVideoPortBandwidth PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4306 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpGetVideoPortBandwidth ENDP ; ULONG __stdcall NtGdiDvpFlipVideoPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDvpFlipVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4307 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpFlipVideoPort ENDP ; ULONG __stdcall NtGdiDvpDestroyVideoPort( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpDestroyVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4308 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpDestroyVideoPort ENDP ; ULONG __stdcall NtGdiDvpCreateVideoPort( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpCreateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4309 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpCreateVideoPort ENDP ; ULONG __stdcall NtGdiDvpColorControl( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpColorControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4310 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpColorControl ENDP ; ULONG __stdcall NtGdiDvpCanCreateVideoPort( ULONG arg_01 , ULONG arg_02 ); NtGdiDvpCanCreateVideoPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4311 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDvpCanCreateVideoPort ENDP ; ULONG __stdcall NtGdiDdWaitForVerticalBlank( ULONG arg_01 , ULONG arg_02 ); NtGdiDdWaitForVerticalBlank PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4312 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdWaitForVerticalBlank ENDP ; ULONG __stdcall NtGdiDdUpdateOverlay( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdUpdateOverlay PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4313 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdUpdateOverlay ENDP ; ULONG __stdcall NtGdiDdUnlockD3D( ULONG arg_01 , ULONG arg_02 ); NtGdiDdUnlockD3D PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4314 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdUnlockD3D ENDP ; ULONG __stdcall NtGdiDdUnlock( ULONG arg_01 , ULONG arg_02 ); NtGdiDdUnlock PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4315 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdUnlock ENDP ; ULONG __stdcall NtGdiDdUnattachSurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdUnattachSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4316 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdUnattachSurface ENDP ; ULONG __stdcall NtGdiDdSetOverlayPosition( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdSetOverlayPosition PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4317 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdSetOverlayPosition ENDP ; ULONG __stdcall NtGdiDdCreateSurfaceEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdCreateSurfaceEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4318 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateSurfaceEx ENDP ; ULONG __stdcall NtGdiDdSetGammaRamp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdSetGammaRamp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4319 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdSetGammaRamp ENDP ; ULONG __stdcall NtGdiDdSetExclusiveMode( ULONG arg_01 , ULONG arg_02 ); NtGdiDdSetExclusiveMode PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4320 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdSetExclusiveMode ENDP ; ULONG __stdcall NtGdiDdSetColorKey( ULONG arg_01 , ULONG arg_02 ); NtGdiDdSetColorKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4321 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdSetColorKey ENDP ; ULONG __stdcall NtGdiDdResetVisrgn( ULONG arg_01 , ULONG arg_02 ); NtGdiDdResetVisrgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4322 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdResetVisrgn ENDP ; ULONG __stdcall NtGdiDdRenderMoComp( ULONG arg_01 , ULONG arg_02 ); NtGdiDdRenderMoComp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4323 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdRenderMoComp ENDP ; ULONG __stdcall NtGdiDdReleaseDC( ULONG arg_01 ); NtGdiDdReleaseDC PROC STDCALL arg_01:DWORD mov eax , 4324 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdReleaseDC ENDP ; ULONG __stdcall NtGdiDdReenableDirectDrawObject( ULONG arg_01 , ULONG arg_02 ); NtGdiDdReenableDirectDrawObject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4325 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdReenableDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdQueryMoCompStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdQueryMoCompStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4326 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdQueryMoCompStatus ENDP ; ULONG __stdcall NtGdiDdQueryDirectDrawObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiDdQueryDirectDrawObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4327 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdQueryDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdLockD3D( ULONG arg_01 , ULONG arg_02 ); NtGdiDdLockD3D PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4328 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdLockD3D ENDP ; ULONG __stdcall NtGdiDdLock( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdLock PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4329 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdLock ENDP ; ULONG __stdcall NtGdiDdGetScanLine( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetScanLine PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4330 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetScanLine ENDP ; ULONG __stdcall NtGdiDdGetMoCompFormats( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetMoCompFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4331 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetMoCompFormats ENDP ; ULONG __stdcall NtGdiDdGetMoCompGuids( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetMoCompGuids PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4332 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetMoCompGuids ENDP ; ULONG __stdcall NtGdiDdGetMoCompBuffInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetMoCompBuffInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4333 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetMoCompBuffInfo ENDP ; ULONG __stdcall NtGdiDdGetInternalMoCompInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetInternalMoCompInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4334 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetInternalMoCompInfo ENDP ; ULONG __stdcall NtGdiDdGetFlipStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetFlipStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4335 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetFlipStatus ENDP ; ULONG __stdcall NtGdiDdGetDxHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdGetDxHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4336 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetDxHandle ENDP ; ULONG __stdcall NtGdiDdGetDriverInfo( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetDriverInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4337 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetDriverInfo ENDP ; ULONG __stdcall NtGdiDdGetDC( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetDC PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4338 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetDC ENDP ; ULONG __stdcall NtGdiDdGetBltStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetBltStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4339 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetBltStatus ENDP ; ULONG __stdcall NtGdiDdGetAvailDriverMemory( ULONG arg_01 , ULONG arg_02 ); NtGdiDdGetAvailDriverMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4340 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetAvailDriverMemory ENDP ; ULONG __stdcall NtGdiDdFlipToGDISurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdFlipToGDISurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4341 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdFlipToGDISurface ENDP ; ULONG __stdcall NtGdiDdFlip( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiDdFlip PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4342 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdFlip ENDP ; ULONG __stdcall NtGdiDdEndMoCompFrame( ULONG arg_01 , ULONG arg_02 ); NtGdiDdEndMoCompFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4343 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdEndMoCompFrame ENDP ; ULONG __stdcall NtGdiDdDestroyD3DBuffer( ULONG arg_01 ); NtGdiDdDestroyD3DBuffer PROC STDCALL arg_01:DWORD mov eax , 4344 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDestroyD3DBuffer ENDP ; ULONG __stdcall NtGdiDdDestroySurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDestroySurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4345 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDestroySurface ENDP ; ULONG __stdcall NtGdiDdDestroyMoComp( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDestroyMoComp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4346 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDestroyMoComp ENDP ; ULONG __stdcall NtGdiDdDeleteSurfaceObject( ULONG arg_01 ); NtGdiDdDeleteSurfaceObject PROC STDCALL arg_01:DWORD mov eax , 4347 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDeleteSurfaceObject ENDP ; ULONG __stdcall NtGdiDdDeleteDirectDrawObject( ULONG arg_01 ); NtGdiDdDeleteDirectDrawObject PROC STDCALL arg_01:DWORD mov eax , 4348 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDeleteDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdCreateSurfaceObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiDdCreateSurfaceObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4349 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateSurfaceObject ENDP ; ULONG __stdcall NtGdiDdCreateMoComp( ULONG arg_01 , ULONG arg_02 ); NtGdiDdCreateMoComp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4350 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateMoComp ENDP ; ULONG __stdcall NtGdiDdCreateD3DBuffer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiDdCreateD3DBuffer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4351 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateD3DBuffer ENDP ; ULONG __stdcall NtGdiDdCreateSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiDdCreateSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4352 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateSurface ENDP ; ULONG __stdcall NtGdiDdCreateDirectDrawObject( ULONG arg_01 ); NtGdiDdCreateDirectDrawObject PROC STDCALL arg_01:DWORD mov eax , 4353 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateDirectDrawObject ENDP ; ULONG __stdcall NtGdiDdColorControl( ULONG arg_01 , ULONG arg_02 ); NtGdiDdColorControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4354 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdColorControl ENDP ; ULONG __stdcall NtGdiDdCanCreateD3DBuffer( ULONG arg_01 , ULONG arg_02 ); NtGdiDdCanCreateD3DBuffer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4355 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCanCreateD3DBuffer ENDP ; ULONG __stdcall NtGdiDdCanCreateSurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdCanCreateSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4356 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCanCreateSurface ENDP ; ULONG __stdcall NtGdiDdBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4357 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdBlt ENDP ; ULONG __stdcall NtGdiDdBeginMoCompFrame( ULONG arg_01 , ULONG arg_02 ); NtGdiDdBeginMoCompFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4358 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdBeginMoCompFrame ENDP ; ULONG __stdcall NtGdiDdAttachSurface( ULONG arg_01 , ULONG arg_02 ); NtGdiDdAttachSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4359 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdAttachSurface ENDP ; ULONG __stdcall NtGdiDdAlphaBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdAlphaBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4360 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdAlphaBlt ENDP ; ULONG __stdcall NtGdiDdAddAttachedSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDdAddAttachedSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4361 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdAddAttachedSurface ENDP ; ULONG __stdcall NtGdiDdGetDriverState( ULONG arg_01 ); NtGdiDdGetDriverState PROC STDCALL arg_01:DWORD mov eax , 4362 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdGetDriverState ENDP ; ULONG __stdcall NtGdiD3dDrawPrimitives2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiD3dDrawPrimitives2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4363 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiD3dDrawPrimitives2 ENDP ; ULONG __stdcall NtGdiD3dValidateTextureStageState( ULONG arg_01 ); NtGdiD3dValidateTextureStageState PROC STDCALL arg_01:DWORD mov eax , 4364 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiD3dValidateTextureStageState ENDP ; ULONG __stdcall NtGdiD3dContextDestroyAll( ULONG arg_01 ); NtGdiD3dContextDestroyAll PROC STDCALL arg_01:DWORD mov eax , 4365 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiD3dContextDestroyAll ENDP ; ULONG __stdcall NtGdiD3dContextDestroy( ULONG arg_01 ); NtGdiD3dContextDestroy PROC STDCALL arg_01:DWORD mov eax , 4366 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiD3dContextDestroy ENDP ; ULONG __stdcall NtGdiD3dContextCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiD3dContextCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4367 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiD3dContextCreate ENDP ; ULONG __stdcall NtGdiCreateSolidBrush( ULONG arg_01 , ULONG arg_02 ); NtGdiCreateSolidBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4368 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateSolidBrush ENDP ; ULONG __stdcall NtGdiCreateServerMetaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiCreateServerMetaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4369 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateServerMetaFile ENDP ; ULONG __stdcall NtGdiCreateRoundRectRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiCreateRoundRectRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4370 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateRoundRectRgn ENDP ; ULONG __stdcall NtGdiCreateRectRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCreateRectRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4371 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateRectRgn ENDP ; ULONG __stdcall NtGdiCreatePen( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCreatePen PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4372 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreatePen ENDP ; ULONG __stdcall NtGdiCreatePatternBrushInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCreatePatternBrushInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4373 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreatePatternBrushInternal ENDP ; ULONG __stdcall NtGdiCreatePaletteInternal( ULONG arg_01 , ULONG arg_02 ); NtGdiCreatePaletteInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4374 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreatePaletteInternal ENDP ; ULONG __stdcall NtGdiCreateOPMProtectedOutputs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCreateOPMProtectedOutputs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4375 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateOPMProtectedOutputs ENDP ; ULONG __stdcall NtGdiCreateMetafileDC( ULONG arg_01 ); NtGdiCreateMetafileDC PROC STDCALL arg_01:DWORD mov eax , 4376 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateMetafileDC ENDP ; ULONG __stdcall NtGdiCreateHatchBrushInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCreateHatchBrushInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4377 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateHatchBrushInternal ENDP ; ULONG __stdcall NtGdiCreateHalftonePalette( ULONG arg_01 ); NtGdiCreateHalftonePalette PROC STDCALL arg_01:DWORD mov eax , 4378 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateHalftonePalette ENDP ; ULONG __stdcall NtGdiCreateEllipticRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCreateEllipticRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4379 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateEllipticRgn ENDP ; ULONG __stdcall NtGdiCreateSessionMappedDIBSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiCreateSessionMappedDIBSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4380 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateSessionMappedDIBSection ENDP ; ULONG __stdcall NtGdiCreateDIBSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiCreateDIBSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4381 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateDIBSection ENDP ; ULONG __stdcall NtGdiCreateDIBitmapInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiCreateDIBitmapInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4382 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateDIBitmapInternal ENDP ; ULONG __stdcall NtGdiCreateDIBBrush( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiCreateDIBBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4383 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateDIBBrush ENDP ; ULONG __stdcall NtGdiCreateCompatibleDC( ULONG arg_01 ); NtGdiCreateCompatibleDC PROC STDCALL arg_01:DWORD mov eax , 4384 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateCompatibleDC ENDP ; ULONG __stdcall NtGdiCreateCompatibleBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCreateCompatibleBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4385 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateCompatibleBitmap ENDP ; ULONG __stdcall NtGdiCreateColorTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiCreateColorTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4386 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateColorTransform ENDP ; ULONG __stdcall NtGdiCreateColorSpace( ULONG arg_01 ); NtGdiCreateColorSpace PROC STDCALL arg_01:DWORD mov eax , 4387 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateColorSpace ENDP ; ULONG __stdcall NtGdiCreateClientObj( ULONG arg_01 ); NtGdiCreateClientObj PROC STDCALL arg_01:DWORD mov eax , 4388 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateClientObj ENDP ; ULONG __stdcall NtGdiCreateBitmapFromDxSurface2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiCreateBitmapFromDxSurface2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4389 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateBitmapFromDxSurface2 ENDP ; ULONG __stdcall NtGdiCreateBitmapFromDxSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCreateBitmapFromDxSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4390 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateBitmapFromDxSurface ENDP ; ULONG __stdcall NtGdiCreateBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCreateBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4391 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCreateBitmap ENDP ; ULONG __stdcall NtGdiConvertMetafileRect( ULONG arg_01 , ULONG arg_02 ); NtGdiConvertMetafileRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4392 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiConvertMetafileRect ENDP ; ULONG __stdcall NtGdiConfigureOPMProtectedOutput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiConfigureOPMProtectedOutput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4393 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiConfigureOPMProtectedOutput ENDP ; ULONG __stdcall NtGdiComputeXformCoefficients( ULONG arg_01 ); NtGdiComputeXformCoefficients PROC STDCALL arg_01:DWORD mov eax , 4394 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiComputeXformCoefficients ENDP ; ULONG __stdcall NtGdiCombineTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCombineTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4395 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCombineTransform ENDP ; ULONG __stdcall NtGdiCombineRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiCombineRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4396 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCombineRgn ENDP ; ULONG __stdcall NtGdiColorCorrectPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiColorCorrectPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4397 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiColorCorrectPalette ENDP ; ULONG __stdcall NtGdiClearBrushAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiClearBrushAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4398 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiClearBrushAttributes ENDP ; ULONG __stdcall NtGdiClearBitmapAttributes( ULONG arg_01 , ULONG arg_02 ); NtGdiClearBitmapAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4399 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiClearBitmapAttributes ENDP ; ULONG __stdcall NtGdiCloseFigure( ULONG arg_01 ); NtGdiCloseFigure PROC STDCALL arg_01:DWORD mov eax , 4400 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCloseFigure ENDP ; ULONG __stdcall NtGdiCheckBitmapBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiCheckBitmapBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4401 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCheckBitmapBits ENDP ; ULONG __stdcall NtGdiCancelDC( ULONG arg_01 ); NtGdiCancelDC PROC STDCALL arg_01:DWORD mov eax , 4402 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCancelDC ENDP ; ULONG __stdcall NtGdiBitBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiBitBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4403 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBitBlt ENDP ; ULONG __stdcall NtGdiBeginPath( ULONG arg_01 ); NtGdiBeginPath PROC STDCALL arg_01:DWORD mov eax , 4404 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBeginPath ENDP ; ULONG __stdcall NtGdiBeginGdiRendering( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiBeginGdiRendering PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4405 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBeginGdiRendering ENDP ; ULONG __stdcall NtGdiArcInternal( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiArcInternal PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4406 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiArcInternal ENDP ; ULONG __stdcall NtGdiFontIsLinked( ULONG arg_01 ); NtGdiFontIsLinked PROC STDCALL arg_01:DWORD mov eax , 4407 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFontIsLinked ENDP ; ULONG __stdcall NtGdiAnyLinkedFonts( ); NtGdiAnyLinkedFonts PROC STDCALL mov eax , 4408 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAnyLinkedFonts ENDP ; ULONG __stdcall NtGdiAngleArc( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiAngleArc PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4409 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAngleArc ENDP ; ULONG __stdcall NtGdiAlphaBlend( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); NtGdiAlphaBlend PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 4410 call _label_sysenter ret 48 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAlphaBlend ENDP ; ULONG __stdcall NtGdiAddRemoteMMInstanceToDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiAddRemoteMMInstanceToDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4411 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAddRemoteMMInstanceToDC ENDP ; ULONG __stdcall NtGdiRemoveMergeFont( ULONG arg_01 , ULONG arg_02 ); NtGdiRemoveMergeFont PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4412 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiRemoveMergeFont ENDP ; ULONG __stdcall NtGdiAddFontMemResourceEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiAddFontMemResourceEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4413 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAddFontMemResourceEx ENDP ; ULONG __stdcall NtGdiAddRemoteFontToDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiAddRemoteFontToDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4414 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAddRemoteFontToDC ENDP ; ULONG __stdcall NtGdiAddFontResourceW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiAddFontResourceW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4415 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAddFontResourceW ENDP ; ULONG __stdcall NtGdiAbortPath( ULONG arg_01 ); NtGdiAbortPath PROC STDCALL arg_01:DWORD mov eax , 4416 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAbortPath ENDP ; ULONG __stdcall NtGdiAbortDoc( ULONG arg_01 ); NtGdiAbortDoc PROC STDCALL arg_01:DWORD mov eax , 4417 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiAbortDoc ENDP ; ULONG __stdcall NtUserDefSetText( ULONG arg_01 , ULONG arg_02 ); NtUserDefSetText PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4418 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDefSetText ENDP ; ULONG __stdcall NtUserDeferWindowPosAndBand( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtUserDeferWindowPosAndBand PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4419 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDeferWindowPosAndBand ENDP ; ULONG __stdcall NtUserDdeInitialize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserDdeInitialize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4420 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDdeInitialize ENDP ; ULONG __stdcall NtUserCanBrokerForceForeground( ULONG arg_01 ); NtUserCanBrokerForceForeground PROC STDCALL arg_01:DWORD mov eax , 4421 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCanBrokerForceForeground ENDP ; ULONG __stdcall NtUserCreateWindowStation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserCreateWindowStation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4422 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateWindowStation ENDP ; ULONG __stdcall NtUserCreateWindowEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 , ULONG arg_17 ); NtUserCreateWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD , arg_17:DWORD mov eax , 4423 call _label_sysenter ret 68 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateWindowEx ENDP ; ULONG __stdcall NtUserCreateLocalMemHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserCreateLocalMemHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4424 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateLocalMemHandle ENDP ; ULONG __stdcall NtUserCreateInputContext( ULONG arg_01 ); NtUserCreateInputContext PROC STDCALL arg_01:DWORD mov eax , 4425 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateInputContext ENDP ; ULONG __stdcall NtUserCreateDesktopEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserCreateDesktopEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4426 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateDesktopEx ENDP ; ULONG __stdcall NtUserCreateCaret( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserCreateCaret PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4427 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateCaret ENDP ; ULONG __stdcall NtUserCreateAcceleratorTable( ULONG arg_01 , ULONG arg_02 ); NtUserCreateAcceleratorTable PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4428 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateAcceleratorTable ENDP ; ULONG __stdcall NtUserCountClipboardFormats( ); NtUserCountClipboardFormats PROC STDCALL mov eax , 4429 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCountClipboardFormats ENDP ; ULONG __stdcall NtUserCopyAcceleratorTable( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCopyAcceleratorTable PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4430 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCopyAcceleratorTable ENDP ; ULONG __stdcall NtUserConvertMemHandle( ULONG arg_01 , ULONG arg_02 ); NtUserConvertMemHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4431 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserConvertMemHandle ENDP ; ULONG __stdcall NtUserConsoleControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserConsoleControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4432 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserConsoleControl ENDP ; ULONG __stdcall NtUserCloseWindowStation( ULONG arg_01 ); NtUserCloseWindowStation PROC STDCALL arg_01:DWORD mov eax , 4433 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCloseWindowStation ENDP ; ULONG __stdcall NtUserCloseDesktop( ULONG arg_01 ); NtUserCloseDesktop PROC STDCALL arg_01:DWORD mov eax , 4434 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCloseDesktop ENDP ; ULONG __stdcall NtUserCloseClipboard( ); NtUserCloseClipboard PROC STDCALL mov eax , 4435 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCloseClipboard ENDP ; ULONG __stdcall NtUserClipCursor( ULONG arg_01 ); NtUserClipCursor PROC STDCALL arg_01:DWORD mov eax , 4436 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserClipCursor ENDP ; ULONG __stdcall NtUserChildWindowFromPointEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserChildWindowFromPointEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4437 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserChildWindowFromPointEx ENDP ; ULONG __stdcall NtUserCheckMenuItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCheckMenuItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4438 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCheckMenuItem ENDP ; ULONG __stdcall NtUserCheckWindowThreadDesktop( ULONG arg_01 , ULONG arg_02 ); NtUserCheckWindowThreadDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4439 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCheckWindowThreadDesktop ENDP ; ULONG __stdcall NtUserDwmValidateWindow( ULONG arg_01 , ULONG arg_02 ); NtUserDwmValidateWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4440 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDwmValidateWindow ENDP ; ULONG __stdcall NtUserCheckAccessForIntegrityLevel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCheckAccessForIntegrityLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4441 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCheckAccessForIntegrityLevel ENDP ; ULONG __stdcall NtUserDisplayConfigSetDeviceInfo( ULONG arg_01 ); NtUserDisplayConfigSetDeviceInfo PROC STDCALL arg_01:DWORD mov eax , 4442 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDisplayConfigSetDeviceInfo ENDP ; ULONG __stdcall NtUserDisplayConfigGetDeviceInfo( ULONG arg_01 ); NtUserDisplayConfigGetDeviceInfo PROC STDCALL arg_01:DWORD mov eax , 4443 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDisplayConfigGetDeviceInfo ENDP ; ULONG __stdcall NtUserQueryDisplayConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserQueryDisplayConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4444 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserQueryDisplayConfig ENDP ; ULONG __stdcall NtUserSetDisplayConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetDisplayConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4445 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetDisplayConfig ENDP ; ULONG __stdcall NtUserGetDisplayConfigBufferSizes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetDisplayConfigBufferSizes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4446 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDisplayConfigBufferSizes ENDP ; ULONG __stdcall NtUserChangeDisplaySettings( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserChangeDisplaySettings PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4447 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserChangeDisplaySettings ENDP ; ULONG __stdcall NtUserChangeClipboardChain( ULONG arg_01 , ULONG arg_02 ); NtUserChangeClipboardChain PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4448 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserChangeClipboardChain ENDP ; ULONG __stdcall NtUserCallTwoParam( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCallTwoParam PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4449 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallTwoParam ENDP ; ULONG __stdcall NtUserCallOneParam( ULONG arg_01 , ULONG arg_02 ); NtUserCallOneParam PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4450 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallOneParam ENDP ; ULONG __stdcall NtUserCallNoParam( ULONG arg_01 ); NtUserCallNoParam PROC STDCALL arg_01:DWORD mov eax , 4451 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallNoParam ENDP ; ULONG __stdcall NtUserCallNextHookEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserCallNextHookEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4452 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallNextHookEx ENDP ; ULONG __stdcall NtUserCallMsgFilter( ULONG arg_01 , ULONG arg_02 ); NtUserCallMsgFilter PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4453 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallMsgFilter ENDP ; ULONG __stdcall NtUserCallHwndParamLock( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCallHwndParamLock PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4454 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallHwndParamLock ENDP ; ULONG __stdcall NtUserCallHwndParam( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCallHwndParam PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4455 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallHwndParam ENDP ; ULONG __stdcall NtUserCallHwndOpt( ULONG arg_01 , ULONG arg_02 ); NtUserCallHwndOpt PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4456 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallHwndOpt ENDP ; ULONG __stdcall NtUserCallHwndLock( ULONG arg_01 , ULONG arg_02 ); NtUserCallHwndLock PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4457 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallHwndLock ENDP ; ULONG __stdcall NtUserCallHwnd( ULONG arg_01 , ULONG arg_02 ); NtUserCallHwnd PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4458 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCallHwnd ENDP ; ULONG __stdcall NtUserBuildPropList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserBuildPropList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4459 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBuildPropList ENDP ; ULONG __stdcall NtUserBuildNameList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserBuildNameList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4460 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBuildNameList ENDP ; ULONG __stdcall NtUserBuildHwndList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserBuildHwndList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4461 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBuildHwndList ENDP ; ULONG __stdcall NtUserBuildHimcList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserBuildHimcList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4462 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBuildHimcList ENDP ; ULONG __stdcall NtUserBlockInput( ULONG arg_01 ); NtUserBlockInput PROC STDCALL arg_01:DWORD mov eax , 4463 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBlockInput ENDP ; ULONG __stdcall NtUserBitBltSysBmp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserBitBltSysBmp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4464 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBitBltSysBmp ENDP ; ULONG __stdcall NtUserBeginPaint( ULONG arg_01 , ULONG arg_02 ); NtUserBeginPaint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4465 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserBeginPaint ENDP ; ULONG __stdcall NtUserAttachThreadInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserAttachThreadInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4466 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAttachThreadInput ENDP ; ULONG __stdcall NtUserAssociateInputContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserAssociateInputContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4467 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAssociateInputContext ENDP ; ULONG __stdcall NtUserAlterWindowStyle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserAlterWindowStyle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4468 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAlterWindowStyle ENDP ; ULONG __stdcall NtUserAddClipboardFormatListener( ULONG arg_01 ); NtUserAddClipboardFormatListener PROC STDCALL arg_01:DWORD mov eax , 4469 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAddClipboardFormatListener ENDP ; ULONG __stdcall NtUserActivateKeyboardLayout( ULONG arg_01 , ULONG arg_02 ); NtUserActivateKeyboardLayout PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4470 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserActivateKeyboardLayout ENDP ; ULONG __stdcall NtUserDelegateCapturePointers( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserDelegateCapturePointers PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4471 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDelegateCapturePointers ENDP ; ULONG __stdcall NtUserDelegateInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserDelegateInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4472 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDelegateInput ENDP ; ULONG __stdcall NtUserDispatchMessage( ULONG arg_01 ); NtUserDispatchMessage PROC STDCALL arg_01:DWORD mov eax , 4473 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDispatchMessage ENDP ; ULONG __stdcall NtUserDisableProcessWindowFiltering( ); NtUserDisableProcessWindowFiltering PROC STDCALL mov eax , 4474 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDisableProcessWindowFiltering ENDP ; ULONG __stdcall NtUserDisableThreadIme( ULONG arg_01 ); NtUserDisableThreadIme PROC STDCALL arg_01:DWORD mov eax , 4475 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDisableThreadIme ENDP ; ULONG __stdcall NtUserDestroyWindow( ULONG arg_01 ); NtUserDestroyWindow PROC STDCALL arg_01:DWORD mov eax , 4476 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDestroyWindow ENDP ; ULONG __stdcall NtUserDestroyMenu( ULONG arg_01 ); NtUserDestroyMenu PROC STDCALL arg_01:DWORD mov eax , 4477 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDestroyMenu ENDP ; ULONG __stdcall NtUserDestroyInputContext( ULONG arg_01 ); NtUserDestroyInputContext PROC STDCALL arg_01:DWORD mov eax , 4478 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDestroyInputContext ENDP ; ULONG __stdcall NtUserDestroyCursor( ULONG arg_01 , ULONG arg_02 ); NtUserDestroyCursor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4479 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDestroyCursor ENDP ; ULONG __stdcall NtUserDestroyAcceleratorTable( ULONG arg_01 ); NtUserDestroyAcceleratorTable PROC STDCALL arg_01:DWORD mov eax , 4480 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDestroyAcceleratorTable ENDP ; ULONG __stdcall NtUserDeleteMenu( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserDeleteMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4481 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDeleteMenu ENDP ; ULONG __stdcall NtUserDoSoundDisconnect( ); NtUserDoSoundDisconnect PROC STDCALL mov eax , 4482 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDoSoundDisconnect ENDP ; ULONG __stdcall NtUserDoSoundConnect( ); NtUserDoSoundConnect PROC STDCALL mov eax , 4483 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDoSoundConnect ENDP ; ULONG __stdcall NtUserGhostWindowFromHungWindow( ULONG arg_01 ); NtUserGhostWindowFromHungWindow PROC STDCALL arg_01:DWORD mov eax , 4484 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGhostWindowFromHungWindow ENDP ; ULONG __stdcall NtUserGetWOWClass( ULONG arg_01 , ULONG arg_02 ); NtUserGetWOWClass PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4485 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWOWClass ENDP ; ULONG __stdcall NtUserGetWindowPlacement( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowPlacement PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4486 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowPlacement ENDP ; ULONG __stdcall NtUserGetWindowDisplayAffinity( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowDisplayAffinity PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4487 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowDisplayAffinity ENDP ; ULONG __stdcall NtUserGetWindowDC( ULONG arg_01 ); NtUserGetWindowDC PROC STDCALL arg_01:DWORD mov eax , 4488 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowDC ENDP ; ULONG __stdcall NtUserGetWindowCompositionAttribute( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowCompositionAttribute PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4489 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowCompositionAttribute ENDP ; ULONG __stdcall NtUserGetWindowCompositionInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowCompositionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4490 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowCompositionInfo ENDP ; ULONG __stdcall NtUserGetWindowBand( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowBand PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4491 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowBand ENDP ; ULONG __stdcall NtUserGetUpdateRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetUpdateRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4492 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetUpdateRgn ENDP ; ULONG __stdcall NtUserGetUpdateRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetUpdateRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4493 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetUpdateRect ENDP ; ULONG __stdcall NtUserGetUpdatedClipboardFormats( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetUpdatedClipboardFormats PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4494 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetUpdatedClipboardFormats ENDP ; ULONG __stdcall NtUserGetTopLevelWindow( ULONG arg_01 ); NtUserGetTopLevelWindow PROC STDCALL arg_01:DWORD mov eax , 4495 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetTopLevelWindow ENDP ; ULONG __stdcall NtUserGetTitleBarInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetTitleBarInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4496 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetTitleBarInfo ENDP ; ULONG __stdcall NtUserGetThreadState( ULONG arg_01 ); NtUserGetThreadState PROC STDCALL arg_01:DWORD mov eax , 4497 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetThreadState ENDP ; ULONG __stdcall NtUserGetThreadDesktop( ULONG arg_01 ); NtUserGetThreadDesktop PROC STDCALL arg_01:DWORD mov eax , 4498 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetThreadDesktop ENDP ; ULONG __stdcall NtUserGetSystemMenu( ULONG arg_01 , ULONG arg_02 ); NtUserGetSystemMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4499 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetSystemMenu ENDP ; ULONG __stdcall NtUserGetScrollBarInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetScrollBarInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4500 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetScrollBarInfo ENDP ; ULONG __stdcall NtUserGetRegisteredRawInputDevices( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetRegisteredRawInputDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4501 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetRegisteredRawInputDevices ENDP ; ULONG __stdcall NtUserGetRawInputDeviceList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetRawInputDeviceList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4502 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetRawInputDeviceList ENDP ; ULONG __stdcall NtUserGetRawInputDeviceInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetRawInputDeviceInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4503 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetRawInputDeviceInfo ENDP ; ULONG __stdcall NtUserGetRawInputData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetRawInputData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4504 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetRawInputData ENDP ; ULONG __stdcall NtUserGetRawInputBuffer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetRawInputBuffer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4505 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetRawInputBuffer ENDP ; ULONG __stdcall NtUserGetProcessWindowStation( ); NtUserGetProcessWindowStation PROC STDCALL mov eax , 4506 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetProcessWindowStation ENDP ; ULONG __stdcall NtUserGetPriorityClipboardFormat( ULONG arg_01 , ULONG arg_02 ); NtUserGetPriorityClipboardFormat PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4507 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPriorityClipboardFormat ENDP ; ULONG __stdcall NtUserGetOpenClipboardWindow( ); NtUserGetOpenClipboardWindow PROC STDCALL mov eax , 4508 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetOpenClipboardWindow ENDP ; ULONG __stdcall NtUserGetObjectInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetObjectInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4509 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetObjectInformation ENDP ; ULONG __stdcall NtUserGetMouseMovePointsEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetMouseMovePointsEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4510 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetMouseMovePointsEx ENDP ; ULONG __stdcall NtUserGetMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4511 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetMessage ENDP ; ULONG __stdcall NtUserGetMenuItemRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetMenuItemRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4512 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetMenuItemRect ENDP ; ULONG __stdcall NtUserGetMenuIndex( ULONG arg_01 , ULONG arg_02 ); NtUserGetMenuIndex PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4513 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetMenuIndex ENDP ; ULONG __stdcall NtUserGetMenuBarInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetMenuBarInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4514 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetMenuBarInfo ENDP ; ULONG __stdcall NtUserGetListBoxInfo( ULONG arg_01 ); NtUserGetListBoxInfo PROC STDCALL arg_01:DWORD mov eax , 4515 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetListBoxInfo ENDP ; ULONG __stdcall NtUserGetKeyState( ULONG arg_01 ); NtUserGetKeyState PROC STDCALL arg_01:DWORD mov eax , 4516 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetKeyState ENDP ; ULONG __stdcall NtUserGetKeyNameText( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetKeyNameText PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4517 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetKeyNameText ENDP ; ULONG __stdcall NtUserGetKeyboardState( ULONG arg_01 ); NtUserGetKeyboardState PROC STDCALL arg_01:DWORD mov eax , 4518 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetKeyboardState ENDP ; ULONG __stdcall NtUserGetKeyboardLayoutName( ULONG arg_01 ); NtUserGetKeyboardLayoutName PROC STDCALL arg_01:DWORD mov eax , 4519 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetKeyboardLayoutName ENDP ; ULONG __stdcall NtUserGetKeyboardLayoutList( ULONG arg_01 , ULONG arg_02 ); NtUserGetKeyboardLayoutList PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4520 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetKeyboardLayoutList ENDP ; ULONG __stdcall NtUserGetInternalWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetInternalWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4521 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetInternalWindowPos ENDP ; ULONG __stdcall NtUserGetInputLocaleInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetInputLocaleInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4522 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetInputLocaleInfo ENDP ; ULONG __stdcall NtUserGetImeInfoEx( ULONG arg_01 , ULONG arg_02 ); NtUserGetImeInfoEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4523 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetImeInfoEx ENDP ; ULONG __stdcall NtUserGetImeHotKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetImeHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4524 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetImeHotKey ENDP ; ULONG __stdcall NtUserGetIconSize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetIconSize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4525 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetIconSize ENDP ; ULONG __stdcall NtUserGetIconInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserGetIconInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4526 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetIconInfo ENDP ; ULONG __stdcall NtUserGetGUIThreadInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetGUIThreadInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4527 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetGUIThreadInfo ENDP ; ULONG __stdcall NtUserGetGuiResources( ULONG arg_01 , ULONG arg_02 ); NtUserGetGuiResources PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4528 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetGuiResources ENDP ; ULONG __stdcall NtUserGetForegroundWindow( ); NtUserGetForegroundWindow PROC STDCALL mov eax , 4529 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetForegroundWindow ENDP ; ULONG __stdcall NtUserGetDpiSystemMetrics( ULONG arg_01 , ULONG arg_02 ); NtUserGetDpiSystemMetrics PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4530 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDpiSystemMetrics ENDP ; ULONG __stdcall NtUserGetDoubleClickTime( ); NtUserGetDoubleClickTime PROC STDCALL mov eax , 4531 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDoubleClickTime ENDP ; ULONG __stdcall NtUserGetDesktopID( ULONG arg_01 , ULONG arg_02 ); NtUserGetDesktopID PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4532 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDesktopID ENDP ; ULONG __stdcall NtUserGetDCEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetDCEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4533 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDCEx ENDP ; ULONG __stdcall NtUserGetDC( ULONG arg_01 ); NtUserGetDC PROC STDCALL arg_01:DWORD mov eax , 4534 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDC ENDP ; ULONG __stdcall NtUserGetCursorInfo( ULONG arg_01 ); NtUserGetCursorInfo PROC STDCALL arg_01:DWORD mov eax , 4535 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCursorInfo ENDP ; ULONG __stdcall NtUserGetCursorFrameInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetCursorFrameInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4536 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCursorFrameInfo ENDP ; ULONG __stdcall NtUserGetCurrentInputMessageSource( ULONG arg_01 ); NtUserGetCurrentInputMessageSource PROC STDCALL arg_01:DWORD mov eax , 4537 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCurrentInputMessageSource ENDP ; ULONG __stdcall NtUserGetCIMSSM( ULONG arg_01 ); NtUserGetCIMSSM PROC STDCALL arg_01:DWORD mov eax , 4538 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCIMSSM ENDP ; ULONG __stdcall NtUserGetCPD( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetCPD PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4539 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCPD ENDP ; ULONG __stdcall NtUserGetControlColor( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetControlColor PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4540 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetControlColor ENDP ; ULONG __stdcall NtUserGetControlBrush( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetControlBrush PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4541 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetControlBrush ENDP ; ULONG __stdcall NtUserGetComboBoxInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetComboBoxInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4542 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetComboBoxInfo ENDP ; ULONG __stdcall NtUserGetClipCursor( ULONG arg_01 ); NtUserGetClipCursor PROC STDCALL arg_01:DWORD mov eax , 4543 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipCursor ENDP ; ULONG __stdcall NtUserGetClipboardViewer( ); NtUserGetClipboardViewer PROC STDCALL mov eax , 4544 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipboardViewer ENDP ; ULONG __stdcall NtUserGetClipboardSequenceNumber( ); NtUserGetClipboardSequenceNumber PROC STDCALL mov eax , 4545 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipboardSequenceNumber ENDP ; ULONG __stdcall NtUserGetClipboardOwner( ); NtUserGetClipboardOwner PROC STDCALL mov eax , 4546 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipboardOwner ENDP ; ULONG __stdcall NtUserGetClipboardFormatName( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetClipboardFormatName PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4547 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipboardFormatName ENDP ; ULONG __stdcall NtUserGetClipboardData( ULONG arg_01 , ULONG arg_02 ); NtUserGetClipboardData PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4548 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipboardData ENDP ; ULONG __stdcall NtUserGetClassName( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetClassName PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4549 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClassName ENDP ; ULONG __stdcall NtUserGetClassInfoEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetClassInfoEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4550 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClassInfoEx ENDP ; ULONG __stdcall NtUserGetCaretPos( ULONG arg_01 ); NtUserGetCaretPos PROC STDCALL arg_01:DWORD mov eax , 4551 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCaretPos ENDP ; ULONG __stdcall NtUserGetCaretBlinkTime( ); NtUserGetCaretBlinkTime PROC STDCALL mov eax , 4552 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCaretBlinkTime ENDP ; ULONG __stdcall NtUserGetAtomName( ULONG arg_01 , ULONG arg_02 ); NtUserGetAtomName PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4553 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetAtomName ENDP ; ULONG __stdcall NtUserGetAsyncKeyState( ULONG arg_01 ); NtUserGetAsyncKeyState PROC STDCALL arg_01:DWORD mov eax , 4554 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetAsyncKeyState ENDP ; ULONG __stdcall NtUserGetAppImeLevel( ULONG arg_01 ); NtUserGetAppImeLevel PROC STDCALL arg_01:DWORD mov eax , 4555 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetAppImeLevel ENDP ; ULONG __stdcall NtUserGetAncestor( ULONG arg_01 , ULONG arg_02 ); NtUserGetAncestor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4556 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetAncestor ENDP ; ULONG __stdcall NtUserGetAltTabInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserGetAltTabInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4557 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetAltTabInfo ENDP ; ULONG __stdcall NtUserFrostCrashedWindow( ULONG arg_01 , ULONG arg_02 ); NtUserFrostCrashedWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4558 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserFrostCrashedWindow ENDP ; ULONG __stdcall NtUserFlashWindowEx( ULONG arg_01 ); NtUserFlashWindowEx PROC STDCALL arg_01:DWORD mov eax , 4559 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserFlashWindowEx ENDP ; ULONG __stdcall NtUserFindWindowEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserFindWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4560 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserFindWindowEx ENDP ; ULONG __stdcall NtUserFindExistingCursorIcon( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserFindExistingCursorIcon PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4561 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserFindExistingCursorIcon ENDP ; ULONG __stdcall NtUserFillWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserFillWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4562 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserFillWindow ENDP ; ULONG __stdcall NtUserExcludeUpdateRgn( ULONG arg_01 , ULONG arg_02 ); NtUserExcludeUpdateRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4563 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserExcludeUpdateRgn ENDP ; ULONG __stdcall NtUserEvent( ULONG arg_01 ); NtUserEvent PROC STDCALL arg_01:DWORD mov eax , 4564 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEvent ENDP ; ULONG __stdcall NtUserEnumDisplaySettings( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserEnumDisplaySettings PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4565 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnumDisplaySettings ENDP ; ULONG __stdcall NtUserEnumDisplayMonitors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserEnumDisplayMonitors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4566 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnumDisplayMonitors ENDP ; ULONG __stdcall NtUserEnumDisplayDevices( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserEnumDisplayDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4567 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnumDisplayDevices ENDP ; ULONG __stdcall NtUserEndPaint( ULONG arg_01 , ULONG arg_02 ); NtUserEndPaint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4568 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEndPaint ENDP ; ULONG __stdcall NtUserEndMenu( ); NtUserEndMenu PROC STDCALL mov eax , 4569 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEndMenu ENDP ; ULONG __stdcall NtUserEndDeferWindowPosEx( ULONG arg_01 , ULONG arg_02 ); NtUserEndDeferWindowPosEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4570 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEndDeferWindowPosEx ENDP ; ULONG __stdcall NtUserEnableScrollBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserEnableScrollBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4571 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableScrollBar ENDP ; ULONG __stdcall NtUserEnableMenuItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserEnableMenuItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4572 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableMenuItem ENDP ; ULONG __stdcall NtUserEmptyClipboard( ); NtUserEmptyClipboard PROC STDCALL mov eax , 4573 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEmptyClipboard ENDP ; ULONG __stdcall NtUserDrawMenuBarTemp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserDrawMenuBarTemp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4574 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDrawMenuBarTemp ENDP ; ULONG __stdcall NtUserDrawIconEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtUserDrawIconEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4575 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDrawIconEx ENDP ; ULONG __stdcall NtUserDrawCaptionTemp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserDrawCaptionTemp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4576 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDrawCaptionTemp ENDP ; ULONG __stdcall NtUserDrawCaption( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserDrawCaption PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4577 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDrawCaption ENDP ; ULONG __stdcall NtUserDrawAnimatedRects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserDrawAnimatedRects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4578 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDrawAnimatedRects ENDP ; ULONG __stdcall NtUserDragObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserDragObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4579 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDragObject ENDP ; ULONG __stdcall NtUserDragDetect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserDragDetect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4580 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDragDetect ENDP ; ULONG __stdcall NtUserHandleDelegatedInput( ULONG arg_01 , ULONG arg_02 ); NtUserHandleDelegatedInput PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4581 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHandleDelegatedInput ENDP ; ULONG __stdcall NtUserRealChildWindowFromPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRealChildWindowFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4582 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRealChildWindowFromPoint ENDP ; ULONG __stdcall NtUserQueryWindow( ULONG arg_01 , ULONG arg_02 ); NtUserQueryWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4583 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserQueryWindow ENDP ; ULONG __stdcall NtUserQuerySendMessage( ULONG arg_01 ); NtUserQuerySendMessage PROC STDCALL arg_01:DWORD mov eax , 4584 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserQuerySendMessage ENDP ; ULONG __stdcall NtUserQueryInputContext( ULONG arg_01 , ULONG arg_02 ); NtUserQueryInputContext PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4585 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserQueryInputContext ENDP ; ULONG __stdcall NtUserQueryInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserQueryInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4586 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserQueryInformationThread ENDP ; ULONG __stdcall NtUserQueryBSDRWindow( ); NtUserQueryBSDRWindow PROC STDCALL mov eax , 4587 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserQueryBSDRWindow ENDP ; ULONG __stdcall NtUserPerMonitorDPIPhysicalToLogicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserPerMonitorDPIPhysicalToLogicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4588 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPerMonitorDPIPhysicalToLogicalPoint ENDP ; ULONG __stdcall NtUserProcessConnect( ULONG arg_01 , ULONG arg_02 ); NtUserProcessConnect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4589 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserProcessConnect ENDP ; ULONG __stdcall NtUserPrintWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserPrintWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4590 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPrintWindow ENDP ; ULONG __stdcall NtUserPostThreadMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserPostThreadMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4591 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPostThreadMessage ENDP ; ULONG __stdcall NtUserPostMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserPostMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4592 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPostMessage ENDP ; ULONG __stdcall NtUserPhysicalToLogicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserPhysicalToLogicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4593 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPhysicalToLogicalPoint ENDP ; ULONG __stdcall NtUserPeekMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserPeekMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4594 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPeekMessage ENDP ; ULONG __stdcall NtUserPaintMonitor( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserPaintMonitor PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4595 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPaintMonitor ENDP ; ULONG __stdcall NtUserPaintDesktop( ULONG arg_01 ); NtUserPaintDesktop PROC STDCALL arg_01:DWORD mov eax , 4596 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPaintDesktop ENDP ; ULONG __stdcall NtUserOpenWindowStation( ULONG arg_01 , ULONG arg_02 ); NtUserOpenWindowStation PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4597 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserOpenWindowStation ENDP ; ULONG __stdcall NtUserOpenThreadDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserOpenThreadDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4598 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserOpenThreadDesktop ENDP ; ULONG __stdcall NtUserOpenInputDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserOpenInputDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4599 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserOpenInputDesktop ENDP ; ULONG __stdcall NtUserOpenDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserOpenDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4600 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserOpenDesktop ENDP ; ULONG __stdcall NtUserOpenClipboard( ULONG arg_01 , ULONG arg_02 ); NtUserOpenClipboard PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4601 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserOpenClipboard ENDP ; ULONG __stdcall NtUserNotifyWinEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserNotifyWinEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4602 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserNotifyWinEvent ENDP ; ULONG __stdcall NtUserNotifyProcessCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserNotifyProcessCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4603 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserNotifyProcessCreate ENDP ; ULONG __stdcall NtUserNotifyIMEStatus( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserNotifyIMEStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4604 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserNotifyIMEStatus ENDP ; ULONG __stdcall NtUserMoveWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserMoveWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4605 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMoveWindow ENDP ; ULONG __stdcall NtUserModifyUserStartupInfoFlags( ULONG arg_01 , ULONG arg_02 ); NtUserModifyUserStartupInfoFlags PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4606 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserModifyUserStartupInfoFlags ENDP ; ULONG __stdcall NtUserMNDragOver( ULONG arg_01 , ULONG arg_02 ); NtUserMNDragOver PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4607 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMNDragOver ENDP ; ULONG __stdcall NtUserMNDragLeave( ); NtUserMNDragLeave PROC STDCALL mov eax , 4608 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMNDragLeave ENDP ; ULONG __stdcall NtUserMinMaximize( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserMinMaximize PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4609 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMinMaximize ENDP ; ULONG __stdcall NtUserMessageCall( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserMessageCall PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4610 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMessageCall ENDP ; ULONG __stdcall NtUserMenuItemFromPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMenuItemFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4611 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMenuItemFromPoint ENDP ; ULONG __stdcall NtUserMapVirtualKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMapVirtualKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4612 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMapVirtualKeyEx ENDP ; ULONG __stdcall NtUserLayoutCompleted( ULONG arg_01 ); NtUserLayoutCompleted PROC STDCALL arg_01:DWORD mov eax , 4613 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLayoutCompleted ENDP ; ULONG __stdcall NtUserLogicalToPerMonitorDPIPhysicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserLogicalToPerMonitorDPIPhysicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4614 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLogicalToPerMonitorDPIPhysicalPoint ENDP ; ULONG __stdcall NtUserLogicalToPhysicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserLogicalToPhysicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4615 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLogicalToPhysicalPoint ENDP ; ULONG __stdcall NtUserLockWorkStation( ); NtUserLockWorkStation PROC STDCALL mov eax , 4616 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLockWorkStation ENDP ; ULONG __stdcall NtUserLockWindowUpdate( ULONG arg_01 ); NtUserLockWindowUpdate PROC STDCALL arg_01:DWORD mov eax , 4617 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLockWindowUpdate ENDP ; ULONG __stdcall NtUserLockWindowStation( ULONG arg_01 ); NtUserLockWindowStation PROC STDCALL arg_01:DWORD mov eax , 4618 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLockWindowStation ENDP ; ULONG __stdcall NtUserLoadKeyboardLayoutEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserLoadKeyboardLayoutEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4619 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLoadKeyboardLayoutEx ENDP ; ULONG __stdcall NtUserKillTimer( ULONG arg_01 , ULONG arg_02 ); NtUserKillTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4620 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserKillTimer ENDP ; ULONG __stdcall NtUserIsTopLevelWindow( ULONG arg_01 ); NtUserIsTopLevelWindow PROC STDCALL arg_01:DWORD mov eax , 4621 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsTopLevelWindow ENDP ; ULONG __stdcall NtUserIsClipboardFormatAvailable( ULONG arg_01 ); NtUserIsClipboardFormatAvailable PROC STDCALL arg_01:DWORD mov eax , 4622 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsClipboardFormatAvailable ENDP ; ULONG __stdcall NtUserInvalidateRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInvalidateRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4623 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInvalidateRgn ENDP ; ULONG __stdcall NtUserInvalidateRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInvalidateRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4624 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInvalidateRect ENDP ; ULONG __stdcall NtUserInternalGetWindowIcon( ULONG arg_01 , ULONG arg_02 ); NtUserInternalGetWindowIcon PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4625 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInternalGetWindowIcon ENDP ; ULONG __stdcall NtUserInternalGetWindowText( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInternalGetWindowText PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4626 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInternalGetWindowText ENDP ; ULONG __stdcall NtUserInitTask( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); NtUserInitTask PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 4627 call _label_sysenter ret 48 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInitTask ENDP ; ULONG __stdcall NtUserInitializeClientPfnArrays( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserInitializeClientPfnArrays PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4628 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInitializeClientPfnArrays ENDP ; ULONG __stdcall NtUserInitialize( ULONG arg_01 , ULONG arg_02 ); NtUserInitialize PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4629 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInitialize ENDP ; ULONG __stdcall NtUserImpersonateDdeClientWindow( ULONG arg_01 , ULONG arg_02 ); NtUserImpersonateDdeClientWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4630 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserImpersonateDdeClientWindow ENDP ; ULONG __stdcall NtUserHungWindowFromGhostWindow( ULONG arg_01 ); NtUserHungWindowFromGhostWindow PROC STDCALL arg_01:DWORD mov eax , 4631 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHungWindowFromGhostWindow ENDP ; ULONG __stdcall NtUserHiliteMenuItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserHiliteMenuItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4632 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHiliteMenuItem ENDP ; ULONG __stdcall NtUserHideCaret( ULONG arg_01 ); NtUserHideCaret PROC STDCALL arg_01:DWORD mov eax , 4633 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHideCaret ENDP ; ULONG __stdcall NtUserHardErrorControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserHardErrorControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4634 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHardErrorControl ENDP ; ULONG __stdcall NtUserRealInternalGetMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserRealInternalGetMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4635 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRealInternalGetMessage ENDP ; ULONG __stdcall NtUserRealWaitMessageEx( ULONG arg_01 , ULONG arg_02 ); NtUserRealWaitMessageEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4636 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRealWaitMessageEx ENDP ; ULONG __stdcall NtUserReleaseDwmHitTestWaiters( ); NtUserReleaseDwmHitTestWaiters PROC STDCALL mov eax , 4637 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserReleaseDwmHitTestWaiters ENDP ; ULONG __stdcall NtUserTranslateMessage( ULONG arg_01 , ULONG arg_02 ); NtUserTranslateMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4638 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTranslateMessage ENDP ; ULONG __stdcall NtUserTranslateAccelerator( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserTranslateAccelerator PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4639 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTranslateAccelerator ENDP ; ULONG __stdcall NtUserPaintMenuBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserPaintMenuBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4640 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPaintMenuBar ENDP ; ULONG __stdcall NtUserCalcMenuBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserCalcMenuBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4641 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCalcMenuBar ENDP ; ULONG __stdcall NtUserCalculatePopupWindowPosition( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserCalculatePopupWindowPosition PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4642 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCalculatePopupWindowPosition ENDP ; ULONG __stdcall NtUserTrackPopupMenuEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserTrackPopupMenuEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4643 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTrackPopupMenuEx ENDP ; ULONG __stdcall NtUserTrackMouseEvent( ULONG arg_01 ); NtUserTrackMouseEvent PROC STDCALL arg_01:DWORD mov eax , 4644 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTrackMouseEvent ENDP ; ULONG __stdcall NtUserToUnicodeEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserToUnicodeEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4645 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserToUnicodeEx ENDP ; ULONG __stdcall NtUserThunkedMenuItemInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserThunkedMenuItemInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4646 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserThunkedMenuItemInfo ENDP ; ULONG __stdcall NtUserThunkedMenuInfo( ULONG arg_01 , ULONG arg_02 ); NtUserThunkedMenuInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4647 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserThunkedMenuInfo ENDP ; ULONG __stdcall NtUserTestForInteractiveUser( ULONG arg_01 ); NtUserTestForInteractiveUser PROC STDCALL arg_01:DWORD mov eax , 4648 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTestForInteractiveUser ENDP ; ULONG __stdcall NtUserSendEventMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSendEventMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4649 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSendEventMessage ENDP ; ULONG __stdcall NtUserSystemParametersInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSystemParametersInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4650 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSystemParametersInfo ENDP ; ULONG __stdcall NtUserSwitchDesktop( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSwitchDesktop PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4651 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSwitchDesktop ENDP ; ULONG __stdcall NtUserSoundSentry( ); NtUserSoundSentry PROC STDCALL mov eax , 4652 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSoundSentry ENDP ; ULONG __stdcall NtUserShutdownReasonDestroy( ULONG arg_01 ); NtUserShutdownReasonDestroy PROC STDCALL arg_01:DWORD mov eax , 4653 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShutdownReasonDestroy ENDP ; ULONG __stdcall NtUserShutdownBlockReasonQuery( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserShutdownBlockReasonQuery PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4654 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShutdownBlockReasonQuery ENDP ; ULONG __stdcall NtUserShutdownBlockReasonCreate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserShutdownBlockReasonCreate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4655 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShutdownBlockReasonCreate ENDP ; ULONG __stdcall NtUserShowWindowAsync( ULONG arg_01 , ULONG arg_02 ); NtUserShowWindowAsync PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4656 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShowWindowAsync ENDP ; ULONG __stdcall NtUserShowWindow( ULONG arg_01 , ULONG arg_02 ); NtUserShowWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4657 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShowWindow ENDP ; ULONG __stdcall NtUserShowScrollBar( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserShowScrollBar PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4658 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShowScrollBar ENDP ; ULONG __stdcall NtUserShowCaret( ULONG arg_01 ); NtUserShowCaret PROC STDCALL arg_01:DWORD mov eax , 4659 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShowCaret ENDP ; ULONG __stdcall NtUserSetWinEventHook( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserSetWinEventHook PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4660 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWinEventHook ENDP ; ULONG __stdcall NtUserSetWindowWord( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowWord PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4661 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowWord ENDP ; ULONG __stdcall NtUserSetWindowStationUser( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetWindowStationUser PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4662 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowStationUser ENDP ; ULONG __stdcall NtUserSetWindowsHookEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserSetWindowsHookEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4663 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowsHookEx ENDP ; ULONG __stdcall NtUserSetWindowsHookAW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowsHookAW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4664 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowsHookAW ENDP ; ULONG __stdcall NtUserSetWindowRgnEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowRgnEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4665 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowRgnEx ENDP ; ULONG __stdcall NtUserGetWindowRgnEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetWindowRgnEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4666 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowRgnEx ENDP ; ULONG __stdcall NtUserSetWindowRgn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowRgn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4667 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowRgn ENDP ; ULONG __stdcall NtUserSetWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserSetWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4668 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowPos ENDP ; ULONG __stdcall NtUserSetWindowPlacement( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowPlacement PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4669 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowPlacement ENDP ; ULONG __stdcall NtUserSetWindowLong( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetWindowLong PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4670 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowLong ENDP ; ULONG __stdcall NtUserSetWindowFNID( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowFNID PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4671 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowFNID ENDP ; ULONG __stdcall NtUserSetWindowDisplayAffinity( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowDisplayAffinity PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4672 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowDisplayAffinity ENDP ; ULONG __stdcall NtUserSetWindowCompositionTransition( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserSetWindowCompositionTransition PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4673 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowCompositionTransition ENDP ; ULONG __stdcall NtUserUpdateDefaultDesktopThumbnail( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserUpdateDefaultDesktopThumbnail PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4674 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateDefaultDesktopThumbnail ENDP ; ULONG __stdcall NtUserSetWindowCompositionAttribute( ULONG arg_01 , ULONG arg_02 ); NtUserSetWindowCompositionAttribute PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4675 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowCompositionAttribute ENDP ; ULONG __stdcall NtUserSetWindowBand( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetWindowBand PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4676 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowBand ENDP ; ULONG __stdcall NtUserSetProcessUIAccessZorder( ); NtUserSetProcessUIAccessZorder PROC STDCALL mov eax , 4677 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetProcessUIAccessZorder ENDP ; ULONG __stdcall NtUserSetProcessDpiAwareness( ULONG arg_01 , ULONG arg_02 ); NtUserSetProcessDpiAwareness PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4678 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetProcessDpiAwareness ENDP ; ULONG __stdcall NtUserEnableChildWindowDpiMessage( ULONG arg_01 , ULONG arg_02 ); NtUserEnableChildWindowDpiMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4679 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableChildWindowDpiMessage ENDP ; ULONG __stdcall NtUserIsChildWindowDpiMessageEnabled( ULONG arg_01 ); NtUserIsChildWindowDpiMessageEnabled PROC STDCALL arg_01:DWORD mov eax , 4680 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsChildWindowDpiMessageEnabled ENDP ; ULONG __stdcall NtUserIsWindowBroadcastingDpiToChildren( ULONG arg_01 ); NtUserIsWindowBroadcastingDpiToChildren PROC STDCALL arg_01:DWORD mov eax , 4681 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsWindowBroadcastingDpiToChildren ENDP ; ULONG __stdcall NtUserSetTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4682 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetTimer ENDP ; ULONG __stdcall NtUserSetThreadState( ULONG arg_01 , ULONG arg_02 ); NtUserSetThreadState PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4683 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetThreadState ENDP ; ULONG __stdcall NtUserSetThreadLayoutHandles( ULONG arg_01 , ULONG arg_02 ); NtUserSetThreadLayoutHandles PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4684 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetThreadLayoutHandles ENDP ; ULONG __stdcall NtUserSetThreadDesktop( ULONG arg_01 ); NtUserSetThreadDesktop PROC STDCALL arg_01:DWORD mov eax , 4685 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetThreadDesktop ENDP ; ULONG __stdcall NtUserSetThreadInputBlocked( ULONG arg_01 , ULONG arg_02 ); NtUserSetThreadInputBlocked PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4686 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetThreadInputBlocked ENDP ; ULONG __stdcall NtUserSetSystemTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetSystemTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4687 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetSystemTimer ENDP ; ULONG __stdcall NtUserSetSystemMenu( ULONG arg_01 , ULONG arg_02 ); NtUserSetSystemMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4688 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetSystemMenu ENDP ; ULONG __stdcall NtUserSetSystemCursor( ULONG arg_01 , ULONG arg_02 ); NtUserSetSystemCursor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4689 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetSystemCursor ENDP ; ULONG __stdcall NtUserSetSysColors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetSysColors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4690 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetSysColors ENDP ; ULONG __stdcall NtUserSetShellWindowEx( ULONG arg_01 , ULONG arg_02 ); NtUserSetShellWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4691 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetShellWindowEx ENDP ; ULONG __stdcall NtUserSetScrollInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetScrollInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4692 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetScrollInfo ENDP ; ULONG __stdcall NtUserSetProp( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetProp PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4693 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetProp ENDP ; ULONG __stdcall NtUserGetProp( ULONG arg_01 , ULONG arg_02 ); NtUserGetProp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4694 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetProp ENDP ; ULONG __stdcall NtUserSetProcessWindowStation( ULONG arg_01 ); NtUserSetProcessWindowStation PROC STDCALL arg_01:DWORD mov eax , 4695 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetProcessWindowStation ENDP ; ULONG __stdcall NtUserSetParent( ULONG arg_01 , ULONG arg_02 ); NtUserSetParent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4696 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetParent ENDP ; ULONG __stdcall NtUserSetObjectInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetObjectInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4697 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetObjectInformation ENDP ; ULONG __stdcall NtUserSetMenuFlagRtoL( ULONG arg_01 ); NtUserSetMenuFlagRtoL PROC STDCALL arg_01:DWORD mov eax , 4698 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetMenuFlagRtoL ENDP ; ULONG __stdcall NtUserSetMenuDefaultItem( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetMenuDefaultItem PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4699 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetMenuDefaultItem ENDP ; ULONG __stdcall NtUserSetMenuContextHelpId( ULONG arg_01 , ULONG arg_02 ); NtUserSetMenuContextHelpId PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4700 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetMenuContextHelpId ENDP ; ULONG __stdcall NtUserSetMenu( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4701 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetMenu ENDP ; ULONG __stdcall NtUserSetKeyboardState( ULONG arg_01 ); NtUserSetKeyboardState PROC STDCALL arg_01:DWORD mov eax , 4702 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetKeyboardState ENDP ; ULONG __stdcall NtUserSetInternalWindowPos( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetInternalWindowPos PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4703 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetInternalWindowPos ENDP ; ULONG __stdcall NtUserSetInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4704 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetInformationThread ENDP ; ULONG __stdcall NtUserSetImeOwnerWindow( ULONG arg_01 , ULONG arg_02 ); NtUserSetImeOwnerWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4705 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetImeOwnerWindow ENDP ; ULONG __stdcall NtUserSetImeInfoEx( ULONG arg_01 ); NtUserSetImeInfoEx PROC STDCALL arg_01:DWORD mov eax , 4706 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetImeInfoEx ENDP ; ULONG __stdcall NtUserSetImeHotKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetImeHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4707 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetImeHotKey ENDP ; ULONG __stdcall NtUserSetFocus( ULONG arg_01 ); NtUserSetFocus PROC STDCALL arg_01:DWORD mov eax , 4708 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetFocus ENDP ; ULONG __stdcall NtUserSetCursorIconData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetCursorIconData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4709 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCursorIconData ENDP ; ULONG __stdcall NtUserSetCursorContents( ULONG arg_01 , ULONG arg_02 ); NtUserSetCursorContents PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4710 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCursorContents ENDP ; ULONG __stdcall NtUserSetCursor( ULONG arg_01 ); NtUserSetCursor PROC STDCALL arg_01:DWORD mov eax , 4711 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCursor ENDP ; ULONG __stdcall NtUserSetClipboardViewer( ULONG arg_01 ); NtUserSetClipboardViewer PROC STDCALL arg_01:DWORD mov eax , 4712 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetClipboardViewer ENDP ; ULONG __stdcall NtUserSetClipboardData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetClipboardData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4713 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetClipboardData ENDP ; ULONG __stdcall NtUserSetClassWord( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetClassWord PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4714 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetClassWord ENDP ; ULONG __stdcall NtUserSetClassLong( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetClassLong PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4715 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetClassLong ENDP ; ULONG __stdcall NtUserSetChildWindowNoActivate( ULONG arg_01 ); NtUserSetChildWindowNoActivate PROC STDCALL arg_01:DWORD mov eax , 4716 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetChildWindowNoActivate ENDP ; ULONG __stdcall NtUserSetCapture( ULONG arg_01 ); NtUserSetCapture PROC STDCALL arg_01:DWORD mov eax , 4717 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCapture ENDP ; ULONG __stdcall NtUserSetAppImeLevel( ULONG arg_01 , ULONG arg_02 ); NtUserSetAppImeLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4718 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetAppImeLevel ENDP ; ULONG __stdcall NtUserSetActiveWindow( ULONG arg_01 ); NtUserSetActiveWindow PROC STDCALL arg_01:DWORD mov eax , 4719 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetActiveWindow ENDP ; ULONG __stdcall NtUserSendInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSendInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4720 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSendInput ENDP ; ULONG __stdcall NtUserSelectPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSelectPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4721 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSelectPalette ENDP ; ULONG __stdcall NtUserScrollWindowEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserScrollWindowEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4722 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserScrollWindowEx ENDP ; ULONG __stdcall NtUserScrollDC( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserScrollDC PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4723 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserScrollDC ENDP ; ULONG __stdcall NtUserSBGetParms( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSBGetParms PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4724 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSBGetParms ENDP ; ULONG __stdcall NtUserResolveDesktopForWOW( ULONG arg_01 ); NtUserResolveDesktopForWOW PROC STDCALL arg_01:DWORD mov eax , 4725 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserResolveDesktopForWOW ENDP ; ULONG __stdcall NtUserRemoveProp( ULONG arg_01 , ULONG arg_02 ); NtUserRemoveProp PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4726 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoveProp ENDP ; ULONG __stdcall NtUserRemoveMenu( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRemoveMenu PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4727 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoveMenu ENDP ; ULONG __stdcall NtUserRemoveClipboardFormatListener( ULONG arg_01 ); NtUserRemoveClipboardFormatListener PROC STDCALL arg_01:DWORD mov eax , 4728 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoveClipboardFormatListener ENDP ; ULONG __stdcall NtUserRegisterWindowMessage( ULONG arg_01 ); NtUserRegisterWindowMessage PROC STDCALL arg_01:DWORD mov eax , 4729 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterWindowMessage ENDP ; ULONG __stdcall NtUserRegisterTasklist( ULONG arg_01 ); NtUserRegisterTasklist PROC STDCALL arg_01:DWORD mov eax , 4730 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterTasklist ENDP ; ULONG __stdcall NtUserRegisterServicesProcess( ULONG arg_01 ); NtUserRegisterServicesProcess PROC STDCALL arg_01:DWORD mov eax , 4731 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterServicesProcess ENDP ; ULONG __stdcall NtUserRegisterRawInputDevices( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRegisterRawInputDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4732 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterRawInputDevices ENDP ; ULONG __stdcall NtUserRegisterHotKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRegisterHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4733 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterHotKey ENDP ; ULONG __stdcall NtUserRegisterDManipHook( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRegisterDManipHook PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4734 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterDManipHook ENDP ; ULONG __stdcall NtUserGetDManipHookInitFunction( ULONG arg_01 , ULONG arg_02 ); NtUserGetDManipHookInitFunction PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4735 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDManipHookInitFunction ENDP ; ULONG __stdcall NtUserRegisterManipulationThread( ULONG arg_01 ); NtUserRegisterManipulationThread PROC STDCALL arg_01:DWORD mov eax , 4736 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterManipulationThread ENDP ; ULONG __stdcall NtUserSetManipulationInputTarget( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetManipulationInputTarget PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4737 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetManipulationInputTarget ENDP ; ULONG __stdcall NtUserRegisterUserApiHook( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRegisterUserApiHook PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4738 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterUserApiHook ENDP ; ULONG __stdcall NtUserRegisterErrorReportingDialog( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterErrorReportingDialog PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4739 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterErrorReportingDialog ENDP ; ULONG __stdcall NtUserRegisterClassExWOW( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserRegisterClassExWOW PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4740 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterClassExWOW ENDP ; ULONG __stdcall NtUserRegisterBSDRWindow( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterBSDRWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4741 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterBSDRWindow ENDP ; ULONG __stdcall NtUserRedrawWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRedrawWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4742 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRedrawWindow ENDP ; ULONG __stdcall NtUserUndelegateInput( ULONG arg_01 , ULONG arg_02 ); NtUserUndelegateInput PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4743 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUndelegateInput ENDP ; ULONG __stdcall NtUserGetWindowMinimizeRect( ULONG arg_01 , ULONG arg_02 ); NtUserGetWindowMinimizeRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4744 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowMinimizeRect ENDP ; ULONG __stdcall NtUserDwmGetRemoteSessionOcclusionEvent( ); NtUserDwmGetRemoteSessionOcclusionEvent PROC STDCALL mov eax , 4745 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDwmGetRemoteSessionOcclusionEvent ENDP ; ULONG __stdcall NtUserDwmGetRemoteSessionOcclusionState( ); NtUserDwmGetRemoteSessionOcclusionState PROC STDCALL mov eax , 4746 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDwmGetRemoteSessionOcclusionState ENDP ; ULONG __stdcall NtUserDwmKernelShutdown( ); NtUserDwmKernelShutdown PROC STDCALL mov eax , 4747 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDwmKernelShutdown ENDP ; ULONG __stdcall NtUserDwmKernelStartup( ); NtUserDwmKernelStartup PROC STDCALL mov eax , 4748 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDwmKernelStartup ENDP ; ULONG __stdcall NtUserUpdateWindowTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateWindowTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4749 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateWindowTransform ENDP ; ULONG __stdcall NtUserCheckProcessSession( ULONG arg_01 ); NtUserCheckProcessSession PROC STDCALL arg_01:DWORD mov eax , 4750 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCheckProcessSession ENDP ; ULONG __stdcall NtUserUnregisterSessionPort( ); NtUserUnregisterSessionPort PROC STDCALL mov eax , 4751 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnregisterSessionPort ENDP ; ULONG __stdcall NtUserRegisterSessionPort( ULONG arg_01 ); NtUserRegisterSessionPort PROC STDCALL arg_01:DWORD mov eax , 4752 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterSessionPort ENDP ; ULONG __stdcall NtUserCtxDisplayIOCtl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCtxDisplayIOCtl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4753 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCtxDisplayIOCtl ENDP ; ULONG __stdcall NtUserRemoteStopScreenUpdates( ); NtUserRemoteStopScreenUpdates PROC STDCALL mov eax , 4754 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoteStopScreenUpdates ENDP ; ULONG __stdcall NtUserRemoteRedrawScreen( ); NtUserRemoteRedrawScreen PROC STDCALL mov eax , 4755 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoteRedrawScreen ENDP ; ULONG __stdcall NtUserRemoteRedrawRectangle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserRemoteRedrawRectangle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4756 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoteRedrawRectangle ENDP ; ULONG __stdcall NtUserRemoteConnect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRemoteConnect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4757 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoteConnect ENDP ; ULONG __stdcall NtUserWaitAvailableMessageEx( ULONG arg_01 , ULONG arg_02 ); NtUserWaitAvailableMessageEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4758 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWaitAvailableMessageEx ENDP ; ULONG __stdcall NtUserWindowFromPoint( ULONG arg_01 , ULONG arg_02 ); NtUserWindowFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4759 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWindowFromPoint ENDP ; ULONG __stdcall NtUserWindowFromPhysicalPoint( ULONG arg_01 , ULONG arg_02 ); NtUserWindowFromPhysicalPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4760 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWindowFromPhysicalPoint ENDP ; ULONG __stdcall NtUserWaitMessage( ); NtUserWaitMessage PROC STDCALL mov eax , 4761 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWaitMessage ENDP ; ULONG __stdcall NtUserWaitForMsgAndEvent( ULONG arg_01 ); NtUserWaitForMsgAndEvent PROC STDCALL arg_01:DWORD mov eax , 4762 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWaitForMsgAndEvent ENDP ; ULONG __stdcall NtUserWaitForInputIdle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserWaitForInputIdle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4763 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWaitForInputIdle ENDP ; ULONG __stdcall NtUserVkKeyScanEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserVkKeyScanEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4764 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserVkKeyScanEx ENDP ; ULONG __stdcall NtUserValidateTimerCallback( ULONG arg_01 ); NtUserValidateTimerCallback PROC STDCALL arg_01:DWORD mov eax , 4765 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserValidateTimerCallback ENDP ; ULONG __stdcall NtUserValidateRect( ULONG arg_01 , ULONG arg_02 ); NtUserValidateRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4766 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserValidateRect ENDP ; ULONG __stdcall NtUserValidateHandleSecure( ULONG arg_01 ); NtUserValidateHandleSecure PROC STDCALL arg_01:DWORD mov eax , 4767 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserValidateHandleSecure ENDP ; ULONG __stdcall NtUserUserHandleGrantAccess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUserHandleGrantAccess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4768 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUserHandleGrantAccess ENDP ; ULONG __stdcall NtUserUpdatePerUserSystemParameters( ULONG arg_01 ); NtUserUpdatePerUserSystemParameters PROC STDCALL arg_01:DWORD mov eax , 4769 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdatePerUserSystemParameters ENDP ; ULONG __stdcall NtUserSetLayeredWindowAttributes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetLayeredWindowAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4770 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetLayeredWindowAttributes ENDP ; ULONG __stdcall NtUserGetLayeredWindowAttributes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetLayeredWindowAttributes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4771 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetLayeredWindowAttributes ENDP ; ULONG __stdcall NtUserUpdateLayeredWindow( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtUserUpdateLayeredWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4772 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateLayeredWindow ENDP ; ULONG __stdcall NtUserUpdateInstance( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateInstance PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4773 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateInstance ENDP ; ULONG __stdcall NtUserUpdateInputContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateInputContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4774 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateInputContext ENDP ; ULONG __stdcall NtUserUnregisterHotKey( ULONG arg_01 , ULONG arg_02 ); NtUserUnregisterHotKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4775 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnregisterHotKey ENDP ; ULONG __stdcall NtUserUnregisterUserApiHook( ); NtUserUnregisterUserApiHook PROC STDCALL mov eax , 4776 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnregisterUserApiHook ENDP ; ULONG __stdcall NtUserUnregisterClass( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUnregisterClass PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4777 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnregisterClass ENDP ; ULONG __stdcall NtUserUnlockWindowStation( ULONG arg_01 ); NtUserUnlockWindowStation PROC STDCALL arg_01:DWORD mov eax , 4778 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnlockWindowStation ENDP ; ULONG __stdcall NtUserUnloadKeyboardLayout( ULONG arg_01 ); NtUserUnloadKeyboardLayout PROC STDCALL arg_01:DWORD mov eax , 4779 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnloadKeyboardLayout ENDP ; ULONG __stdcall NtUserUnhookWinEvent( ULONG arg_01 ); NtUserUnhookWinEvent PROC STDCALL arg_01:DWORD mov eax , 4780 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnhookWinEvent ENDP ; ULONG __stdcall NtUserUnhookWindowsHookEx( ULONG arg_01 ); NtUserUnhookWindowsHookEx PROC STDCALL arg_01:DWORD mov eax , 4781 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUnhookWindowsHookEx ENDP ; ULONG __stdcall NtUserGetTouchInputInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetTouchInputInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4782 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetTouchInputInfo ENDP ; ULONG __stdcall NtUserIsTouchWindow( ULONG arg_01 , ULONG arg_02 ); NtUserIsTouchWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4783 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsTouchWindow ENDP ; ULONG __stdcall NtUserModifyWindowTouchCapability( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserModifyWindowTouchCapability PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4784 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserModifyWindowTouchCapability ENDP ; ULONG __stdcall NtGdiEngStretchBltROP( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 ); NtGdiEngStretchBltROP PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD mov eax , 4785 call _label_sysenter ret 52 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngStretchBltROP ENDP ; ULONG __stdcall NtGdiEngTextOut( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiEngTextOut PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4786 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngTextOut ENDP ; ULONG __stdcall NtGdiEngTransparentBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiEngTransparentBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4787 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngTransparentBlt ENDP ; ULONG __stdcall NtGdiEngGradientFill( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiEngGradientFill PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4788 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngGradientFill ENDP ; ULONG __stdcall NtGdiEngAlphaBlend( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiEngAlphaBlend PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4789 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngAlphaBlend ENDP ; ULONG __stdcall NtGdiEngLineTo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtGdiEngLineTo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 4790 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngLineTo ENDP ; ULONG __stdcall NtGdiEngPaint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiEngPaint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4791 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngPaint ENDP ; ULONG __stdcall NtGdiEngStrokeAndFillPath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); NtGdiEngStrokeAndFillPath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 4792 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngStrokeAndFillPath ENDP ; ULONG __stdcall NtGdiEngFillPath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiEngFillPath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 4793 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngFillPath ENDP ; ULONG __stdcall NtGdiEngStrokePath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtGdiEngStrokePath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4794 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngStrokePath ENDP ; ULONG __stdcall NtGdiEngMarkBandingSurface( ULONG arg_01 ); NtGdiEngMarkBandingSurface PROC STDCALL arg_01:DWORD mov eax , 4795 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngMarkBandingSurface ENDP ; ULONG __stdcall NtGdiEngPlgBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiEngPlgBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4796 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngPlgBlt ENDP ; ULONG __stdcall NtGdiEngStretchBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiEngStretchBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4797 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngStretchBlt ENDP ; ULONG __stdcall NtGdiEngBitBlt( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); NtGdiEngBitBlt PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 4798 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngBitBlt ENDP ; ULONG __stdcall NtGdiEngLockSurface( ULONG arg_01 ); NtGdiEngLockSurface PROC STDCALL arg_01:DWORD mov eax , 4799 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngLockSurface ENDP ; ULONG __stdcall NtGdiEngUnlockSurface( ULONG arg_01 ); NtGdiEngUnlockSurface PROC STDCALL arg_01:DWORD mov eax , 4800 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngUnlockSurface ENDP ; ULONG __stdcall NtGdiEngEraseSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEngEraseSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4801 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngEraseSurface ENDP ; ULONG __stdcall NtGdiEngDeleteSurface( ULONG arg_01 ); NtGdiEngDeleteSurface PROC STDCALL arg_01:DWORD mov eax , 4802 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngDeleteSurface ENDP ; ULONG __stdcall NtGdiEngDeletePalette( ULONG arg_01 ); NtGdiEngDeletePalette PROC STDCALL arg_01:DWORD mov eax , 4803 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngDeletePalette ENDP ; ULONG __stdcall NtGdiEngCopyBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiEngCopyBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4804 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCopyBits ENDP ; ULONG __stdcall NtGdiEngComputeGlyphSet( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEngComputeGlyphSet PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4805 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngComputeGlyphSet ENDP ; ULONG __stdcall NtGdiEngCreatePalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiEngCreatePalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4806 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCreatePalette ENDP ; ULONG __stdcall NtGdiEngCreateDeviceBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEngCreateDeviceBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4807 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCreateDeviceBitmap ENDP ; ULONG __stdcall NtGdiEngCreateDeviceSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiEngCreateDeviceSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4808 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCreateDeviceSurface ENDP ; ULONG __stdcall NtGdiEngCreateBitmap( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiEngCreateBitmap PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4809 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCreateBitmap ENDP ; ULONG __stdcall NtGdiEngAssociateSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiEngAssociateSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4810 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngAssociateSurface ENDP ; ULONG __stdcall NtUserSetWindowFeedbackSetting( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetWindowFeedbackSetting PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4811 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowFeedbackSetting ENDP ; ULONG __stdcall NtUserRegisterEdgy( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRegisterEdgy PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4812 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterEdgy ENDP ; ULONG __stdcall NtUserRegisterShellPTPListener( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterShellPTPListener PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4813 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterShellPTPListener ENDP ; ULONG __stdcall NtUserGetWindowFeedbackSetting( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetWindowFeedbackSetting PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4814 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetWindowFeedbackSetting ENDP ; ULONG __stdcall NtUserHidePointerContactVisualization( ULONG arg_01 ); NtUserHidePointerContactVisualization PROC STDCALL arg_01:DWORD mov eax , 4815 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHidePointerContactVisualization ENDP ; ULONG __stdcall NtUserGetTouchValidationStatus( ULONG arg_01 ); NtUserGetTouchValidationStatus PROC STDCALL arg_01:DWORD mov eax , 4816 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetTouchValidationStatus ENDP ; ULONG __stdcall NtUserInitializeTouchInjection( ULONG arg_01 , ULONG arg_02 ); NtUserInitializeTouchInjection PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4817 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInitializeTouchInjection ENDP ; ULONG __stdcall NtUserInjectTouchInput( ULONG arg_01 , ULONG arg_02 ); NtUserInjectTouchInput PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4818 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInjectTouchInput ENDP ; ULONG __stdcall NtUserRegisterTouchHitTestingWindow( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterTouchHitTestingWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4819 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterTouchHitTestingWindow ENDP ; ULONG __stdcall NtUserSetDisplayMapping( ULONG arg_01 , ULONG arg_02 ); NtUserSetDisplayMapping PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4820 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetDisplayMapping ENDP ; ULONG __stdcall NtUserSetCalibrationData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetCalibrationData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4821 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCalibrationData ENDP ; ULONG __stdcall NtUserGetPhysicalDeviceRect( ULONG arg_01 , ULONG arg_02 ); NtUserGetPhysicalDeviceRect PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4822 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPhysicalDeviceRect ENDP ; ULONG __stdcall NtUserRegisterTouchPadCapable( ULONG arg_01 ); NtUserRegisterTouchPadCapable PROC STDCALL arg_01:DWORD mov eax , 4823 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterTouchPadCapable ENDP ; ULONG __stdcall NtUserGetRawPointerDeviceData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetRawPointerDeviceData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4824 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetRawPointerDeviceData ENDP ; ULONG __stdcall NtUserGetPointerDeviceCursors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetPointerDeviceCursors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4825 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerDeviceCursors ENDP ; ULONG __stdcall NtUserGetPointerDeviceRects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetPointerDeviceRects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4826 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerDeviceRects ENDP ; ULONG __stdcall NtUserRegisterPointerDeviceNotifications( ULONG arg_01 , ULONG arg_02 ); NtUserRegisterPointerDeviceNotifications PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4827 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterPointerDeviceNotifications ENDP ; ULONG __stdcall NtUserGetPointerDeviceProperties( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetPointerDeviceProperties PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4828 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerDeviceProperties ENDP ; ULONG __stdcall NtUserGetPointerDevice( ULONG arg_01 , ULONG arg_02 ); NtUserGetPointerDevice PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4829 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerDevice ENDP ; ULONG __stdcall NtUserGetPointerDevices( ULONG arg_01 , ULONG arg_02 ); NtUserGetPointerDevices PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4830 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerDevices ENDP ; ULONG __stdcall NtUserEnableTouchPad( ULONG arg_01 ); NtUserEnableTouchPad PROC STDCALL arg_01:DWORD mov eax , 4831 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableTouchPad ENDP ; ULONG __stdcall NtUserGetPrecisionTouchPadConfiguration( ULONG arg_01 ); NtUserGetPrecisionTouchPadConfiguration PROC STDCALL arg_01:DWORD mov eax , 4832 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPrecisionTouchPadConfiguration ENDP ; ULONG __stdcall NtUserSetPrecisionTouchPadConfiguration( ULONG arg_01 ); NtUserSetPrecisionTouchPadConfiguration PROC STDCALL arg_01:DWORD mov eax , 4833 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetPrecisionTouchPadConfiguration ENDP ; ULONG __stdcall NtUserPromotePointer( ULONG arg_01 , ULONG arg_02 ); NtUserPromotePointer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4834 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPromotePointer ENDP ; ULONG __stdcall NtUserDiscardPointerFrameMessages( ULONG arg_01 ); NtUserDiscardPointerFrameMessages PROC STDCALL arg_01:DWORD mov eax , 4835 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDiscardPointerFrameMessages ENDP ; ULONG __stdcall NtUserRegisterPointerInputTarget( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserRegisterPointerInputTarget PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4836 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRegisterPointerInputTarget ENDP ; ULONG __stdcall NtUserGetPointerFrameArrivalTimes( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetPointerFrameArrivalTimes PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4837 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerFrameArrivalTimes ENDP ; ULONG __stdcall NtUserGetPointerInputTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetPointerInputTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4838 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerInputTransform ENDP ; ULONG __stdcall NtUserGetPointerInfoList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtUserGetPointerInfoList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 4839 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerInfoList ENDP ; ULONG __stdcall NtUserGetPointerCursorId( ULONG arg_01 , ULONG arg_02 ); NtUserGetPointerCursorId PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4840 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerCursorId ENDP ; ULONG __stdcall NtUserGetPointerType( ULONG arg_01 , ULONG arg_02 ); NtUserGetPointerType PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4841 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetPointerType ENDP ; ULONG __stdcall NtUserGetGestureConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtUserGetGestureConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4842 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetGestureConfig ENDP ; ULONG __stdcall NtUserSetGestureConfig( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserSetGestureConfig PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4843 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetGestureConfig ENDP ; ULONG __stdcall NtUserGetGestureExtArgs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetGestureExtArgs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4844 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetGestureExtArgs ENDP ; ULONG __stdcall NtUserGetGestureInfo( ULONG arg_01 , ULONG arg_02 ); NtUserGetGestureInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4845 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetGestureInfo ENDP ; ULONG __stdcall NtUserInjectGesture( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserInjectGesture PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4846 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInjectGesture ENDP ; ULONG __stdcall NtUserChangeWindowMessageFilterEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserChangeWindowMessageFilterEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4847 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserChangeWindowMessageFilterEx ENDP ; ULONG __stdcall NtGdiXLATEOBJ_hGetColorTransform( ULONG arg_01 ); NtGdiXLATEOBJ_hGetColorTransform PROC STDCALL arg_01:DWORD mov eax , 4848 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiXLATEOBJ_hGetColorTransform ENDP ; ULONG __stdcall NtGdiXLATEOBJ_iXlate( ULONG arg_01 , ULONG arg_02 ); NtGdiXLATEOBJ_iXlate PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4849 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiXLATEOBJ_iXlate ENDP ; ULONG __stdcall NtGdiXLATEOBJ_cGetPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiXLATEOBJ_cGetPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4850 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiXLATEOBJ_cGetPalette ENDP ; ULONG __stdcall NtGdiEngDeleteClip( ULONG arg_01 ); NtGdiEngDeleteClip PROC STDCALL arg_01:DWORD mov eax , 4851 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngDeleteClip ENDP ; ULONG __stdcall NtGdiEngCreateClip( ); NtGdiEngCreateClip PROC STDCALL mov eax , 4852 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCreateClip ENDP ; ULONG __stdcall NtGdiEngDeletePath( ULONG arg_01 ); NtGdiEngDeletePath PROC STDCALL arg_01:DWORD mov eax , 4853 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngDeletePath ENDP ; ULONG __stdcall NtGdiCLIPOBJ_ppoGetPath( ULONG arg_01 ); NtGdiCLIPOBJ_ppoGetPath PROC STDCALL arg_01:DWORD mov eax , 4854 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCLIPOBJ_ppoGetPath ENDP ; ULONG __stdcall NtGdiCLIPOBJ_cEnumStart( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiCLIPOBJ_cEnumStart PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4855 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCLIPOBJ_cEnumStart ENDP ; ULONG __stdcall NtGdiCLIPOBJ_bEnum( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiCLIPOBJ_bEnum PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4856 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiCLIPOBJ_bEnum ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_hGetColorTransform( ULONG arg_01 ); NtGdiBRUSHOBJ_hGetColorTransform PROC STDCALL arg_01:DWORD mov eax , 4857 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBRUSHOBJ_hGetColorTransform ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_pvGetRbrush( ULONG arg_01 ); NtGdiBRUSHOBJ_pvGetRbrush PROC STDCALL arg_01:DWORD mov eax , 4858 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBRUSHOBJ_pvGetRbrush ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_pvAllocRbrush( ULONG arg_01 , ULONG arg_02 ); NtGdiBRUSHOBJ_pvAllocRbrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4859 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBRUSHOBJ_pvAllocRbrush ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_ulGetBrushColor( ULONG arg_01 ); NtGdiBRUSHOBJ_ulGetBrushColor PROC STDCALL arg_01:DWORD mov eax , 4860 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBRUSHOBJ_ulGetBrushColor ENDP ; ULONG __stdcall NtGdiXFORMOBJ_iGetXform( ULONG arg_01 , ULONG arg_02 ); NtGdiXFORMOBJ_iGetXform PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4861 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiXFORMOBJ_iGetXform ENDP ; ULONG __stdcall NtGdiXFORMOBJ_bApplyXform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiXFORMOBJ_bApplyXform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4862 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiXFORMOBJ_bApplyXform ENDP ; ULONG __stdcall NtGdiFONTOBJ_pQueryGlyphAttrs( ULONG arg_01 , ULONG arg_02 ); NtGdiFONTOBJ_pQueryGlyphAttrs PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4863 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_pQueryGlyphAttrs ENDP ; ULONG __stdcall NtGdiFONTOBJ_pfdg( ULONG arg_01 ); NtGdiFONTOBJ_pfdg PROC STDCALL arg_01:DWORD mov eax , 4864 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_pfdg ENDP ; ULONG __stdcall NtGdiFONTOBJ_pifi( ULONG arg_01 ); NtGdiFONTOBJ_pifi PROC STDCALL arg_01:DWORD mov eax , 4865 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_pifi ENDP ; ULONG __stdcall NtGdiFONTOBJ_cGetGlyphs( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiFONTOBJ_cGetGlyphs PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4866 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_cGetGlyphs ENDP ; ULONG __stdcall NtGdiFONTOBJ_pxoGetXform( ULONG arg_01 ); NtGdiFONTOBJ_pxoGetXform PROC STDCALL arg_01:DWORD mov eax , 4867 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_pxoGetXform ENDP ; ULONG __stdcall NtGdiFONTOBJ_vGetInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiFONTOBJ_vGetInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4868 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_vGetInfo ENDP ; ULONG __stdcall NtGdiFONTOBJ_cGetAllGlyphHandles( ULONG arg_01 , ULONG arg_02 ); NtGdiFONTOBJ_cGetAllGlyphHandles PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4869 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_cGetAllGlyphHandles ENDP ; ULONG __stdcall NtGdiFONTOBJ_pvTrueTypeFontFile( ULONG arg_01 , ULONG arg_02 ); NtGdiFONTOBJ_pvTrueTypeFontFile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4870 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiFONTOBJ_pvTrueTypeFontFile ENDP ; ULONG __stdcall NtGdiSTROBJ_dwGetCodePage( ULONG arg_01 ); NtGdiSTROBJ_dwGetCodePage PROC STDCALL arg_01:DWORD mov eax , 4871 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSTROBJ_dwGetCodePage ENDP ; ULONG __stdcall NtGdiSTROBJ_vEnumStart( ULONG arg_01 ); NtGdiSTROBJ_vEnumStart PROC STDCALL arg_01:DWORD mov eax , 4872 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSTROBJ_vEnumStart ENDP ; ULONG __stdcall NtGdiSTROBJ_bGetAdvanceWidths( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSTROBJ_bGetAdvanceWidths PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4873 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSTROBJ_bGetAdvanceWidths ENDP ; ULONG __stdcall NtGdiSTROBJ_bEnumPositionsOnly( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSTROBJ_bEnumPositionsOnly PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4874 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSTROBJ_bEnumPositionsOnly ENDP ; ULONG __stdcall NtGdiSTROBJ_bEnum( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiSTROBJ_bEnum PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4875 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSTROBJ_bEnum ENDP ; ULONG __stdcall NtGdiPATHOBJ_bEnumClipLines( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiPATHOBJ_bEnumClipLines PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4876 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPATHOBJ_bEnumClipLines ENDP ; ULONG __stdcall NtGdiPATHOBJ_vEnumStartClipLines( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiPATHOBJ_vEnumStartClipLines PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4877 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPATHOBJ_vEnumStartClipLines ENDP ; ULONG __stdcall NtGdiPATHOBJ_vEnumStart( ULONG arg_01 ); NtGdiPATHOBJ_vEnumStart PROC STDCALL arg_01:DWORD mov eax , 4878 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPATHOBJ_vEnumStart ENDP ; ULONG __stdcall NtGdiPATHOBJ_bEnum( ULONG arg_01 , ULONG arg_02 ); NtGdiPATHOBJ_bEnum PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4879 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPATHOBJ_bEnum ENDP ; ULONG __stdcall NtGdiPATHOBJ_vGetBounds( ULONG arg_01 , ULONG arg_02 ); NtGdiPATHOBJ_vGetBounds PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4880 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiPATHOBJ_vGetBounds ENDP ; ULONG __stdcall NtGdiEngCheckAbort( ULONG arg_01 ); NtGdiEngCheckAbort PROC STDCALL arg_01:DWORD mov eax , 4881 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiEngCheckAbort ENDP ; ULONG __stdcall NtGdiGetDhpdev( ULONG arg_01 ); NtGdiGetDhpdev PROC STDCALL arg_01:DWORD mov eax , 4882 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetDhpdev ENDP ; ULONG __stdcall NtGdiHT_Get8BPPMaskPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtGdiHT_Get8BPPMaskPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4883 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiHT_Get8BPPMaskPalette ENDP ; ULONG __stdcall NtGdiHT_Get8BPPFormatPalette( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiHT_Get8BPPFormatPalette PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4884 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiHT_Get8BPPFormatPalette ENDP ; ULONG __stdcall NtGdiUpdateTransform( ULONG arg_01 ); NtGdiUpdateTransform PROC STDCALL arg_01:DWORD mov eax , 4885 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiUpdateTransform ENDP ; ULONG __stdcall NtGdiUMPDEngFreeUserMem( ULONG arg_01 ); NtGdiUMPDEngFreeUserMem PROC STDCALL arg_01:DWORD mov eax , 4886 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiUMPDEngFreeUserMem ENDP ; ULONG __stdcall NtGdiBRUSHOBJ_DeleteRbrush( ULONG arg_01 , ULONG arg_02 ); NtGdiBRUSHOBJ_DeleteRbrush PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4887 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiBRUSHOBJ_DeleteRbrush ENDP ; ULONG __stdcall NtGdiSetPUMPDOBJ( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiSetPUMPDOBJ PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4888 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetPUMPDOBJ ENDP ; ULONG __stdcall NtGdiSetUMPDSandboxState( ULONG arg_01 ); NtGdiSetUMPDSandboxState PROC STDCALL arg_01:DWORD mov eax , 4889 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiSetUMPDSandboxState ENDP ; ULONG __stdcall NtGdiDrawStream( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDrawStream PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 4890 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDrawStream ENDP ; ULONG __stdcall NtGdiHLSurfSetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiHLSurfSetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4891 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiHLSurfSetInformation ENDP ; ULONG __stdcall NtGdiHLSurfGetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiHLSurfGetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 4892 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiHLSurfGetInformation ENDP ; ULONG __stdcall NtGdiDwmCreatedBitmapRemotingOutput( ); NtGdiDwmCreatedBitmapRemotingOutput PROC STDCALL mov eax , 4893 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDwmCreatedBitmapRemotingOutput ENDP ; ULONG __stdcall NtGdiDdDDIGetScanLine( ULONG arg_01 ); NtGdiDdDDIGetScanLine PROC STDCALL arg_01:DWORD mov eax , 4894 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetScanLine ENDP ; ULONG __stdcall NtGdiDdDDIReleaseProcessVidPnSourceOwners( ULONG arg_01 ); NtGdiDdDDIReleaseProcessVidPnSourceOwners PROC STDCALL arg_01:DWORD mov eax , 4895 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReleaseProcessVidPnSourceOwners ENDP ; ULONG __stdcall NtGdiDdDDIGetProcessSchedulingPriorityClass( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDIGetProcessSchedulingPriorityClass PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4896 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetProcessSchedulingPriorityClass ENDP ; ULONG __stdcall NtGdiDdDDISetProcessSchedulingPriorityClass( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDISetProcessSchedulingPriorityClass PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4897 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetProcessSchedulingPriorityClass ENDP ; ULONG __stdcall NtGdiDdDDIGetContextSchedulingPriority( ULONG arg_01 ); NtGdiDdDDIGetContextSchedulingPriority PROC STDCALL arg_01:DWORD mov eax , 4898 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetContextSchedulingPriority ENDP ; ULONG __stdcall NtGdiDdDDISetContextSchedulingPriority( ULONG arg_01 ); NtGdiDdDDISetContextSchedulingPriority PROC STDCALL arg_01:DWORD mov eax , 4899 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetContextSchedulingPriority ENDP ; ULONG __stdcall NtGdiDdDDIDestroyDCFromMemory( ULONG arg_01 ); NtGdiDdDDIDestroyDCFromMemory PROC STDCALL arg_01:DWORD mov eax , 4900 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyDCFromMemory ENDP ; ULONG __stdcall NtGdiDdDDICreateDCFromMemory( ULONG arg_01 ); NtGdiDdDDICreateDCFromMemory PROC STDCALL arg_01:DWORD mov eax , 4901 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateDCFromMemory ENDP ; ULONG __stdcall NtGdiDdDDIGetDeviceState( ULONG arg_01 ); NtGdiDdDDIGetDeviceState PROC STDCALL arg_01:DWORD mov eax , 4902 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetDeviceState ENDP ; ULONG __stdcall NtGdiDdDDISetGammaRamp( ULONG arg_01 ); NtGdiDdDDISetGammaRamp PROC STDCALL arg_01:DWORD mov eax , 4903 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetGammaRamp ENDP ; ULONG __stdcall NtGdiDdDDIWaitForVerticalBlankEvent( ULONG arg_01 ); NtGdiDdDDIWaitForVerticalBlankEvent PROC STDCALL arg_01:DWORD mov eax , 4904 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIWaitForVerticalBlankEvent ENDP ; ULONG __stdcall NtGdiDdDDIDestroyOverlay( ULONG arg_01 ); NtGdiDdDDIDestroyOverlay PROC STDCALL arg_01:DWORD mov eax , 4905 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyOverlay ENDP ; ULONG __stdcall NtGdiDdDDIFlipOverlay( ULONG arg_01 ); NtGdiDdDDIFlipOverlay PROC STDCALL arg_01:DWORD mov eax , 4906 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIFlipOverlay ENDP ; ULONG __stdcall NtGdiDdDDIUpdateOverlay( ULONG arg_01 ); NtGdiDdDDIUpdateOverlay PROC STDCALL arg_01:DWORD mov eax , 4907 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIUpdateOverlay ENDP ; ULONG __stdcall NtGdiDdDDICreateOverlay( ULONG arg_01 ); NtGdiDdDDICreateOverlay PROC STDCALL arg_01:DWORD mov eax , 4908 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateOverlay ENDP ; ULONG __stdcall NtGdiDdDDIGetPresentQueueEvent( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDIGetPresentQueueEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 4909 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetPresentQueueEvent ENDP ; ULONG __stdcall NtGdiDdDDIGetPresentHistory( ULONG arg_01 ); NtGdiDdDDIGetPresentHistory PROC STDCALL arg_01:DWORD mov eax , 4910 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetPresentHistory ENDP ; ULONG __stdcall NtGdiDdDDISetVidPnSourceOwner1( ULONG arg_01 ); NtGdiDdDDISetVidPnSourceOwner1 PROC STDCALL arg_01:DWORD mov eax , 4911 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetVidPnSourceOwner1 ENDP ; ULONG __stdcall NtGdiDdDDISetVidPnSourceOwner( ULONG arg_01 ); NtGdiDdDDISetVidPnSourceOwner PROC STDCALL arg_01:DWORD mov eax , 4912 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetVidPnSourceOwner ENDP ; ULONG __stdcall NtGdiDdDDIQueryStatistics( ULONG arg_01 ); NtGdiDdDDIQueryStatistics PROC STDCALL arg_01:DWORD mov eax , 4913 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryStatistics ENDP ; ULONG __stdcall NtGdiDdDDIEscape( ULONG arg_01 ); NtGdiDdDDIEscape PROC STDCALL arg_01:DWORD mov eax , 4914 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIEscape ENDP ; ULONG __stdcall NtGdiDdDDIGetSharedPrimaryHandle( ULONG arg_01 ); NtGdiDdDDIGetSharedPrimaryHandle PROC STDCALL arg_01:DWORD mov eax , 4915 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetSharedPrimaryHandle ENDP ; ULONG __stdcall NtGdiDdDDICloseAdapter( ULONG arg_01 ); NtGdiDdDDICloseAdapter PROC STDCALL arg_01:DWORD mov eax , 4916 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICloseAdapter ENDP ; ULONG __stdcall NtGdiDdDDIOpenAdapterFromLuid( ULONG arg_01 ); NtGdiDdDDIOpenAdapterFromLuid PROC STDCALL arg_01:DWORD mov eax , 4917 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenAdapterFromLuid ENDP ; ULONG __stdcall NtGdiDdDDIEnumAdapters( ULONG arg_01 ); NtGdiDdDDIEnumAdapters PROC STDCALL arg_01:DWORD mov eax , 4918 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIEnumAdapters ENDP ; ULONG __stdcall NtGdiDdDDIEnumAdapters2( ULONG arg_01 ); NtGdiDdDDIEnumAdapters2 PROC STDCALL arg_01:DWORD mov eax , 4919 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIEnumAdapters2 ENDP ; ULONG __stdcall NtGdiDdDDIOpenAdapterFromHdc( ULONG arg_01 ); NtGdiDdDDIOpenAdapterFromHdc PROC STDCALL arg_01:DWORD mov eax , 4920 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenAdapterFromHdc ENDP ; ULONG __stdcall NtGdiDdDDIOpenAdapterFromDeviceName( ULONG arg_01 ); NtGdiDdDDIOpenAdapterFromDeviceName PROC STDCALL arg_01:DWORD mov eax , 4921 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenAdapterFromDeviceName ENDP ; ULONG __stdcall NtGdiDdDDIRender( ULONG arg_01 ); NtGdiDdDDIRender PROC STDCALL arg_01:DWORD mov eax , 4922 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIRender ENDP ; ULONG __stdcall NtGdiDdDDIPresent( ULONG arg_01 ); NtGdiDdDDIPresent PROC STDCALL arg_01:DWORD mov eax , 4923 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIPresent ENDP ; ULONG __stdcall NtGdiDdDDIGetMultisampleMethodList( ULONG arg_01 ); NtGdiDdDDIGetMultisampleMethodList PROC STDCALL arg_01:DWORD mov eax , 4924 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetMultisampleMethodList ENDP ; ULONG __stdcall NtGdiDdDDISetDisplayMode( ULONG arg_01 ); NtGdiDdDDISetDisplayMode PROC STDCALL arg_01:DWORD mov eax , 4925 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetDisplayMode ENDP ; ULONG __stdcall NtGdiDdDDIGetDisplayModeList( ULONG arg_01 ); NtGdiDdDDIGetDisplayModeList PROC STDCALL arg_01:DWORD mov eax , 4926 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetDisplayModeList ENDP ; ULONG __stdcall NtGdiDdDDIUnlock( ULONG arg_01 ); NtGdiDdDDIUnlock PROC STDCALL arg_01:DWORD mov eax , 4927 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIUnlock ENDP ; ULONG __stdcall NtGdiDdDDILock( ULONG arg_01 ); NtGdiDdDDILock PROC STDCALL arg_01:DWORD mov eax , 4928 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDILock ENDP ; ULONG __stdcall NtGdiDdDDIQueryAdapterInfo( ULONG arg_01 ); NtGdiDdDDIQueryAdapterInfo PROC STDCALL arg_01:DWORD mov eax , 4929 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryAdapterInfo ENDP ; ULONG __stdcall NtGdiDdDDIGetRuntimeData( ULONG arg_01 ); NtGdiDdDDIGetRuntimeData PROC STDCALL arg_01:DWORD mov eax , 4930 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetRuntimeData ENDP ; ULONG __stdcall NtGdiDdDDISignalSynchronizationObject( ULONG arg_01 ); NtGdiDdDDISignalSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4931 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISignalSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIWaitForSynchronizationObject( ULONG arg_01 ); NtGdiDdDDIWaitForSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4932 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIWaitForSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIDestroySynchronizationObject( ULONG arg_01 ); NtGdiDdDDIDestroySynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4933 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroySynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIOpenSynchronizationObject( ULONG arg_01 ); NtGdiDdDDIOpenSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4934 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDICreateSynchronizationObject( ULONG arg_01 ); NtGdiDdDDICreateSynchronizationObject PROC STDCALL arg_01:DWORD mov eax , 4935 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateSynchronizationObject ENDP ; ULONG __stdcall NtGdiDdDDIDestroyContext( ULONG arg_01 ); NtGdiDdDDIDestroyContext PROC STDCALL arg_01:DWORD mov eax , 4936 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyContext ENDP ; ULONG __stdcall NtGdiDdDDICreateContext( ULONG arg_01 ); NtGdiDdDDICreateContext PROC STDCALL arg_01:DWORD mov eax , 4937 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateContext ENDP ; ULONG __stdcall NtGdiDdDDIDestroyDevice( ULONG arg_01 ); NtGdiDdDDIDestroyDevice PROC STDCALL arg_01:DWORD mov eax , 4938 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyDevice ENDP ; ULONG __stdcall NtGdiDdDDICreateDevice( ULONG arg_01 ); NtGdiDdDDICreateDevice PROC STDCALL arg_01:DWORD mov eax , 4939 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateDevice ENDP ; ULONG __stdcall NtGdiDdDDIQueryAllocationResidency( ULONG arg_01 ); NtGdiDdDDIQueryAllocationResidency PROC STDCALL arg_01:DWORD mov eax , 4940 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryAllocationResidency ENDP ; ULONG __stdcall NtGdiDdDDISetAllocationPriority( ULONG arg_01 ); NtGdiDdDDISetAllocationPriority PROC STDCALL arg_01:DWORD mov eax , 4941 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetAllocationPriority ENDP ; ULONG __stdcall NtGdiDdDDIDestroyAllocation( ULONG arg_01 ); NtGdiDdDDIDestroyAllocation PROC STDCALL arg_01:DWORD mov eax , 4942 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyAllocation ENDP ; ULONG __stdcall NtGdiDdDDIDestroyAllocation2( ULONG arg_01 ); NtGdiDdDDIDestroyAllocation2 PROC STDCALL arg_01:DWORD mov eax , 4943 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyAllocation2 ENDP ; ULONG __stdcall NtGdiDdDDIOpenResourceFromNtHandle( ULONG arg_01 ); NtGdiDdDDIOpenResourceFromNtHandle PROC STDCALL arg_01:DWORD mov eax , 4944 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenResourceFromNtHandle ENDP ; ULONG __stdcall NtGdiDdDDIOpenSyncObjectFromNtHandle( ULONG arg_01 ); NtGdiDdDDIOpenSyncObjectFromNtHandle PROC STDCALL arg_01:DWORD mov eax , 4945 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenSyncObjectFromNtHandle ENDP ; ULONG __stdcall NtGdiDdDDIOpenSyncObjectFromNtHandle2( ULONG arg_01 ); NtGdiDdDDIOpenSyncObjectFromNtHandle2 PROC STDCALL arg_01:DWORD mov eax , 4946 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenSyncObjectFromNtHandle2 ENDP ; ULONG __stdcall NtGdiDdDDIOpenResource( ULONG arg_01 ); NtGdiDdDDIOpenResource PROC STDCALL arg_01:DWORD mov eax , 4947 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenResource ENDP ; ULONG __stdcall NtGdiDdDDIOpenNtHandleFromName( ULONG arg_01 ); NtGdiDdDDIOpenNtHandleFromName PROC STDCALL arg_01:DWORD mov eax , 4948 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenNtHandleFromName ENDP ; ULONG __stdcall NtGdiDdDDIOpenSyncObjectNtHandleFromName( ULONG arg_01 ); NtGdiDdDDIOpenSyncObjectNtHandleFromName PROC STDCALL arg_01:DWORD mov eax , 4949 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenSyncObjectNtHandleFromName ENDP ; ULONG __stdcall NtGdiDdDDIShareObjects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiDdDDIShareObjects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 4950 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIShareObjects ENDP ; ULONG __stdcall NtGdiDdDDIQueryResourceInfoFromNtHandle( ULONG arg_01 ); NtGdiDdDDIQueryResourceInfoFromNtHandle PROC STDCALL arg_01:DWORD mov eax , 4951 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryResourceInfoFromNtHandle ENDP ; ULONG __stdcall NtGdiDdDDIQueryResourceInfo( ULONG arg_01 ); NtGdiDdDDIQueryResourceInfo PROC STDCALL arg_01:DWORD mov eax , 4952 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryResourceInfo ENDP ; ULONG __stdcall NtGdiDdDDICreateAllocation( ULONG arg_01 ); NtGdiDdDDICreateAllocation PROC STDCALL arg_01:DWORD mov eax , 4953 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateAllocation ENDP ; ULONG __stdcall NtGdiDdDDIOutputDuplReleaseFrame( ULONG arg_01 ); NtGdiDdDDIOutputDuplReleaseFrame PROC STDCALL arg_01:DWORD mov eax , 4954 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOutputDuplReleaseFrame ENDP ; ULONG __stdcall NtGdiDdDDIQueryRemoteVidPnSourceFromGdiDisplayName( ULONG arg_01 ); NtGdiDdDDIQueryRemoteVidPnSourceFromGdiDisplayName PROC STDCALL arg_01:DWORD mov eax , 4955 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryRemoteVidPnSourceFromGdiDisplayName ENDP ; ULONG __stdcall NtGdiDdDDIOutputDuplPresent( ULONG arg_01 ); NtGdiDdDDIOutputDuplPresent PROC STDCALL arg_01:DWORD mov eax , 4956 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOutputDuplPresent ENDP ; ULONG __stdcall NtGdiDdDDIReleaseKeyedMutex2( ULONG arg_01 ); NtGdiDdDDIReleaseKeyedMutex2 PROC STDCALL arg_01:DWORD mov eax , 4957 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReleaseKeyedMutex2 ENDP ; ULONG __stdcall NtGdiDdDDIAcquireKeyedMutex2( ULONG arg_01 ); NtGdiDdDDIAcquireKeyedMutex2 PROC STDCALL arg_01:DWORD mov eax , 4958 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIAcquireKeyedMutex2 ENDP ; ULONG __stdcall NtGdiDdDDIOpenKeyedMutex2( ULONG arg_01 ); NtGdiDdDDIOpenKeyedMutex2 PROC STDCALL arg_01:DWORD mov eax , 4959 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenKeyedMutex2 ENDP ; ULONG __stdcall NtGdiDdDDICreateKeyedMutex2( ULONG arg_01 ); NtGdiDdDDICreateKeyedMutex2 PROC STDCALL arg_01:DWORD mov eax , 4960 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateKeyedMutex2 ENDP ; ULONG __stdcall NtGdiDdDDIOutputDuplGetPointerShapeData( ULONG arg_01 ); NtGdiDdDDIOutputDuplGetPointerShapeData PROC STDCALL arg_01:DWORD mov eax , 4961 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOutputDuplGetPointerShapeData ENDP ; ULONG __stdcall NtGdiDdDDIOutputDuplGetMetaData( ULONG arg_01 ); NtGdiDdDDIOutputDuplGetMetaData PROC STDCALL arg_01:DWORD mov eax , 4962 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOutputDuplGetMetaData ENDP ; ULONG __stdcall NtGdiDdDDIOutputDuplGetFrameInfo( ULONG arg_01 ); NtGdiDdDDIOutputDuplGetFrameInfo PROC STDCALL arg_01:DWORD mov eax , 4963 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOutputDuplGetFrameInfo ENDP ; ULONG __stdcall NtGdiDdDDIDestroyOutputDupl( ULONG arg_01 ); NtGdiDdDDIDestroyOutputDupl PROC STDCALL arg_01:DWORD mov eax , 4964 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyOutputDupl ENDP ; ULONG __stdcall NtGdiDdDDICreateOutputDupl( ULONG arg_01 ); NtGdiDdDDICreateOutputDupl PROC STDCALL arg_01:DWORD mov eax , 4965 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateOutputDupl ENDP ; ULONG __stdcall NtGdiDdDDIReclaimAllocations( ULONG arg_01 ); NtGdiDdDDIReclaimAllocations PROC STDCALL arg_01:DWORD mov eax , 4966 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReclaimAllocations ENDP ; ULONG __stdcall NtGdiDdDDIOfferAllocations( ULONG arg_01 ); NtGdiDdDDIOfferAllocations PROC STDCALL arg_01:DWORD mov eax , 4967 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOfferAllocations ENDP ; ULONG __stdcall NtGdiDdDDICheckSharedResourceAccess( ULONG arg_01 ); NtGdiDdDDICheckSharedResourceAccess PROC STDCALL arg_01:DWORD mov eax , 4968 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckSharedResourceAccess ENDP ; ULONG __stdcall NtGdiDdDDICheckVidPnExclusiveOwnership( ULONG arg_01 ); NtGdiDdDDICheckVidPnExclusiveOwnership PROC STDCALL arg_01:DWORD mov eax , 4969 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckVidPnExclusiveOwnership ENDP ; ULONG __stdcall NtGdiDdDDIGetOverlayState( ULONG arg_01 ); NtGdiDdDDIGetOverlayState PROC STDCALL arg_01:DWORD mov eax , 4970 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetOverlayState ENDP ; ULONG __stdcall NtGdiDdDDIConfigureSharedResource( ULONG arg_01 ); NtGdiDdDDIConfigureSharedResource PROC STDCALL arg_01:DWORD mov eax , 4971 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIConfigureSharedResource ENDP ; ULONG __stdcall NtGdiDdDDIReleaseKeyedMutex( ULONG arg_01 ); NtGdiDdDDIReleaseKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4972 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReleaseKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIAcquireKeyedMutex( ULONG arg_01 ); NtGdiDdDDIAcquireKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4973 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIAcquireKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIDestroyKeyedMutex( ULONG arg_01 ); NtGdiDdDDIDestroyKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4974 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDIOpenKeyedMutex( ULONG arg_01 ); NtGdiDdDDIOpenKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4975 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDICreateKeyedMutex( ULONG arg_01 ); NtGdiDdDDICreateKeyedMutex PROC STDCALL arg_01:DWORD mov eax , 4976 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateKeyedMutex ENDP ; ULONG __stdcall NtGdiDdDDISharedPrimaryUnLockNotification( ULONG arg_01 ); NtGdiDdDDISharedPrimaryUnLockNotification PROC STDCALL arg_01:DWORD mov eax , 4977 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISharedPrimaryUnLockNotification ENDP ; ULONG __stdcall NtGdiDdDDISharedPrimaryLockNotification( ULONG arg_01 ); NtGdiDdDDISharedPrimaryLockNotification PROC STDCALL arg_01:DWORD mov eax , 4978 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISharedPrimaryLockNotification ENDP ; ULONG __stdcall NtGdiDdDDISetDisplayPrivateDriverFormat( ULONG arg_01 ); NtGdiDdDDISetDisplayPrivateDriverFormat PROC STDCALL arg_01:DWORD mov eax , 4979 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetDisplayPrivateDriverFormat ENDP ; ULONG __stdcall NtGdiDdDDICheckExclusiveOwnership( ); NtGdiDdDDICheckExclusiveOwnership PROC STDCALL mov eax , 4980 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckExclusiveOwnership ENDP ; ULONG __stdcall NtGdiDdDDICheckMonitorPowerState( ULONG arg_01 ); NtGdiDdDDICheckMonitorPowerState PROC STDCALL arg_01:DWORD mov eax , 4981 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckMonitorPowerState ENDP ; ULONG __stdcall NtGdiDdDDIWaitForIdle( ULONG arg_01 ); NtGdiDdDDIWaitForIdle PROC STDCALL arg_01:DWORD mov eax , 4982 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIWaitForIdle ENDP ; ULONG __stdcall NtGdiDdDDICheckOcclusion( ULONG arg_01 ); NtGdiDdDDICheckOcclusion PROC STDCALL arg_01:DWORD mov eax , 4983 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckOcclusion ENDP ; ULONG __stdcall NtGdiDdDDIInvalidateActiveVidPn( ULONG arg_01 ); NtGdiDdDDIInvalidateActiveVidPn PROC STDCALL arg_01:DWORD mov eax , 4984 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIInvalidateActiveVidPn ENDP ; ULONG __stdcall NtGdiDdDDIPollDisplayChildren( ULONG arg_01 ); NtGdiDdDDIPollDisplayChildren PROC STDCALL arg_01:DWORD mov eax , 4985 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIPollDisplayChildren ENDP ; ULONG __stdcall NtGdiDdDDISetQueuedLimit( ULONG arg_01 ); NtGdiDdDDISetQueuedLimit PROC STDCALL arg_01:DWORD mov eax , 4986 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetQueuedLimit ENDP ; ULONG __stdcall NtGdiDdDDIPinDirectFlipResources( ULONG arg_01 ); NtGdiDdDDIPinDirectFlipResources PROC STDCALL arg_01:DWORD mov eax , 4987 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIPinDirectFlipResources ENDP ; ULONG __stdcall NtGdiDdDDIUnpinDirectFlipResources( ULONG arg_01 ); NtGdiDdDDIUnpinDirectFlipResources PROC STDCALL arg_01:DWORD mov eax , 4988 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIUnpinDirectFlipResources ENDP ; ULONG __stdcall NtGdiDdDDIWaitForVerticalBlankEvent2( ULONG arg_01 ); NtGdiDdDDIWaitForVerticalBlankEvent2 PROC STDCALL arg_01:DWORD mov eax , 4989 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIWaitForVerticalBlankEvent2 ENDP ; ULONG __stdcall NtGdiDdDDIGetDWMVerticalBlankEvent( ULONG arg_01 ); NtGdiDdDDIGetDWMVerticalBlankEvent PROC STDCALL arg_01:DWORD mov eax , 4990 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetDWMVerticalBlankEvent ENDP ; ULONG __stdcall NtGdiDdDDISetSyncRefreshCountWaitTarget( ULONG arg_01 ); NtGdiDdDDISetSyncRefreshCountWaitTarget PROC STDCALL arg_01:DWORD mov eax , 4991 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetSyncRefreshCountWaitTarget ENDP ; ULONG __stdcall NtGdiDdDDISetContextInProcessSchedulingPriority( ULONG arg_01 ); NtGdiDdDDISetContextInProcessSchedulingPriority PROC STDCALL arg_01:DWORD mov eax , 4992 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetContextInProcessSchedulingPriority ENDP ; ULONG __stdcall NtGdiDdDDIGetContextInProcessSchedulingPriority( ULONG arg_01 ); NtGdiDdDDIGetContextInProcessSchedulingPriority PROC STDCALL arg_01:DWORD mov eax , 4993 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetContextInProcessSchedulingPriority ENDP ; ULONG __stdcall NtGdiDdDDIGetSharedResourceAdapterLuid( ULONG arg_01 ); NtGdiDdDDIGetSharedResourceAdapterLuid PROC STDCALL arg_01:DWORD mov eax , 4994 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetSharedResourceAdapterLuid ENDP ; ULONG __stdcall NtGdiDdDDISetStereoEnabled( ULONG arg_01 ); NtGdiDdDDISetStereoEnabled PROC STDCALL arg_01:DWORD mov eax , 4995 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetStereoEnabled ENDP ; ULONG __stdcall NtGdiDdDDIPresentMultiPlaneOverlay( ULONG arg_01 ); NtGdiDdDDIPresentMultiPlaneOverlay PROC STDCALL arg_01:DWORD mov eax , 4996 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIPresentMultiPlaneOverlay ENDP ; ULONG __stdcall NtGdiDdDDICheckMultiPlaneOverlaySupport( ULONG arg_01 ); NtGdiDdDDICheckMultiPlaneOverlaySupport PROC STDCALL arg_01:DWORD mov eax , 4997 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckMultiPlaneOverlaySupport ENDP ; ULONG __stdcall NtGdiDdDDIMakeResident( ULONG arg_01 ); NtGdiDdDDIMakeResident PROC STDCALL arg_01:DWORD mov eax , 4998 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIMakeResident ENDP ; ULONG __stdcall NtGdiDdDDIEvict( ULONG arg_01 ); NtGdiDdDDIEvict PROC STDCALL arg_01:DWORD mov eax , 4999 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIEvict ENDP ; ULONG __stdcall NtGdiDdDDIWaitForSynchronizationObjectFromCpu( ULONG arg_01 ); NtGdiDdDDIWaitForSynchronizationObjectFromCpu PROC STDCALL arg_01:DWORD mov eax , 5000 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIWaitForSynchronizationObjectFromCpu ENDP ; ULONG __stdcall NtGdiDdDDISignalSynchronizationObjectFromCpu( ULONG arg_01 ); NtGdiDdDDISignalSynchronizationObjectFromCpu PROC STDCALL arg_01:DWORD mov eax , 5001 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISignalSynchronizationObjectFromCpu ENDP ; ULONG __stdcall NtGdiDdDDIWaitForSynchronizationObjectFromGpu( ULONG arg_01 ); NtGdiDdDDIWaitForSynchronizationObjectFromGpu PROC STDCALL arg_01:DWORD mov eax , 5002 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIWaitForSynchronizationObjectFromGpu ENDP ; ULONG __stdcall NtGdiDdDDISignalSynchronizationObjectFromGpu( ULONG arg_01 ); NtGdiDdDDISignalSynchronizationObjectFromGpu PROC STDCALL arg_01:DWORD mov eax , 5003 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISignalSynchronizationObjectFromGpu ENDP ; ULONG __stdcall NtGdiDdDDISignalSynchronizationObjectFromGpu2( ULONG arg_01 ); NtGdiDdDDISignalSynchronizationObjectFromGpu2 PROC STDCALL arg_01:DWORD mov eax , 5004 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISignalSynchronizationObjectFromGpu2 ENDP ; ULONG __stdcall NtGdiDdDDICreatePagingQueue( ULONG arg_01 ); NtGdiDdDDICreatePagingQueue PROC STDCALL arg_01:DWORD mov eax , 5005 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreatePagingQueue ENDP ; ULONG __stdcall NtGdiDdDDIDestroyPagingQueue( ULONG arg_01 ); NtGdiDdDDIDestroyPagingQueue PROC STDCALL arg_01:DWORD mov eax , 5006 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIDestroyPagingQueue ENDP ; ULONG __stdcall NtGdiDdDDILock2( ULONG arg_01 ); NtGdiDdDDILock2 PROC STDCALL arg_01:DWORD mov eax , 5007 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDILock2 ENDP ; ULONG __stdcall NtGdiDdDDIUnlock2( ULONG arg_01 ); NtGdiDdDDIUnlock2 PROC STDCALL arg_01:DWORD mov eax , 5008 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIUnlock2 ENDP ; ULONG __stdcall NtGdiDdDDIInvalidateCache( ULONG arg_01 ); NtGdiDdDDIInvalidateCache PROC STDCALL arg_01:DWORD mov eax , 5009 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIInvalidateCache ENDP ; ULONG __stdcall NtGdiDdDDIGetResourcePresentPrivateDriverData( ULONG arg_01 ); NtGdiDdDDIGetResourcePresentPrivateDriverData PROC STDCALL arg_01:DWORD mov eax , 5010 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetResourcePresentPrivateDriverData ENDP ; ULONG __stdcall NtGdiDdDDIMapGpuVirtualAddress( ULONG arg_01 ); NtGdiDdDDIMapGpuVirtualAddress PROC STDCALL arg_01:DWORD mov eax , 5011 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIMapGpuVirtualAddress ENDP ; ULONG __stdcall NtGdiDdDDIReserveGpuVirtualAddress( ULONG arg_01 ); NtGdiDdDDIReserveGpuVirtualAddress PROC STDCALL arg_01:DWORD mov eax , 5012 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReserveGpuVirtualAddress ENDP ; ULONG __stdcall NtGdiDdDDIFreeGpuVirtualAddress( ULONG arg_01 ); NtGdiDdDDIFreeGpuVirtualAddress PROC STDCALL arg_01:DWORD mov eax , 5013 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIFreeGpuVirtualAddress ENDP ; ULONG __stdcall NtGdiDdDDIUpdateGpuVirtualAddress( ULONG arg_01 ); NtGdiDdDDIUpdateGpuVirtualAddress PROC STDCALL arg_01:DWORD mov eax , 5014 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIUpdateGpuVirtualAddress ENDP ; ULONG __stdcall NtGdiDdDDICreateContextVirtual( ULONG arg_01 ); NtGdiDdDDICreateContextVirtual PROC STDCALL arg_01:DWORD mov eax , 5015 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateContextVirtual ENDP ; ULONG __stdcall NtGdiDdDDISubmitCommand( ULONG arg_01 ); NtGdiDdDDISubmitCommand PROC STDCALL arg_01:DWORD mov eax , 5016 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISubmitCommand ENDP ; ULONG __stdcall NtGdiDdDDIGetCachedHybridQueryValue( ULONG arg_01 ); NtGdiDdDDIGetCachedHybridQueryValue PROC STDCALL arg_01:DWORD mov eax , 5017 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetCachedHybridQueryValue ENDP ; ULONG __stdcall NtGdiDdDDICacheHybridQueryValue( ULONG arg_01 ); NtGdiDdDDICacheHybridQueryValue PROC STDCALL arg_01:DWORD mov eax , 5018 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICacheHybridQueryValue ENDP ; ULONG __stdcall NtGdiDdDDINetDispGetNextChunkInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtGdiDdDDINetDispGetNextChunkInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 5019 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDINetDispGetNextChunkInfo ENDP ; ULONG __stdcall NtGdiDdDDINetDispQueryMiracastDisplayDeviceSupport( ULONG arg_01 ); NtGdiDdDDINetDispQueryMiracastDisplayDeviceSupport PROC STDCALL arg_01:DWORD mov eax , 5020 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDINetDispQueryMiracastDisplayDeviceSupport ENDP ; ULONG __stdcall NtGdiDdDDINetDispStartMiracastDisplayDevice( ULONG arg_01 ); NtGdiDdDDINetDispStartMiracastDisplayDevice PROC STDCALL arg_01:DWORD mov eax , 5021 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDINetDispStartMiracastDisplayDevice ENDP ; ULONG __stdcall NtGdiDdDDINetDispStopMiracastDisplayDevice( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDINetDispStopMiracastDisplayDevice PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5022 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDINetDispStopMiracastDisplayDevice ENDP ; ULONG __stdcall NtGdiDdDDINetDispQueryMiracastDisplayDeviceStatus( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDDINetDispQueryMiracastDisplayDeviceStatus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5023 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDINetDispQueryMiracastDisplayDeviceStatus ENDP ; ULONG __stdcall NtGdiDdDDINetDispStopSessions( ULONG arg_01 ); NtGdiDdDDINetDispStopSessions PROC STDCALL arg_01:DWORD mov eax , 5024 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDINetDispStopSessions ENDP ; ULONG __stdcall NtGdiDdDDIQueryVideoMemoryInfo( ULONG arg_01 ); NtGdiDdDDIQueryVideoMemoryInfo PROC STDCALL arg_01:DWORD mov eax , 5025 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryVideoMemoryInfo ENDP ; ULONG __stdcall NtGdiDdDDIChangeVideoMemoryReservation( ULONG arg_01 ); NtGdiDdDDIChangeVideoMemoryReservation PROC STDCALL arg_01:DWORD mov eax , 5026 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIChangeVideoMemoryReservation ENDP ; ULONG __stdcall NtGdiDdDDICreateSwapChain( ULONG arg_01 ); NtGdiDdDDICreateSwapChain PROC STDCALL arg_01:DWORD mov eax , 5027 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICreateSwapChain ENDP ; ULONG __stdcall NtGdiDdDDIOpenSwapChain( ULONG arg_01 ); NtGdiDdDDIOpenSwapChain PROC STDCALL arg_01:DWORD mov eax , 5028 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIOpenSwapChain ENDP ; ULONG __stdcall NtGdiDdDDIGetSetSwapChainMetadata( ULONG arg_01 ); NtGdiDdDDIGetSetSwapChainMetadata PROC STDCALL arg_01:DWORD mov eax , 5029 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIGetSetSwapChainMetadata ENDP ; ULONG __stdcall NtGdiDdDDIAcquireSwapChain( ULONG arg_01 ); NtGdiDdDDIAcquireSwapChain PROC STDCALL arg_01:DWORD mov eax , 5030 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIAcquireSwapChain ENDP ; ULONG __stdcall NtGdiDdDDIReleaseSwapChain( ULONG arg_01 ); NtGdiDdDDIReleaseSwapChain PROC STDCALL arg_01:DWORD mov eax , 5031 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReleaseSwapChain ENDP ; ULONG __stdcall NtGdiDdDDIAbandonSwapChain( ULONG arg_01 ); NtGdiDdDDIAbandonSwapChain PROC STDCALL arg_01:DWORD mov eax , 5032 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIAbandonSwapChain ENDP ; ULONG __stdcall NtGdiDdDDISetDodIndirectSwapchain( ULONG arg_01 ); NtGdiDdDDISetDodIndirectSwapchain PROC STDCALL arg_01:DWORD mov eax , 5033 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetDodIndirectSwapchain ENDP ; ULONG __stdcall NtGdiDdDDICheckMultiPlaneOverlaySupport2( ULONG arg_01 ); NtGdiDdDDICheckMultiPlaneOverlaySupport2 PROC STDCALL arg_01:DWORD mov eax , 5034 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDICheckMultiPlaneOverlaySupport2 ENDP ; ULONG __stdcall NtGdiDdDDIPresentMultiPlaneOverlay2( ULONG arg_01 ); NtGdiDdDDIPresentMultiPlaneOverlay2 PROC STDCALL arg_01:DWORD mov eax , 5035 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIPresentMultiPlaneOverlay2 ENDP ; ULONG __stdcall NtGdiDdDDIReclaimAllocations2( ULONG arg_01 ); NtGdiDdDDIReclaimAllocations2 PROC STDCALL arg_01:DWORD mov eax , 5036 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIReclaimAllocations2 ENDP ; ULONG __stdcall NtGdiDdDDISetStablePowerState( ULONG arg_01 ); NtGdiDdDDISetStablePowerState PROC STDCALL arg_01:DWORD mov eax , 5037 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetStablePowerState ENDP ; ULONG __stdcall NtGdiDdDDIQueryClockCalibration( ULONG arg_01 ); NtGdiDdDDIQueryClockCalibration PROC STDCALL arg_01:DWORD mov eax , 5038 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryClockCalibration ENDP ; ULONG __stdcall NtGdiDdDDIQueryVidPnExclusiveOwnership( ULONG arg_01 ); NtGdiDdDDIQueryVidPnExclusiveOwnership PROC STDCALL arg_01:DWORD mov eax , 5039 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIQueryVidPnExclusiveOwnership ENDP ; ULONG __stdcall NtGdiDdDDIAdjustFullscreenGamma( ULONG arg_01 ); NtGdiDdDDIAdjustFullscreenGamma PROC STDCALL arg_01:DWORD mov eax , 5040 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIAdjustFullscreenGamma ENDP ; ULONG __stdcall NtGdiDdDDISetVidPnSourceHwProtection( ULONG arg_01 ); NtGdiDdDDISetVidPnSourceHwProtection PROC STDCALL arg_01:DWORD mov eax , 5041 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetVidPnSourceHwProtection ENDP ; ULONG __stdcall NtGdiDdDDIMarkDeviceAsError( ULONG arg_01 ); NtGdiDdDDIMarkDeviceAsError PROC STDCALL arg_01:DWORD mov eax , 5042 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIMarkDeviceAsError ENDP ; ULONG __stdcall NtGdiDdDDIFlushHeapTransitions( ULONG arg_01 ); NtGdiDdDDIFlushHeapTransitions PROC STDCALL arg_01:DWORD mov eax , 5043 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDIFlushHeapTransitions ENDP ; ULONG __stdcall NtGdiDdDDISetHwProtectionTeardownRecovery( ULONG arg_01 ); NtGdiDdDDISetHwProtectionTeardownRecovery PROC STDCALL arg_01:DWORD mov eax , 5044 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDDISetHwProtectionTeardownRecovery ENDP ; ULONG __stdcall NtGdiMakeObjectUnXferable( ULONG arg_01 ); NtGdiMakeObjectUnXferable PROC STDCALL arg_01:DWORD mov eax , 5045 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMakeObjectUnXferable ENDP ; ULONG __stdcall NtGdiMakeObjectXferable( ULONG arg_01 , ULONG arg_02 ); NtGdiMakeObjectXferable PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5046 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiMakeObjectXferable ENDP ; ULONG __stdcall NtGdiDestroyPhysicalMonitor( ULONG arg_01 ); NtGdiDestroyPhysicalMonitor PROC STDCALL arg_01:DWORD mov eax , 5047 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDestroyPhysicalMonitor ENDP ; ULONG __stdcall NtGdiGetPhysicalMonitorDescription( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiGetPhysicalMonitorDescription PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5048 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetPhysicalMonitorDescription ENDP ; ULONG __stdcall NtGdiGetPhysicalMonitors( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiGetPhysicalMonitors PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5049 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetPhysicalMonitors ENDP ; ULONG __stdcall NtGdiGetNumberOfPhysicalMonitors( ULONG arg_01 , ULONG arg_02 ); NtGdiGetNumberOfPhysicalMonitors PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5050 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiGetNumberOfPhysicalMonitors ENDP ; ULONG __stdcall NtGdiDDCCIGetTimingReport( ULONG arg_01 , ULONG arg_02 ); NtGdiDDCCIGetTimingReport PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5051 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDDCCIGetTimingReport ENDP ; ULONG __stdcall NtGdiDDCCIGetCapabilitiesString( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDDCCIGetCapabilitiesString PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5052 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDDCCIGetCapabilitiesString ENDP ; ULONG __stdcall NtGdiDDCCIGetCapabilitiesStringLength( ULONG arg_01 , ULONG arg_02 ); NtGdiDDCCIGetCapabilitiesStringLength PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5053 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDDCCIGetCapabilitiesStringLength ENDP ; ULONG __stdcall NtGdiDDCCISaveCurrentSettings( ULONG arg_01 ); NtGdiDDCCISaveCurrentSettings PROC STDCALL arg_01:DWORD mov eax , 5054 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDDCCISaveCurrentSettings ENDP ; ULONG __stdcall NtGdiDDCCISetVCPFeature( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtGdiDDCCISetVCPFeature PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5055 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDDCCISetVCPFeature ENDP ; ULONG __stdcall NtGdiDDCCIGetVCPFeature( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtGdiDDCCIGetVCPFeature PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5056 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDDCCIGetVCPFeature ENDP ; ULONG __stdcall NtGdiDdQueryVisRgnUniqueness( ); NtGdiDdQueryVisRgnUniqueness PROC STDCALL mov eax , 5057 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdQueryVisRgnUniqueness ENDP ; ULONG __stdcall NtGdiDdDestroyFullscreenSprite( ULONG arg_01 , ULONG arg_02 ); NtGdiDdDestroyFullscreenSprite PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5058 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdDestroyFullscreenSprite ENDP ; ULONG __stdcall NtGdiDdNotifyFullscreenSpriteUpdate( ULONG arg_01 , ULONG arg_02 ); NtGdiDdNotifyFullscreenSpriteUpdate PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5059 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdNotifyFullscreenSpriteUpdate ENDP ; ULONG __stdcall NtGdiDdCreateFullscreenSprite( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtGdiDdCreateFullscreenSprite PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5060 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtGdiDdCreateFullscreenSprite ENDP ; ULONG __stdcall NtUserShowSystemCursor( ULONG arg_01 ); NtUserShowSystemCursor PROC STDCALL arg_01:DWORD mov eax , 5061 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserShowSystemCursor ENDP ; ULONG __stdcall NtUserSetMirrorRendering( ULONG arg_01 , ULONG arg_02 ); NtUserSetMirrorRendering PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5062 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetMirrorRendering ENDP ; ULONG __stdcall NtUserMagGetContextInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMagGetContextInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5063 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMagGetContextInformation ENDP ; ULONG __stdcall NtUserMagSetContextInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserMagSetContextInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5064 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMagSetContextInformation ENDP ; ULONG __stdcall NtUserMagControl( ULONG arg_01 , ULONG arg_02 ); NtUserMagControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5065 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserMagControl ENDP ; ULONG __stdcall NtUserSlicerControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSlicerControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5066 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSlicerControl ENDP ; ULONG __stdcall NtUserHwndSetRedirectionInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserHwndSetRedirectionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5067 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHwndSetRedirectionInfo ENDP ; ULONG __stdcall NtUserHwndQueryRedirectionInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserHwndQueryRedirectionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5068 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserHwndQueryRedirectionInfo ENDP ; ULONG __stdcall NtCreateCompositionSurfaceHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtCreateCompositionSurfaceHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5069 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtCreateCompositionSurfaceHandle ENDP ; ULONG __stdcall NtValidateCompositionSurfaceHandle( ULONG arg_01 , ULONG arg_02 ); NtValidateCompositionSurfaceHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5070 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtValidateCompositionSurfaceHandle ENDP ; ULONG __stdcall NtBindCompositionSurface( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtBindCompositionSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5071 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtBindCompositionSurface ENDP ; ULONG __stdcall NtUnBindCompositionSurface( ULONG arg_01 , ULONG arg_02 ); NtUnBindCompositionSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5072 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUnBindCompositionSurface ENDP ; ULONG __stdcall NtQueryCompositionSurfaceBinding( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtQueryCompositionSurfaceBinding PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5073 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionSurfaceBinding ENDP ; ULONG __stdcall NtNotifyPresentToCompositionSurface( ULONG arg_01 , ULONG arg_02 ); NtNotifyPresentToCompositionSurface PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5074 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtNotifyPresentToCompositionSurface ENDP ; ULONG __stdcall NtQueryCompositionSurfaceStatistics( ULONG arg_01 , ULONG arg_02 ); NtQueryCompositionSurfaceStatistics PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5075 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionSurfaceStatistics ENDP ; ULONG __stdcall NtOpenCompositionSurfaceSectionInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtOpenCompositionSurfaceSectionInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5076 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtOpenCompositionSurfaceSectionInfo ENDP ; ULONG __stdcall NtOpenCompositionSurfaceSwapChainHandleInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtOpenCompositionSurfaceSwapChainHandleInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5077 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtOpenCompositionSurfaceSwapChainHandleInfo ENDP ; ULONG __stdcall NtQueryCompositionSurfaceRenderingRealization( ULONG arg_01 , ULONG arg_02 ); NtQueryCompositionSurfaceRenderingRealization PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5078 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionSurfaceRenderingRealization ENDP ; ULONG __stdcall NtOpenCompositionSurfaceDirtyRegion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtOpenCompositionSurfaceDirtyRegion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5079 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtOpenCompositionSurfaceDirtyRegion ENDP ; ULONG __stdcall NtSetCompositionSurfaceOutOfFrameDirectFlipNotification( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtSetCompositionSurfaceOutOfFrameDirectFlipNotification PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5080 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtSetCompositionSurfaceOutOfFrameDirectFlipNotification ENDP ; ULONG __stdcall NtSetCompositionSurfaceStatistics( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtSetCompositionSurfaceStatistics PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5081 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtSetCompositionSurfaceStatistics ENDP ; ULONG __stdcall NtSetCompositionSurfaceBufferCompositionModeAndOrientation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtSetCompositionSurfaceBufferCompositionModeAndOrientation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5082 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtSetCompositionSurfaceBufferCompositionModeAndOrientation ENDP ; ULONG __stdcall NtSetCompositionSurfaceIndependentFlipInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtSetCompositionSurfaceIndependentFlipInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 5083 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtSetCompositionSurfaceIndependentFlipInfo ENDP ; ULONG __stdcall NtDesktopCaptureBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtDesktopCaptureBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 5084 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDesktopCaptureBits ENDP ; ULONG __stdcall NtDCompositionEnableMMCSS( ULONG arg_01 ); NtDCompositionEnableMMCSS PROC STDCALL arg_01:DWORD mov eax , 5085 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionEnableMMCSS ENDP ; ULONG __stdcall NtVisualCaptureBits( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtVisualCaptureBits PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 5086 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtVisualCaptureBits ENDP ; ULONG __stdcall NtDCompositionEnableDDASupport( ); NtDCompositionEnableDDASupport PROC STDCALL mov eax , 5087 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionEnableDDASupport ENDP ; ULONG __stdcall NtCreateCompositionInputSink( ULONG arg_01 , ULONG arg_02 ); NtCreateCompositionInputSink PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5088 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtCreateCompositionInputSink ENDP ; ULONG __stdcall NtCreateImplicitCompositionInputSink( ULONG arg_01 , ULONG arg_02 ); NtCreateImplicitCompositionInputSink PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5089 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtCreateImplicitCompositionInputSink ENDP ; ULONG __stdcall NtDuplicateCompositionInputSink( ULONG arg_01 , ULONG arg_02 ); NtDuplicateCompositionInputSink PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5090 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDuplicateCompositionInputSink ENDP ; ULONG __stdcall NtQueryCompositionInputSink( ULONG arg_01 , ULONG arg_02 ); NtQueryCompositionInputSink PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5091 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionInputSink ENDP ; ULONG __stdcall NtQueryCompositionInputSinkLuid( ULONG arg_01 , ULONG arg_02 ); NtQueryCompositionInputSinkLuid PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5092 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionInputSinkLuid ENDP ; ULONG __stdcall NtQueryCompositionInputSinkViewId( ULONG arg_01 , ULONG arg_02 ); NtQueryCompositionInputSinkViewId PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5093 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionInputSinkViewId ENDP ; ULONG __stdcall NtUpdateInputSinkTransforms( ULONG arg_01 , ULONG arg_02 ); NtUpdateInputSinkTransforms PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5094 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUpdateInputSinkTransforms ENDP ; ULONG __stdcall NtCompositionInputThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtCompositionInputThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5095 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtCompositionInputThread ENDP ; ULONG __stdcall NtQueryCompositionInputQueueAndTransform( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtQueryCompositionInputQueueAndTransform PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5096 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionInputQueueAndTransform ENDP ; ULONG __stdcall NtQueryCompositionInputIsImplicit( ULONG arg_01 , ULONG arg_02 ); NtQueryCompositionInputIsImplicit PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5097 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtQueryCompositionInputIsImplicit ENDP ; ULONG __stdcall NtCompositionSetDropTarget( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtCompositionSetDropTarget PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5098 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtCompositionSetDropTarget ENDP ; ULONG __stdcall NtTokenManagerOpenSectionAndEvents( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtTokenManagerOpenSectionAndEvents PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5099 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerOpenSectionAndEvents ENDP ; ULONG __stdcall NtTokenManagerThread( ULONG arg_01 ); NtTokenManagerThread PROC STDCALL arg_01:DWORD mov eax , 5100 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerThread ENDP ; ULONG __stdcall NtTokenManagerGetOutOfFrameDirectFlipSurfaceUpdates( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtTokenManagerGetOutOfFrameDirectFlipSurfaceUpdates PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 5101 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerGetOutOfFrameDirectFlipSurfaceUpdates ENDP ; ULONG __stdcall NtTokenManagerDeleteOutstandingDirectFlipTokens( ); NtTokenManagerDeleteOutstandingDirectFlipTokens PROC STDCALL mov eax , 5102 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerDeleteOutstandingDirectFlipTokens ENDP ; ULONG __stdcall NtTokenManagerCreateCompositionTokenHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtTokenManagerCreateCompositionTokenHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5103 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerCreateCompositionTokenHandle ENDP ; ULONG __stdcall NtTokenManagerGetAnalogExclusiveTokenEvent( ULONG arg_01 ); NtTokenManagerGetAnalogExclusiveTokenEvent PROC STDCALL arg_01:DWORD mov eax , 5104 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerGetAnalogExclusiveTokenEvent ENDP ; ULONG __stdcall NtTokenManagerGetAnalogExclusiveSurfaceUpdates( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtTokenManagerGetAnalogExclusiveSurfaceUpdates PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5105 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerGetAnalogExclusiveSurfaceUpdates ENDP ; ULONG __stdcall NtTokenManagerConfirmOutstandingAnalogToken( ); NtTokenManagerConfirmOutstandingAnalogToken PROC STDCALL mov eax , 5106 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtTokenManagerConfirmOutstandingAnalogToken ENDP ; ULONG __stdcall NtSetCompositionSurfaceAnalogExclusive( ULONG arg_01 , ULONG arg_02 ); NtSetCompositionSurfaceAnalogExclusive PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5107 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtSetCompositionSurfaceAnalogExclusive ENDP ; ULONG __stdcall NtDCompositionBeginFrame( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionBeginFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5108 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionBeginFrame ENDP ; ULONG __stdcall NtDCompositionConfirmFrame( ULONG arg_01 , ULONG arg_02 ); NtDCompositionConfirmFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5109 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionConfirmFrame ENDP ; ULONG __stdcall NtDCompositionRetireFrame( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionRetireFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5110 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionRetireFrame ENDP ; ULONG __stdcall NtDCompositionDiscardFrame( ULONG arg_01 , ULONG arg_02 ); NtDCompositionDiscardFrame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5111 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionDiscardFrame ENDP ; ULONG __stdcall NtDCompositionGetFrameSurfaceUpdates( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionGetFrameSurfaceUpdates PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5112 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetFrameSurfaceUpdates ENDP ; ULONG __stdcall NtDCompositionGetFrameLegacyTokens( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionGetFrameLegacyTokens PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5113 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetFrameLegacyTokens ENDP ; ULONG __stdcall NtDCompositionDestroyConnection( ULONG arg_01 ); NtDCompositionDestroyConnection PROC STDCALL arg_01:DWORD mov eax , 5114 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionDestroyConnection ENDP ; ULONG __stdcall NtDCompositionGetConnectionBatch( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionGetConnectionBatch PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5115 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetConnectionBatch ENDP ; ULONG __stdcall NtDCompositionGetFrameStatistics( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionGetFrameStatistics PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5116 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetFrameStatistics ENDP ; ULONG __stdcall NtDCompositionGetDeletedResources( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionGetDeletedResources PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5117 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetDeletedResources ENDP ; ULONG __stdcall NtDCompositionSetResourceDeletedNotificationTag( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionSetResourceDeletedNotificationTag PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5118 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceDeletedNotificationTag ENDP ; ULONG __stdcall NtDCompositionCreateConnection( ULONG arg_01 , ULONG arg_02 ); NtDCompositionCreateConnection PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5119 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCreateConnection ENDP ; ULONG __stdcall NtDCompositionDestroyChannel( ULONG arg_01 ); NtDCompositionDestroyChannel PROC STDCALL arg_01:DWORD mov eax , 5120 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionDestroyChannel ENDP ; ULONG __stdcall NtDCompositionReleaseAllResources( ULONG arg_01 , ULONG arg_02 ); NtDCompositionReleaseAllResources PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5121 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionReleaseAllResources ENDP ; ULONG __stdcall NtDCompositionSubmitDWMBatch( ULONG arg_01 , ULONG arg_02 ); NtDCompositionSubmitDWMBatch PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5122 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSubmitDWMBatch ENDP ; ULONG __stdcall NtDCompositionCommitChannel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionCommitChannel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5123 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCommitChannel ENDP ; ULONG __stdcall NtDCompositionWaitForChannel( ULONG arg_01 , ULONG arg_02 ); NtDCompositionWaitForChannel PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5124 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionWaitForChannel ENDP ; ULONG __stdcall NtDCompositionSetChannelCommitCompletionEvent( ULONG arg_01 , ULONG arg_02 ); NtDCompositionSetChannelCommitCompletionEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5125 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetChannelCommitCompletionEvent ENDP ; ULONG __stdcall NtDCompositionTelemetryTouchInteractionBegin( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionTelemetryTouchInteractionBegin PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5126 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetryTouchInteractionBegin ENDP ; ULONG __stdcall NtDCompositionTelemetryTouchInteractionUpdate( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionTelemetryTouchInteractionUpdate PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5127 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetryTouchInteractionUpdate ENDP ; ULONG __stdcall NtDCompositionTelemetryTouchInteractionEnd( ULONG arg_01 , ULONG arg_02 ); NtDCompositionTelemetryTouchInteractionEnd PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5128 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetryTouchInteractionEnd ENDP ; ULONG __stdcall NtDCompositionTelemetrySetApplicationId( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionTelemetrySetApplicationId PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5129 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetrySetApplicationId ENDP ; ULONG __stdcall NtDCompositionTelemetryAnimationScenarioBegin( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionTelemetryAnimationScenarioBegin PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5130 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetryAnimationScenarioBegin ENDP ; ULONG __stdcall NtDCompositionTelemetryAnimationScenarioReference( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionTelemetryAnimationScenarioReference PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5131 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetryAnimationScenarioReference ENDP ; ULONG __stdcall NtDCompositionTelemetryAnimationScenarioUnreference( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionTelemetryAnimationScenarioUnreference PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5132 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionTelemetryAnimationScenarioUnreference ENDP ; ULONG __stdcall NtDCompositionCurrentBatchId( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionCurrentBatchId PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5133 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCurrentBatchId ENDP ; ULONG __stdcall NtDCompositionReleaseResource( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionReleaseResource PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5134 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionReleaseResource ENDP ; ULONG __stdcall NtDCompositionRemoveCrossDeviceVisualChild( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionRemoveCrossDeviceVisualChild PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5135 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionRemoveCrossDeviceVisualChild ENDP ; ULONG __stdcall NtDCompositionRemoveVisualChild( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionRemoveVisualChild PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5136 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionRemoveVisualChild ENDP ; ULONG __stdcall NtDCompositionAddCrossDeviceVisualChild( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtDCompositionAddCrossDeviceVisualChild PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 5137 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionAddCrossDeviceVisualChild ENDP ; ULONG __stdcall NtDCompositionAddVisualChild( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtDCompositionAddVisualChild PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5138 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionAddVisualChild ENDP ; ULONG __stdcall NtDCompositionReplaceVisualChildren( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionReplaceVisualChildren PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5139 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionReplaceVisualChildren ENDP ; ULONG __stdcall NtDCompositionSetResourceAnimationProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionSetResourceAnimationProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5140 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceAnimationProperty ENDP ; ULONG __stdcall NtDCompositionSetResourceReferenceArrayProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtDCompositionSetResourceReferenceArrayProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 5141 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceReferenceArrayProperty ENDP ; ULONG __stdcall NtDCompositionSetResourceReferenceProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtDCompositionSetResourceReferenceProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5142 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceReferenceProperty ENDP ; ULONG __stdcall NtDCompositionSetResourceBufferProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); NtDCompositionSetResourceBufferProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 5143 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceBufferProperty ENDP ; ULONG __stdcall NtDCompositionSetResourceIntegerProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionSetResourceIntegerProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5144 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceIntegerProperty ENDP ; ULONG __stdcall NtDCompositionSetResourceFloatProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionSetResourceFloatProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5145 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceFloatProperty ENDP ; ULONG __stdcall NtDCompositionSetResourceHandleProperty( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionSetResourceHandleProperty PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5146 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceHandleProperty ENDP ; ULONG __stdcall NtDCompositionCreateResource( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionCreateResource PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5147 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCreateResource ENDP ; ULONG __stdcall NtDCompositionOpenSharedResource( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtDCompositionOpenSharedResource PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5148 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionOpenSharedResource ENDP ; ULONG __stdcall NtDCompositionOpenSharedResourceHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionOpenSharedResourceHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5149 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionOpenSharedResourceHandle ENDP ; ULONG __stdcall NtDCompositionCreateDwmChannel( ULONG arg_01 ); NtDCompositionCreateDwmChannel PROC STDCALL arg_01:DWORD mov eax , 5150 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCreateDwmChannel ENDP ; ULONG __stdcall NtDCompositionCreateChannel( ULONG arg_01 ); NtDCompositionCreateChannel PROC STDCALL arg_01:DWORD mov eax , 5151 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCreateChannel ENDP ; ULONG __stdcall NtDCompositionSynchronize( ULONG arg_01 , ULONG arg_02 ); NtDCompositionSynchronize PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5152 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSynchronize ENDP ; ULONG __stdcall NtDCompositionReferenceSharedResourceOnDwmChannel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtDCompositionReferenceSharedResourceOnDwmChannel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5153 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionReferenceSharedResourceOnDwmChannel ENDP ; ULONG __stdcall NtDCompositionCreateAndBindSharedSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionCreateAndBindSharedSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5154 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCreateAndBindSharedSection ENDP ; ULONG __stdcall NtDCompositionSetDebugCounter( ULONG arg_01 , ULONG arg_02 ); NtDCompositionSetDebugCounter PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5155 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetDebugCounter ENDP ; ULONG __stdcall NtDCompositionGetChannels( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionGetChannels PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5156 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetChannels ENDP ; ULONG __stdcall NtDCompositionConnectPipe( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionConnectPipe PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5157 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionConnectPipe ENDP ; ULONG __stdcall NtDCompositionRegisterThumbnailVisual( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); NtDCompositionRegisterThumbnailVisual PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 5158 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionRegisterThumbnailVisual ENDP ; ULONG __stdcall NtDCompositionRegisterVirtualDesktopVisual( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionRegisterVirtualDesktopVisual PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5159 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionRegisterVirtualDesktopVisual ENDP ; ULONG __stdcall NtDCompositionDuplicateHandleToProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionDuplicateHandleToProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5160 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionDuplicateHandleToProcess ENDP ; ULONG __stdcall NtDCompositionSetVisualInputSink( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionSetVisualInputSink PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5161 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetVisualInputSink ENDP ; ULONG __stdcall NtDCompositionGetAnimationTime( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionGetAnimationTime PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5162 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionGetAnimationTime ENDP ; ULONG __stdcall NtDCompositionUpdatePointerCapture( ULONG arg_01 , ULONG arg_02 ); NtDCompositionUpdatePointerCapture PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5163 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionUpdatePointerCapture ENDP ; ULONG __stdcall NtDCompositionCapturePointer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionCapturePointer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5164 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionCapturePointer ENDP ; ULONG __stdcall NtDCompositionSetChannelCallbackId( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionSetChannelCallbackId PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5165 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetChannelCallbackId ENDP ; ULONG __stdcall NtDCompositionSetResourceCallbackId( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtDCompositionSetResourceCallbackId PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5166 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionSetResourceCallbackId ENDP ; ULONG __stdcall NtDCompositionDuplicateSwapchainHandleToDwm( ULONG arg_01 , ULONG arg_02 ); NtDCompositionDuplicateSwapchainHandleToDwm PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5167 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionDuplicateSwapchainHandleToDwm ENDP ; ULONG __stdcall NtDCompositionAttachMouseWheelToHwnd( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtDCompositionAttachMouseWheelToHwnd PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5168 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtDCompositionAttachMouseWheelToHwnd ENDP ; ULONG __stdcall NtUserDestroyDCompositionHwndTarget( ULONG arg_01 , ULONG arg_02 ); NtUserDestroyDCompositionHwndTarget PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5169 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDestroyDCompositionHwndTarget ENDP ; ULONG __stdcall NtUserCreateDCompositionHwndTarget( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserCreateDCompositionHwndTarget PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5170 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCreateDCompositionHwndTarget ENDP ; ULONG __stdcall NtUserWaitForRedirectionStartComplete( ); NtUserWaitForRedirectionStartComplete PROC STDCALL mov eax , 5171 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserWaitForRedirectionStartComplete ENDP ; ULONG __stdcall NtUserSignalRedirectionStartComplete( ); NtUserSignalRedirectionStartComplete PROC STDCALL mov eax , 5172 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSignalRedirectionStartComplete ENDP ; ULONG __stdcall NtUserSetActiveProcessForMonitor( ULONG arg_01 , ULONG arg_02 ); NtUserSetActiveProcessForMonitor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5173 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetActiveProcessForMonitor ENDP ; ULONG __stdcall NtUserGetDisplayAutoRotationPreferencesByProcessId( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserGetDisplayAutoRotationPreferencesByProcessId PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5174 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDisplayAutoRotationPreferencesByProcessId ENDP ; ULONG __stdcall NtUserGetDisplayAutoRotationPreferences( ULONG arg_01 ); NtUserGetDisplayAutoRotationPreferences PROC STDCALL arg_01:DWORD mov eax , 5175 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDisplayAutoRotationPreferences ENDP ; ULONG __stdcall NtUserSetDisplayAutoRotationPreferences( ULONG arg_01 ); NtUserSetDisplayAutoRotationPreferences PROC STDCALL arg_01:DWORD mov eax , 5176 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetDisplayAutoRotationPreferences ENDP ; ULONG __stdcall NtUserSetAutoRotation( ULONG arg_01 ); NtUserSetAutoRotation PROC STDCALL arg_01:DWORD mov eax , 5177 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetAutoRotation ENDP ; ULONG __stdcall NtUserGetAutoRotationState( ULONG arg_01 ); NtUserGetAutoRotationState PROC STDCALL arg_01:DWORD mov eax , 5178 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetAutoRotationState ENDP ; ULONG __stdcall NtUserAutoRotateScreen( ULONG arg_01 ); NtUserAutoRotateScreen PROC STDCALL arg_01:DWORD mov eax , 5179 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAutoRotateScreen ENDP ; ULONG __stdcall NtUserAcquireIAMKey( ULONG arg_01 ); NtUserAcquireIAMKey PROC STDCALL arg_01:DWORD mov eax , 5180 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAcquireIAMKey ENDP ; ULONG __stdcall NtUserSetActivationFilter( ULONG arg_01 , ULONG arg_02 ); NtUserSetActivationFilter PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5181 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetActivationFilter ENDP ; ULONG __stdcall NtUserSetFallbackForeground( ULONG arg_01 , ULONG arg_02 ); NtUserSetFallbackForeground PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5182 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetFallbackForeground ENDP ; ULONG __stdcall NtUserSetBrokeredForeground( ULONG arg_01 ); NtUserSetBrokeredForeground PROC STDCALL arg_01:DWORD mov eax , 5183 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetBrokeredForeground ENDP ; ULONG __stdcall NtUserDisableImmersiveOwner( ULONG arg_01 ); NtUserDisableImmersiveOwner PROC STDCALL arg_01:DWORD mov eax , 5184 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserDisableImmersiveOwner ENDP ; ULONG __stdcall NtUserClearForeground( ); NtUserClearForeground PROC STDCALL mov eax , 5185 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserClearForeground ENDP ; ULONG __stdcall NtUserEnableIAMAccess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserEnableIAMAccess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5186 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableIAMAccess ENDP ; ULONG __stdcall NtUserGetProcessUIContextInformation( ULONG arg_01 , ULONG arg_02 ); NtUserGetProcessUIContextInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5187 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetProcessUIContextInformation ENDP ; ULONG __stdcall NtUserSetProcessRestrictionExemption( ULONG arg_01 ); NtUserSetProcessRestrictionExemption PROC STDCALL arg_01:DWORD mov eax , 5188 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetProcessRestrictionExemption ENDP ; ULONG __stdcall NtUserSetWindowArrangement( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetWindowArrangement PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5189 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowArrangement ENDP ; ULONG __stdcall NtUserSetWindowShowState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserSetWindowShowState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5190 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetWindowShowState ENDP ; ULONG __stdcall NtUserUpdateWindowTrackingInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserUpdateWindowTrackingInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5191 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateWindowTrackingInfo ENDP ; ULONG __stdcall NtUserEnableMouseInPointer( ULONG arg_01 ); NtUserEnableMouseInPointer PROC STDCALL arg_01:DWORD mov eax , 5192 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableMouseInPointer ENDP ; ULONG __stdcall NtUserIsMouseInPointerEnabled( ); NtUserIsMouseInPointerEnabled PROC STDCALL mov eax , 5193 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsMouseInPointerEnabled ENDP ; ULONG __stdcall NtUserPromoteMouseInPointer( ULONG arg_01 ); NtUserPromoteMouseInPointer PROC STDCALL arg_01:DWORD mov eax , 5194 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserPromoteMouseInPointer ENDP ; ULONG __stdcall NtUserAutoPromoteMouseInPointer( ULONG arg_01 ); NtUserAutoPromoteMouseInPointer PROC STDCALL arg_01:DWORD mov eax , 5195 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserAutoPromoteMouseInPointer ENDP ; ULONG __stdcall NtUserEnableMouseInputForCursorSuppression( ULONG arg_01 ); NtUserEnableMouseInputForCursorSuppression PROC STDCALL arg_01:DWORD mov eax , 5196 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserEnableMouseInputForCursorSuppression ENDP ; ULONG __stdcall NtUserIsMouseInputEnabled( ); NtUserIsMouseInputEnabled PROC STDCALL mov eax , 5197 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserIsMouseInputEnabled ENDP ; ULONG __stdcall NtUserInternalClipCursor( ULONG arg_01 , ULONG arg_02 ); NtUserInternalClipCursor PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5198 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInternalClipCursor ENDP ; ULONG __stdcall NtUserCheckProcessForClipboardAccess( ULONG arg_01 , ULONG arg_02 ); NtUserCheckProcessForClipboardAccess PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5199 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCheckProcessForClipboardAccess ENDP ; ULONG __stdcall NtUserGetClipboardAccessToken( ULONG arg_01 , ULONG arg_02 ); NtUserGetClipboardAccessToken PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5200 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetClipboardAccessToken ENDP ; ULONG __stdcall NtUserGetQueueEventStatus( ); NtUserGetQueueEventStatus PROC STDCALL mov eax , 5201 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetQueueEventStatus ENDP ; ULONG __stdcall NtUserCompositionInputSinkLuidFromPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserCompositionInputSinkLuidFromPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5202 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserCompositionInputSinkLuidFromPoint ENDP ; ULONG __stdcall NtUserUpdateWindowInputSinkHints( ULONG arg_01 , ULONG arg_02 ); NtUserUpdateWindowInputSinkHints PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5203 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserUpdateWindowInputSinkHints ENDP ; ULONG __stdcall NtUserTransformPoint( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserTransformPoint PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5204 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTransformPoint ENDP ; ULONG __stdcall NtUserTransformRect( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserTransformRect PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5205 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserTransformRect ENDP ; ULONG __stdcall NtUserGetHimetricScaleFactorFromPixelLocation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserGetHimetricScaleFactorFromPixelLocation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5206 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetHimetricScaleFactorFromPixelLocation ENDP ; ULONG __stdcall NtUserGetProcessDpiAwareness( ULONG arg_01 , ULONG arg_02 ); NtUserGetProcessDpiAwareness PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5207 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetProcessDpiAwareness ENDP ; ULONG __stdcall NtUserGetDpiForMonitor( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtUserGetDpiForMonitor PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5208 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetDpiForMonitor ENDP ; ULONG __stdcall NtUserReportInertia( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserReportInertia PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5209 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserReportInertia ENDP ; ULONG __stdcall NtUserLinkDpiCursor( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserLinkDpiCursor PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5210 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserLinkDpiCursor ENDP ; ULONG __stdcall NtUserGetCursorDims( ULONG arg_01 ); NtUserGetCursorDims PROC STDCALL arg_01:DWORD mov eax , 5211 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserGetCursorDims ENDP ; ULONG __stdcall NtUserInitializeInputDeviceInjection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); NtUserInitializeInputDeviceInjection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 5212 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInitializeInputDeviceInjection ENDP ; ULONG __stdcall NtUserInitializePointerDeviceInjection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); NtUserInitializePointerDeviceInjection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 5213 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInitializePointerDeviceInjection ENDP ; ULONG __stdcall NtUserRemoveInjectionDevice( ULONG arg_01 ); NtUserRemoveInjectionDevice PROC STDCALL arg_01:DWORD mov eax , 5214 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserRemoveInjectionDevice ENDP ; ULONG __stdcall NtUserSetFeatureReportResponse( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetFeatureReportResponse PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5215 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetFeatureReportResponse ENDP ; ULONG __stdcall NtUserInjectDeviceInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInjectDeviceInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5216 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInjectDeviceInput ENDP ; ULONG __stdcall NtUserInjectMouseInput( ULONG arg_01 , ULONG arg_02 ); NtUserInjectMouseInput PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5217 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInjectMouseInput ENDP ; ULONG __stdcall NtUserInjectKeyboardInput( ULONG arg_01 , ULONG arg_02 ); NtUserInjectKeyboardInput PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5218 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInjectKeyboardInput ENDP ; ULONG __stdcall NtUserInjectPointerInput( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserInjectPointerInput PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5219 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserInjectPointerInput ENDP ; ULONG __stdcall NtRIMAddInputObserver( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); NtRIMAddInputObserver PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 5220 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtRIMAddInputObserver ENDP ; ULONG __stdcall NtRIMRemoveInputObserver( ULONG arg_01 ); NtRIMRemoveInputObserver PROC STDCALL arg_01:DWORD mov eax , 5221 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtRIMRemoveInputObserver ENDP ; ULONG __stdcall NtRIMUpdateInputObserverRegistration( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); NtRIMUpdateInputObserverRegistration PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 5222 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtRIMUpdateInputObserverRegistration ENDP ; ULONG __stdcall NtRIMObserveNextInput( ULONG arg_01 ); NtRIMObserveNextInput PROC STDCALL arg_01:DWORD mov eax , 5223 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtRIMObserveNextInput ENDP ; ULONG __stdcall NtRIMGetDevicePreparsedDataLockfree( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtRIMGetDevicePreparsedDataLockfree PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5224 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtRIMGetDevicePreparsedDataLockfree ENDP ; ULONG __stdcall NtUserSetCoreWindow( ULONG arg_01 , ULONG arg_02 ); NtUserSetCoreWindow PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5225 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCoreWindow ENDP ; ULONG __stdcall NtUserSetCoreWindowPartner( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); NtUserSetCoreWindowPartner PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 5226 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserSetCoreWindowPartner ENDP ; ULONG __stdcall NtUserNavigateFocus( ULONG arg_01 , ULONG arg_02 ); NtUserNavigateFocus PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5227 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtUserNavigateFocus ENDP ; ULONG __stdcall NtHWCursorUpdatePointer( ULONG arg_01 , ULONG arg_02 ); NtHWCursorUpdatePointer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 5228 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret NtHWCursorUpdatePointer ENDP
; A040601: Continued fraction for sqrt(627). ; 25,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50,25,50 pow $1,$0 sub $1,2 gcd $1,$0 mul $1,25 mov $0,$1
%include "include/u7si-all-includes.asm" %include "../u7-common/patch-eop-getItemZ.asm"
; A083811: Numbers n such that 2n+1 is the digit reversal of n+1. ; 36,396,3996,39996,399996,3999996,39999996,399999996,3999999996,39999999996,399999999996,3999999999996 mov $1,10 pow $1,$0 div $1,3 mul $1,120 add $1,36 mov $0,$1
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; CpuSleep.Asm ; ; Abstract: ; ; CpuSleep function ; ; Notes: ; ;------------------------------------------------------------------------------ SECTION .text ;------------------------------------------------------------------------------ ; VOID ; EFIAPI ; CpuSleep ( ; VOID ; ); ;------------------------------------------------------------------------------ global ASM_PFX(CpuSleep) ASM_PFX(CpuSleep): hlt ret
/* * Copyright (c) 2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <pybind11/numpy.h> #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <pybind/model.hpp> namespace HugeCTR { namespace python_lib { void ModelPybind(pybind11::module &m) { pybind11::class_<HugeCTR::DataReaderParams, std::shared_ptr<HugeCTR::DataReaderParams>>( m, "DataReaderParams") .def(pybind11::init<DataReaderType_t, std::string, std::string, std::string, Check_t, int, long long, long long, bool, int, std::vector<long long> &, const AsyncParam &>(), pybind11::arg("data_reader_type"), pybind11::arg("source"), pybind11::arg("keyset") = "", pybind11::arg("eval_source"), pybind11::arg("check_type"), pybind11::arg("cache_eval_data") = 0, pybind11::arg("num_samples") = 0, pybind11::arg("eval_num_samples") = 0, pybind11::arg("float_label_dense") = false, pybind11::arg("num_workers") = 12, pybind11::arg("slot_size_array") = std::vector<long long>(), pybind11::arg("async_param") = AsyncParam{16, 4, 512000, 4, 512, false, Alignment_t::None}) .def(pybind11::init<DataReaderType_t, std::vector<std::string>, std::vector<std::string>, std::string, Check_t, int, long long, long long, bool, int, std::vector<long long> &, const AsyncParam &>(), pybind11::arg("data_reader_type"), pybind11::arg("source"), pybind11::arg("keyset") = std::vector<std::string>(), pybind11::arg("eval_source"), pybind11::arg("check_type"), pybind11::arg("cache_eval_data") = 0, pybind11::arg("num_samples") = 0, pybind11::arg("eval_num_samples") = 0, pybind11::arg("float_label_dense") = false, pybind11::arg("num_workers") = 12, pybind11::arg("slot_size_array") = std::vector<long long>(), pybind11::arg("async_param") = AsyncParam{16, 4, 512000, 4, 512, false, Alignment_t::None}); pybind11::class_<HugeCTR::Input, std::shared_ptr<HugeCTR::Input>>(m, "Input") .def(pybind11::init<int, std::string, int, std::string, std::vector<DataReaderSparseParam> &>(), pybind11::arg("label_dim"), pybind11::arg("label_name"), pybind11::arg("dense_dim"), pybind11::arg("dense_name"), pybind11::arg("data_reader_sparse_param_array")); pybind11::class_<HugeCTR::SparseEmbedding, std::shared_ptr<HugeCTR::SparseEmbedding>>( m, "SparseEmbedding") .def(pybind11::init<Embedding_t, size_t, size_t, const std::string &, std::string, std::string, std::vector<size_t> &, std::shared_ptr<OptParamsPy> &, const HybridEmbeddingParam &>(), pybind11::arg("embedding_type"), pybind11::arg("workspace_size_per_gpu_in_mb"), pybind11::arg("embedding_vec_size"), pybind11::arg("combiner"), pybind11::arg("sparse_embedding_name"), pybind11::arg("bottom_name"), pybind11::arg("slot_size_array") = std::vector<size_t>(), pybind11::arg("optimizer") = std::shared_ptr<OptParamsPy>(new OptParamsPy()), pybind11::arg("hybrid_embedding_param") = HybridEmbeddingParam{1, -1, 0.01, 1.3e11, 1.9e11, 1.0, false, false, hybrid_embedding::CommunicationType::NVLink_SingleNode, hybrid_embedding::HybridEmbeddingType::Distributed}); pybind11::class_<HugeCTR::DenseLayer, std::shared_ptr<HugeCTR::DenseLayer>>(m, "DenseLayer") .def( pybind11::init<Layer_t, std::vector<std::string> &, std::vector<std::string> &, float, float, Initializer_t, Initializer_t, float, float, size_t, Initializer_t, Initializer_t, int, size_t, size_t, size_t, size_t, size_t, bool, std::vector<int> &, std::vector<std::pair<int, int>> &, std::vector<int> &, std::vector<size_t> &, size_t, int, std::vector<float> &, bool, Regularizer_t, float, FcPosition_t, Activation_t>(), pybind11::arg("layer_type"), pybind11::arg("bottom_names"), pybind11::arg("top_names"), pybind11::arg("factor") = 1.0, pybind11::arg("eps") = 0.00001, pybind11::arg("gamma_init_type") = Initializer_t::Default, pybind11::arg("beta_init_type") = Initializer_t::Default, pybind11::arg("dropout_rate") = 0.5, pybind11::arg("elu_alpha") = 1.0, pybind11::arg("num_output") = 1, pybind11::arg("weight_init_type") = Initializer_t::Default, pybind11::arg("bias_init_type") = Initializer_t::Default, pybind11::arg("num_layers") = 0, pybind11::arg("leading_dim") = 1, pybind11::arg("time_step") = 0, pybind11::arg("batchsize") = 1, pybind11::arg("SeqLength") = 1, pybind11::arg("vector_size") = 1, pybind11::arg("selected") = false, pybind11::arg("selected_slots") = std::vector<int>(), pybind11::arg("ranges") = std::vector<std::pair<int, int>>(), pybind11::arg("indices") = std::vector<int>(), pybind11::arg("weight_dims") = std::vector<size_t>(), pybind11::arg("out_dim") = 0, pybind11::arg("axis") = 1, pybind11::arg("target_weight_vec") = std::vector<float>(), pybind11::arg("use_regularizer") = false, pybind11::arg("regularizer_type") = Regularizer_t::L1, pybind11::arg("lambda") = 0, pybind11::arg("pos_type") = FcPosition_t::None, pybind11::arg("act_type") = Activation_t::Relu); pybind11::class_<HugeCTR::GroupDenseLayer, std::shared_ptr<HugeCTR::GroupDenseLayer>>( m, "GroupDenseLayer") .def(pybind11::init<GroupLayer_t, std::vector<std::string> &, std::vector<std::string> &, std::vector<size_t> &, Activation_t>(), pybind11::arg("group_layer_type"), pybind11::arg("bottom_name_list"), pybind11::arg("top_name_list"), pybind11::arg("num_outputs"), pybind11::arg("last_act_type") = Activation_t::Relu); pybind11::class_<HugeCTR::Model, std::shared_ptr<HugeCTR::Model>>(m, "Model") .def(pybind11::init<const Solver &, const DataReaderParams &, std::shared_ptr<OptParamsPy> &, std::shared_ptr<EmbeddingTrainingCacheParams> &>(), pybind11::arg("solver"), pybind11::arg("reader_params"), pybind11::arg("opt_params"), pybind11::arg("etc_params") = std::shared_ptr<EmbeddingTrainingCacheParams>(new EmbeddingTrainingCacheParams())) .def("compile", &HugeCTR::Model::compile) .def("summary", &HugeCTR::Model::summary) .def("fit", &HugeCTR::Model::fit, pybind11::arg("num_epochs") = 0, pybind11::arg("max_iter") = 2000, pybind11::arg("display") = 200, pybind11::arg("eval_interval") = 1000, pybind11::arg("snapshot") = 10000, pybind11::arg("snapshot_prefix") = "", pybind11::arg("data_source_params") = new DataSourceParams()) .def("set_source", pybind11::overload_cast<std::vector<std::string>, std::vector<std::string>, std::string>( &HugeCTR::Model::set_source), pybind11::arg("source"), pybind11::arg("keyset"), pybind11::arg("eval_source")) .def("set_source", pybind11::overload_cast<std::string, std::string>(&HugeCTR::Model::set_source), pybind11::arg("source"), pybind11::arg("eval_source")) .def("graph_to_json", &HugeCTR::Model::graph_to_json, pybind11::arg("graph_config_file")) .def("construct_from_json", &HugeCTR::Model::construct_from_json, pybind11::arg("graph_config_file"), pybind11::arg("include_dense_network")) .def("reset_learning_rate_scheduler", &HugeCTR::Model::reset_learning_rate_scheduler, pybind11::arg("base_lr"), pybind11::arg("warmup_steps") = 1, pybind11::arg("decay_start") = 0, pybind11::arg("decay_steps") = 1, pybind11::arg("decay_power") = 2.f, pybind11::arg("end_lr") = 0.f) .def("freeze_embedding", pybind11::overload_cast<>(&HugeCTR::Model::freeze_embedding)) .def("freeze_embedding", pybind11::overload_cast<const std::string &>(&HugeCTR::Model::freeze_embedding), pybind11::arg("embedding_name")) .def("freeze_dense", &HugeCTR::Model::freeze_dense) .def("unfreeze_embedding", pybind11::overload_cast<>(&HugeCTR::Model::unfreeze_embedding)) .def("unfreeze_embedding", pybind11::overload_cast<const std::string &>(&HugeCTR::Model::unfreeze_embedding), pybind11::arg("embedding_name")) .def("unfreeze_dense", &HugeCTR::Model::unfreeze_dense) .def("load_dense_weights", &HugeCTR::Model::load_dense_weights, pybind11::arg("dense_model_file")) .def("load_sparse_weights", pybind11::overload_cast<const std::vector<std::string> &>( &HugeCTR::Model::load_sparse_weights), pybind11::arg("sparse_embedding_files")) .def("load_sparse_weights", pybind11::overload_cast<const std::map<std::string, std::string> &>( &HugeCTR::Model::load_sparse_weights), pybind11::arg("sparse_embedding_files_map")) .def("load_dense_optimizer_states", &HugeCTR::Model::load_dense_optimizer_states, pybind11::arg("dense_opt_states_file")) .def("load_sparse_optimizer_states", pybind11::overload_cast<const std::vector<std::string> &>( &HugeCTR::Model::load_sparse_optimizer_states), pybind11::arg("sparse_opt_states_files")) .def("load_sparse_optimizer_states", pybind11::overload_cast<const std::map<std::string, std::string> &>( &HugeCTR::Model::load_sparse_optimizer_states), pybind11::arg("sparse_opt_states_files_map")) .def("add", pybind11::overload_cast<Input &>(&HugeCTR::Model::add), pybind11::arg("input")) .def("add", pybind11::overload_cast<SparseEmbedding &>(&HugeCTR::Model::add), pybind11::arg("sparse_embedding")) .def("add", pybind11::overload_cast<DenseLayer &>(&HugeCTR::Model::add), pybind11::arg("dense_layer")) .def("add", pybind11::overload_cast<GroupDenseLayer &>(&HugeCTR::Model::add), pybind11::arg("group_dense_layer")) .def("set_learning_rate", &HugeCTR::Model::set_learning_rate, pybind11::arg("lr")) .def("train", &HugeCTR::Model::train, pybind11::arg("is_first_batch") = true) .def("eval", &HugeCTR::Model::eval, pybind11::arg("is_first_batch") = true) .def("start_data_reading", &HugeCTR::Model::start_data_reading) .def("get_current_loss", [](HugeCTR::Model &self) { float loss = 0; self.get_current_loss(&loss); return loss; }) .def("get_eval_metrics", &HugeCTR::Model::get_eval_metrics) .def("get_incremental_model", [](HugeCTR::Model &self) { auto inc_sparse_model = self.get_incremental_model(); std::vector<std::pair<pybind11::array_t<long long>, pybind11::array_t<float>>> array_inc_sparse_model; for (const auto &pair : inc_sparse_model) { size_t num_keys = pair.first.size(); size_t emb_vec_size = pair.second.size() / num_keys; long long *keys = new long long[num_keys]; float *emb_vecs = new float[pair.second.size()]; memcpy(keys, pair.first.data(), num_keys * sizeof(long long)); memcpy(emb_vecs, pair.second.data(), num_keys * emb_vec_size * sizeof(float)); auto keys_capsule = pybind11::capsule(keys, [](void *v) { long long *vv = reinterpret_cast<long long *>(v); delete[] vv; }); auto emb_vecs_capsule = pybind11::capsule(emb_vecs, [](void *v) { float *vv = reinterpret_cast<float *>(v); delete[] vv; }); array_inc_sparse_model.push_back(std::make_pair( pybind11::array_t<long long>(num_keys, keys, keys_capsule), pybind11::array_t<float>({num_keys, emb_vec_size}, emb_vecs, emb_vecs_capsule))); } inc_sparse_model.clear(); return array_inc_sparse_model; }) .def("dump_incremental_model_2kafka", &HugeCTR::Model::dump_incremental_model_2kafka) .def("save_params_to_files", &HugeCTR::Model::download_params_to_files, pybind11::arg("prefix"), pybind11::arg("iter") = 0, pybind11::arg("data_source_params") = new DataSourceParams()) .def("get_embedding_training_cache", &HugeCTR::Model::get_embedding_training_cache) .def("get_data_reader_train", &HugeCTR::Model::get_train_data_reader) .def("get_data_reader_eval", &HugeCTR::Model::get_evaluate_data_reader) .def("get_learning_rate_scheduler", &HugeCTR::Model::get_learning_rate_scheduler) .def("export_predictions", &HugeCTR::Model::export_predictions, pybind11::arg("output_prediction_file_name"), pybind11::arg("output_label_file_name")); } } // namespace python_lib } // namespace HugeCTR
#include "SDL/SDL.h" #include "pomgob.h" #include "graphics.h" #include "settings.h" #include "game.h" #include <sstream> int Pomgob::obj_count = 0; SDL_Surface *Pomgob::pic = NULL; std::string Pomgob::generate_save_string(){ stringstream ss; string ret, temp; ss << "pomgob "; ss << pos.x; ss << " "; ss << pos.y; ss << " "; ss << look_right; ss << " "; ss << standing_still; ss << " "; ss << team; ret =ss.str(); return ret; } bool Pomgob::get_stand_still(){ return standing_still; } void Pomgob::set_stand_still(bool istand_still){ standing_still = istand_still; } bool Pomgob::looking_right(){ return look_right; } void Pomgob::set_look_right(bool ilook_right){ look_right = ilook_right; if (look_right) set_pic(POMGOBRIGHT1); else set_pic(POMGOBLEFT1); } Pomgob::Pomgob( SDL_Surface **screen, Sint16 x, Sint16 y, bool ilook_right, bool istanding_still, int iteam, Map *iworld){ if (obj_count == 0 && pic == NULL){ pic = load_optimized_pic( "graphics/pomgob.bmp", screen, 44, 255, 153 ); } //creature specific settings team = iteam; hpmax = 9; hp = hpmax; safe = 0; world = iworld; immune_to_gravity = 0; pos.x = x; pos.y = y; pos.w = 55; pos.h = 57; //pomgob specific settings obj_count ++; look_right = ilook_right; runframe = 1; leaps_default = 3; if (istanding_still) leaps_left = leaps_default; else leaps_left = 0; legspeed = 6; recovery = 0; standing_still = istanding_still; steps_until_picswitch = legspeed; hitpower_x = 7; hitpower_y = 1; jumpwait = 10; last_aspeed_y = 0; x_maxspeed = 2.2; x_ret = 0.5; x_acc = 0.15; x_airacc = 0.0; aura = NULL; if (look_right) set_pic(POMGOBRIGHT1); else set_pic(POMGOBLEFT1); } void Pomgob::think(){ if (recovery > 0){ if (below){ aspeed_y = -last_aspeed_y * 0.75; recovery --; } last_aspeed_y = aspeed_y; if (aspeed_x > 0){ if (aspeed_x > x_airacc) aspeed_x = aspeed_x - x_airacc; else aspeed_x = 0; } else if (aspeed_x < 0){ if (aspeed_x < -x_airacc) aspeed_x = aspeed_x + x_airacc; else aspeed_x = 0; } if (recovery == 0 && hp <= 0) { dead = 1; aspeed_x = 0; aura = NULL; if (look_right) set_pic(POMGOBDEADRIGHT); else set_pic(POMGOBDEADLEFT); } } else{ // recovery == 0 if (aura == NULL){ Fxfield **ny; if (world == NULL){ printf("Pomgob: world == NULL\n"); exit(1); } ny = world->get_free_fxfield(); aura = new Aura(pos.x, pos.y, pos.w, pos.h, this, world, team, hitpower_x, hitpower_y, 1); *ny = aura; world->register_fxfield(*ny); } if (not standing_still){ if (look_right && rightof) look_right = 0; else if (not look_right && leftof) look_right = 1; aspeed_x = aspeed_x + x_acc * (look_right? 1: -1); if (aspeed_x > x_maxspeed) aspeed_x = x_maxspeed; if (aspeed_x < -x_maxspeed) aspeed_x = -x_maxspeed; if (steps_until_picswitch == 0){ switch(runframe){ case 0: case 2: if (look_right) set_pic(POMGOBRIGHT1); else set_pic(POMGOBLEFT1); break; case 1: if (look_right) set_pic(POMGOBRIGHT0); else set_pic(POMGOBLEFT0); break; case 3: if (look_right) set_pic(POMGOBRIGHT2); else set_pic(POMGOBLEFT2); break; default: printf("Errorous runframe on Pomgob\n"); exit(1); } runframe = (runframe + 1) % 4; } steps_until_picswitch = (steps_until_picswitch == 0? legspeed : steps_until_picswitch -1); } //fi not standing_still else{ //standing still if (aspeed_x > x_airacc) aspeed_x = aspeed_x - x_airacc; else if (aspeed_x < -x_airacc) aspeed_x = aspeed_x + x_airacc; else aspeed_x = 0; if (look_right) set_pic(POMGOBRIGHT1); else set_pic(POMGOBLEFT1); if (below){ jumpwait --; if (jumpwait <= 0){ jumpwait = 100; aspeed_y -= 7; leaps_left --; if (leaps_left == 0) standing_still = false; } } } } if (aura != NULL){ aura->lifetime = 1; } } void Pomgob::paint(SDL_Surface **screen){ SDL_Rect source, target; if (not settings.collision_mode){ source = source_pos; prepare_to_show(target, target_pos); if(SDL_BlitSurface(pic, &source, *screen, &target)){ printf("Pomgob:paint() Error while blitting player:%s",SDL_GetError()); exit(1); } } else{ prepare_to_show(target, pos); SDL_FillRect(*screen, &target, SDL_MapRGB((*screen)->format, 200, 120, 0)); } return; } Pomgob::~Pomgob(){ obj_count --; if (obj_count == 0){ SDL_FreeSurface( pic ); pic = NULL; } return; } void Pomgob::hurt(Fxfield *fxf){ if (not dead){ standing_still = not standing_still; if (standing_still) leaps_left = leaps_default; else leaps_left = 0; if (aspeed_x > 0){ set_pic(POMGOBHITRIGHT); look_right = 1; } else{ set_pic(POMGOBHITLEFT); look_right = 0; } last_aspeed_y = aspeed_y; safe = 20; recovery = 25; } } void Pomgob::set_pic( int pic_number ){ switch(pic_number){ case POMGOBLEFT0: source_pos.x = 2; source_pos.y = 3; source_pos.w = 83; source_pos.h = 60; target_pos.x = pos.x - 16; target_pos.y = pos.y; break; case POMGOBLEFT1: source_pos.x = 90; source_pos.y = 4; source_pos.w = 83; source_pos.h = 57; target_pos.x = pos.x - 16; target_pos.y = pos.y; break; case POMGOBLEFT2: source_pos.x = 179; source_pos.y = 5; source_pos.w = 83; source_pos.h = 56; target_pos.x = pos.x - 16; target_pos.y = pos.y; break; case POMGOBRIGHT0: source_pos.x = 5; source_pos.y = 72; source_pos.w = 83; source_pos.h = 56; target_pos.x = pos.x - 12; target_pos.y = pos.y; break; case POMGOBRIGHT1: source_pos.x = 94; source_pos.y = 71; source_pos.w = 83; source_pos.h = 57; target_pos.x = pos.x - 12; target_pos.y = pos.y; break; case POMGOBRIGHT2: source_pos.x = 182; source_pos.y = 70; source_pos.w = 83; source_pos.h = 60; target_pos.x = pos.x - 12; target_pos.y = pos.y; break; case POMGOBHITRIGHT: source_pos.x = 9; source_pos.y = 139; source_pos.w = 72; source_pos.h = 51; target_pos.x = pos.x - 20; target_pos.y = pos.y + 7; break; case POMGOBHITLEFT: source_pos.x = 114; source_pos.y = 196; source_pos.w = 72; source_pos.h = 51; target_pos.x = pos.x; target_pos.y = pos.y + 7; break; case POMGOBDEADRIGHT: source_pos.x = 94; source_pos.y = 146; source_pos.w = 84; source_pos.h = 45; target_pos.x = pos.x - 17; target_pos.y = pos.y + 22; break; case POMGOBDEADLEFT: source_pos.x = 17; source_pos.y = 203; source_pos.w = 84; source_pos.h = 45; target_pos.x = pos.x - 17; target_pos.y = pos.y + 22; break; default: printf("Pomgob set wrong pic\n"); exit(1); } target_pos.w = source_pos.w; target_pos.h = source_pos.h; } void Pomgob::move_x(int x_diff){ pos.x = pos.x + x_diff; target_pos.x = target_pos.x + x_diff; if (aura != NULL){ world->unregister_fxfield(aura); aura->col_rect[0].x = pos.x; aura->col_rect[0].w = pos.w; world->register_fxfield(aura); } } void Pomgob::move_y(int y_diff){ pos.y = pos.y + y_diff; target_pos.y = target_pos.y + y_diff; if (aura != NULL){ world->unregister_fxfield(aura); aura->col_rect[0].y = pos.y; aura->col_rect[0].h = pos.h; world->register_fxfield(aura); } }
; ; jccolext.asm - colorspace conversion (64-bit SSE2) ; ; Copyright (C) 2009, 2016, D. R. Commander. ; Copyright (C) 2018, Matthias Räncker. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 %include "jcolsamp.inc" ; -------------------------------------------------------------------------- ; ; Convert some rows of samples to the output colorspace. ; ; GLOBAL(void) ; jsimd_rgb_ycc_convert_sse2(JDIMENSION img_width, JSAMPARRAY input_buf, ; JSAMPIMAGE output_buf, JDIMENSION output_row, ; int num_rows); ; ; r10d = JDIMENSION img_width ; r11 = JSAMPARRAY input_buf ; r12 = JSAMPIMAGE output_buf ; r13d = JDIMENSION output_row ; r14d = int num_rows %define wk(i) rbp - (WK_NUM - (i)) * SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 8 align 32 GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2) EXTN(jsimd_rgb_ycc_convert_sse2): push rbp mov rax, rsp ; rax = original rbp sub rsp, byte 4 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [rsp], rax mov rbp, rsp ; rbp = aligned rbp lea rsp, [wk(0)] collect_args 5 push rbx mov ecx, r10d test rcx, rcx jz near .return push rcx mov rsi, r12 mov ecx, r13d mov rdip, JSAMPARRAY [rsi+0*SIZEOF_JSAMPARRAY] mov rbxp, JSAMPARRAY [rsi+1*SIZEOF_JSAMPARRAY] mov rdxp, JSAMPARRAY [rsi+2*SIZEOF_JSAMPARRAY] lea rdi, [rdi+rcx*SIZEOF_JSAMPROW] lea rbx, [rbx+rcx*SIZEOF_JSAMPROW] lea rdx, [rdx+rcx*SIZEOF_JSAMPROW] pop rcx mov rsi, r11 mov eax, r14d test rax, rax jle near .return .rowloop: push rdx push rbx push rdi push rsi push rcx ; col mov rsip, JSAMPROW [rsi] ; inptr mov rdip, JSAMPROW [rdi] ; outptr0 mov rbxp, JSAMPROW [rbx] ; outptr1 mov rdxp, JSAMPROW [rdx] ; outptr2 cmp rcx, byte SIZEOF_XMMWORD jae near .columnloop %if RGB_PIXELSIZE == 3 ; --------------- .column_ld1: push rax push rdx lea rcx, [rcx+rcx*2] ; imul ecx,RGB_PIXELSIZE test cl, SIZEOF_BYTE jz short .column_ld2 sub rcx, byte SIZEOF_BYTE movzx rax, byte [rsi+rcx] .column_ld2: test cl, SIZEOF_WORD jz short .column_ld4 sub rcx, byte SIZEOF_WORD movzx rdx, word [rsi+rcx] shl rax, WORD_BIT or rax, rdx .column_ld4: movd xmmA, eax pop rdx pop rax test cl, SIZEOF_DWORD jz short .column_ld8 sub rcx, byte SIZEOF_DWORD movd xmmF, XMM_DWORD [rsi+rcx] pslldq xmmA, SIZEOF_DWORD por xmmA, xmmF .column_ld8: test cl, SIZEOF_MMWORD jz short .column_ld16 sub rcx, byte SIZEOF_MMWORD movq xmmB, XMM_MMWORD [rsi+rcx] pslldq xmmA, SIZEOF_MMWORD por xmmA, xmmB .column_ld16: test cl, SIZEOF_XMMWORD jz short .column_ld32 movdqa xmmF, xmmA movdqu xmmA, XMMWORD [rsi+0*SIZEOF_XMMWORD] mov rcx, SIZEOF_XMMWORD jmp short .rgb_ycc_cnv .column_ld32: test cl, 2*SIZEOF_XMMWORD mov rcx, SIZEOF_XMMWORD jz short .rgb_ycc_cnv movdqa xmmB, xmmA movdqu xmmA, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqu xmmF, XMMWORD [rsi+1*SIZEOF_XMMWORD] jmp short .rgb_ycc_cnv .columnloop: movdqu xmmA, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqu xmmF, XMMWORD [rsi+1*SIZEOF_XMMWORD] movdqu xmmB, XMMWORD [rsi+2*SIZEOF_XMMWORD] .rgb_ycc_cnv: ; xmmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05) ; xmmF=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A) ; xmmB=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F) movdqa xmmG, xmmA pslldq xmmA, 8 ; xmmA=(-- -- -- -- -- -- -- -- 00 10 20 01 11 21 02 12) psrldq xmmG, 8 ; xmmG=(22 03 13 23 04 14 24 05 -- -- -- -- -- -- -- --) punpckhbw xmmA, xmmF ; xmmA=(00 08 10 18 20 28 01 09 11 19 21 29 02 0A 12 1A) pslldq xmmF, 8 ; xmmF=(-- -- -- -- -- -- -- -- 15 25 06 16 26 07 17 27) punpcklbw xmmG, xmmB ; xmmG=(22 2A 03 0B 13 1B 23 2B 04 0C 14 1C 24 2C 05 0D) punpckhbw xmmF, xmmB ; xmmF=(15 1D 25 2D 06 0E 16 1E 26 2E 07 0F 17 1F 27 2F) movdqa xmmD, xmmA pslldq xmmA, 8 ; xmmA=(-- -- -- -- -- -- -- -- 00 08 10 18 20 28 01 09) psrldq xmmD, 8 ; xmmD=(11 19 21 29 02 0A 12 1A -- -- -- -- -- -- -- --) punpckhbw xmmA, xmmG ; xmmA=(00 04 08 0C 10 14 18 1C 20 24 28 2C 01 05 09 0D) pslldq xmmG, 8 ; xmmG=(-- -- -- -- -- -- -- -- 22 2A 03 0B 13 1B 23 2B) punpcklbw xmmD, xmmF ; xmmD=(11 15 19 1D 21 25 29 2D 02 06 0A 0E 12 16 1A 1E) punpckhbw xmmG, xmmF ; xmmG=(22 26 2A 2E 03 07 0B 0F 13 17 1B 1F 23 27 2B 2F) movdqa xmmE, xmmA pslldq xmmA, 8 ; xmmA=(-- -- -- -- -- -- -- -- 00 04 08 0C 10 14 18 1C) psrldq xmmE, 8 ; xmmE=(20 24 28 2C 01 05 09 0D -- -- -- -- -- -- -- --) punpckhbw xmmA, xmmD ; xmmA=(00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E) pslldq xmmD, 8 ; xmmD=(-- -- -- -- -- -- -- -- 11 15 19 1D 21 25 29 2D) punpcklbw xmmE, xmmG ; xmmE=(20 22 24 26 28 2A 2C 2E 01 03 05 07 09 0B 0D 0F) punpckhbw xmmD, xmmG ; xmmD=(11 13 15 17 19 1B 1D 1F 21 23 25 27 29 2B 2D 2F) pxor xmmH, xmmH movdqa xmmC, xmmA punpcklbw xmmA, xmmH ; xmmA=(00 02 04 06 08 0A 0C 0E) punpckhbw xmmC, xmmH ; xmmC=(10 12 14 16 18 1A 1C 1E) movdqa xmmB, xmmE punpcklbw xmmE, xmmH ; xmmE=(20 22 24 26 28 2A 2C 2E) punpckhbw xmmB, xmmH ; xmmB=(01 03 05 07 09 0B 0D 0F) movdqa xmmF, xmmD punpcklbw xmmD, xmmH ; xmmD=(11 13 15 17 19 1B 1D 1F) punpckhbw xmmF, xmmH ; xmmF=(21 23 25 27 29 2B 2D 2F) %else ; RGB_PIXELSIZE == 4 ; ----------- .column_ld1: test cl, SIZEOF_XMMWORD/16 jz short .column_ld2 sub rcx, byte SIZEOF_XMMWORD/16 movd xmmA, XMM_DWORD [rsi+rcx*RGB_PIXELSIZE] .column_ld2: test cl, SIZEOF_XMMWORD/8 jz short .column_ld4 sub rcx, byte SIZEOF_XMMWORD/8 movq xmmE, XMM_MMWORD [rsi+rcx*RGB_PIXELSIZE] pslldq xmmA, SIZEOF_MMWORD por xmmA, xmmE .column_ld4: test cl, SIZEOF_XMMWORD/4 jz short .column_ld8 sub rcx, byte SIZEOF_XMMWORD/4 movdqa xmmE, xmmA movdqu xmmA, XMMWORD [rsi+rcx*RGB_PIXELSIZE] .column_ld8: test cl, SIZEOF_XMMWORD/2 mov rcx, SIZEOF_XMMWORD jz short .rgb_ycc_cnv movdqa xmmF, xmmA movdqa xmmH, xmmE movdqu xmmA, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqu xmmE, XMMWORD [rsi+1*SIZEOF_XMMWORD] jmp short .rgb_ycc_cnv .columnloop: movdqu xmmA, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqu xmmE, XMMWORD [rsi+1*SIZEOF_XMMWORD] movdqu xmmF, XMMWORD [rsi+2*SIZEOF_XMMWORD] movdqu xmmH, XMMWORD [rsi+3*SIZEOF_XMMWORD] .rgb_ycc_cnv: ; xmmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33) ; xmmE=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37) ; xmmF=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B) ; xmmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F) movdqa xmmD, xmmA punpcklbw xmmA, xmmE ; xmmA=(00 04 10 14 20 24 30 34 01 05 11 15 21 25 31 35) punpckhbw xmmD, xmmE ; xmmD=(02 06 12 16 22 26 32 36 03 07 13 17 23 27 33 37) movdqa xmmC, xmmF punpcklbw xmmF, xmmH ; xmmF=(08 0C 18 1C 28 2C 38 3C 09 0D 19 1D 29 2D 39 3D) punpckhbw xmmC, xmmH ; xmmC=(0A 0E 1A 1E 2A 2E 3A 3E 0B 0F 1B 1F 2B 2F 3B 3F) movdqa xmmB, xmmA punpcklwd xmmA, xmmF ; xmmA=(00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C) punpckhwd xmmB, xmmF ; xmmB=(01 05 09 0D 11 15 19 1D 21 25 29 2D 31 35 39 3D) movdqa xmmG, xmmD punpcklwd xmmD, xmmC ; xmmD=(02 06 0A 0E 12 16 1A 1E 22 26 2A 2E 32 36 3A 3E) punpckhwd xmmG, xmmC ; xmmG=(03 07 0B 0F 13 17 1B 1F 23 27 2B 2F 33 37 3B 3F) movdqa xmmE, xmmA punpcklbw xmmA, xmmD ; xmmA=(00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E) punpckhbw xmmE, xmmD ; xmmE=(20 22 24 26 28 2A 2C 2E 30 32 34 36 38 3A 3C 3E) movdqa xmmH, xmmB punpcklbw xmmB, xmmG ; xmmB=(01 03 05 07 09 0B 0D 0F 11 13 15 17 19 1B 1D 1F) punpckhbw xmmH, xmmG ; xmmH=(21 23 25 27 29 2B 2D 2F 31 33 35 37 39 3B 3D 3F) pxor xmmF, xmmF movdqa xmmC, xmmA punpcklbw xmmA, xmmF ; xmmA=(00 02 04 06 08 0A 0C 0E) punpckhbw xmmC, xmmF ; xmmC=(10 12 14 16 18 1A 1C 1E) movdqa xmmD, xmmB punpcklbw xmmB, xmmF ; xmmB=(01 03 05 07 09 0B 0D 0F) punpckhbw xmmD, xmmF ; xmmD=(11 13 15 17 19 1B 1D 1F) movdqa xmmG, xmmE punpcklbw xmmE, xmmF ; xmmE=(20 22 24 26 28 2A 2C 2E) punpckhbw xmmG, xmmF ; xmmG=(30 32 34 36 38 3A 3C 3E) punpcklbw xmmF, xmmH punpckhbw xmmH, xmmH psrlw xmmF, BYTE_BIT ; xmmF=(21 23 25 27 29 2B 2D 2F) psrlw xmmH, BYTE_BIT ; xmmH=(31 33 35 37 39 3B 3D 3F) %endif ; RGB_PIXELSIZE ; --------------- ; xmm0=R(02468ACE)=RE, xmm2=G(02468ACE)=GE, xmm4=B(02468ACE)=BE ; xmm1=R(13579BDF)=RO, xmm3=G(13579BDF)=GO, xmm5=B(13579BDF)=BO ; (Original) ; Y = 0.29900 * R + 0.58700 * G + 0.11400 * B ; Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE ; Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE ; ; (This implementation) ; Y = 0.29900 * R + 0.33700 * G + 0.11400 * B + 0.25000 * G ; Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE ; Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE movdqa XMMWORD [wk(0)], xmm0 ; wk(0)=RE movdqa XMMWORD [wk(1)], xmm1 ; wk(1)=RO movdqa XMMWORD [wk(2)], xmm4 ; wk(2)=BE movdqa XMMWORD [wk(3)], xmm5 ; wk(3)=BO movdqa xmm6, xmm1 punpcklwd xmm1, xmm3 punpckhwd xmm6, xmm3 movdqa xmm7, xmm1 movdqa xmm4, xmm6 pmaddwd xmm1, [rel PW_F0299_F0337] ; xmm1=ROL*FIX(0.299)+GOL*FIX(0.337) pmaddwd xmm6, [rel PW_F0299_F0337] ; xmm6=ROH*FIX(0.299)+GOH*FIX(0.337) pmaddwd xmm7, [rel PW_MF016_MF033] ; xmm7=ROL*-FIX(0.168)+GOL*-FIX(0.331) pmaddwd xmm4, [rel PW_MF016_MF033] ; xmm4=ROH*-FIX(0.168)+GOH*-FIX(0.331) movdqa XMMWORD [wk(4)], xmm1 ; wk(4)=ROL*FIX(0.299)+GOL*FIX(0.337) movdqa XMMWORD [wk(5)], xmm6 ; wk(5)=ROH*FIX(0.299)+GOH*FIX(0.337) pxor xmm1, xmm1 pxor xmm6, xmm6 punpcklwd xmm1, xmm5 ; xmm1=BOL punpckhwd xmm6, xmm5 ; xmm6=BOH psrld xmm1, 1 ; xmm1=BOL*FIX(0.500) psrld xmm6, 1 ; xmm6=BOH*FIX(0.500) movdqa xmm5, [rel PD_ONEHALFM1_CJ] ; xmm5=[PD_ONEHALFM1_CJ] paddd xmm7, xmm1 paddd xmm4, xmm6 paddd xmm7, xmm5 paddd xmm4, xmm5 psrld xmm7, SCALEBITS ; xmm7=CbOL psrld xmm4, SCALEBITS ; xmm4=CbOH packssdw xmm7, xmm4 ; xmm7=CbO movdqa xmm1, XMMWORD [wk(2)] ; xmm1=BE movdqa xmm6, xmm0 punpcklwd xmm0, xmm2 punpckhwd xmm6, xmm2 movdqa xmm5, xmm0 movdqa xmm4, xmm6 pmaddwd xmm0, [rel PW_F0299_F0337] ; xmm0=REL*FIX(0.299)+GEL*FIX(0.337) pmaddwd xmm6, [rel PW_F0299_F0337] ; xmm6=REH*FIX(0.299)+GEH*FIX(0.337) pmaddwd xmm5, [rel PW_MF016_MF033] ; xmm5=REL*-FIX(0.168)+GEL*-FIX(0.331) pmaddwd xmm4, [rel PW_MF016_MF033] ; xmm4=REH*-FIX(0.168)+GEH*-FIX(0.331) movdqa XMMWORD [wk(6)], xmm0 ; wk(6)=REL*FIX(0.299)+GEL*FIX(0.337) movdqa XMMWORD [wk(7)], xmm6 ; wk(7)=REH*FIX(0.299)+GEH*FIX(0.337) pxor xmm0, xmm0 pxor xmm6, xmm6 punpcklwd xmm0, xmm1 ; xmm0=BEL punpckhwd xmm6, xmm1 ; xmm6=BEH psrld xmm0, 1 ; xmm0=BEL*FIX(0.500) psrld xmm6, 1 ; xmm6=BEH*FIX(0.500) movdqa xmm1, [rel PD_ONEHALFM1_CJ] ; xmm1=[PD_ONEHALFM1_CJ] paddd xmm5, xmm0 paddd xmm4, xmm6 paddd xmm5, xmm1 paddd xmm4, xmm1 psrld xmm5, SCALEBITS ; xmm5=CbEL psrld xmm4, SCALEBITS ; xmm4=CbEH packssdw xmm5, xmm4 ; xmm5=CbE psllw xmm7, BYTE_BIT por xmm5, xmm7 ; xmm5=Cb movdqa XMMWORD [rbx], xmm5 ; Save Cb movdqa xmm0, XMMWORD [wk(3)] ; xmm0=BO movdqa xmm6, XMMWORD [wk(2)] ; xmm6=BE movdqa xmm1, XMMWORD [wk(1)] ; xmm1=RO movdqa xmm4, xmm0 punpcklwd xmm0, xmm3 punpckhwd xmm4, xmm3 movdqa xmm7, xmm0 movdqa xmm5, xmm4 pmaddwd xmm0, [rel PW_F0114_F0250] ; xmm0=BOL*FIX(0.114)+GOL*FIX(0.250) pmaddwd xmm4, [rel PW_F0114_F0250] ; xmm4=BOH*FIX(0.114)+GOH*FIX(0.250) pmaddwd xmm7, [rel PW_MF008_MF041] ; xmm7=BOL*-FIX(0.081)+GOL*-FIX(0.418) pmaddwd xmm5, [rel PW_MF008_MF041] ; xmm5=BOH*-FIX(0.081)+GOH*-FIX(0.418) movdqa xmm3, [rel PD_ONEHALF] ; xmm3=[PD_ONEHALF] paddd xmm0, XMMWORD [wk(4)] paddd xmm4, XMMWORD [wk(5)] paddd xmm0, xmm3 paddd xmm4, xmm3 psrld xmm0, SCALEBITS ; xmm0=YOL psrld xmm4, SCALEBITS ; xmm4=YOH packssdw xmm0, xmm4 ; xmm0=YO pxor xmm3, xmm3 pxor xmm4, xmm4 punpcklwd xmm3, xmm1 ; xmm3=ROL punpckhwd xmm4, xmm1 ; xmm4=ROH psrld xmm3, 1 ; xmm3=ROL*FIX(0.500) psrld xmm4, 1 ; xmm4=ROH*FIX(0.500) movdqa xmm1, [rel PD_ONEHALFM1_CJ] ; xmm1=[PD_ONEHALFM1_CJ] paddd xmm7, xmm3 paddd xmm5, xmm4 paddd xmm7, xmm1 paddd xmm5, xmm1 psrld xmm7, SCALEBITS ; xmm7=CrOL psrld xmm5, SCALEBITS ; xmm5=CrOH packssdw xmm7, xmm5 ; xmm7=CrO movdqa xmm3, XMMWORD [wk(0)] ; xmm3=RE movdqa xmm4, xmm6 punpcklwd xmm6, xmm2 punpckhwd xmm4, xmm2 movdqa xmm1, xmm6 movdqa xmm5, xmm4 pmaddwd xmm6, [rel PW_F0114_F0250] ; xmm6=BEL*FIX(0.114)+GEL*FIX(0.250) pmaddwd xmm4, [rel PW_F0114_F0250] ; xmm4=BEH*FIX(0.114)+GEH*FIX(0.250) pmaddwd xmm1, [rel PW_MF008_MF041] ; xmm1=BEL*-FIX(0.081)+GEL*-FIX(0.418) pmaddwd xmm5, [rel PW_MF008_MF041] ; xmm5=BEH*-FIX(0.081)+GEH*-FIX(0.418) movdqa xmm2, [rel PD_ONEHALF] ; xmm2=[PD_ONEHALF] paddd xmm6, XMMWORD [wk(6)] paddd xmm4, XMMWORD [wk(7)] paddd xmm6, xmm2 paddd xmm4, xmm2 psrld xmm6, SCALEBITS ; xmm6=YEL psrld xmm4, SCALEBITS ; xmm4=YEH packssdw xmm6, xmm4 ; xmm6=YE psllw xmm0, BYTE_BIT por xmm6, xmm0 ; xmm6=Y movdqa XMMWORD [rdi], xmm6 ; Save Y pxor xmm2, xmm2 pxor xmm4, xmm4 punpcklwd xmm2, xmm3 ; xmm2=REL punpckhwd xmm4, xmm3 ; xmm4=REH psrld xmm2, 1 ; xmm2=REL*FIX(0.500) psrld xmm4, 1 ; xmm4=REH*FIX(0.500) movdqa xmm0, [rel PD_ONEHALFM1_CJ] ; xmm0=[PD_ONEHALFM1_CJ] paddd xmm1, xmm2 paddd xmm5, xmm4 paddd xmm1, xmm0 paddd xmm5, xmm0 psrld xmm1, SCALEBITS ; xmm1=CrEL psrld xmm5, SCALEBITS ; xmm5=CrEH packssdw xmm1, xmm5 ; xmm1=CrE psllw xmm7, BYTE_BIT por xmm1, xmm7 ; xmm1=Cr movdqa XMMWORD [rdx], xmm1 ; Save Cr sub rcx, byte SIZEOF_XMMWORD add rsi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; inptr add rdi, byte SIZEOF_XMMWORD ; outptr0 add rbx, byte SIZEOF_XMMWORD ; outptr1 add rdx, byte SIZEOF_XMMWORD ; outptr2 cmp rcx, byte SIZEOF_XMMWORD jae near .columnloop test rcx, rcx jnz near .column_ld1 pop rcx ; col pop rsi pop rdi pop rbx pop rdx add rsi, byte SIZEOF_JSAMPROW ; input_buf add rdi, byte SIZEOF_JSAMPROW add rbx, byte SIZEOF_JSAMPROW add rdx, byte SIZEOF_JSAMPROW dec rax ; num_rows jg near .rowloop .return: pop rbx uncollect_args 5 mov rsp, rbp ; rsp <- aligned rbp pop rsp ; rsp <- original rbp pop rbp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
; int wv_priority_queue_reserve_callee(wv_priority_queue_t *q, size_t n) SECTION code_clib SECTION code_adt_wv_priority_queue PUBLIC _wv_priority_queue_reserve_callee EXTERN asm_wv_priority_queue_reserve _wv_priority_queue_reserve_callee: pop af pop hl pop bc push af jp asm_wv_priority_queue_reserve
; A175216: The first nonprimes after the primes. ; 4,4,6,8,12,14,18,20,24,30,32,38,42,44,48,54,60,62,68,72,74,80,84,90,98,102,104,108,110,114,128,132,138,140,150,152,158,164,168,174,180,182,192,194,198,200,212,224,228,230,234,240,242,252,258,264,270,272 trn $0,1 seq $0,168565 ; Let p = prime(n); then a(n) = p + (p-1)/2. div $0,3 add $0,1 mul $0,2
#include "stdafx.h" /////////////////////////////////////////////////////////////////////////////// // 文件名:CampAndStand.cpp // 功能说明:阵营数据表结构和功能实现 // // 修改记录: // // // /////////////////////////////////////////////////////////////////////////////// /** \file CampAndStand.cpp * \brief the implement of camp and stand structure */ #include "CampAndStand.h" #include "GameUtil.h" #include "DB_Struct.h" #include "PAP_DBC.h" namespace Combat_Module { namespace Camp_Stand { using namespace DBC; //class CampStandRecord_T CampStandRecord_T::CampStandRecord_T() : m_bInited(FALSE) { memset((VOID*)m_aStands, (INT)FALSE, sizeof(m_aStands)); } BOOL CampStandRecord_T::InitFromDB(const DBCFile * pDB, INT const nRow) { __ENTER_FUNCTION Assert(pDB); Assert(0<=nRow && nRow< pDB->GetRecordsNum()); INT column = 1; INT col_num=pDB->GetFieldsNum(); for(INT nIdx=0;MAX_ID>=nIdx;++nIdx) { m_aStands[nIdx]= (col_num > column) ? (pDB->Search_Posistion(nRow, column++)->iValue != 0) : false; } m_bInited = TRUE; return TRUE; __LEAVE_FUNCTION return FALSE; } BOOL CampStandRecord_T::StandByCampID(CampID_t const nCampID)const { __ENTER_FUNCTION if(0<=nCampID&&MAX_ID>=nCampID) { return m_aStands[nCampID]; } return FALSE; __LEAVE_FUNCTION return FALSE; } } } //写死了的一些阵营逻辑,其实可以配表 //看看两个阵营,是否是敌对关系 //BOOL CalcCamp_IfIsEnemy(CampID_t a, CampID_t b) //{ // if( a == -1 || b == -1 ) //阵营ID无效 // return TRUE; // // if( a == CAMP_1 ) // { // if( b == CAMP_1 ) return FALSE; // else if( b == CAMP_2 ) return TRUE; // else if( b == CAMP_3 ) return FALSE; // else if( b == CAMP_4 ) return TRUE; // } // else if( a == CAMP_2 ) // { // if( b == CAMP_1 ) return TRUE; // else if( b == CAMP_2 ) return FALSE; // else if( b == CAMP_3 ) return FALSE; // else if( b == CAMP_4 ) return TRUE; // } // else if( a == CAMP_3 ) // { // return FALSE; // } // else if( a == CAMP_4 ) // { // return TRUE; // } // else // Assert( FALSE && "怎么没有这个阵营类型呢?" ) ; // // return FALSE; //} ENUM_RELATION CalcRelationType( INT nObj1Type, INT nObj2Type, CampAndStandDataMgr_T* pCampAndStandDataMgr ) { const CampStandRecord_T *pCampAndStand = pCampAndStandDataMgr->GetInstanceByID( nObj1Type ); if( pCampAndStand == NULL ) return RELATION_FRIEND; if( nObj2Type < 0 || nObj2Type > CampStandRecord_T::MAX_ID ) return RELATION_FRIEND; if( pCampAndStand->StandByCampID(nObj2Type) ) return RELATION_FRIEND; else return RELATION_ENEMY; //ENUM_RELATION eRelation_A, eRelation_B; //if ( pCamp_A == NULL || pCamp_B == NULL ) // return RELATION_ENEMY; //BOOL ret = CalcCamp_IfIsEnemy( pCamp_A->m_nCampID, pCamp_B->m_nCampID ); //if( ret ) // return RELATION_ENEMY; //else // return RELATION_FRIEND; //// 对A来说 //if ( pCamp_A->IsActiveFlag_Dirty( pCamp_B->m_nCampID ) ) //{ // if ( pCamp_A->IsRelationFlag_Dirty( pCamp_B->m_nCampID ) ) // { // eRelation_A = RELATION_FRIEND; // } // else // { // eRelation_A = RELATION_ENEMY; // } //} //else //{ // const CampStandRecord_T *pCampAndStand; // pCampAndStand = pCampMgr->GetInstanceByID( pCamp_A->m_nCampID ); // if ( pCampAndStand != NULL ) // { // if ( pCampAndStand->StandByCampID( pCamp_B->m_nCampID ) ) // { // eRelation_A = RELATION_ENEMY; // } // else // { // eRelation_A = RELATION_FRIEND; // } // } // else // { // eRelation_A = RELATION_INVALID; // } //} //// 对B来说 //if ( pCamp_B->IsActiveFlag_Dirty( pCamp_A->m_nCampID ) ) //{ // if ( pCamp_B->IsRelationFlag_Dirty( pCamp_A->m_nCampID ) ) // { // eRelation_B = RELATION_FRIEND; // } // else // { // eRelation_B = RELATION_ENEMY; // } //} //else //{ // const CampStandRecord_T *pCampAndStand; // pCampAndStand = pCampMgr->GetInstanceByID( pCamp_B->m_nCampID ); // if ( pCampAndStand != NULL ) // { // if ( pCampAndStand->StandByCampID( pCamp_A->m_nCampID ) ) // { // eRelation_B = RELATION_ENEMY; // } // else // { // eRelation_B = RELATION_FRIEND; // } // } // else // { // eRelation_B = RELATION_INVALID; // } //} //if ( eRelation_A == eRelation_B ) //{ // return eRelation_A; //} //else //{ // if ( bHuman_A && bHuman_B ) // { // return RELATION_ENEMY; // } // else if ( bHuman_A ) // { // return eRelation_A; // } // else if ( bHuman_B ) // { // return eRelation_B; // } // else // { // return RELATION_ENEMY; // } //} }
/* * Copyright 2018, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <media/stagefright/bqhelper/Conversion.h> namespace android { namespace conversion { // native_handle_t helper functions. /** * \brief Take an fd and create a native handle containing only the given fd. * The created handle will need to be deleted manually with * `native_handle_delete()`. * * \param[in] fd The source file descriptor (of type `int`). * \return The create `native_handle_t*` that contains the given \p fd. If the * supplied \p fd is negative, the created native handle will contain no file * descriptors. * * If the native handle cannot be created, the return value will be * `nullptr`. * * This function does not duplicate the file descriptor. */ native_handle_t* native_handle_create_from_fd(int fd) { if (fd < 2) { return native_handle_create(0, 0); } native_handle_t* nh = native_handle_create(1, 0); if (nh == nullptr) { return nullptr; } nh->data[0] = fd; return nh; } /** * \brief Extract a file descriptor from a native handle. * * \param[in] nh The source `native_handle_t*`. * \param[in] index The index of the file descriptor in \p nh to read from. This * input has the default value of `0`. * \return The `index`-th file descriptor in \p nh. If \p nh does not have * enough file descriptors, the returned value will be `-1`. * * This function does not duplicate the file descriptor. */ int native_handle_read_fd(native_handle_t const* nh, int index) { return ((nh == nullptr) || (nh->numFds == 0) || (nh->numFds <= index) || (index < 0)) ? -1 : nh->data[index]; } /** * Conversion functions * ==================== * * There are two main directions of conversion: * - `inTargetType(...)`: Create a wrapper whose lifetime depends on the * input. The wrapper has type `TargetType`. * - `toTargetType(...)`: Create a standalone object of type `TargetType` that * corresponds to the input. The lifetime of the output does not depend on the * lifetime of the input. * - `wrapIn(TargetType*, ...)`: Same as `inTargetType()`, but for `TargetType` * that cannot be copied and/or moved efficiently, or when there are multiple * output arguments. * - `convertTo(TargetType*, ...)`: Same as `toTargetType()`, but for * `TargetType` that cannot be copied and/or moved efficiently, or when there * are multiple output arguments. * * `wrapIn()` and `convertTo()` functions will take output arguments before * input arguments. Some of these functions might return a value to indicate * success or error. * * In converting or wrapping something as a Treble type that contains a * `hidl_handle`, `native_handle_t*` will need to be created and returned as * an additional output argument, hence only `wrapIn()` or `convertTo()` would * be available. The caller must call `native_handle_delete()` to deallocate the * returned native handle when it is no longer needed. * * For types that contain file descriptors, `inTargetType()` and `wrapAs()` do * not perform duplication of file descriptors, while `toTargetType()` and * `convertTo()` do. */ /** * \brief Convert `Return<void>` to `binder::Status`. * * \param[in] t The source `Return<void>`. * \return The corresponding `binder::Status`. */ // convert: Return<void> -> ::android::binder::Status ::android::binder::Status toBinderStatus( Return<void> const& t) { return ::android::binder::Status::fromExceptionCode( t.isOk() ? OK : UNKNOWN_ERROR, t.description().c_str()); } /** * \brief Convert `Return<void>` to `status_t`. This is for legacy binder calls. * * \param[in] t The source `Return<void>`. * \return The corresponding `status_t`. */ // convert: Return<void> -> status_t status_t toStatusT(Return<void> const& t) { return t.isOk() ? OK : UNKNOWN_ERROR; } /** * \brief Wrap `native_handle_t*` in `hidl_handle`. * * \param[in] nh The source `native_handle_t*`. * \return The `hidl_handle` that points to \p nh. */ // wrap: native_handle_t* -> hidl_handle hidl_handle inHidlHandle(native_handle_t const* nh) { return hidl_handle(nh); } /** * \brief Convert `int32_t` to `Dataspace`. * * \param[in] l The source `int32_t`. * \result The corresponding `Dataspace`. */ // convert: int32_t -> Dataspace Dataspace toHardwareDataspace(int32_t l) { return static_cast<Dataspace>(l); } /** * \brief Convert `Dataspace` to `int32_t`. * * \param[in] t The source `Dataspace`. * \result The corresponding `int32_t`. */ // convert: Dataspace -> int32_t int32_t toRawDataspace(Dataspace const& t) { return static_cast<int32_t>(t); } /** * \brief Wrap an opaque buffer inside a `hidl_vec<uint8_t>`. * * \param[in] l The pointer to the beginning of the opaque buffer. * \param[in] size The size of the buffer. * \return A `hidl_vec<uint8_t>` that points to the buffer. */ // wrap: void*, size_t -> hidl_vec<uint8_t> hidl_vec<uint8_t> inHidlBytes(void const* l, size_t size) { hidl_vec<uint8_t> t; t.setToExternal(static_cast<uint8_t*>(const_cast<void*>(l)), size, false); return t; } /** * \brief Create a `hidl_vec<uint8_t>` that is a copy of an opaque buffer. * * \param[in] l The pointer to the beginning of the opaque buffer. * \param[in] size The size of the buffer. * \return A `hidl_vec<uint8_t>` that is a copy of the input buffer. */ // convert: void*, size_t -> hidl_vec<uint8_t> hidl_vec<uint8_t> toHidlBytes(void const* l, size_t size) { hidl_vec<uint8_t> t; t.resize(size); uint8_t const* src = static_cast<uint8_t const*>(l); std::copy(src, src + size, t.data()); return t; } /** * \brief Wrap `GraphicBuffer` in `AnwBuffer`. * * \param[out] t The wrapper of type `AnwBuffer`. * \param[in] l The source `GraphicBuffer`. */ // wrap: GraphicBuffer -> AnwBuffer void wrapAs(AnwBuffer* t, GraphicBuffer const& l) { t->attr.width = l.getWidth(); t->attr.height = l.getHeight(); t->attr.stride = l.getStride(); t->attr.format = static_cast<PixelFormat>(l.getPixelFormat()); t->attr.layerCount = l.getLayerCount(); t->attr.usage = l.getUsage(); t->attr.id = l.getId(); t->attr.generationNumber = l.getGenerationNumber(); t->nativeHandle = hidl_handle(l.handle); } /** * \brief Convert `AnwBuffer` to `GraphicBuffer`. * * \param[out] l The destination `GraphicBuffer`. * \param[in] t The source `AnwBuffer`. * * This function will duplicate all file descriptors in \p t. */ // convert: AnwBuffer -> GraphicBuffer // Ref: frameworks/native/libs/ui/GraphicBuffer.cpp: GraphicBuffer::flatten bool convertTo(GraphicBuffer* l, AnwBuffer const& t) { native_handle_t* handle = t.nativeHandle == nullptr ? nullptr : native_handle_clone(t.nativeHandle); size_t const numInts = 12 + (handle ? handle->numInts : 0); int32_t* ints = new int32_t[numInts]; size_t numFds = static_cast<size_t>(handle ? handle->numFds : 0); int* fds = new int[numFds]; ints[0] = 'GBFR'; ints[1] = static_cast<int32_t>(t.attr.width); ints[2] = static_cast<int32_t>(t.attr.height); ints[3] = static_cast<int32_t>(t.attr.stride); ints[4] = static_cast<int32_t>(t.attr.format); ints[5] = static_cast<int32_t>(t.attr.layerCount); ints[6] = static_cast<int32_t>(t.attr.usage); ints[7] = static_cast<int32_t>(t.attr.id >> 32); ints[8] = static_cast<int32_t>(t.attr.id & 0xFFFFFFFF); ints[9] = static_cast<int32_t>(t.attr.generationNumber); ints[10] = 0; ints[11] = 0; if (handle) { ints[10] = static_cast<int32_t>(handle->numFds); ints[11] = static_cast<int32_t>(handle->numInts); int* intsStart = handle->data + handle->numFds; std::copy(handle->data, intsStart, fds); std::copy(intsStart, intsStart + handle->numInts, &ints[12]); } void const* constBuffer = static_cast<void const*>(ints); size_t size = numInts * sizeof(int32_t); int const* constFds = static_cast<int const*>(fds); status_t status = l->unflatten(constBuffer, size, constFds, numFds); delete [] fds; delete [] ints; native_handle_delete(handle); return status == NO_ERROR; } /** * Conversion functions for types outside media * ============================================ * * Some objects in libui and libgui that were made to go through binder calls do * not expose ways to read or write their fields to the public. To pass an * object of this kind through the HIDL boundary, translation functions need to * work around the access restriction by using the publicly available * `flatten()` and `unflatten()` functions. * * All `flatten()` and `unflatten()` overloads follow the same convention as * follows: * * status_t flatten(ObjectType const& object, * [OtherType const& other, ...] * void*& buffer, size_t& size, * int*& fds, size_t& numFds) * * status_t unflatten(ObjectType* object, * [OtherType* other, ...,] * void*& buffer, size_t& size, * int*& fds, size_t& numFds) * * The number of `other` parameters varies depending on the `ObjectType`. For * example, in the process of unflattening an object that contains * `hidl_handle`, `other` is needed to hold `native_handle_t` objects that will * be created. * * The last four parameters always work the same way in all overloads of * `flatten()` and `unflatten()`: * - For `flatten()`, `buffer` is the pointer to the non-fd buffer to be filled, * `size` is the size (in bytes) of the non-fd buffer pointed to by `buffer`, * `fds` is the pointer to the fd buffer to be filled, and `numFds` is the * size (in ints) of the fd buffer pointed to by `fds`. * - For `unflatten()`, `buffer` is the pointer to the non-fd buffer to be read * from, `size` is the size (in bytes) of the non-fd buffer pointed to by * `buffer`, `fds` is the pointer to the fd buffer to be read from, and * `numFds` is the size (in ints) of the fd buffer pointed to by `fds`. * - After a successful call to `flatten()` or `unflatten()`, `buffer` and `fds` * will be advanced, while `size` and `numFds` will be decreased to reflect * how much storage/data of the two buffers (fd and non-fd) have been used. * - After an unsuccessful call, the values of `buffer`, `size`, `fds` and * `numFds` are invalid. * * The return value of a successful `flatten()` or `unflatten()` call will be * `OK` (also aliased as `NO_ERROR`). Any other values indicate a failure. * * For each object type that supports flattening, there will be two accompanying * functions: `getFlattenedSize()` and `getFdCount()`. `getFlattenedSize()` will * return the size of the non-fd buffer that the object will need for * flattening. `getFdCount()` will return the size of the fd buffer that the * object will need for flattening. * * The set of these four functions, `getFlattenedSize()`, `getFdCount()`, * `flatten()` and `unflatten()`, are similar to functions of the same name in * the abstract class `Flattenable`. The only difference is that functions in * this file are not member functions of the object type. For example, we write * * flatten(x, buffer, size, fds, numFds) * * instead of * * x.flatten(buffer, size, fds, numFds) * * because we cannot modify the type of `x`. * * There is one exception to the naming convention: `hidl_handle` that * represents a fence. The four functions for this "Fence" type have the word * "Fence" attched to their names because the object type, which is * `hidl_handle`, does not carry the special meaning that the object itself can * only contain zero or one file descriptor. */ // Ref: frameworks/native/libs/ui/Fence.cpp /** * \brief Return the size of the non-fd buffer required to flatten a fence. * * \param[in] fence The input fence of type `hidl_handle`. * \return The required size of the flat buffer. * * The current version of this function always returns 4, which is the number of * bytes required to store the number of file descriptors contained in the fd * part of the flat buffer. */ size_t getFenceFlattenedSize(hidl_handle const& /* fence */) { return 4; }; /** * \brief Return the number of file descriptors contained in a fence. * * \param[in] fence The input fence of type `hidl_handle`. * \return `0` if \p fence does not contain a valid file descriptor, or `1` * otherwise. */ size_t getFenceFdCount(hidl_handle const& fence) { return native_handle_read_fd(fence) == -1 ? 0 : 1; } /** * \brief Unflatten `Fence` to `hidl_handle`. * * \param[out] fence The destination `hidl_handle`. * \param[out] nh The underlying native handle. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * If the return value is `NO_ERROR`, \p nh will point to a newly created * native handle, which needs to be deleted with `native_handle_delete()` * afterwards. */ status_t unflattenFence(hidl_handle* fence, native_handle_t** nh, void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { if (size < 4) { return NO_MEMORY; } uint32_t numFdsInHandle; FlattenableUtils::read(buffer, size, numFdsInHandle); if (numFdsInHandle > 1) { return BAD_VALUE; } if (numFds < numFdsInHandle) { return NO_MEMORY; } if (numFdsInHandle) { *nh = native_handle_create_from_fd(*fds); if (*nh == nullptr) { return NO_MEMORY; } *fence = *nh; ++fds; --numFds; } else { *nh = nullptr; *fence = hidl_handle(); } return NO_ERROR; } /** * \brief Flatten `hidl_handle` as `Fence`. * * \param[in] t The source `hidl_handle`. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. */ status_t flattenFence(hidl_handle const& fence, void*& buffer, size_t& size, int*& fds, size_t& numFds) { if (size < getFenceFlattenedSize(fence) || numFds < getFenceFdCount(fence)) { return NO_MEMORY; } // Cast to uint32_t since the size of a size_t can vary between 32- and // 64-bit processes FlattenableUtils::write(buffer, size, static_cast<uint32_t>(getFenceFdCount(fence))); int fd = native_handle_read_fd(fence); if (fd != -1) { *fds = fd; ++fds; --numFds; } return NO_ERROR; } /** * \brief Wrap `Fence` in `hidl_handle`. * * \param[out] t The wrapper of type `hidl_handle`. * \param[out] nh The native handle pointed to by \p t. * \param[in] l The source `Fence`. * * On success, \p nh will hold a newly created native handle, which must be * deleted manually with `native_handle_delete()` afterwards. */ // wrap: Fence -> hidl_handle bool wrapAs(hidl_handle* t, native_handle_t** nh, Fence const& l) { size_t const baseSize = l.getFlattenedSize(); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } size_t const baseNumFds = l.getFdCount(); std::unique_ptr<int[]> baseFds( new (std::nothrow) int[baseNumFds]); if (!baseFds) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; int* fds = static_cast<int*>(baseFds.get()); size_t numFds = baseNumFds; if (l.flatten(buffer, size, fds, numFds) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; int const* constFds = static_cast<int const*>(baseFds.get()); numFds = baseNumFds; if (unflattenFence(t, nh, constBuffer, size, constFds, numFds) != NO_ERROR) { return false; } return true; } /** * \brief Convert `hidl_handle` to `Fence`. * * \param[out] l The destination `Fence`. `l` must not have been used * (`l->isValid()` must return `false`) before this function is called. * \param[in] t The source `hidl_handle`. * * If \p t contains a valid file descriptor, it will be duplicated. */ // convert: hidl_handle -> Fence bool convertTo(Fence* l, hidl_handle const& t) { int fd = native_handle_read_fd(t); if (fd != -1) { fd = dup(fd); if (fd == -1) { return false; } } native_handle_t* nh = native_handle_create_from_fd(fd); if (nh == nullptr) { if (fd != -1) { close(fd); } return false; } size_t const baseSize = getFenceFlattenedSize(t); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { native_handle_delete(nh); return false; } size_t const baseNumFds = getFenceFdCount(t); std::unique_ptr<int[]> baseFds( new (std::nothrow) int[baseNumFds]); if (!baseFds) { native_handle_delete(nh); return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; int* fds = static_cast<int*>(baseFds.get()); size_t numFds = baseNumFds; if (flattenFence(hidl_handle(nh), buffer, size, fds, numFds) != NO_ERROR) { native_handle_delete(nh); return false; } native_handle_delete(nh); void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; int const* constFds = static_cast<int const*>(baseFds.get()); numFds = baseNumFds; if (l->unflatten(constBuffer, size, constFds, numFds) != NO_ERROR) { return false; } return true; } // Ref: frameworks/native/libs/ui/FenceTime.cpp: FenceTime::Snapshot /** * \brief Return the size of the non-fd buffer required to flatten * `FenceTimeSnapshot`. * * \param[in] t The input `FenceTimeSnapshot`. * \return The required size of the flat buffer. */ size_t getFlattenedSize( HGraphicBufferProducer::FenceTimeSnapshot const& t) { constexpr size_t min = sizeof(t.state); switch (t.state) { case HGraphicBufferProducer::FenceTimeSnapshot::State::EMPTY: return min; case HGraphicBufferProducer::FenceTimeSnapshot::State::FENCE: return min + getFenceFlattenedSize(t.fence); case HGraphicBufferProducer::FenceTimeSnapshot::State::SIGNAL_TIME: return min + sizeof( ::android::FenceTime::Snapshot::signalTime); } return 0; } /** * \brief Return the number of file descriptors contained in * `FenceTimeSnapshot`. * * \param[in] t The input `FenceTimeSnapshot`. * \return The number of file descriptors contained in \p snapshot. */ size_t getFdCount( HGraphicBufferProducer::FenceTimeSnapshot const& t) { return t.state == HGraphicBufferProducer::FenceTimeSnapshot::State::FENCE ? getFenceFdCount(t.fence) : 0; } /** * \brief Flatten `FenceTimeSnapshot`. * * \param[in] t The source `FenceTimeSnapshot`. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * This function will duplicate the file descriptor in `t.fence` if `t.state == * FENCE`. */ status_t flatten(HGraphicBufferProducer::FenceTimeSnapshot const& t, void*& buffer, size_t& size, int*& fds, size_t& numFds) { if (size < getFlattenedSize(t)) { return NO_MEMORY; } switch (t.state) { case HGraphicBufferProducer::FenceTimeSnapshot::State::EMPTY: FlattenableUtils::write(buffer, size, ::android::FenceTime::Snapshot::State::EMPTY); return NO_ERROR; case HGraphicBufferProducer::FenceTimeSnapshot::State::FENCE: FlattenableUtils::write(buffer, size, ::android::FenceTime::Snapshot::State::FENCE); return flattenFence(t.fence, buffer, size, fds, numFds); case HGraphicBufferProducer::FenceTimeSnapshot::State::SIGNAL_TIME: FlattenableUtils::write(buffer, size, ::android::FenceTime::Snapshot::State::SIGNAL_TIME); FlattenableUtils::write(buffer, size, t.signalTimeNs); return NO_ERROR; } return NO_ERROR; } /** * \brief Unflatten `FenceTimeSnapshot`. * * \param[out] t The destination `FenceTimeSnapshot`. * \param[out] nh The underlying native handle. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * If the return value is `NO_ERROR` and the constructed snapshot contains a * file descriptor, \p nh will be created to hold that file descriptor. In this * case, \p nh needs to be deleted with `native_handle_delete()` afterwards. */ status_t unflatten( HGraphicBufferProducer::FenceTimeSnapshot* t, native_handle_t** nh, void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { if (size < sizeof(t->state)) { return NO_MEMORY; } *nh = nullptr; ::android::FenceTime::Snapshot::State state; FlattenableUtils::read(buffer, size, state); switch (state) { case ::android::FenceTime::Snapshot::State::EMPTY: t->state = HGraphicBufferProducer::FenceTimeSnapshot::State::EMPTY; return NO_ERROR; case ::android::FenceTime::Snapshot::State::FENCE: t->state = HGraphicBufferProducer::FenceTimeSnapshot::State::FENCE; return unflattenFence(&t->fence, nh, buffer, size, fds, numFds); case ::android::FenceTime::Snapshot::State::SIGNAL_TIME: t->state = HGraphicBufferProducer::FenceTimeSnapshot::State::SIGNAL_TIME; if (size < sizeof(t->signalTimeNs)) { return NO_MEMORY; } FlattenableUtils::read(buffer, size, t->signalTimeNs); return NO_ERROR; } return NO_ERROR; } // Ref: frameworks/native/libs/gui/FrameTimestamps.cpp: FrameEventsDelta /** * \brief Return a lower bound on the size of the non-fd buffer required to * flatten `FrameEventsDelta`. * * \param[in] t The input `FrameEventsDelta`. * \return A lower bound on the size of the flat buffer. */ constexpr size_t minFlattenedSize( HGraphicBufferProducer::FrameEventsDelta const& /* t */) { return sizeof(uint64_t) + // mFrameNumber sizeof(uint8_t) + // mIndex sizeof(uint8_t) + // mAddPostCompositeCalled sizeof(uint8_t) + // mAddRetireCalled sizeof(uint8_t) + // mAddReleaseCalled sizeof(nsecs_t) + // mPostedTime sizeof(nsecs_t) + // mRequestedPresentTime sizeof(nsecs_t) + // mLatchTime sizeof(nsecs_t) + // mFirstRefreshStartTime sizeof(nsecs_t); // mLastRefreshStartTime } /** * \brief Return the size of the non-fd buffer required to flatten * `FrameEventsDelta`. * * \param[in] t The input `FrameEventsDelta`. * \return The required size of the flat buffer. */ size_t getFlattenedSize( HGraphicBufferProducer::FrameEventsDelta const& t) { return minFlattenedSize(t) + getFlattenedSize(t.gpuCompositionDoneFence) + getFlattenedSize(t.displayPresentFence) + getFlattenedSize(t.displayRetireFence) + getFlattenedSize(t.releaseFence); }; /** * \brief Return the number of file descriptors contained in * `FrameEventsDelta`. * * \param[in] t The input `FrameEventsDelta`. * \return The number of file descriptors contained in \p t. */ size_t getFdCount( HGraphicBufferProducer::FrameEventsDelta const& t) { return getFdCount(t.gpuCompositionDoneFence) + getFdCount(t.displayPresentFence) + getFdCount(t.displayRetireFence) + getFdCount(t.releaseFence); }; /** * \brief Unflatten `FrameEventsDelta`. * * \param[out] t The destination `FrameEventsDelta`. * \param[out] nh The underlying array of native handles. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * If the return value is `NO_ERROR`, \p nh will have length 4, and it will be * populated with `nullptr` or newly created handles. Each non-null slot in \p * nh will need to be deleted manually with `native_handle_delete()`. */ status_t unflatten(HGraphicBufferProducer::FrameEventsDelta* t, std::vector<native_handle_t*>* nh, void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { if (size < minFlattenedSize(*t)) { return NO_MEMORY; } FlattenableUtils::read(buffer, size, t->frameNumber); // These were written as uint8_t for alignment. uint8_t temp = 0; FlattenableUtils::read(buffer, size, temp); size_t index = static_cast<size_t>(temp); if (index >= ::android::FrameEventHistory::MAX_FRAME_HISTORY) { return BAD_VALUE; } t->index = static_cast<uint32_t>(index); FlattenableUtils::read(buffer, size, temp); t->addPostCompositeCalled = static_cast<bool>(temp); FlattenableUtils::read(buffer, size, temp); t->addRetireCalled = static_cast<bool>(temp); FlattenableUtils::read(buffer, size, temp); t->addReleaseCalled = static_cast<bool>(temp); FlattenableUtils::read(buffer, size, t->postedTimeNs); FlattenableUtils::read(buffer, size, t->requestedPresentTimeNs); FlattenableUtils::read(buffer, size, t->latchTimeNs); FlattenableUtils::read(buffer, size, t->firstRefreshStartTimeNs); FlattenableUtils::read(buffer, size, t->lastRefreshStartTimeNs); FlattenableUtils::read(buffer, size, t->dequeueReadyTime); // Fences HGraphicBufferProducer::FenceTimeSnapshot* tSnapshot[4]; tSnapshot[0] = &t->gpuCompositionDoneFence; tSnapshot[1] = &t->displayPresentFence; tSnapshot[2] = &t->displayRetireFence; tSnapshot[3] = &t->releaseFence; nh->resize(4); for (size_t snapshotIndex = 0; snapshotIndex < 4; ++snapshotIndex) { status_t status = unflatten( tSnapshot[snapshotIndex], &((*nh)[snapshotIndex]), buffer, size, fds, numFds); if (status != NO_ERROR) { while (snapshotIndex > 0) { --snapshotIndex; if ((*nh)[snapshotIndex] != nullptr) { native_handle_delete((*nh)[snapshotIndex]); } } return status; } } return NO_ERROR; } /** * \brief Flatten `FrameEventsDelta`. * * \param[in] t The source `FrameEventsDelta`. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * This function will duplicate file descriptors contained in \p t. */ // Ref: frameworks/native/libs/gui/FrameTimestamp.cpp: // FrameEventsDelta::flatten status_t flatten(HGraphicBufferProducer::FrameEventsDelta const& t, void*& buffer, size_t& size, int*& fds, size_t numFds) { // Check that t.index is within a valid range. if (t.index >= static_cast<uint32_t>(FrameEventHistory::MAX_FRAME_HISTORY) || t.index > std::numeric_limits<uint8_t>::max()) { return BAD_VALUE; } FlattenableUtils::write(buffer, size, t.frameNumber); // These are static_cast to uint8_t for alignment. FlattenableUtils::write(buffer, size, static_cast<uint8_t>(t.index)); FlattenableUtils::write( buffer, size, static_cast<uint8_t>(t.addPostCompositeCalled)); FlattenableUtils::write( buffer, size, static_cast<uint8_t>(t.addRetireCalled)); FlattenableUtils::write( buffer, size, static_cast<uint8_t>(t.addReleaseCalled)); FlattenableUtils::write(buffer, size, t.postedTimeNs); FlattenableUtils::write(buffer, size, t.requestedPresentTimeNs); FlattenableUtils::write(buffer, size, t.latchTimeNs); FlattenableUtils::write(buffer, size, t.firstRefreshStartTimeNs); FlattenableUtils::write(buffer, size, t.lastRefreshStartTimeNs); FlattenableUtils::write(buffer, size, t.dequeueReadyTime); // Fences HGraphicBufferProducer::FenceTimeSnapshot const* tSnapshot[4]; tSnapshot[0] = &t.gpuCompositionDoneFence; tSnapshot[1] = &t.displayPresentFence; tSnapshot[2] = &t.displayRetireFence; tSnapshot[3] = &t.releaseFence; for (size_t snapshotIndex = 0; snapshotIndex < 4; ++snapshotIndex) { status_t status = flatten( *(tSnapshot[snapshotIndex]), buffer, size, fds, numFds); if (status != NO_ERROR) { return status; } } return NO_ERROR; } // Ref: frameworks/native/libs/gui/FrameTimestamps.cpp: FrameEventHistoryDelta /** * \brief Return the size of the non-fd buffer required to flatten * `HGraphicBufferProducer::FrameEventHistoryDelta`. * * \param[in] t The input `HGraphicBufferProducer::FrameEventHistoryDelta`. * \return The required size of the flat buffer. */ size_t getFlattenedSize( HGraphicBufferProducer::FrameEventHistoryDelta const& t) { size_t size = 4 + // mDeltas.size() sizeof(t.compositorTiming); for (size_t i = 0; i < t.deltas.size(); ++i) { size += getFlattenedSize(t.deltas[i]); } return size; } /** * \brief Return the number of file descriptors contained in * `HGraphicBufferProducer::FrameEventHistoryDelta`. * * \param[in] t The input `HGraphicBufferProducer::FrameEventHistoryDelta`. * \return The number of file descriptors contained in \p t. */ size_t getFdCount( HGraphicBufferProducer::FrameEventHistoryDelta const& t) { size_t numFds = 0; for (size_t i = 0; i < t.deltas.size(); ++i) { numFds += getFdCount(t.deltas[i]); } return numFds; } /** * \brief Unflatten `FrameEventHistoryDelta`. * * \param[out] t The destination `FrameEventHistoryDelta`. * \param[out] nh The underlying array of arrays of native handles. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * If the return value is `NO_ERROR`, \p nh will be populated with `nullptr` or * newly created handles. The second dimension of \p nh will be 4. Each non-null * slot in \p nh will need to be deleted manually with `native_handle_delete()`. */ status_t unflatten( HGraphicBufferProducer::FrameEventHistoryDelta* t, std::vector<std::vector<native_handle_t*> >* nh, void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { if (size < 4) { return NO_MEMORY; } FlattenableUtils::read(buffer, size, t->compositorTiming); uint32_t deltaCount = 0; FlattenableUtils::read(buffer, size, deltaCount); if (static_cast<size_t>(deltaCount) > ::android::FrameEventHistory::MAX_FRAME_HISTORY) { return BAD_VALUE; } t->deltas.resize(deltaCount); nh->resize(deltaCount); for (size_t deltaIndex = 0; deltaIndex < deltaCount; ++deltaIndex) { status_t status = unflatten( &(t->deltas[deltaIndex]), &((*nh)[deltaIndex]), buffer, size, fds, numFds); if (status != NO_ERROR) { return status; } } return NO_ERROR; } /** * \brief Flatten `FrameEventHistoryDelta`. * * \param[in] t The source `FrameEventHistoryDelta`. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * This function will duplicate file descriptors contained in \p t. */ status_t flatten( HGraphicBufferProducer::FrameEventHistoryDelta const& t, void*& buffer, size_t& size, int*& fds, size_t& numFds) { if (t.deltas.size() > ::android::FrameEventHistory::MAX_FRAME_HISTORY) { return BAD_VALUE; } if (size < getFlattenedSize(t)) { return NO_MEMORY; } FlattenableUtils::write(buffer, size, t.compositorTiming); FlattenableUtils::write(buffer, size, static_cast<uint32_t>(t.deltas.size())); for (size_t deltaIndex = 0; deltaIndex < t.deltas.size(); ++deltaIndex) { status_t status = flatten(t.deltas[deltaIndex], buffer, size, fds, numFds); if (status != NO_ERROR) { return status; } } return NO_ERROR; } /** * \brief Wrap `::android::FrameEventHistoryData` in * `HGraphicBufferProducer::FrameEventHistoryDelta`. * * \param[out] t The wrapper of type * `HGraphicBufferProducer::FrameEventHistoryDelta`. * \param[out] nh The array of array of native handles that are referred to by * members of \p t. * \param[in] l The source `::android::FrameEventHistoryDelta`. * * On success, each member of \p nh will be either `nullptr` or a newly created * native handle. All the non-`nullptr` elements must be deleted individually * with `native_handle_delete()`. */ bool wrapAs(HGraphicBufferProducer::FrameEventHistoryDelta* t, std::vector<std::vector<native_handle_t*> >* nh, ::android::FrameEventHistoryDelta const& l) { size_t const baseSize = l.getFlattenedSize(); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } size_t const baseNumFds = l.getFdCount(); std::unique_ptr<int[]> baseFds( new (std::nothrow) int[baseNumFds]); if (!baseFds) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; int* fds = baseFds.get(); size_t numFds = baseNumFds; if (l.flatten(buffer, size, fds, numFds) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; int const* constFds = static_cast<int const*>(baseFds.get()); numFds = baseNumFds; if (unflatten(t, nh, constBuffer, size, constFds, numFds) != NO_ERROR) { return false; } return true; } /** * \brief Convert `HGraphicBufferProducer::FrameEventHistoryDelta` to * `::android::FrameEventHistoryDelta`. * * \param[out] l The destination `::android::FrameEventHistoryDelta`. * \param[in] t The source `HGraphicBufferProducer::FrameEventHistoryDelta`. * * This function will duplicate all file descriptors contained in \p t. */ bool convertTo( ::android::FrameEventHistoryDelta* l, HGraphicBufferProducer::FrameEventHistoryDelta const& t) { size_t const baseSize = getFlattenedSize(t); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } size_t const baseNumFds = getFdCount(t); std::unique_ptr<int[]> baseFds( new (std::nothrow) int[baseNumFds]); if (!baseFds) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; int* fds = static_cast<int*>(baseFds.get()); size_t numFds = baseNumFds; if (flatten(t, buffer, size, fds, numFds) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; int const* constFds = static_cast<int const*>(baseFds.get()); numFds = baseNumFds; if (l->unflatten(constBuffer, size, constFds, numFds) != NO_ERROR) { return false; } return true; } // Ref: frameworks/native/libs/ui/Region.cpp /** * \brief Return the size of the buffer required to flatten `Region`. * * \param[in] t The input `Region`. * \return The required size of the flat buffer. */ size_t getFlattenedSize(Region const& t) { return sizeof(uint32_t) + t.size() * sizeof(::android::Rect); } /** * \brief Unflatten `Region`. * * \param[out] t The destination `Region`. * \param[in,out] buffer The pointer to the flat buffer. * \param[in,out] size The size of the flat buffer. * \return `NO_ERROR` on success; other value on failure. */ status_t unflatten(Region* t, void const*& buffer, size_t& size) { if (size < sizeof(uint32_t)) { return NO_MEMORY; } uint32_t numRects = 0; FlattenableUtils::read(buffer, size, numRects); if (size < numRects * sizeof(Rect)) { return NO_MEMORY; } if (numRects > (UINT32_MAX / sizeof(Rect))) { return NO_MEMORY; } t->resize(numRects); for (size_t r = 0; r < numRects; ++r) { ::android::Rect rect(::android::Rect::EMPTY_RECT); status_t status = rect.unflatten(buffer, size); if (status != NO_ERROR) { return status; } FlattenableUtils::advance(buffer, size, sizeof(rect)); (*t)[r] = Rect{ static_cast<int32_t>(rect.left), static_cast<int32_t>(rect.top), static_cast<int32_t>(rect.right), static_cast<int32_t>(rect.bottom)}; } return NO_ERROR; } /** * \brief Flatten `Region`. * * \param[in] t The source `Region`. * \param[in,out] buffer The pointer to the flat buffer. * \param[in,out] size The size of the flat buffer. * \return `NO_ERROR` on success; other value on failure. */ status_t flatten(Region const& t, void*& buffer, size_t& size) { if (size < getFlattenedSize(t)) { return NO_MEMORY; } FlattenableUtils::write(buffer, size, static_cast<uint32_t>(t.size())); for (size_t r = 0; r < t.size(); ++r) { ::android::Rect rect( static_cast<int32_t>(t[r].left), static_cast<int32_t>(t[r].top), static_cast<int32_t>(t[r].right), static_cast<int32_t>(t[r].bottom)); status_t status = rect.flatten(buffer, size); if (status != NO_ERROR) { return status; } FlattenableUtils::advance(buffer, size, sizeof(rect)); } return NO_ERROR; } /** * \brief Convert `::android::Region` to `Region`. * * \param[out] t The destination `Region`. * \param[in] l The source `::android::Region`. */ // convert: ::android::Region -> Region bool convertTo(Region* t, ::android::Region const& l) { size_t const baseSize = l.getFlattenedSize(); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; if (l.flatten(buffer, size) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; if (unflatten(t, constBuffer, size) != NO_ERROR) { return false; } return true; } /** * \brief Convert `Region` to `::android::Region`. * * \param[out] l The destination `::android::Region`. * \param[in] t The source `Region`. */ // convert: Region -> ::android::Region bool convertTo(::android::Region* l, Region const& t) { size_t const baseSize = getFlattenedSize(t); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; if (flatten(t, buffer, size) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; if (l->unflatten(constBuffer, size) != NO_ERROR) { return false; } return true; } // Ref: frameworks/native/libs/gui/BGraphicBufferProducer.cpp: // BGraphicBufferProducer::QueueBufferInput /** * \brief Return a lower bound on the size of the buffer required to flatten * `HGraphicBufferProducer::QueueBufferInput`. * * \param[in] t The input `HGraphicBufferProducer::QueueBufferInput`. * \return A lower bound on the size of the flat buffer. */ constexpr size_t minFlattenedSize( HGraphicBufferProducer::QueueBufferInput const& /* t */) { return sizeof(int64_t) + // timestamp sizeof(int) + // isAutoTimestamp sizeof(android_dataspace) + // dataSpace sizeof(::android::Rect) + // crop sizeof(int) + // scalingMode sizeof(uint32_t) + // transform sizeof(uint32_t) + // stickyTransform sizeof(bool); // getFrameTimestamps } /** * \brief Return the size of the buffer required to flatten * `HGraphicBufferProducer::QueueBufferInput`. * * \param[in] t The input `HGraphicBufferProducer::QueueBufferInput`. * \return The required size of the flat buffer. */ size_t getFlattenedSize(HGraphicBufferProducer::QueueBufferInput const& t) { return minFlattenedSize(t) + getFenceFlattenedSize(t.fence) + getFlattenedSize(t.surfaceDamage) + sizeof(HdrMetadata::validTypes); } /** * \brief Return the number of file descriptors contained in * `HGraphicBufferProducer::QueueBufferInput`. * * \param[in] t The input `HGraphicBufferProducer::QueueBufferInput`. * \return The number of file descriptors contained in \p t. */ size_t getFdCount( HGraphicBufferProducer::QueueBufferInput const& t) { return getFenceFdCount(t.fence); } /** * \brief Flatten `HGraphicBufferProducer::QueueBufferInput`. * * \param[in] t The source `HGraphicBufferProducer::QueueBufferInput`. * \param[out] nh The native handle cloned from `t.fence`. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * This function will duplicate the file descriptor in `t.fence`. */ status_t flatten(HGraphicBufferProducer::QueueBufferInput const& t, native_handle_t** nh, void*& buffer, size_t& size, int*& fds, size_t& numFds) { if (size < getFlattenedSize(t)) { return NO_MEMORY; } FlattenableUtils::write(buffer, size, t.timestamp); FlattenableUtils::write(buffer, size, static_cast<int>(t.isAutoTimestamp)); FlattenableUtils::write(buffer, size, static_cast<android_dataspace_t>(t.dataSpace)); FlattenableUtils::write(buffer, size, ::android::Rect( static_cast<int32_t>(t.crop.left), static_cast<int32_t>(t.crop.top), static_cast<int32_t>(t.crop.right), static_cast<int32_t>(t.crop.bottom))); FlattenableUtils::write(buffer, size, static_cast<int>(t.scalingMode)); FlattenableUtils::write(buffer, size, t.transform); FlattenableUtils::write(buffer, size, t.stickyTransform); FlattenableUtils::write(buffer, size, t.getFrameTimestamps); *nh = t.fence.getNativeHandle() == nullptr ? nullptr : native_handle_clone(t.fence); status_t status = flattenFence(hidl_handle(*nh), buffer, size, fds, numFds); if (status != NO_ERROR) { return status; } status = flatten(t.surfaceDamage, buffer, size); if (status != NO_ERROR) { return status; } FlattenableUtils::write(buffer, size, decltype(HdrMetadata::validTypes)(0)); return NO_ERROR; } /** * \brief Unflatten `HGraphicBufferProducer::QueueBufferInput`. * * \param[out] t The destination `HGraphicBufferProducer::QueueBufferInput`. * \param[out] nh The underlying native handle for `t->fence`. * \param[in,out] buffer The pointer to the flat non-fd buffer. * \param[in,out] size The size of the flat non-fd buffer. * \param[in,out] fds The pointer to the flat fd buffer. * \param[in,out] numFds The size of the flat fd buffer. * \return `NO_ERROR` on success; other value on failure. * * If the return value is `NO_ERROR` and `t->fence` contains a valid file * descriptor, \p nh will be a newly created native handle holding that file * descriptor. \p nh needs to be deleted with `native_handle_delete()` * afterwards. */ status_t unflatten( HGraphicBufferProducer::QueueBufferInput* t, native_handle_t** nh, void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { if (size < minFlattenedSize(*t)) { return NO_MEMORY; } FlattenableUtils::read(buffer, size, t->timestamp); int lIsAutoTimestamp; FlattenableUtils::read(buffer, size, lIsAutoTimestamp); t->isAutoTimestamp = static_cast<int32_t>(lIsAutoTimestamp); android_dataspace_t lDataSpace; FlattenableUtils::read(buffer, size, lDataSpace); t->dataSpace = static_cast<Dataspace>(lDataSpace); Rect lCrop; FlattenableUtils::read(buffer, size, lCrop); t->crop = Rect{ static_cast<int32_t>(lCrop.left), static_cast<int32_t>(lCrop.top), static_cast<int32_t>(lCrop.right), static_cast<int32_t>(lCrop.bottom)}; int lScalingMode; FlattenableUtils::read(buffer, size, lScalingMode); t->scalingMode = static_cast<int32_t>(lScalingMode); FlattenableUtils::read(buffer, size, t->transform); FlattenableUtils::read(buffer, size, t->stickyTransform); FlattenableUtils::read(buffer, size, t->getFrameTimestamps); status_t status = unflattenFence(&(t->fence), nh, buffer, size, fds, numFds); if (status != NO_ERROR) { return status; } // HdrMetadata ignored return unflatten(&(t->surfaceDamage), buffer, size); } /** * \brief Wrap `BGraphicBufferProducer::QueueBufferInput` in * `HGraphicBufferProducer::QueueBufferInput`. * * \param[out] t The wrapper of type * `HGraphicBufferProducer::QueueBufferInput`. * \param[out] nh The underlying native handle for `t->fence`. * \param[in] l The source `BGraphicBufferProducer::QueueBufferInput`. * * If the return value is `true` and `t->fence` contains a valid file * descriptor, \p nh will be a newly created native handle holding that file * descriptor. \p nh needs to be deleted with `native_handle_delete()` * afterwards. */ bool wrapAs( HGraphicBufferProducer::QueueBufferInput* t, native_handle_t** nh, BGraphicBufferProducer::QueueBufferInput const& l) { size_t const baseSize = l.getFlattenedSize(); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } size_t const baseNumFds = l.getFdCount(); std::unique_ptr<int[]> baseFds( new (std::nothrow) int[baseNumFds]); if (!baseFds) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; int* fds = baseFds.get(); size_t numFds = baseNumFds; if (l.flatten(buffer, size, fds, numFds) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; int const* constFds = static_cast<int const*>(baseFds.get()); numFds = baseNumFds; if (unflatten(t, nh, constBuffer, size, constFds, numFds) != NO_ERROR) { return false; } return true; } /** * \brief Convert `HGraphicBufferProducer::QueueBufferInput` to * `BGraphicBufferProducer::QueueBufferInput`. * * \param[out] l The destination `BGraphicBufferProducer::QueueBufferInput`. * \param[in] t The source `HGraphicBufferProducer::QueueBufferInput`. * * If `t.fence` has a valid file descriptor, it will be duplicated. */ bool convertTo( BGraphicBufferProducer::QueueBufferInput* l, HGraphicBufferProducer::QueueBufferInput const& t) { size_t const baseSize = getFlattenedSize(t); std::unique_ptr<uint8_t[]> baseBuffer( new (std::nothrow) uint8_t[baseSize]); if (!baseBuffer) { return false; } size_t const baseNumFds = getFdCount(t); std::unique_ptr<int[]> baseFds( new (std::nothrow) int[baseNumFds]); if (!baseFds) { return false; } void* buffer = static_cast<void*>(baseBuffer.get()); size_t size = baseSize; int* fds = baseFds.get(); size_t numFds = baseNumFds; native_handle_t* nh; if (flatten(t, &nh, buffer, size, fds, numFds) != NO_ERROR) { return false; } void const* constBuffer = static_cast<void const*>(baseBuffer.get()); size = baseSize; int const* constFds = static_cast<int const*>(baseFds.get()); numFds = baseNumFds; if (l->unflatten(constBuffer, size, constFds, numFds) != NO_ERROR) { if (nh != nullptr) { native_handle_close(nh); native_handle_delete(nh); } return false; } native_handle_delete(nh); return true; } // Ref: frameworks/native/libs/gui/BGraphicBufferProducer.cpp: // BGraphicBufferProducer::QueueBufferOutput /** * \brief Wrap `BGraphicBufferProducer::QueueBufferOutput` in * `HGraphicBufferProducer::QueueBufferOutput`. * * \param[out] t The wrapper of type * `HGraphicBufferProducer::QueueBufferOutput`. * \param[out] nh The array of array of native handles that are referred to by * members of \p t. * \param[in] l The source `BGraphicBufferProducer::QueueBufferOutput`. * * On success, each member of \p nh will be either `nullptr` or a newly created * native handle. All the non-`nullptr` elements must be deleted individually * with `native_handle_delete()`. */ // wrap: BGraphicBufferProducer::QueueBufferOutput -> // HGraphicBufferProducer::QueueBufferOutput bool wrapAs(HGraphicBufferProducer::QueueBufferOutput* t, std::vector<std::vector<native_handle_t*> >* nh, BGraphicBufferProducer::QueueBufferOutput const& l) { if (!wrapAs(&(t->frameTimestamps), nh, l.frameTimestamps)) { return false; } t->width = l.width; t->height = l.height; t->transformHint = l.transformHint; t->numPendingBuffers = l.numPendingBuffers; t->nextFrameNumber = l.nextFrameNumber; t->bufferReplaced = l.bufferReplaced; return true; } /** * \brief Convert `HGraphicBufferProducer::QueueBufferOutput` to * `BGraphicBufferProducer::QueueBufferOutput`. * * \param[out] l The destination `BGraphicBufferProducer::QueueBufferOutput`. * \param[in] t The source `HGraphicBufferProducer::QueueBufferOutput`. * * This function will duplicate all file descriptors contained in \p t. */ // convert: HGraphicBufferProducer::QueueBufferOutput -> // BGraphicBufferProducer::QueueBufferOutput bool convertTo( BGraphicBufferProducer::QueueBufferOutput* l, HGraphicBufferProducer::QueueBufferOutput const& t) { if (!convertTo(&(l->frameTimestamps), t.frameTimestamps)) { return false; } l->width = t.width; l->height = t.height; l->transformHint = t.transformHint; l->numPendingBuffers = t.numPendingBuffers; l->nextFrameNumber = t.nextFrameNumber; l->bufferReplaced = t.bufferReplaced; return true; } /** * \brief Convert `BGraphicBufferProducer::DisconnectMode` to * `HGraphicBufferProducer::DisconnectMode`. * * \param[in] l The source `BGraphicBufferProducer::DisconnectMode`. * \return The corresponding `HGraphicBufferProducer::DisconnectMode`. */ HGraphicBufferProducer::DisconnectMode toHidlDisconnectMode( BGraphicBufferProducer::DisconnectMode l) { switch (l) { case BGraphicBufferProducer::DisconnectMode::Api: return HGraphicBufferProducer::DisconnectMode::API; case BGraphicBufferProducer::DisconnectMode::AllLocal: return HGraphicBufferProducer::DisconnectMode::ALL_LOCAL; } return HGraphicBufferProducer::DisconnectMode::API; } /** * \brief Convert `HGraphicBufferProducer::DisconnectMode` to * `BGraphicBufferProducer::DisconnectMode`. * * \param[in] l The source `HGraphicBufferProducer::DisconnectMode`. * \return The corresponding `BGraphicBufferProducer::DisconnectMode`. */ BGraphicBufferProducer::DisconnectMode toGuiDisconnectMode( HGraphicBufferProducer::DisconnectMode t) { switch (t) { case HGraphicBufferProducer::DisconnectMode::API: return BGraphicBufferProducer::DisconnectMode::Api; case HGraphicBufferProducer::DisconnectMode::ALL_LOCAL: return BGraphicBufferProducer::DisconnectMode::AllLocal; } return BGraphicBufferProducer::DisconnectMode::Api; } } // namespace conversion } // namespace android
; A113225: a(2n) = A011900(n), a(2n+1) = A001109(n+1). ; 1,1,3,6,15,35,85,204,493,1189,2871,6930,16731,40391,97513,235416,568345,1372105,3312555,7997214,19306983,46611179,112529341,271669860,655869061,1583407981,3822685023,9228778026,22280241075,53789260175 cal $0,52937 ; Expansion of (2-3*x-x^2)/((1-x)*(1-2*x-x^2)). div $0,2 mov $1,$0
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r15 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x6d5, %rsi lea addresses_A_ht+0x10ed5, %rdi clflush (%rsi) nop nop nop add $835, %r15 mov $78, %rcx rep movsq nop nop nop nop xor %rsi, %rsi lea addresses_UC_ht+0x1ea95, %rsi lea addresses_normal_ht+0x62b1, %rdi nop nop add $11262, %rdx mov $89, %rcx rep movsb nop nop nop cmp $18422, %rsi lea addresses_D_ht+0x1e4d5, %r15 nop add %rcx, %rcx movups (%r15), %xmm2 vpextrq $0, %xmm2, %rdi sub %rdx, %rdx lea addresses_A_ht+0x126b5, %r13 nop mfence mov (%r13), %rdx nop nop xor $27441, %r8 lea addresses_normal_ht+0x10ed5, %rdx nop and $38351, %r15 movw $0x6162, (%rdx) nop nop nop nop add %r13, %r13 lea addresses_WT_ht+0x1b1b5, %r8 nop nop nop nop nop sub %r13, %r13 mov $0x6162636465666768, %rsi movq %rsi, %xmm3 vmovups %ymm3, (%r8) nop add $44360, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %rax push %rbp push %rdi push %rdx push %rsi // Store mov $0x5df, %rbp nop xor $56237, %r15 mov $0x5152535455565758, %rdx movq %rdx, %xmm7 movups %xmm7, (%rbp) add %r15, %r15 // Load lea addresses_UC+0x1dcd5, %r15 xor %rax, %rax mov (%r15), %r10w nop nop sub %rsi, %rsi // Load mov $0x30ba60000000cd5, %r10 nop nop nop nop nop inc %rbp mov (%r10), %dx nop nop nop nop nop sub %rbp, %rbp // Faulty Load lea addresses_WC+0x16cd5, %rdi nop nop nop xor $58664, %rax mov (%rdi), %edx lea oracles, %rsi and $0xff, %rdx shlq $12, %rdx mov (%rsi,%rdx,1), %rdx pop %rsi pop %rdx pop %rdi pop %rbp pop %rax pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
SECTION rodata_font SECTION rodata_font_fzx PUBLIC _ff_ao_Aribeth6 _ff_ao_Aribeth6: BINARY "font/fzx/fonts/ao/Aribeth/Aribeth6.fzx"