){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style.")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(we.getPaintProperty(K),de)){var Ue=we.setPaintProperty(K,de,ne);Ue&&this._updateLayer(we),this._changed=!0,this._updatedPaintProps[q]=!0}},D.prototype.getPaintProperty=function(q,K){return this.getLayer(q).getPaintProperty(K)},D.prototype.setFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=q.sourceLayer,we=this.sourceCaches[de];if(we===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var Ue=we.getSource().type;if(Ue==="geojson"&&ne){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Ue==="vector"&&!ne){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}q.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),we.setFeatureState(ne,q.id,K)},D.prototype.removeFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var we=ne.getSource().type,Ue=we==="vector"?q.sourceLayer:void 0;if(we==="vector"&&!Ue){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(K&&typeof q.id!="string"&&typeof q.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ne.removeFeatureState(Ue,q.id,K)},D.prototype.getFeatureState=function(q){this._checkLoaded();var K=q.source,de=q.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+K+"' does not exist in the map's style.")));return}var we=ne.getSource().type;if(we==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return q.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ne.getFeatureState(de,q.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitc


ime = timeService.now();
        long elapsedTime = endTime - startTime;
        return accessEvent()
                .forHttpServletRequest(request)
                .timestamp(endTime)
                .transactionId(AuditRequestContext.getTransactionIdValue())
                .eventName(AM_ACCESS_OUTCOME)
                .component(component)
                .response(SUCCESSFUL, "", elapsedTime, MILLISECONDS)
                .toEvent();
    }

    /**
     * Creates an audit event that captures details of an unsuccessfully completed HTTP call.
     *
     * @return An AuditEvent.
     */
    public AuditEvent auditAccessFailure() {
        long endTime = timeService.now();
        long elapsedTime = endTime - startTime;
        String statusCode = Integer.toString(response.getStatusCode());
        JsonValue responseDetail = json(object(
                field(ACCESS_RESPONSE_DETAIL_REASON, response.getMessage())));
        return accessEvent()
                .forHttpServletRequest(request)
                .timestamp(endTime)
                .transactionId(AuditRequestContext.getTransactionIdValue())
                .eventName(AM_ACCESS_OUTCOME)
                .component(component)
                .responseWithDetail(FAILED, statusCode, elapsedTime, MILLISECONDS, responseDetail)
                .toEvent();
    }

    private AMAccessAuditEventBuilder accessEvent() {
        return new AMAccessAuditEventBuilder();
    }
}
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.11 at 10:34:07 AM PDT
//

package com.sun.identity.saml2.jaxb.xmlsig;

/**
 * Java content class for DSAKeyValueType complex type.
 *
The following schema fragment specifies the expected content contained within this java content object. (defined at file:/Users/allan/A-SVN/trunk/opensso/products/federation/library/xsd/saml2/xmldsig-core-schema.xsd line 292)
 *

 *

 * <complexType name="DSAKeyValueType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <sequence minOccurs="0">
 *           <element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
 *           <element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
 *         </sequence>
 *         <element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
 *         <element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
 *         <element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
 *         <sequence minOccurs="0">
 *           <element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
 *           <element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
 *         </sequence>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 */
public interface DSAKeyValueType {

    /**
     * Gets the value of the g property.
     *
     * @return
     *     possible object is
     *     byte[]
     */
    byte[] getG();

    /**
     * Sets the value of the g property.


    Genesis - A toolkit for working with phylogenetic data.
    Copyright (C) 2014-2024 Lucas Czech

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    Contact:
    Lucas Czech <lczech@carnegiescience.edu>
    Department of Plant Biology, Carnegie Institution For Science
    260 Panama Street, Stanford, CA 94305, USA
*/

/**
 * @brief
 *
 * @file
 * @ingroup population
 */

#include "genesis/population/function/genome_region.hpp"

#include "genesis/utils/io/input_source.hpp"
#include "genesis/utils/io/input_stream.hpp"
#include "genesis/utils/io/scanner.hpp"
#include "genesis/utils/text/convert.hpp"
#include "genesis/utils/text/string.hpp"

#include <algorithm>
#include <cassert>
#include <iostream>
#include <stdexcept>

namespace genesis {
namespace population {

// =================================================================================================
//     Comparion Operators
// =================================================================================================

bool operator ==( GenomeRegion const& a, GenomeRegion const& b )
{
    return a.chromosome == b.chromosome && a.start == b.start && a.end == b.end;
}

bool operator !=( GenomeRegion const& a, GenomeRegion const& b )
{
    return !( a == b );
}

// =================================================================================================
//     Parsing & Printing
// =================================================================================================

std::ostream& operator<<( std::ostream& os, GenomeRegion const& region )
{
    os << to_string( region );
    // os << region.chromosome << ": [" << region.start << ", " << region.end << ")";
    return os;
}

std::string to_string( GenomeRegion const& region )
{
    // Error cases. We need to check separately here, as we want to be able to treat the
    // start == end == 0 special case extra here, and just print out the chromosome in that case.
    if( region.chromosome.empty() ) {
        throw std::invalid_argument(
            "Invalid GenomeRegion with empty chromosome."
        );
    }
    if(( region.start == 0 ) != ( region.end == 0 )) {
        throw std::invalid_argument(
            "Invalid GenomeRegion with one of start and end equal to zero."
        );
    }
    if( region.start > region.end ) {
        throw std::invalid_argument(
            "Invalid GenomeRegion with start > end."
        );
    }

    // Special cases.
    if( region.start == 0 && region.end == 0 ) {
        return region.chromosome;
    } else if( region.start == region.end ) {
        return region.chromosome + ":" + std::to_string( region.start );
    }

    // General case.
    return
        region.chromosome + ":" +
        std::to_string( region.start ) + "-" +
        std::to_string( region.end )
    ;
}

GenomeRegion parse_genome_region( std::string const& region, bool zero_based, bool end_exclusive )
{
    GenomeRegion result;

    // Helper function to throw on error without copies of the same error message each time.
    auto throw_invalid_arg_ = [&](){
        throw std::invalid_argument( "Invalid genomic region string \"" + region + "\""


_TABLE];

fn ceil(a: usize,b: usize) -> usize {
    (a-1)/b+1
}

/* output u \in F_p */
fn hash_to_field(hash: usize,hlen: usize ,u: &mut [FP], dst: &[u8],m: &[u8],ctr: usize) {
    let q = BIG::new_ints(&rom::MODULUS);
    let nbq=q.nbits();
    let el = ceil(nbq+ecp::AESKEY*8,8);

    let mut okm: [u8;256]=[0;256];
    let mut fd: [u8;128]=[0;128];

    hmac::xmd_expand(hash,hlen,&mut okm,el*ctr,&dst,&m);
    for i in 0..ctr {
        for j in 0..el {
            fd[j]=okm[el*i+j];
        }
        u[i]=FP::new_big(&DBIG::frombytes(&fd[0 .. el]).ctdmod(&q,8*el-nbq));
    }
}

/* hash a message to an ECP point, using SHA2, random oracle method */
#[allow(non_snake_case)]
pub fn bls_hash_to_point(m: &[u8]) -> ECP {
    let dst= String::from("BLS_SIG_ZZZG1_XMD:SHA-512_SVDW_RO_NUL_".to_ascii_uppercase());
    let mut u: [FP; 2] = [
        FP::new(),
        FP::new(),
    ];
    hash_to_field(hmac::MC_SHA2,ecp::HASH_TYPE,&mut u,dst.as_bytes(),m,2);

    let mut P=ECP::map2point(&u[0]);
    let P1=ECP::map2point(&u[1]);
    P.add(&P1);
    P.cfp();
    P.affine();
    P
}

pub fn init() -> isize {
    let g = ECP8::generator();
    if g.is_infinity() {
        return BLS_FAIL;
    }
    unsafe {
        pair8::precomp(&mut G2_TAB, &g);
    }
    BLS_OK
}

/* generate key pair, private key s, public key w */
pub fn key_pair_generate(ikm: &[u8], s: &mut [u8], w: &mut [u8]) -> isize {
    let r = BIG::new_ints(&rom::CURVE_ORDER);
    let nbr=r.nbits();
    let el = ceil(3*ceil(nbr,8),2);
    let g = ECP8::generator();
    let mut len: [u8; 2] = [0; 2];
    hmac::inttobytes(el,&mut len);

    let salt=String::from("BLS-SIG-KEYGEN-SALT-");

    let mut prk: [u8;64]=[0;64];
    let mut okm: [u8;128]=[0;128];
    let mut aikm: [u8;65]=[0;65];
    let likm=ikm.len();
    for i in 0..likm {
        aikm[i]=ikm[i];
    }
    aikm[likm]=0;

    let hlen=ecp::HASH_TYPE;

    hmac::hkdf_extract(hmac::MC_SHA2,hlen,&mut prk,Some(&salt.as_bytes()),&aikm[0 .. likm+1]);
    hmac::hkdf_expand(hmac::MC_SHA2,hlen,&mut okm,el,&prk[0 .. hlen],&len);

    let mut dx = DBIG::frombytes(&okm[0 .. el]);
    let sc = dx.ctdmod(&r,8*el-nbr);
    sc.tobytes(s);
// SkToPk
    pair8::g2mul(&g, &sc).tobytes(w,true);  // true for public key compression
    BLS_OK
}

/* Sign message m using private key s to produce signature sig */

pub fn core_sign(sig: &mut [u8], m: &[u8], s: &[u8]) -> isize {
    let d = bls_hash_to_point(m);
    let sc = BIG::frombytes(&s);


ly. A value of 0 will completely disable the route's idle timeout, even if a
	// connection manager stream idle timeout is configured.
	//
	// The idle timeout is distinct to :ref:`timeout
	// <envoy_api_field_route.RouteAction.timeout>`, which provides an upper bound
	// on the upstream response time; :ref:`idle_timeout
	// <envoy_api_field_route.RouteAction.idle_timeout>` instead bounds the amount
	// of time the request's stream may be idle.
	//
	// After header decoding, the idle timeout will apply on downstream and
	// upstream request events. Each time an encode/decode event for headers or
	// data is processed for the stream, the timer will be reset. If the timeout
	// fires, the stream is terminated with a 408 Request Timeout error code if no
	// upstream response header has been received, otherwise a stream reset
	// occurs.
	IdleTimeout *durationpb.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
	// Indicates that the route has a retry policy. Note that if this is set,
	// it'll take precedence over the virtual host level retry policy entirely
	// (e.g.: policies are not merged, most internal one becomes the enforced policy).
	RetryPolicy *RetryPolicy `protobuf:"bytes,9,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"`
	// [#not-implemented-hide:]
	// Specifies the configuration for retry policy extension. Note that if this is set, it'll take
	// precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
	// most internal one becomes the enforced policy). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>`
	// should not be set if this field is used.
	RetryPolicyTypedConfig *anypb.Any `protobuf:"bytes,33,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"`
	// Indicates that the route has a request mirroring policy.
	//
	// .. attention::
	//
	//	This field has been deprecated in favor of `request_mirror_policies` which supports one or
	//	more mirroring policies.
	//
	// Deprecated: Marked as deprecated in envoy/api/v2/route/route_components.proto.
	RequestMirrorPolicy *RouteAction_RequestMirrorPolicy `protobuf:"bytes,10,opt,name=request_mirror_policy,json=requestMirrorPolicy,proto3" json:"request_mirror_policy,omitempty"`
	// Indicates that the route has request mirroring policies.
	RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,30,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"`
	// Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
	Priority core.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"`
	// Specifies a set of rate limit configurations that could be applied to the
	// route.
	RateLimits []*RateLimit `protobuf:"bytes,13,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// Specifies if the rate limit filter should include the virtual host rate
	// limits. By default, if the route configured rate limits, the virtual host
	// :ref:`rate_limits <envoy_api_field_route.VirtualHost.rate_limits>` are not applied to the
	// request.
	IncludeVh


: String, required: true },
    features: { type: Boolean, default: false },
  },
  { timestamps: true }
);

export default mongoose.model<ILeader>("Leader", LeaderSchema);
import { ListCharacters, GetCharacter } from "./Characters/";
import { ListComics, GetComicsByCharacter } from "./Comics";

// Get a data from APi and transform it to array
export const getListCharacters = async () => {
  const response: any = await ListCharacters();
  const record: Array<string> = response.data;
  return record;
};

export const getCharacter = async (id: String) => {
  const response: any = await GetCharacter(id);
  const record: Object = response.data;
  return record;
};

// Comics
export const getListComicsById = async (id: String) => {
  const response: any = await GetComicsByCharacter(id);
  const record: Object = response.data;
  return record;
};

export const getListComics = async () => {
  const response: any = await ListComics();
  const record: Object = response.data;
  return record;
};
/*

undefined
MaaS booking message object

!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!!

*/

import * as t from 'io-ts';

type Defined =
  | Record<string, unknown>
  | Array<unknown>
  | string
  | boolean
  | number
  | null;
const Defined = t.union([
  t.UnknownRecord,
  t.UnknownArray,
  t.string,
  t.boolean,
  t.number,
  t.null,
]);

export const schemaId = 'http://maasglobal.com/core/components/message.json';

// Message
// The default export. More information at the top.
export type Message = t.Branded<
  {
    text?: string;
    mode?: string &
      (
        | 'MODE_WALK'
        | 'MODE_BICYCLE'
        | 'MODE_CAR'
        | 'MODE_TRAM'
        | 'MODE_SUBWAY'
        | 'MODE_RAIL'
        | 'MODE_BUS'
        | 'MODE_FERRY'
        | 'MODE_CABLE_CAR'
        | 'MODE_GONDOLA'
        | 'MODE_FUNICULAR'
        | 'MODE_SHARED_BICYCLE'
        | 'MODE_SHARED_E_BICYCLE'
        | 'MODE_SHARED_CAR'
        | 'MODE_TRANSIT'
        | 'MODE_TRAIN'
        | 'MODE_TRAINISH'
        | 'MODE_BUSISH'
        | 'MODE_TAXI'
        | 'MODE_SCOOTER'
      );
    property?: string;
  } & {
    text: Defined;
    mode: Defined;
    property: Defined;
  },
  MessageBrand
>;
export const Message = t.brand(
  t.intersection([
    t.partial({
      text: t.string,
      mode: t.intersection([
        t.string,
        t.union([
          t.literal('MODE_WALK'),
          t.literal('MODE_BICYCLE'),
          t.literal('MODE_CAR'),
          t.literal('MODE_TRAM'),
          t.literal('MODE_SUBWAY'),
          t.literal('MODE_RAIL'),
          t.l


{
                    Tensor i = targets[TensorIndex.Colon, 0];  // image index
                    var (_, _, counts) = i.unique(return_counts: true);
                    Tensor _out = torch.zeros(new long[] { batch_size, counts.max().ToInt64(), ne - 1 }, device: this.device);

                    for (int j = 0; j < batch_size; j++)
                    {
                        Tensor matches = i == j;
                        long n = matches.sum().ToInt64();
                        if (n > 0)
                        {
                            // Get the indices where matches is True
                            var indices = torch.nonzero(matches).squeeze().to(torch.ScalarType.Int64);

                            // Select the rows from targets
                            var selectedRows = targets.index_select(0, indices.contiguous());

                            // Slice the rows to exclude the first column
                            var selectedRowsSliced = selectedRows.narrow(1, 1, ne - 1);

                            // Assign to the output tensor
                            _out[j, TensorIndex.Slice(0, n)] = selectedRowsSliced;
                        }

                    }
                    // Convert xywh to xyxy format and scale
                    _out[TensorIndex.Ellipsis, TensorIndex.Slice(1, 5)] = xywh2xyxy(_out[TensorIndex.Ellipsis, TensorIndex.Slice(1, 5)].mul(scale_tensor));
                    return _out.MoveToOuterDisposeScope();
                }

            }

            private Tensor xywh2xyxy(Tensor xywh)
            {
                using var _ = NewDisposeScope();
                var xyxy = torch.zeros_like(xywh);
                xyxy[TensorIndex.Ellipsis, 0] = xywh[TensorIndex.Ellipsis, 0] - xywh[TensorIndex.Ellipsis, 2] / 2; // x1
                xyxy[TensorIndex.Ellipsis, 1] = xywh[TensorIndex.Ellipsis, 1] - xywh[TensorIndex.Ellipsis, 3] / 2; // y1
                xyxy[TensorIndex.Ellipsis, 2] = xywh[TensorIndex.Ellipsis, 0] + xywh[TensorIndex.Ellipsis, 2] / 2; // x2
                xyxy[TensorIndex.Ellipsis, 3] = xywh[TensorIndex.Ellipsis, 1] + xywh[TensorIndex.Ellipsis, 3] / 2; // y2
                return xyxy.MoveToOuterDisposeScope();
            }

        }

        public class SegmentationLoss : Module<Tensor[], Tensor, Tensor, (Tensor, Tensor)>
        {
            private readonly int[] stride;
            private readonly int nc;
            private readonly int no;
            private readonly int reg_max;
            private readonly int tal_topk;
            private torch.Device device;
            private torch.ScalarType dtype;
            private readonly bool use_dfl;

            private readonly BCEWithLogitsLoss bce;

            private readonly float hyp_box = 7.5f;
            private readonly float hyp_cls = 0.5f;
            private readonly float hyp_dfl = 1.5f;
            private readonly bool over_laps = true;

            public SegmentationLoss(int nc = 80, int reg_max = 16, int tal_topk = 10) : base(nameof(SegmentationLoss))
            {
                this.stride = new int[] { 8, 16, 32 };
                this.bce = BCEWithLogitsLoss(reduction: Reduction.None);
                this.nc = nc; // number of classes
                this.no = nc + reg_max * 4;
                this.reg_max = reg_max;
                this.use_dfl = reg_max > 1;
                this.tal_topk = tal_topk


				msg:addString(icon)
			end

			if category.parent then
				msg:addString(category.parent)
			else
				msg:addU16(0)
			end
		end

		msg:sendToPlayer(player)
		sendStoreBalanceUpdating(playerId, true)
	end
end

function sendOfferDescription(player, offerId, description)
	local msg = NetworkMessage()
	msg:addByte(0xEA)
	msg:addU32(offerId)
	msg:addString(description)
	msg:sendToPlayer(player)
end

function Player.canBuyOffer(self, offer)
	local playerId = self:getId()
	local disabled, disabledReason = 0, ""
	if offer.disabled == true or not offer.type then
		disabled = 1
	end

	if offer.type ~= GameStore.OfferTypes.OFFER_TYPE_NAMECHANGE and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_EXPBOOST and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_PREYSLOT and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_PREYBONUS and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_TEMPLE and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_SEXCHANGE and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_POUNCH and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_HIRELING_SKILL and
	offer.type ~= GameStore.OfferTypes.OFFER_TYPE_HIRELING_OUTFIT and
	not offer.id then
		disabled = 1
	end

	if disabled == 1 and offer.disabledReason then
		-- dynamic disable
		disabledReason = offer.disabledReason
	end

	if disabled ~= 1 then
		if offer.type == GameStore.OfferTypes.OFFER_TYPE_POUNCH then
			local pounch = self:getItemById(23721, true)
			if pounch then
				disabled = 1
				disabledReason = "You already have Loot Pouch."
			end
		elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_BLESSINGS then
			if self:getBlessingCount(offer.blessid) >= 5 then
				disabled = 1
				disabledReason = "You reached the maximum amount for this blessing."
			end
		elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_ALLBLESSINGS then
			for i = 1, 8 do
				if self:getBlessingCount(i) >= 5 then
					disabled = 1
					disabledReason = "You already have all Blessings."
					break
				end
			end
		elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT or offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT_ADDON then
			local outfitLookType
			if self:getSex() == PLAYERSEX_MALE then
				outfitLookType = offer.sexId.male
			else
				outfitLookType = offer.sexId.female
			end

			if outfitLookType then
				if offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT and self:hasOutfit(outfitLookType) then
					disabled = 1
					disabledReason = "You already have this outfit."
				elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT_ADDON then
					if self:hasOutfit(outfitLookType) then
						if self:hasOutfit(outfitLookType, offer.addon) then
							disabled = 1
							disabledReason = "You already have this addon."
						end
					else
						disabled = 1
						disabledReason = "You don't have the outfit, you can't buy the addon."
					end
				end
			else
				disabled = 1
				disabledReason = "The offer is fake."
			end
		elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_MOUNT then
			local hasMount = self:hasMount(offer.id)
			if hasMount == true then
				disabled = 1
				disabledReason = "You


      	mov    -0x18(%rbp),%eax
 8056343:	85 c0                	test   %eax,%eax
 8056345:	0f 84 05 00 00 00    	je     8056350 <parse_escape_string+0x4a2>
 805634b:	e9 1e 00 00 00       	jmpq   805636e <parse_escape_string+0x4c0>
 8056350:	b8 00 00 00 00       	mov    $0x0,%eax
 8056355:	48 89 c6             	mov    %rax,%rsi
 8056358:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
 805635c:	48 89 c7             	mov    %rax,%rdi
 805635f:	b8 00 00 00 00       	mov    $0x0,%eax
 8056364:	e8 e4 ae ff ff       	callq  805124d <cstr_ccat>
 8056369:	e9 19 00 00 00       	jmpq   8056387 <parse_escape_string+0x4d9>
 805636e:	b8 00 00 00 00       	mov    $0x0,%eax
 8056373:	48 89 c6             	mov    %rax,%rsi
 8056376:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
 805637a:	48 89 c7             	mov    %rax,%rdi
 805637d:	b8 00 00 00 00       	mov    $0x0,%eax
 8056382:	e8 af af ff ff       	callq  8051336 <cstr_wccat>
 8056387:	c9                   	leaveq
 8056388:	c3                   	retq

0000000008056389 <bn_lshift>:
 8056389:	55                   	push   %rbp
 805638a:	48 89 e5             	mov    %rsp,%rbp
 805638d:	48 81 ec 30 00 00 00 	sub    $0x30,%rsp
 8056394:	48 89 7d f8          	mov    %rdi,-0x8(%rbp)
 8056398:	48 89 75 f0          	mov    %rsi,-0x10(%rbp)
 805639c:	48 89 55 e8          	mov    %rdx,-0x18(%rbp)
 80563a0:	b8 00 00 00 00       	mov    $0x0,%eax
 80563a5:	89 45 e4             	mov    %eax,-0x1c(%rbp)
 80563a8:	8b 45 e4             	mov    -0x1c(%rbp),%eax
 80563ab:	83 f8 02             	cmp    $0x2,%eax
 80563ae:	0f 8d 7c 00 00 00    	jge    8056430 <bn_lshift+0xa7>
 80563b4:	e9 0e 00 00 00       	jmpq   80563c7 <bn_lshift+0x3e>
 80563b9:	8b 45 e4             	mov    -0x1c(%rbp),%eax
 80563bc:	48 89 c1             	mov    %rax,%rcx
 80563bf:	83 c0 01             	add    $0x1,%eax
 80563c2:	89 45 e4             	mov    %eax,-0x1c(%rbp)
 80563c5:	eb e1                	jmp    80563a8 <bn_lshift+0x1f>
 80563c7:	8b 45 e4             	mov    -0x1c(%rbp),%eax
 80563ca:	48 63 c0             	movslq %eax,%rax
 80563cd:	48 89 c1             	mov    %rax,%rcx
 80563d0:	48 c1 e1 02          	shl    $0x2,%rcx
 80563d4:	48 8


dd>       [ ( {compName pinName | PIN pinName | VPIN vpinName} ) ] ...
       [NONDEFAULTRULE rulename]
       [regularWiring] ...] ...
   [+ XTALK class]
   [+ NONDEFAULTRULE ruleName]
   [regularWiring] ...
   [+ SOURCE {DIST | NETLIST | TEST | TIMING | USER}]
   [+ FIXEDBUMP]
   [+ FREQUENCY frequency]
   [+ ORIGINAL netName]
   [+ USE {ANALOG | CLOCK | GROUND | POWER | RESET | SCAN | SIGNAL
             | TIEOFF}]
   [+ PATTERN {BALANCED | STEINER | TRUNK | WIREDLOGIC}]
   [+ ESTCAP wireCapacitance]
   [+ WEIGHT weight]
   [+ PROPERTY {propName propVal} ...] ...
;] ...

        END NETS

Defines netlist connectivity and regular-routes for nets containing regular pins. These routes are normally created by a signal router that can rip-up and repair the routing. The SPECIALNETS statement defines netlist connectivity and routing for special-routes that are created by "special routers" or "manually" and should not be modified by a signal router. Special routes are normally used for power-routing, fixed clock-mesh routing, high-speed buses, critical analog routes, or flip-chip routing on the top-metal layer to bumps.

Input arguments for a net can appear in the NETS section or the SPECIALNETS section. In case of conflicting values, the DEF reader uses the last value encountered. NETS and SPECIALNETS statements can appear more than once in


0x9f	# DW_OP_stack_value
	.quad	0	# Location list terminator begin (*.LLST17)
	.quad	0	# Location list terminator end (*.LLST17)
.LLST18:
	.quad	.LVL50	# Location list begin address (*.LLST18)
	.quad	.LVL53-1	# Location list end address (*.LLST18)
	.value	0x1	# Location expression size
	.byte	0x54	# DW_OP_reg4
	.quad	.LVL53-1	# Location list begin address (*.LLST18)
	.quad	.LFE14	# Location list end address (*.LLST18)
	.value	0x4	# Location expression size
	.byte	0xf3	# DW_OP_GNU_entry_value
	.uleb128 0x1
	.byte	0x54	# DW_OP_reg4
	.byte	0x9f	# DW_OP_stack_value
	.quad	0	# Location list terminator begin (*.LLST18)
	.quad	0	# Location list terminator end (*.LLST18)
.LLST19:
	.quad	.LVL50	# Location list begin address (*.LLST19)
	.quad	.LVL53-1	# Location list end address (*.LLST19)
	.value	0x1	# Location expression size
	.byte	0x51	# DW_OP_reg1
	.quad	.LVL53-1	# Location list begin address (*.LLST19)
	.quad	.LFE14	# Location list end address (*.LLST19)
	.value	0x4	# Location expression size
	.byte	0xf3	# DW_OP_GNU_entry_value
	.uleb128 0x1
	.byte	0x51	# DW_OP_reg1
	.byte	0x9f	# DW_OP_stack_value
	.quad	0	# Location list terminator begin (*.LLST19)
	.quad	0	# Location list terminator end (*.LLST19)
.LLST20:
	.quad	.LVL50	# Location list begin address (*.LLST20)
	.quad	.LVL53-1	# Location list end address (*.LLST20)
	.value	0x1	# Location expression size
	.byte	0x52	# DW_OP_reg2
	.quad	.LVL53-1	# Location list begin address (*.LLST20)
	.quad	.LFE14	# Location list end address (*.LLST20)
	.value	0x4	# Location expression size
	.byte	0xf3	# DW_OP_GNU_entry_value
	.uleb128 0x1
	.byte	0x52	# DW_OP_reg2
	.byte	0x9f	# DW_OP_stack_value
	.quad	0	# Location list terminator begin (*.LLST20)
	.quad	0	# Location list terminator end (*.LLST20)
.LLST21:
	.quad	.LVL50	# Location list begin address (*.LLST21)
	.quad	.LVL53-1	# Location list end address (*.LLST21)
	.value	0x1	# Location expression size
	.byte	0x58	# DW_OP_reg8
	.quad	.LVL53-1	# Location list begin address (*.LLST21)
	.quad	.LFE14	# Location list end address (*.LLST21)
	.value	0x4	# Location expression size
	.byte	0xf3	# DW_OP_GNU_entry_value
	.uleb128 0x1
	.byte	0x58	# DW_OP_reg8
	.byte	0x9f	# DW_OP_stack_value
	.quad	0	# Location list terminator begin (*.LLST21)
	.quad	0	# Location list terminator end (*.LLST21)
.


d.horizontalAlignment = SWT.FILL;
			gd.grabExcessHorizontalSpace = true;
			dataGroup.setLayoutData(gd);
		}

		data = new LabeledText(snmpColumn ? dataGroup : dialogArea, SWT.NONE);
		if (snmpColumn)
		{
			data.setLabel(Messages.get().EditColumnDialog_SNMP_OID);
			data.setText(columnObject.getSnmpOid());
		}
		else
		{
			data.setLabel(Messages.get().EditColumnDialog_SubstrIndex);
			data.setText(Integer.toString(columnObject.getSubstringIndex()));
		}
		gd = new GridData();
		gd.horizontalAlignment = SWT.FILL;
		gd.grabExcessHorizontalSpace = true;
		gd.widthHint = 350;
		data.setLayoutData(gd);

		if (snmpColumn)
		{
			selectButton = new Button(dataGroup, SWT.PUSH);
			selectButton.setText("..."); //$NON-NLS-1$
			gd = new GridData();
			gd.verticalAlignment = SWT.BOTTOM;
			selectButton.setLayoutData(gd);
			selectButton.addSelectionListener(new SelectionListener() {
				@Override
				public void widgetSelected(SelectionEvent e)
				{
					SnmpObjectId initial;
					try
					{
						initial = SnmpObjectId.parseSnmpObjectId(data.getText());
					}
					catch(SnmpObjectIdFormatException ex)
					{
						initial = null;
					}
					MibSelectionDialog dlg = new MibSelectionDialog(getShell(), initial, 0);
					if (dlg.open() == Window.OK)
					{
						data.setText(dlg.getSelectedObjectId().toString());
					}
				}

				@Override
				public void widgetDefaultSelected(SelectionEvent e)
				{
					widgetSelected(e);
				}
			});
		}

		return dialogArea;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
	 */
	@Override
	protected void okPressed()
	{
		if (snmpColumn)
		{
			/* TODO: add OID validation */
			columnObject.setSnmpOid(data.getText());
		}
		else
		{
			try
			{
				int n = Integer.parseInt(data.getText());
				columnObject.setSubstringIndex(n);
			}
			catch(NumberFormatException e)
			{
				MessageDialogHelper.openWarning(getShell(), Messages.get().EditColumnDialog_Warning, Messages.get().EditColumnDialog_EnterValidIndex);
				return;
			}
		}

		columnObject.setFormat(format.getSelectionIndex());
		columnObject.setName(name.getText().trim());

		super.okPressed();
	}
}
/**
 * NetXMS - open source network management system
 * Copyright (C) 2020-2022 Raden Soultions
 *
 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
package org.netxms.ui.eclipse.objecttools.widgets;

import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.


      HEAP32[((rmtp)>>2)]=0;
        HEAP32[(((rmtp)+(4))>>2)]=0;
      }
      return _usleep((seconds * 1e6) + (nanoseconds / 1000));
    }

  function _pthread_attr_destroy(attr) {
      /* int pthread_attr_destroy(pthread_attr_t *attr); */
      //FIXME: should destroy the pthread_attr_t struct
      return 0;
    }

  function _pthread_attr_init(attr) {
      /* int pthread_attr_init(pthread_attr_t *attr); */
      //FIXME: should allocate a pthread_attr_t
      return 0;
    }

  function _pthread_condattr_destroy() { return 0; }

  function _pthread_condattr_init() { return 0; }

  function _pthread_condattr_setclock() { return 0; }

  function _pthread_create() {
      return 6;
    }

  function _pthread_join() {}

  function _pthread_mutexattr_destroy() {}

  function _pthread_mutexattr_init() {}

  function _pthread_mutexattr_settype() {}

  function _pthread_rwlock_rdlock() { return 0; }

  function _pthread_rwlock_unlock() { return 0; }

  function _setTempRet0($i) {
      setTempRet0(($i) | 0);
    }

  function _sysconf(name) {
      // long sysconf(int name);
      // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html
      switch(name) {
        case 30: return 16384;
        case 85:
          var maxHeapSize = 2147483648;
          return maxHeapSize / 16384;
        case 132:
        case 133:
        case 12:
        case 137:
        case 138:
        case 15:
        case 235:
        case 16:
        case 17:
        case 18:
        case 19:
        case 20:
        case 149:
        case 13:
        case 10:
        case 236:
        case 153:
        case 9:
        case 21:
        case 22:
        case 159:
        case 154:
        case 14:
        case 77:
        case 78:
        case 139:
        case 80:
        case 81:
        case 82:
        case 68:
        case 67:
        case 164:
        case 11:
        case 29:
        case 47:
        case 48:
        case 95:
        case 52:
        case 51:
        case 46:
        case 79:
          return 200809;
        case 27:
        case 246:
        case 127:
        case 128:
        case 23:
        case 24:
        case 160:
        case 161:
        case 181:
        case 182:
        case 242:
        case 183:
        case 184:
        case 243:
        case 244:
        case 245:
        case 165:
        case 178:
        case 179:
        case 49:
        case 50:
        case 168:
        case 169:
        case 175:
        case 170:
        case 171:
        case 172:
        case 97:
        case 76:
        case 32:
        case 173:
        case 35:
          return -1;
        case 176:
        case 177:
        case 7:
        case 155:
        case 8:
        case 157:
        case 125:
        case 126:
        case 92:
        case 93:
        case 129:
        case 130:
        case 131:
        case 94:
        case 91:
          return 1;
        case 74:
        case 60:
        case 69:
        case 70:
        case 4:
          return 1024;
        case 31:
        case 42:
        case 72:
          return 32;
        case 87:
        case 26:
        case 33:
          return 2147483647;
        case 34:
        case 1:
          return 478


D 11BE; # (굧; 굧; 굧; 굧; 굧; ) HANGUL SYLLABLE GYOC
AD68;AD68;1100 116D 11BF;AD68;1100 116D 11BF; # (굨; 굨; 굨; 굨; 굨; ) HANGUL SYLLABLE GYOK
AD69;AD69;1100 116D 11C0;AD69;1100 116D 11C0; # (굩; 굩; 굩; 굩; 굩; ) HANGUL SYLLABLE GYOT
AD6A;AD6A;1100 116D 11C1;AD6A;1100 116D 11C1; # (굪; 굪; 굪; 굪; 굪; ) HANGUL SYLLABLE GYOP
AD6B;AD6B;1100 116D 11C2;AD6B;1100 116D 11C2; # (굫; 굫; 굫; 굫; 굫; ) HANGUL SYLLABLE GYOH
AD6C;AD6C;1100 116E;AD6C;1100 116E; # (구; 구; 구; 구; 구; ) HANGUL SYLLABLE GU
AD6D;AD6D;1100 116E 11A8;AD6D;1100 116E 11A8; # (국; 국; 국; 국; 국; ) HANGUL SYLLABLE GUG
AD6E;AD6E;1100 116E 11A9;AD6E;1100 116E 11A9; # (굮; 굮; 굮; 굮; 굮; ) HANGUL SYLLABLE GUGG
AD6F;AD6F;1100 116E 11AA;AD6F;1100 116E 11AA; # (굯; 굯; 굯; 굯; 굯; ) HANGUL SYLLABLE GUGS
AD70;AD70;1100 116E 11AB;AD70;1100 116E 11AB; # (군; 군; 군; 군; 군; ) HANGUL SYLLABLE GUN
AD71;AD71;1100 116E 11AC;AD71;1100 116E 11AC; # (굱; 굱; 굱; 굱; 굱; ) HANGUL SYLLABLE GUNJ
AD72;AD72;1100 116E 11AD;AD72;1100 116E 11AD; # (굲; 굲; 굲; 굲; 굲; ) HANGUL SYLLABLE GUNH
AD73;AD73;1100 116E 11AE;AD73;1100 116E 11AE; # (굳; 굳; 굳; 굳; 굳; ) HANGUL SYLLABLE GUD
AD74;AD74;1100 116E 11AF;AD74;1100 116E 11AF; # (굴; 굴; 굴; 굴; 굴; ) HANGUL SYLLABLE GUL
AD75;AD75;1100 116E 11B0;AD75;1100 116E 11B0; # (굵; 굵; 굵; 굵; 굵; ) HANGUL SYLLABLE GULG
AD76;AD76;1100 116E 11B1;AD76;1100 116E 11B1; # (굶; 굶; 굶; 굶; 굶; ) HANGUL SYLLABLE GULM
AD77;AD77;1100 116E 11B2;AD77;1100 116E 11B2; # (굷; 굷; 굷; 굷; 굷; ) HANGUL SYLLABLE GULB
AD78;AD78;1100 116E 11B3;AD78;1100 116E 11B3; # (굸; 굸; 굸; 굸; 굸; ) HANGUL SYLLABLE GULS
AD79;AD79;1100 116E 11B4;AD79;1100 116E 11B4


able.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins #the-list .update td,.plugins #the-list .update th,.plugins #the-list tr>td:not(:last-child),.wp-list-table.plugins #the-list .theme-title{box-shadow:none;border-top:none}.plugins #the-list tr td{border-top:none}.plugins tbody{padding:1px 0 0}.plugins .plugin-update-tr:before,.plugins tr.active+tr.inactive td.column-description,.plugins tr.active+tr.inactive th.check-column{box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:none}.plugins .plugin-update-tr:before{content:"";display:table-cell}.plugins .active.update+.plugin-update-tr:before{border-left:4px solid #d54e21;background-color:#fef7f1}.plugins #the-list .plugin-update-tr .plugin-update{border-left:none}.plugin-update-tr .update-message{margin-left:0}.plugins .active.update+.plugin-update-tr:before{background-color:#f7fcfe;border-left:4px solid #00a0d2}.plugins .plugin-update-tr .update-message{margin-left:0}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.5}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{box-shadow:none}table.plugin-install #the-list tr{display:block;box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugin-card{margin-left:0;margin-right:0;width:100%}}@media screen and (max-width:480px){.tablenav-pages .current-page{margin:0}.row-actions:not(.plugins-php){-ms-grid-columns:auto auto;grid-template-columns:auto auto}.tablenav-pages .tablenav-paging-text{float:left;width:100%;padding-top:.5em}}.wp-full-overlay-sidebar {
	overflow: visible;
}

/**
 * Hide all sidebar sections by default, only show them (via JS) once the
 * preview loads and we know whether the sidebars are used in the template.
 */

.control-section.control-section-sidebar,
.customize-control-sidebar_widgets label,
.customize-control-sidebar_widgets .hide-if-js {
	/* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */
	display: none;
}

.control-section.control-section-sidebar .accordion-section-content.ui-sortable {
	overflow: visible;
}

/* Note: widget-tops are more compact when (max-height: 700px) and (min-width: 981px). */
.customize-control-widget_form .widget-top {
	background: #fff;
	transition: opacity 0.5s;
}

.customize-control .widget-action {
	color: #72777c;
}

.customize-control .widget-top:hover .widget-action,
.customize-control .widget-action:focus {


/* SPDX-License-Identifier: GPL-2.0-only */

#include <bootblock_common.h>
#include <stdint.h>
#include <pc80/mc146818rtc.h>
#include <bootmode.h>
#include <superio/ite/common/ite.h>
#include <superio/ite/common/ite_gpio.h>
#include <superio/ite/it8772f/it8772f.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/common/gpio.h>
#include <superio/smsc/lpc47n207/lpc47n207.h>

#define SERIAL_DEV PNP_DEV(0x2e, IT8772F_SP1)
#define GPIO_DEV   PNP_DEV(0x2e, IT8772F_GPIO)
#define EC_DEV     PNP_DEV(0x2e, IT8772F_EC)

void mainboard_late_rcba_config(void)
{
	/*
	 *             GFX    INTA -> PIRQA (MSI)
	 * D28IP_P1IP  WLAN   INTA -> PIRQB
	 * D28IP_P4IP  ETH0   INTB -> PIRQC
	 * D29IP_E1P   EHCI1  INTA -> PIRQD
	 * D26IP_E2P   EHCI2  INTA -> PIRQE
	 * D31IP_SIP   SATA   INTA -> PIRQF (MSI)
	 * D31IP_SMIP  SMBUS  INTB -> PIRQG
	 * D31IP_TTIP  THRT   INTC -> PIRQH
	 * D27IP_ZIP   HDA    INTA -> PIRQG (MSI)
	 */

	/* Device interrupt pin register (board specific) */
	RCBA32(D31IP) = (INTC << D31IP_TTIP) | (NOINT << D31IP_SIP2) |
		(INTB << D31IP_SMIP) | (INTA << D31IP_SIP);
	RCBA32(D30IP) = (NOINT << D30IP_PIP);
	RCBA32(D29IP) = (INTA << D29IP_E1P);
	RCBA32(D28IP) = (INTA << D28IP_P1IP) | (INTC << D28IP_P3IP) |
		(INTB << D28IP_P4IP);
	RCBA32(D27IP) = (INTA << D27IP_ZIP);
	RCBA32(D26IP) = (INTA << D26IP_E2P);
	RCBA32(D25IP) = (NOINT << D25IP_LIP);
	RCBA32(D22IP) = (NOINT << D22IP_MEI1IP);

	/* Device interrupt route registers */
	DIR_ROUTE(D31IR, PIRQF, PIRQG, PIRQH, PIRQA);
	DIR_ROUTE(D29IR, PIRQD, PIRQE, PIRQF, PIRQG);
	DIR_ROUTE(D28IR, PIRQB, PIRQC, PIRQD, PIRQE);
	DIR_ROUTE(D27IR, PIRQG, PIRQH, PIRQA, PIRQB);
	DIR_ROUTE(D26IR, PIRQE, PIRQF, PIRQG, PIRQH);
	DIR_ROUTE(D25IR, PIRQA, PIRQB, PIRQC, PIRQD);
	DIR_ROUTE(D22IR, PIRQA, PIRQB, PIRQC, PIRQD);
}

static void setup_sio_gpios(void)
{
	/*
	 * GPIO10 as USBPWRON12#
	 * GPIO12 as USBPWRON13#
	 */
	ite_reg_write(GPIO_DEV, ITE_GPIO_REG_SELECT(0), 0x05);
	ite_gpio_setup(GPIO_DEV, 10, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT);
	ite_gpio_setup(GPIO_DEV, 12, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT);
	/*
	 * GPIO22 as wake SCI#
	 */
	ite_reg_write(GPIO_DEV, ITE_GPIO_REG_SELECT(1), 0x04);
	ite_gpio_setup(GPIO_DEV, 22, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT);
	/*
	 * GPIO32 as EXTSMI#
	 */
	ite_reg_write(GPIO_DEV, ITE_GPIO_REG_SELECT(2), 0x04);
	ite_gpio_setup(GPIO_DEV, 32, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT);
	/*
	 * GPIO45 as LED_POWER#
	 */
	ite_reg_write(GPIO_DEV, ITE_GPIO_REG_SELECT(3), 0x20);
	ite_gpio_setup(GPIO_DEV, 45, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT | ITE_GPIO_PULLUP_ENABLE);
	ite_gpio_setup_led(GPIO_DEV, 45, ITE_GPIO_LED_1, ITE_LED_FREQ_1HZ,
			   ITE_LED_CONTROL_DEFAULT);
	/*
	 * GPIO51 as USBPWRON8#
	 * GPIO52 as USBPWRON1#
	 */
	ite_reg_write(GPIO_DEV, ITE_GPIO_REG_SELECT(4), 0x06);
	ite_gpio_setup(GPIO_DEV, 51, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT);
	ite_gpio_setup(GPIO_DEV, 52, ITE_GPIO_OUTPUT, ITE_GPIO_SIMPLE_IO_MODE,
		       ITE_GPIO_POL_INVERT);
}

void mainboard_fill_pei_data(struct pei_data *pei_data)
{
	/* TODO: Confirm if nortbridge_fill_pei_data() gets .system_type right (should be 0) */
}

void bootblock_mainboard_early_init(void)
{
	if (CONFIG(DRIVERS_UART_8250IO))
		try_enabling_LPC47N207_uart();

	setup_sio_gpios();

	/* Early SuperIO setup */
	ite_ac_resume_southbridge(EC_DEV);
	ite_kill_watchdog(GPIO_DEV);
	ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
}


ObjectNode();

        // 1.交易流水号
        byte[] tradeNoBytes = new byte[16];
        byteBuf.readBytes(tradeNoBytes);
        String tradeNo = decodeTradeNo(tradeNoBytes);

        // 2.桩编号
        byte[] pileCodeBytes = new byte[7];
        byteBuf.readBytes(pileCodeBytes);
        String pileCode = BCDUtil.toString(pileCodeBytes);

        // 3.抢号
        byte gunCodeByte = byteBuf.readByte();
        String gunCode = BCDUtil.toString(gunCodeByte);

        // 4.开始时间
        byte[] startTimeBytes = new byte[7];
        byteBuf.readBytes(startTimeBytes);
        Instant startTime = CP56Time2aUtil.decode(startTimeBytes).atZone(ZoneId.systemDefault()).toInstant();

        // 5.结束时间
        byte[] endTimeBytes = new byte[7];
        byteBuf.readBytes(endTimeBytes);
        Instant endTime = CP56Time2aUtil.decode(endTimeBytes).atZone(ZoneId.systemDefault()).toInstant();

        // ========== V1.7.0 新增字段 - 在结束时间后立即读取 ==========
        // 6.电表表号
        byte[] meterNoBytes = new byte[6];
        byteBuf.readBytes(meterNoBytes);
        String meterNo = BCDUtil.toString(meterNoBytes);
        additionalInfo.put(METER_NO_KEY, meterNo);

        // 7.电表密文
        byte[] meterContextEncyptB = new byte[34];
        byteBuf.readBytes(meterContextEncyptB);
        additionalInfo.put(METER_ENCRYPTED_CONTEXT_KEY, HexUtil.encodeHexStr(meterContextEncyptB));

        // 8.电表协议版本号
        additionalInfo.put(METER_PROTOCOL_VERSION_KEY, byteBuf.readUnsignedShortLE());

        // 9.加密方式
        additionalInfo.put(ENCRYPTION_METHOD_KEY, byteBuf.readUnsignedByte());

        // 10.尖单价
        BigDecimal topPrice = reduceMagnification(byteBuf.readUnsignedIntLE(), 100000);
        additionalInfo.put("尖单价", topPrice);
        // 11. 尖电量
        BigDecimal topEnergy = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);
        // 12.计损尖电量
        BigDecimal topLoseEnergy = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);
        additionalInfo.put("计损尖电量", topLoseEnergy);
        // 13.尖金额
        BigDecimal topAmount = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);

        // 14.峰单价
        BigDecimal peakPrice = reduceMagnification(byteBuf.readUnsignedIntLE(), 100000);
        additionalInfo.put("峰单价", peakPrice);
        // 15. 峰电量
        BigDecimal peakEnergy = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);
        // 16.计损峰电量
        BigDecimal peakLoseEnergy = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);
        additionalInfo.put("计损峰电量", peakLoseEnergy);
        // 17.峰金额
        BigDecimal peakAmount = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);

        // 18.平单价
        BigDecimal flatPrice = reduceMagnification(byteBuf.readUnsignedIntLE(), 100000);
        additionalInfo.put("平单价", flatPrice);
        // 19. 平电量
        BigDecimal flatEnergy = reduceMagnification(byteBuf.readUnsignedIntLE(), 10000);
        // 20.计损平电量
        BigDecimal flatLoseEnergy = reduceMagnification(by


/xhtml/glMultiTexCoord2sv.xml
func (gl *GL) MultiTexCoord2sv(target glbase.Enum, v []int16) {
	if len(v) != 2 {
		panic("parameter v has incorrect length")
	}
	C.gl3_2compat_glMultiTexCoord2sv(gl.funcs, C.GLenum(target), (*C.GLshort)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2s.xml
func (gl *GL) MultiTexCoord2s(target glbase.Enum, s, t int16) {
	C.gl3_2compat_glMultiTexCoord2s(gl.funcs, C.GLenum(target), C.GLshort(s), C.GLshort(t))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2iv.xml
func (gl *GL) MultiTexCoord2iv(target glbase.Enum, v []int32) {
	if len(v) != 2 {
		panic("parameter v has incorrect length")
	}
	C.gl3_2compat_glMultiTexCoord2iv(gl.funcs, C.GLenum(target), (*C.GLint)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2i.xml
func (gl *GL) MultiTexCoord2i(target glbase.Enum, s, t int32) {
	C.gl3_2compat_glMultiTexCoord2i(gl.funcs, C.GLenum(target), C.GLint(s), C.GLint(t))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2fv.xml
func (gl *GL) MultiTexCoord2fv(target glbase.Enum, v []float32) {
	if len(v) != 2 {
		panic("parameter v has incorrect length")
	}
	C.gl3_2compat_glMultiTexCoord2fv(gl.funcs, C.GLenum(target), (*C.GLfloat)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2f.xml
func (gl *GL) MultiTexCoord2f(target glbase.Enum, s, t float32) {
	C.gl3_2compat_glMultiTexCoord2f(gl.funcs, C.GLenum(target), C.GLfloat(s), C.GLfloat(t))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2dv.xml
func (gl *GL) MultiTexCoord2dv(target glbase.Enum, v []float64) {
	if len(v) != 2 {
		panic("parameter v has incorrect length")
	}
	C.gl3_2compat_glMultiTexCoord2dv(gl.funcs, C.GLenum(target), (*C.GLdouble)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord2d.xml
func (gl *GL) MultiTexCoord2d(target glbase.Enum, s, t float64) {
	C.gl3_2compat_glMultiTexCoord2d(gl.funcs, C.GLenum(target), C.GLdouble(s), C.GLdouble(t))
}

// https://www.opengl.org/sdk/docs/man3/xhtml/glMultiTexCoord1sv.xml
func (gl *GL) MultiTexCoord1sv(target glbase.Enum, v []int16) {
	C.gl3_2compat_glMultiTexCoord1sv(gl.funcs, C.GLenum(target), (*C.GLshort)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org


slots > first_slot, "KVM is broken");

	/* All KVM MMUs should be able to survive a 128gb guest. */
	max_mem = 128ull * SZ_1G;

	calc_default_nr_vcpus();

	while ((opt = getopt(argc, argv, "c:h:m:s:H")) != -1) {
		switch (opt) {
		case 'c':
			nr_vcpus = atoi_positive("Number of vCPUs", optarg);
			break;
		case 'm':
			max_mem = 1ull * atoi_positive("Memory size", optarg) * SZ_1G;
			break;
		case 's':
			slot_size = 1ull * atoi_positive("Slot size", optarg) * SZ_1G;
			break;
		case 'H':
			hugepages = true;
			break;
		case 'h':
		default:
			printf("usage: %s [-c nr_vcpus] [-m max_mem_in_gb] [-s slot_size_in_gb] [-H]\n", argv[0]);
			exit(1);
		}
	}

	vcpus = malloc(nr_vcpus * sizeof(*vcpus));
	TEST_ASSERT(vcpus, "Failed to allocate vCPU array");

	vm = vm_create_with_vcpus(nr_vcpus, guest_code, vcpus);

	max_gpa = vm->max_gfn << vm->page_shift;
	TEST_ASSERT(max_gpa > (4 * slot_size), "MAXPHYADDR <4gb ");

	fd = kvm_memfd_alloc(slot_size, hugepages);
	mem = mmap(NULL, slot_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
	TEST_ASSERT(mem != MAP_FAILED, "mmap() failed");

	TEST_ASSERT(!madvise(mem, slot_size, MADV_NOHUGEPAGE), "madvise() failed");

	/* Pre-fault the memory to avoid taking mmap_sem on guest page faults. */
	for (i = 0; i < slot_size; i += vm->page_size)
		((uint8_t *)mem)[i] = 0xaa;

	gpa = 0;
	for (slot = first_slot; slot < max_slots; slot++) {
		gpa = start_gpa + ((slot - first_slot) * slot_size);
		if (gpa + slot_size > max_gpa)
			break;

		if ((gpa - start_gpa) >= max_mem)
			break;

		vm_set_user_memory_region(vm, slot, 0, gpa, slot_size, mem);

#ifdef __x86_64__
		/* Identity map memory in the guest using 1gb pages. */
		for (i = 0; i < slot_size; i += SZ_1G)
			__virt_pg_map(vm, gpa + i, gpa + i, PG_LEVEL_1G);
#else
		for (i = 0; i < slot_size; i += vm->page_size)
			virt_pg_map(vm, gpa + i, gpa + i);
#endif
	}

	atomic_set(&rendezvous, nr_vcpus + 1);
	threads = spawn_workers(vm, vcpus, start_gpa, gpa);

	free(vcpus);
	vcpus = NULL;

	pr_info("Running with %lugb of guest memory and %u vCPUs\n",
		(gpa - start_gpa) / SZ_1G, nr_vcpus);

	rendezvous_with_vcpus(&time_start, "spawning");
	rendezvous_with_vcpus(&time_run1, "run 1");
	rendezvous_with_vcpus(&time_reset, "reset");
	rendezvous_with_vcpus(&time_run2, "run 2");

	time_run2  = timespec_sub(time_run2,   time_reset);
	time_reset = timespec_sub(time_reset, time_run1);
	time_run1  = timespec_sub(time_run1,   time_start);

	pr_info("run1 = %ld.%.9lds, reset = %ld.%.9lds, run2 =  %ld.%.9lds\n",
		time_run1.tv_sec, time_run1.tv_nsec,
		time_reset.tv_sec, time_reset.tv_nsec,
		time_run2.tv_sec, time_run2.tv_nsec);

	/*
	 * Delete even numbered slots (arbitrary) and unmap the first half of
	 * the backing (also arbitrary) to verify KVM correctly drops all
	 * references to the removed regions.
	 */
	for (slot = (slot - 1) & ~1ull; slot >= first_slot; slot -= 2)
		vm_set_user_memory_region(vm, slot, 0, 0, 0, NULL);

	munmap(mem, slot_size / 2);

	/* Sanity check that the vCPUs actually ran. */
	for (i = 0; i < nr_vcpus; i++)
		pthread_join(threads[i], NULL);

	/*
	 * Deliberately exit without deleting the remaining memslots or closing
	 * kvm_fd to test cleanup via mmu_notifier.release.
	 */
}


ENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 [[RES]])
// CHECK:       call {{.*}}void {{.*}} @__kmpc_fork_call(
// CHECK:       invoke{{.*}} [[INT_TY:i[0-9]+]] [[TMAIN_CHAR_5:@.+]]()
// CHECK:       invoke{{.*}} [[INT_TY]] [[TMAIN_S_1:@.+]]()
// CHECK:       call {{.*}} [[S_TY_DESTR:@.+]]([[S_TY]]* [[S_ADDR]])
// CHECK:       ret [[INT_TY]]
// CHECK:       }

// CHECK:       define{{.*}} [[INT_TY]] [[TMAIN_CHAR_5]]()
// CHECK:       [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEF_LOC_2]])
// CHECK:       call {{.*}}void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 5)
// CHECK:       call {{.*}}void {{.*}} @__kmpc_fork_call(
// CHECK:       call {{.*}}void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 23)
// CHECK:       call {{.*}}void {{.*}} @__kmpc_fork_call(
// CHECK:       ret [[INT_TY]] 0
// CHECK-NEXT:  }

// CHECK:       define{{.*}} [[INT_TY]] [[TMAIN_S_1]]()
// CHECK:       [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEF_LOC_2]])
// CHECK:       call {{.*}}void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 1)
// CHECK:       call {{.*}}void {{.*}} @__kmpc_fork_call(
// CHECK:       {{(invoke|call)}} {{.*}} [[S_TY_CONSTR]]([[S_TY]]* [[S_TEMP:%.+]], [[INTPTR_T_TY]] [[INTPTR_T_TY_ATTR]]23)
// CHECK:       [[S_CHAR_OP:%.+]] = invoke{{.*}} i8 [[S_TY_CHAR_OP]]([[S_TY]]* [[S_TEMP]])
// CHECK:       [[RES:%.+]] = sext {{.*}}i8 [[S_CHAR_OP]] to i32
// CHECK:       call {{.*}}void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 [[RES]])
// CHECK:       {{(invoke|call)}} {{.*}} [[S_TY_DESTR]]([[S_TY]]* [[S_TEMP]])
// CHECK:       call {{.*}}void {{.*}} @__kmpc_fork_call(
// CHECK:       ret [[INT_TY]] 0
// CHECK:       }

#endif
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized

// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized

void foo() {
}

#if __cplusplus >= 201103L
// expected-note@+2


s = 'x-table-layout-cell';
        if(c.cellCls){
            cls += ' ' + c.cellCls;
        }
        td.className = cls;
        if(c.colspan){
            td.colSpan = c.colspan;
        }
        if(c.rowspan){
            td.rowSpan = c.rowspan;
        }
        this.getRow(curRow).appendChild(td);
        return td;
    },

    // private
    getNextNonSpan: function(colIndex, rowIndex){
        var cols = this.columns;
        while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) {
            if(cols && colIndex >= cols){
                rowIndex++;
                colIndex = 0;
            }else{
                colIndex++;
            }
        }
        return [colIndex, rowIndex];
    },

    // private
    renderItem : function(c, position, target){
        // Ensure we have our inner table to get cells to render into.
        if(!this.table){
            this.table = target.createChild(
                Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true);
        }
        if(c && !c.rendered){
            c.render(this.getNextCell(c));
            this.configureItem(c);
        }else if(c && !this.isValidParent(c, target)){
            var container = this.getNextCell(c);
            container.insertBefore(c.getPositionEl().dom, null);
            c.container = Ext.get(container);
            this.configureItem(c);
        }
    },

    // private
    isValidParent : function(c, target){
        return c.getPositionEl().up('table', 5).dom.parentNode === (target.dom || target);
    },

    destroy: function(){
        delete this.table;
        Ext.layout.TableLayout.superclass.destroy.call(this);
    }

    /**
     * @property activeItem
     * @hide
     */
});

Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;/**
 * @class Ext.layout.AbsoluteLayout
 * @extends Ext.layout.AnchorLayout
 *
This is a layout that inherits the anchoring of {@link Ext.layout.AnchorLayout} and adds the
 * ability for x/y positioning using the standard x and y component config options.

 *
This class is intended to be extended or created via the <tt>{@link Ext.Container#layout layout}</tt>
 * configuration property.  See <tt>{@link Ext.Container#layout}</tt> for additional details.

 *
Example usage:

 *

var form = new Ext.form.FormPanel({
    title: 'Absolute Layout',
    layout:'absolute',
    layoutConfig: {
        // layout-specific configs go here
        extraCls: 'x-abs-layout-item',
    },
    baseCls: 'x-plain',
    url:'save-form.php',
    defaultType: 'textfield',
    items: [{
        x: 0,
        y: 5,
        xtype:'label',
        text: 'Send To:'
    },{
        x: 60,
        y: 0,
        name: 'to',
        anchor:'100%'  // anchor width by percentage
    },{
        x: 0,
        y: 35,
        xtype:'label',
        text: 'Subject:'
    },{
        x: 60,
        y: 30,
        name: 'subject',
        anchor: '100%'  // anchor width by percentage
    },{
        x:0,
        y: 60,
        xtype: 'textarea',
        name: 'msg',
        anchor: '100% 100%'  // anchor width and height
    }]
});

 */
Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {

    extraCls: 'x-abs-layout-item',


-push-1-2,
    .uk-push-2-4,
    .uk-push-3-6,
    .uk-push-5-10 { left: 50%; }

    /* Thirds */
    .uk-push-1-3,
    .uk-push-2-6 { left: 33.333%; }
    .uk-push-2-3,
    .uk-push-4-6 { left: 66.666%; }

    /* Quarters */
    .uk-push-1-4 { left: 25%; }
    .uk-push-3-4 { left: 75%; }

    /* Fifths */
    .uk-push-1-5,
    .uk-push-2-10 { left: 20%; }
    .uk-push-2-5,
    .uk-push-4-10 { left: 40%; }
    .uk-push-3-5,
    .uk-push-6-10 { left: 60%; }
    .uk-push-4-5,
    .uk-push-8-10 { left: 80%; }

    /* Sixths */
    .uk-push-1-6 { left: 16.666%; }
    .uk-push-5-6 { left: 83.333%; }

    /* Tenths */
    .uk-push-1-10 { left: 10%; }
    .uk-push-3-10 { left: 30%; }
    .uk-push-7-10 { left: 70%; }
    .uk-push-9-10 { left: 90%; }

    /*
     * Pull
     */

     /* Halves */
     .uk-pull-1-2,
     .uk-pull-2-4,
     .uk-pull-3-6,
     .uk-pull-5-10 { left: -50%; }

     /* Thirds */
     .uk-pull-1-3,
     .uk-pull-2-6 { left: -33.333%; }
     .uk-pull-2-3,
     .uk-pull-4-6 { left: -66.666%; }

     /* Quarters */
     .uk-pull-1-4 { left: -25%; }
     .uk-pull-3-4 { left: -75%; }

     /* Fifths */
     .uk-pull-1-5,
     .uk-pull-2-10 { left: -20%; }
     .uk-pull-2-5,
     .uk-pull-4-10 { left: -40%; }
     .uk-pull-3-5,
     .uk-pull-6-10 { left: -60%; }
     .uk-pull-4-5,
     .uk-pull-8-10 { left: -80%; }

     /* Sixths */
     .uk-pull-1-6 { left: -16.666%; }
     .uk-pull-5-6 { left: -83.333%; }

     /* Tenths */
     .uk-pull-1-10 { left: -10%; }
     .uk-pull-3-10 { left: -30%; }
     .uk-pull-7-10 { left: -70%; }
     .uk-pull-9-10 { left: -90%; }

}

// Hooks
// ========================================================================

.hook-grid-misc;

.hook-grid-misc() {}
// Name:            Form advanced
// Description:     Custom appearance of radio and checkbox buttons
//
// Component:       `uk-form`
//
// ========================================================================

// Variables
// ========================================================================

@form-advanced-size:                          14px;
@form-advanced-border:                        #aaa;
@form-advanced-border-width:                  1px;
@form-advanced-margin-top:                    -4px;
@form-advanced-color:                         transparent;

@form-advanced-checked-color:                 #00a8e6;

@form-advanced-radio-size:                    8px;

@form-advanced-checkbox-icon:                 "\f00c";
@form-advanced-checkbox-indeterminate-icon:   "\f068";
@form-advanced-checkbox-font-size:            12px;

@form-advanced-disabled-border:               #ddd;
@form-advanced-disabled-color:                #aaa;

/* ========================================================================
   Component: Form advanced
   Note: Only works in Webkit at the moment
 ====================================================


Enumerable<T>? y)
        {
            if (ReferenceEquals(x, y))
                return true;

            if (x == null || y == null)
                return false;

            // If either of the underlying collections is a set, then we want to respect whatever
            // is the equality comparer tha was specified.
            if (x is ISet<T> xSet)
                return xSet.SetEquals(y);

            if (y is ISet<T> ySet)
                return ySet.SetEquals(x);

            // Otherwise we go with our own.
            xSet = new HashSet<T>(x, EqualityComparer);
            return xSet.SetEquals(y);
        }

        public int GetHashCode(IEnumerable<T>? obj) => 0;
    }
}


import keras

from tests.utils import assert_allclose

def fn(x):
    return keras.ops.square(x)

def test_vjp():
    from bayesflow.utils import vjp

    inputs = keras.random.normal((16, 32))
    tangents = keras.ops.ones((16, 32))

    vjp_fn = vjp(fn, inputs)
    v = vjp_fn(tangents)

    assert keras.ops.shape(v) == (16, 32)
    assert_allclose(v, 2.0 * inputs)

def test_jvp():
    from bayesflow.utils import jvp

    inputs = keras.random.normal((16, 32))
    tangents = keras.ops.ones((16, 32))

    v = jvp(fn, inputs, tangents)

    assert keras.ops.shape(v) == (16, 32)
    assert_allclose(v, 2.0 * inputs)

def test_jacobian():
    from bayesflow.utils import jacobian

    inputs = keras.random.normal((16, 32))

    j = jacobian(fn, inputs)
    target = 2.0 * keras.ops.tile(keras.ops.expand_dims(inputs, axis=-1), (1, 1, 32)) * keras.ops.eye(32)

    assert keras.ops.shape(j) == (16, 32, 32)
    assert_allclose(j, target, atol=0.01, rtol=0.01)

def test_jacobian_trace():
    from bayesflow.utils import jacobian, jacobian_trace

    inputs = keras.random.normal((16, 128))

    # deterministic
    j = jacobian(fn, inputs)
    jt = jacobian_trace(fn, inputs)

    assert jt.shape == (16,)

    jt_target = keras.ops.trace(j, axis1=-2, axis2=-1)

    assert_allclose(jt, jt_target)

    # too few max_steps, uses the stochastic version
    jt = jacobian_trace(fn, inputs, max_steps=127)

    # this check is not reliable enough yet
    # assert_allclose(jt, jt_target, atol=0.01, rtol=0.01)


 image data (without X)
//  [SP+0] ... *remaining width
//  [SP+24] ... *wrap width

RenderPlane2_InLoop:

	// [5] load samples -> R5, R6
	ldrb	r5,[r2,#0]	// [2] load sample from plane 1
	ldrb	r6,[r2,r3]	// [2] load sample from plane 2
	adds	r2,#1		// [1] increase pointer

	// [5] compose samples HIGH -> R4
	lsrs	r4,r6,#4	// [1] isolate high 4 bits from sample 2
	lsls	r4,#8		// [1] shift left
	orrs	r4,r5		// [1] compose sample 2 with sample 1
	lsrs	r4,#4		// [1] isolate high 4 bits from sample 1
	lsls	r4,#2		// [1] 2 shifts to get index*4

	// [2] prepare first 4 pixels
	ldr	r4,[r7,r4]	// [2] load colors

	// [5] compose samples LOW -> R5
	lsls	r6,#28		// [1] isolate low 4 bits from sample 2
	lsrs	r6,#22		// [1] shift to bit position 6
	lsls	r5,#28		// [1] isolate low 4 bit from sample 1
	lsrs	r5,#26		// [1] shift to bit position 2
	orrs	r5,r6		// [1] compose samples

	// [5] write pixels
	ldr	r5,[r7,r5]	// [2] load colors
	stmia	r0!,{r4,r5}	// [3] write pixels

	// [2,3] loop counter
	subs	r1,#2		// [1] loop counter
	bhi	RenderPlane2_InLoop // [1,2] > 0, next step

// ---- end inner loop

RenderPlane2_EndLoop:

	// continue to outer loop
	ldr	r6,[sp,#24]	// load wrap width -> R6
	beq	RenderPlane2_Last // render 1st half of last 8-pixels
	mov	r2,lr		// get base pointer to image data -> R2
	b	RenderPlane2_OutLoop // go back to outer loop


local US_M2Gun_Truck = HGunTractor:New{
	name					= "Towed 105mm M2",
	corpse					= "USM5Tractor_Destroyed",
	trackOffset				= 10,
	trackWidth				= 15,
	customParams = {
		normaltex			= "unittextures/USM2Gun_Truck_normals.png",
	},
}

local US_M2Gun = HInfGun:New{
	name					= "105mm M2",
	corpse					= "USM2Gun_Destroyed",

	transportCapacity		= 3,
	transportMass			= 150,

	collisionVolumeType		= "box",
	collisionVolumeScales	= {15.0, 9.0, 2.0},
	collisionVolumeOffsets	= {0.0, 0.0, 0.0},

	weapons = {
		[1] = { -- HE
			name				= "M2HE",
		},
		[2] = { -- Smoke
			na


 {
	f.records = f.recordsProvider(f.query)
	f.matchesAll = nil
	for i, record := range f.records {
		f.matchesAll = append(f.matchesAll, fuzzy.Match{
			Str:   record,
			Index: i,
		})
	}
	f.markAsDirty()
}

func (f *FuzzyFind) isEventWritable(ev *tcell.EventKey) bool {
	return unicode.IsLetter(ev.Rune()) || unicode.IsSpace(ev.Rune()) || unicode.IsDigit(ev.Rune()) ||
		ev.Rune() == '-' || ev.Rune() == '"' || ev.Rune() == '\'' || ev.Rune() == '&' ||
		ev.Rune() == ';' || ev.Rune() == '|' || ev.Rune() == '>' || ev.Rune() == '<' || ev.Rune() == '=' ||
		ev.Rune() == '!' || ev.Rune() == '.'
}

func (f *FuzzyFind) markAsDirty() {
	f.dirty = true
	// it couples fuzzyFinder with app ... which is not nice,
	// but it's the easy way to make sure that app is re-rendered
	// whenever fuzzy search is updated. Another solution would be to
	// expose dirty channel from here... and handle it from every place
	// which is using fuzzy finder. Let's stick to that one for a time being...
	GetApp().RunOnAppRoutine(func() {
		GetApp().SetDirty()
	})
}

func contains(needle int, haystack []int) bool {
	for _, i := range haystack {
		if needle == i {
			return true
		}
	}
	return false
}

func findSelectedRecord(result string, records []string) int {
	// TODO - impl faster alg
	var index int
	for i := range records {
		if strings.TrimSpace(records[i]) == result || records[i] == result {
			index = i
			break
		}
	}
	return index
}
package issues

import (
	"fmt"
	"github.com/mk-5/fjira/internal/jira"
	"github.com/mk-5/fjira/internal/ui"
	"strings"
)

func BuildSearchIssuesJql(project *jira.Project, query string, status *jira.IssueStatus, user *jira.User, label string) string {
	jql := ""
	if project != nil && project.Id != ui.MessageAll {
		jql = jql + fmt.Sprintf("project=%s", project.Id)
	}
	orderBy := "ORDER BY status"
	query = strings.TrimSpace(query)
	if query != "" {
		jql = jql + fmt.Sprintf(" AND summary~\"%s*\"", query)
	}
	if status != nil && status.Name != ui.MessageAll {
		jql = jql + fmt.Sprintf(" AND status=%s", status.Id)
	}
	if user != nil && user.DisplayName != ui.MessageAll {
		userId := user.AccountId
		if userId == "" {
			userId = user.Name
		}
		jql = jql + fmt.Sprintf(" AND assignee=%s", userId)
	}
	// TODO - would be safer to check the index of inserted all message, instead of checking it like this / same for all All checks
	if label != "" && label != ui.MessageAll {
		jql = jql + fmt.Sprintf(" AND labels=%s", label)
	}
	if query != "" && issueRegExp.MatchString(query) {
		jql = jql + fmt.Sprintf(" OR issuekey=\"%s\"", query)
	}
	return fmt.Sprintf("%s %s", strings.TrimLeft(jql, " AND"), orderBy)
}
package issues

import (
	"bytes"
	"github.com/gdamore/tcell/v2"
	"github.com/mk-5/fjira/internal/app"
	"github.com/mk-5/fjira/internal/jira"
	assert2 "github.com/stretchr/testify/assert"
	"net/http"
	"strings"
	"testing"
	"time"
)

const jira


#ifndef _LIBAUDIOOUT_H_
#define _LIBAUDIOOUT_H_

typedef struct tagLibAudioOutFormat
{
    unsigned int formatType;
    unsigned int numChannels;
    unsigned int samplesPerSec;
    unsigned int bitsPerSample;
    unsigned int containerSize;
    unsigned int channelMask;
    unsigned int endianness;
	unsigned int buffersInQueue;
} LibAudioOutFormat;

typedef enum tagLibAudioOutStatus
{
	LibAudioOutStatusUnknown ,
	LibAudioOutStatusPlaying ,
	LibAudioOutStatusPaused ,
	LibAudioOutStatusStoped
}LibAudioOutStatus;
typedef void* LibAudioOutHandle;
typedef void* LibAudioOutBuffer;
typedef int ( *_LibAudioOutBufferCallback)(LibAudioOutHandle handle,void *usrDataCallback,
                                           void *usrDataBuffer, LibAudioOutBuffer buffer,int bufferSize,int bufferUsed);

#ifdef __cplusplus
extern "C"
{
#endif

LibAudioOutBuffer MYAPI LibAudioOutAllocBuffer(LibAudioOutHandle handle, int size);
void  MYAPI  LibAudioOutFreeBuffer(LibAudioOutHandle handle, LibAudioOutBuffer buffer);
void * MYAPI LibAudioOutLockBuffer(LibAudioOutBuffer buffer);

LibAudioOutHandle MYAPI LibAudioOutCreateOutput(const char *szDevName,LibAudioOutFormat *format,_LibAudioOutBufferCallback callback,
                                          void *usrDataCallback,void *callbackThread,unsigned int threadMode);
void MYAPI LibAudioOutClose(LibAudioOutHandle handle);
BOOL MYAPI LibAudioOutStart(LibAudioOutHandle handle);
BOOL MYAPI LibAudioOutStop(LibAudioOutHandle handle);
BOOL MYAPI LibAudioOutPause(LibAudioOutHandle handle);
BOOL MYAPI LibAudioOutEnqueue(LibAudioOutHandle handle,LibAudioOutBuffer audioData ,int audioDataSize,void *usrDataBuffer);
BOOL MYAPI LibAudioOutSetVolume(LibAudioOutHandle handle,int vol);
int MYAPI LibAudioOutGetVolume(LibAudioOutHandle handle);
LibAudioOutStatus MYAPI LibAudioOutPlayStatus(LibAudioOutHandle handle);

#ifdef __cplusplus
}
#endif

#endif


/*	$NetBSD: subr_interrupt.c,v 1.1 2015/08/17 06:16:03 knakahara Exp $	*/

/*
 * Copyright (c) 2015 Internet Initiative Japan Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_interrupt.c,v 1.1 2015/08/17 06:16:03 knakahara Exp $");

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/errno.h>
#include <sys/cpu.h>
#include <sys/interrupt.h>
#include <sys/intr.h>
#include <sys/kcpuset.h>
#include <sys/kmem.h>
#include <sys/proc.h>
#include <sys/xcall.h>
#include <sys/sysctl.h>

#include <sys/conf.h>
#include <sys/intrio.h>
#include <sys/kauth.h>

#include <machine/limits.h>

#ifdef INTR_DEBUG
#define DPRINTF(msg) printf msg
#else
#define DPRINTF(msg)
#endif

static struct intrio_set kintrio_set = { "\0", NULL, 0 };

#define UNSET_NOINTR_SHIELD	0
#define SET_NOINTR_SHIELD	1

static void
interrupt_shield_xcall(void *arg1, void *arg2)
{
	struct cpu_info *ci;
	struct schedstate_percpu *spc;
	int s, shield;

	ci = arg1;
	shield = (int)(intptr_t)arg2;
	spc = &ci->ci_schedstate;

	s = splsched();
	if (shield == UNSET_NOINTR_SHIELD)
		spc->spc_flags &= ~SPCF_NOINTR;
	else if (shield == SET_NOINTR_SHIELD)
		spc->spc_flags |= SPCF_NOINTR;
	splx(s);
}

/*
 * Change SPCF_NOINTR flag of schedstate_percpu->spc_flags.
 */
static int
interrupt_shield(u_int cpu_idx, int shield)
{
	struct cpu_info *ci;
	struct schedstate_percpu *spc;

	KASSERT(mutex_owned(&cpu_lock));

	ci = cpu_lookup(cpu_idx);
	if (ci == NULL)
		return EINVAL;

	spc = &ci->ci_schedstate;
	if (shield == UNSET_NOINTR_SHIELD) {
		if ((spc->spc_flags & SPCF_NOINTR) == 0)
			return 0;
	} else if (shield == SET_NOINTR_SHIELD) {
		if ((spc->spc_flags & SPCF_NOINTR) != 0)
			return 0;
	}

	if (ci == curcpu() || !mp_online) {
		interrupt_shield_xcall(ci, (void *)(intptr_t)shield);
	} else {
		uint64_t where;
		where = xc_unicast(0, interrupt_shield_xcall, ci,
			(void *)(intptr_t)shield, ci);
		xc_wait(where);
	}

	spc->spc_lastmod = time_second;
	return 0;
}

/*
 * Move all assigned interrupts from "cpu_idx" to the other cpu as possible.
 * The destination cpu is the lowest cpuid of available cpus.
 * If there are no available cpus, give up to move interrupts.
 */
static int
interrupt_avert_intr(u_int cpu_idx)
{
	kcpuset_t *cpuset;
	struct intrids_handler *ii_handler;
	intrid_t *ids;
	int error, i, nids;

	kcpuset_create(&cpuset, true);
	kcpuset_set(cpuset, cpu_idx);

	ii_handler = interrupt_construct_intrids(cpuset);
	if (ii_handler == NULL) {
		error = ENOMEM;
		goto out;
	}
	nids = ii_handler->iih_nids;
	if (nids == 0) {
		error = 0;
		goto destruct_out;
	}

	interrupt_get_available(cpuset);
	kcpuset_clear(cpuset, cpu_idx);
	if (kcpuset_iszero(cpuset)) {
		DPRINTF(("%s: no available cpu\n", __func__));
		error = ENOENT;
		goto destruct_out;
	}

	ids = ii_handler->iih_intrids;
	for (i = 0; i < nids; i++) {
		error = interrupt_distribute_handler(ids[i], cpuset, NULL);
		if (error)
			break;
	}

 destruct_out:
	interrupt_destruct_intrids(ii_handler);
 out:
	kcpuset_destroy(cpuset);
	return error;
}

/*
 * Return actual intrio_list_line size.
 * intrio_list_line size is variable by ncpu.
 */
static size_t
interrupt_intrio_


+ "(com.google.gwt.dom.client.Style.Unit.PX)", w.getInitializer());

    assertStatements(
        "fieldName.add(<g:Label id='able'>, \"@mockToken-" + ElementParserTester.FIELD_NAME
            + "-Remarkable\", true, 3);",
        "fieldName.add(<g:Label id='baker'>, " + "<g:Label id='custom'>, 3);");
  }

  public void testNoUnits() throws Exception {
    StringBuffer b = new StringBuffer();
    b.append("  <g:StackLayoutPanel>");
    b.append("  </g:StackLayoutPanel>");

    FieldWriter w = tester.parse(b.toString());
    assertEquals("new " + PARSED_TYPE
        + "(com.google.gwt.dom.client.Style.Unit.PX)", w.getInitializer());

    assertStatements();
  }

  private void assertStatements(String... expected) {
    Iterator<String> i = tester.writer.statements.iterator();
    for (String e : expected) {
      assertEquals(e, i.next());
    }
    assertFalse(i.hasNext());
    assertNull(tester.logger.died);
  }
}
/*
 * Copyright 2009 Google 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.
 */
package com.google.gwt.uibinder.rebind;

import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;

import com.google.gwt.core.ext.typeinfo.HasAnnotations;
import com.google.gwt.core.ext.typeinfo.HasTypeParameters;
import com.google.gwt.core.ext.typeinfo.JAbstractMethod;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.JConstructor;
import com.google.gwt.core.ext.typeinfo.JField;
import com.google.gwt.core.ext.typeinfo.JMethod;
import com.google.gwt.core.ext.typeinfo.JParameter;
import com.google.gwt.core.ext.typeinfo.JPrimitiveType;
import com.google.gwt.core.ext.typeinfo.JType;

import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.GenericDeclaration;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

/**
 * Creates stub adapters for GWT reflection using EasyMock.
 * This takes in a real java reflection class and returns a JClassType which
 * forwards all its method calls to the equivalent java reflection methods.
 *

 * Most reflections are done lazily (only when the method


 totalDelay < maxDelay)
                    paths.addAll(files.mapNotNull(::appSpecificVolumePath))
                } else {
                    // Primary physical SD-CARD (not emulated)
                    val rawExternalStorage = System.getenv("EXTERNAL_STORAGE") ?: ""

                    // Device has physical external storage; use plain paths.
                    if (TextUtils.isEmpty(rawExternalStorage)) {
                        // EXTERNAL_STORAGE undefined; falling back to default.
                        paths.addAll(physicalPaths)
                    } else {
                        paths.add(rawExternalStorage)
                    }
                }
            } else {
                // Device has emulated storage; external storage paths should have userId burned into them.
                // /storage/emulated/[0,1,2,...]/
                val path = getPrimaryVolumePath(context)
                val rawUserId = path.split(File.separator).lastOrNull(String::isNotEmpty)?.takeIf { it.isDigitsOnly() } ?: ""
                if (rawUserId.isEmpty()) {
                    paths.add(rawEmulatedStorageTarget)
                } else {
                    paths.add(rawEmulatedStorageTarget + File.separator + rawUserId)
                }
            }

            // All Secondary SD-CARDs (all exclude primary) separated by ":"
            System.getenv("SECONDARY_STORAGE")?.let { secondaryStorages ->
                paths.addAll(secondaryStorages.split(File.pathSeparator).filter { it.isNotEmpty() })
            }
        } catch (e: Exception) {
            Log.e(LOG_TAG, "failed to find volume paths", e)
        }

        return paths.map { ensureTrailingSeparator(it) }.toTypedArray()
    }

    // returns physicalPaths based on phone model
    @SuppressLint("SdCardPath")
    private val physicalPaths = arrayOf(
        "/storage/sdcard0",
        "/storage/sdcard1",                 //Motorola Xoom
        "/storage/extsdcard",               //Samsung SGS3
        "/storage/sdcard0/external_sdcard", //User request
        "/mnt/extsdcard",
        "/mnt/sdcard/external_sd",          //Samsung galaxy family
        "/mnt/external_sd",
        "/mnt/media_rw/sdcard1",            //4.4.2 on CyanogenMod S3
        "/removable/microsd",               //Asus transformer prime
        "/mnt/emmc",
        "/storage/external_SD",             //LG
        "/storage/ext_sd",                  //HTC One Max
        "/storage/removable/sdcard1",       //Sony Xperia Z1
        "/data/sdext",
        "/data/sdext2",
        "/data/sdext3",
        "/data/sdext4",
        "/sdcard1",                         //Sony Xperia Z
        "/sdcard2",                         //HTC One M8s
        "/storage/microsd"                  //ASUS ZenFone 2
    )

    /**
     * Volume tree URIs
     */

    // e.g.
    // /storage/emulated/0/         -> primary
    // /storage/10F9-3F13/Pictures/ -> 10F9-3F13
    // /storage/extSdCard/          -> 1234-5678 [Android 5.1.1, Samsung Galaxy Core Prime]
    private fun getVolumeUuidForDocumentUri(context: Context, anyPath: String): String? {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            val sm = context.getSystemService(Context.STORAGE_SERVICE) as? StorageManager
            sm?.getStorageVolume(File(anyPath))?.let { volume ->
                if (volume.isPrimary) {
                    return EXTERNAL_STORAGE_PRIMARY_EMULATED_ROOT_ID
                }
                volume.uuid?.let { uuid ->
                    return uuid.uppercase(Locale.ROOT)
                }
            }
        }

        // fallback for <N
        getVolumePath(context, anyPath)?.let { volumePath ->
            if (volumePath == getPrimaryVol


r implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.antonioleiva.bandhookkotlin.ui.entity.mapper

import com.antonioleiva.bandhookkotlin.domain.entity.Track
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test

class TrackDataMapperTest {

    lateinit var track: Track
    lateinit var tracks: List<Track>

    lateinit var trackDataMapper: TrackDataMapper

    @Before
    fun setUp() {

        track = Track("track name", 10)
        tracks = listOf(track, track)

        trackDataMapper = TrackDataMapper()
    }

    @Test
    fun testTransformTrack() {
        // When
        val transformedTrack = trackDataMapper.transform(1, track)

        // Then
        assertEquals(1, transformedTrack.number)
        assertEquals(track.name, transformedTrack.name)
        assertEquals(track.duration, transformedTrack.duration)
    }

    @Test
    fun testTransformTracks() {
        // When
        val transformedTracks = trackDataMapper.transform(tracks)

        // Then
        assertEquals(2, transformedTracks.size)
        assertEquals(track.name, transformedTracks[0].name)
        assertEquals(track.name, transformedTracks[1].name)
        assertEquals(track.duration, transformedTracks[0].duration)
        assertEquals(track.duration, transformedTracks[1].duration)
    }
}/*
 * Copyright (C) 2016 Alexey Verein
 *
 * 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.
 */

package com.antonioleiva.bandhookkotlin.data.mapper

import com.antonioleiva.bandhookkotlin.data.lastfm.model.*
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test

class AlbumMapperTest {

    lateinit var lastFmAlbum: LastFmAlbum
    lateinit var lastFmAlbumWithoutId: LastFmAlbum
    lateinit var lastFmAlbumWithoutImages: LastFmAlbum

    lateinit var lastFmAlbumDetail: LastFmAlbumDetail
    lateinit var lastFmAlbumDetailWithoutId: LastFmAlbumDetail

    lateinit var lastFmValidAlbums: List<LastFmAlbum>
    lateinit var lastFmInvalidAlbums: List<LastFmAlbum>
    lateinit var lastFmValidAndInvalidAlbums: List<LastFmAlbum>
    lateinit var lastFmEmptyAlbums: List<LastFmAlbum>

    lateinit var albumMapper: AlbumMapper

    private val albumName = "album name"
    private val albumMbid = "album mbid"
    private val albumUrl = "album url"
    private val artistName = "artist name"

    @Before
    fun setUp() {
        val lastFmArtist = LastFmArtist(artistName, "artist mbid", "artist url", emptyList(), null, null)
        val lastFmImages = listOf(LastFmImage("image url", LastFmImageType.MEGA.type))
        val lastFmTracklist = LastFmTracklist(listOf(LastFmTrack("track name", 10, null, null, lastFmArtist)))

        lastFmAlbum = LastFmAlbum(albumName, albumMbid, albumUrl,
                lastFmArtist, lastFmImages, lastFmTracklist)
        lastFmAlbumWithoutId = LastFmAlbum(albumName, null, albumUrl,
                lastFmArtist, lastFmImages, lastFmTracklist)
        lastFmAlbumWithoutImages = Last


OFIGNOREALWAYS']._serialized_start=836
  _globals['_REQUIREDPROTO2ONEOFIGNOREALWAYS']._serialized_end=919
  _globals['_REQUIREDPROTO2REPEATED']._serialized_start=921
  _globals['_REQUIREDPROTO2REPEATED']._serialized_end=971
  _globals['_REQUIREDPROTO2REPEATEDIGNOREALWAYS']._serialized_start=973
  _globals['_REQUIREDPROTO2REPEATEDIGNOREALWAYS']._serialized_end=1038
  _globals['_REQUIREDPROTO2MAP']._serialized_start=1041
  _globals['_REQUIREDPROTO2MAP']._serialized_end=1202
  _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_start=1148
  _globals['_REQUIREDPROTO2MAP_VALENTRY']._serialized_end=1202
  _globals['_REQUIREDPROTO2MAPIGNOREALWAYS']._serialized_start=1205
  _globals['_REQUIREDPROTO2MAPIGNOREALWAYS']._serialized_end=1393
  _globals['_REQUIREDPROTO2MAPIGNOREALWAYS_VALENTRY']._serialized_start=1148
  _globals['_REQUIREDPROTO2MAPIGNOREALWAYS_VALENTRY']._serialized_end=1202
# @@protoc_insertion_point(module_scope)


/*
 * Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holder nor the names of its contributors
 *    may be used to endorse or promote products derived from this software without
 *    specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */
/********************************************
 * ---------------------
 * Signature
 * ---------------------
 * void vrda_exp(int length, double *input, double *result)
 *
 * vrda_exp() computes the exp values for 'length' number of elements
 * present in the 'input' array.
 * The corresponding ouput is stored in the 'result' array.
 *
 * ---------------------
 * Implementation Notes
 * ---------------------
 *
 * For any given length,
 *     If length is greater than 4:
 *         Pack 4 elements of input array into a 256-bit register
 *             call vrd4_exp()
 *         Store the output into result array.
 *         Repeat
 *
 *         For the remaining element/s,
 *         Pack the last 4 elements of input array into a 256-bit register,
 *             call vrd4_exp()
 *         Store the output into result array.
 *     Return
 *
 *     If length is lesser than 4:
 *         Pack the elements of input array into a 256-bit register
 *         Mask the inputs which are not needed to be computed with a 0.
 *             call vrd4_exp()
 *         Store the output of unmasked elements into result array.
 * Return
 */
#include <libm_macros.h>
#include <immintrin.h>
#include <libm/amd_funcs_internal.h>
#include <libm_util_amd.h>
void ALM_PROTO_OPT(vrda_exp)(int length, double *input, double *result)
{
    int j = 0;
    if(likely(length >= DOUBLE_ELEMENTS_256_BIT))
    {
        for (j = 0; j <= length - DOUBLE_ELEMENTS_256_BIT; j += DOUBLE_ELEMENTS_256_BIT)
        {
            __m256d ip4 = _mm256_loadu_pd(&input[j]);
            __m256d op4 = ALM_PROTO(vrd4_exp)(ip4);
            _mm256_storeu_pd(&result[j], op4);
        }
        if (length - j)
        {
            __m256d ip4 = _mm256_loadu_pd(&input[length - DOUBLE_ELEMENTS_256_BIT]);
            __m256d op4 = ALM_PROTO(vrd4_exp)(ip4);
            _mm256_storeu_pd(&result[length - DOUBLE_ELEMENTS_256_BIT], op4);
        }
        return;
    }
    __m256i mask = GET_MASK_DOUBLE_256_BIT(length);
    __m256d ip4 = _mm256_maskload_pd(&input[j], mask);
    __m256d op4 = ALM_PROTO(vrd4_exp)(ip4);
    _mm256_maskstore_pd(&result[j], mask, op4);
}


F2C4438FB7F001F89F3CF9CE9D6508F37FD488FC82D57D09A259C48CD3C8515A7D70E4543355E4BB1BEE1860532646BAD6A62057B67BD2D61976E49BAB1DE6B89C4DF5E31FDE999F2C3F7854AC968087F56FA9BA",
            "testPassed": false
          },
          {
            "tcId": 87,
            "qx": "8C1AA7ACF45E10BBF32A0802FC8B807CBA0F6687E47AFCF00C13FA4C",
            "qy": "CD5024A1675572FC6B9D3CAD21A41D2B6699BFB4EB0A13805A76BD71",
            "r": "CF37F406B12B414970177C8DD16DEAF7415A282614B9C055B1BB7633",
            "s": "C75E289DD368731E6D34A518E2D83E4F1795D1C470E63AEF8F01E5E4",
            "message": "2AC292CCE4865151EC2D51F31A6F1F20E5F7634392CC48544F0B6C9557E7E865C0B20C0C8C51CA1F835FDE2A6B040BCF0B6CCA72593B3A36CF1E1EAEA5D5B0CA57BCF7253E2B8DB069BC7ECD0317736EBA126A08B13F22B8D84A38190233DC012CE142DF72C5E276757CB27BF31280073720E282D7DDAB9A9C6AEB20A1022C1C",
            "testPassed": true
          },
          {
            "tcId": 88,
            "qx": "4E12B8413F076B93D59156786237005E9C3F98150B3D9D27C8130371",
            "qy": "D510D8C337E600D57E31A9B505A67AAC4B0769464790289526F2451C",
            "r": "9F68084E8AA576C394959883ECEDF4CD5B1A98B7D2B088E355C680B7",
            "s": "B4B62FA9CF54FE6D16C1B5F32BDC3140339E876AA02B0ACD0FD8F78F",
            "message": "7FB9F8F9F44C4C27197CE8EDECB90FC05D820B6F598AC58CC2FF9A8D0A1899E2D8ACCD3FE251B4C88046F5BED536F129E95124E7E95FB64DF8DB4AA914CC6E0F3BBE23DDE3F8118169F5CF0FD7BD670CA8AF5A7927D4A1FC8AB037F4D21EBD5056CC7C3D429AD843CB4BBB8A5C40FE30CF1DC7D21DC4DCB7FC6678BB3CDCCD24",
            "testPassed": false
          },
          {
            "tcId": 89,
            "qx": "09D91FD5622B287E832A84036267795E2D6E4BEE34D30F37B4F5A6E7",
            "qy": "E2589F6B958CEC9A641A2426055EFAB7F21C0F8C53640A748769A586",
            "r": "D4DCAE87F5ADD0D7C90B8CCEB49A2CA12CE3DD2CD9B4BD793F528FF8",
            "s": "B3067D418E3BB768CEE48C968AFE47E2AE55C319176FB7A7BC37


[0])
	cli.Output(templateFor(T_DEPLOYMENT_ID, v), e)
	waitForDeploymentIfFlagged(cmd, v.DeploymentID)
}

func scaleApp(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(Usage(cmd), args, 2) {
		os.Exit(1)
	}

	instances, err := strconv.Atoi(args[1])
	if err != nil {
		cli.Output(nil, err)
		os.Exit(1)
	}
	v, e := client(cmd).ScaleApplication(args[0], instances)
	cli.Output(templateFor(T_DEPLOYMENT_ID, v), e)
	waitForDeploymentIfFlagged(cmd, v.DeploymentID)
}

func pauseApp(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(Usage(cmd), args, 1) {
		os.Exit(1)
	}

	v, e := client(cmd).PauseApplication(args[0])
	cli.Output(templateFor(T_DEPLOYMENT_ID, v), e)
	waitForDeploymentIfFlagged(cmd, v.DeploymentID)
}

func updateAppCPU(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(Usage(cmd), args, 2) {
		os.Exit(1)
	}

	wait, _ := cmd.Flags().GetBool(WAIT_FLAG)
	cpu, err := strconv.ParseFloat(args[1], 64)

	if err != nil {
		cli.Output(nil, err)
		os.Exit(1)
	}
	update := marathon.NewApplication(args[0]).CPU(cpu)
	v, e := client(cmd).UpdateApplication(update, wait, false)
	cli.Output(templateFor(T_APPLICATION, v), e)
}

func updateAppMemory(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(Usage(cmd), args, 2) {
		os.Exit(1)
	}

	wait, _ := cmd.Flags().GetBool(WAIT_FLAG)
	mem, err := strconv.ParseFloat(args[1], 64)

	if err != nil {
		cli.Output(nil, err)
		os.Exit(1)
	}
	update := marathon.NewApplication(args[0]).Memory(mem)
	v, e := client(cmd).UpdateApplication(update, wait, false)
	cli.Output(templateFor(T_APPLICATION, v), e)
}

func rollbackAppVersion(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(Usage(cmd), args, 1) {
		os.Exit(1)
	}

	wait, _ := cmd.Flags().GetBool(WAIT_FLAG)
	version := ""

	if len(args) > 1 {
		version = args[1]
	} else {
		versions, e := client(cmd).ListVersions(args[0])
		if e == nil && len(versions.Versions) > 1 {
			version = versions.Versions[1]
		}
	}
	update := marathon.NewApplication(args[0]).RollbackVersion(version)
	v, e := client(cmd).UpdateApplication(update, wait, false)
	cli.Output(templateFor(T_APPLICATION, v), e)
}

func convertFile(cmd *cobra.Command, args []string) {
	if cli.EvalPrintUsage(Usage(cmd), args, 2) {
		os.Exit(1)
	}
	if err := encoding.ConvertFile(args[0], args[1], &marathon.Application{}); err != nil {
		cli.Output(nil, err)
		os.Exit(1)
	}
	fmt.Printf("Source file %s has been re-written into new format in %s\n\n", args[0], args[1])
}

func waitForDeploymentIfFlagged(cmd *cobra.Command, depId string) {
	if found, err := cmd.Flags().GetBool(WAIT_FLAG); err == nil && found {
		client(cmd).WaitForDeployment(depI


 effect);
    cleanup = effect.onStop = () => {
      const cleanups = cleanupMap.get(effect);
      if (cleanups) {
        if (call) {
          call(cleanups, 4);
        } else {
          for (const cleanup2 of cleanups) cleanup2();
        }
        cleanupMap.delete(effect);
      }
    };
    {
      effect.onTrack = options.onTrack;
      effect.onTrigger = options.onTrigger;
    }
    if (cb) {
      if (immediate) {
        job(true);
      } else {
        oldValue = effect.run();
      }
    } else if (scheduler) {
      scheduler(job.bind(null, true), true);
    } else {
      effect.run();
    }
    watchHandle.pause = effect.pause.bind(effect);
    watchHandle.resume = effect.resume.bind(effect);
    watchHandle.stop = watchHandle;
    return watchHandle;
  }
  function traverse(value, depth = Infinity, seen) {
    if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
      return value;
    }
    seen = seen || /* @__PURE__ */ new Set();
    if (seen.has(value)) {
      return value;
    }
    seen.add(value);
    depth--;
    if (isRef(value)) {
      traverse(value.value, depth, seen);
    } else if (isArray(value)) {
      for (let i = 0; i < value.length; i++) {
        traverse(value[i], depth, seen);
      }
    } else if (isSet(value) || isMap(value)) {
      value.forEach((v) => {
        traverse(v, depth, seen);
      });
    } else if (isPlainObject(value)) {
      for (const key in value) {
        traverse(value[key], depth, seen);
      }
      for (const key of Object.getOwnPropertySymbols(value)) {
        if (Object.prototype.propertyIsEnumerable.call(value, key)) {
          traverse(value[key], depth, seen);
        }
      }
    }
    return value;
  }

  const stack$1 = [];
  function pushWarningContext(vnode) {
    stack$1.push(vnode);
  }
  function popWarningContext() {
    stack$1.pop();
  }
  let isWarning = false;
  function warn$1(msg, ...args) {
    if (isWarning) return;
    isWarning = true;
    pauseTracking();
    const instance = stack$1.length
      ? stack$1[stack$1.length - 1].component
      : null;
    const appWarnHandler = instance && instance.appContext.config.warnHandler;
    const trace = getComponentTrace();
    if (appWarnHandler) {
      callWithErrorHandling(appWarnHandler, instance, 11, [
        // eslint-disable-next-line no-restricted-syntax
        msg +
          args
            .map((a) => {
              var _a, _b;
              return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) !=
                null
                ? _b
                : JSON.stringify(a);
            })
            .join(""),
        instance && instance.proxy,
        trace
          .map(
            ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
          )
          .join("\n"),
        trace,
      ]);
    } else {
      const warnArgs = [`[Vue warn]: ${msg}`, ...args];
      if (
        trace.length && // avoid spamming console during tests
        true
      ) {
        warnArgs.push(
          `
  `,
          ...formatTrace(trace)
        );