cd,0xd1,0x01,0x05,0xfa,0x01]

v_lerp_u8 v5, v1, v2, exec_hi
// CHECK: [0x05,0x00,0xcd,0xd1,0x01,0x05,0xfe,0x01]

v_lerp_u8 v5, v1, v2, 0
// CHECK: [0x05,0x00,0xcd,0xd1,0x01,0x05,0x02,0x02]

v_lerp_u8 v5, v1, v2, -1
// CHECK: [0x05,0x00,0xcd,0xd1,0x01,0x05,0x06,0x03]

v_lerp_u8 v5, v1, v2, 0.5
// CHECK: [0x05,0x00,0xcd,0xd1,0x01,0x05,0xc2,0x03]

v_lerp_u8 v5, v1, v2, -4.0
// CHECK: [0x05,0x00,0xcd,0xd1,0x01,0x05,0xde,0x03]

v_alignbit_b32 v5, v1, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x01,0x05,0x0e,0x04]

v_alignbit_b32 v255, v1, v2, v3
// CHECK: [0xff,0x00,0xce,0xd1,0x01,0x05,0x0e,0x04]

v_alignbit_b32 v5, v255, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0xff,0x05,0x0e,0x04]

v_alignbit_b32 v5, s1, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x01,0x04,0x0e,0x04]

v_alignbit_b32 v5, s101, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x65,0x04,0x0e,0x04]

v_alignbit_b32 v5, flat_scratch_lo, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x66,0x04,0x0e,0x04]

v_alignbit_b32 v5, flat_scratch_hi, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x67,0x04,0x0e,0x04]

v_alignbit_b32 v5, vcc_lo, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x6a,0x04,0x0e,0x04]

v_alignbit_b32 v5, vcc_hi, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x6b,0x04,0x0e,0x04]

v_alignbit_b32 v5, tba_lo, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x6c,0x04,0x0e,0x04]

v_alignbit_b32 v5, tba_hi, v2, v3
// CHECK: [0x05,0x00,0xce,0xd1,0x6d,0x04,0x0e,0x04]

v_alignbit_b32 v5, tma_lo, v2, v3
// CHECK: [0x05,0x00,0xce


,
					data: {},
					handles: {}
				};

				var _press = lang.hitch(this, "_process", element, "press");
				var _move = lang.hitch(this, "_process", element, "move");
				var _release = lang.hitch(this, "_process", element, "release");
				var _cancel = lang.hitch(this, "_process", element, "cancel");

				var handles = element.handles;
				if(this.touchOnly){
					handles.press = on(node, 'touchstart', _press);
					handles.move = on(node, 'touchmove', _move);
					handles.release = on(node, 'touchend', _release);
					handles.cancel = on(node, 'touchcancel', _cancel);
				}else{
					handles.press = touch.press(node, _press);
					handles.move = touch.move(node, _move);
					handles.release = touch.release(node, _release);
					handles.cancel = touch.cancel(node, _cancel);
				}
				this._elements.push(element);
			}
			// track num of listeners for the gesture event - type
			// so that we can release element if no more gestures being monitored
			element.handles[type] = !element.handles[type] ? 1 : ++element.handles[type];

			return on(node, type, listener); //handle
		},
		_getGestureElement: function(/*Dom*/node){
			// summary:
			//		Obtain a gesture element for the give node
			var i = 0, element;
			for(; i < this._elements.length; i++){
				element = this._elements[i];
				if(element.target === node){
					return element;
				}
			}
		},
		_process: function(element, phase, e){
			// summary:
			//		Process and dispatch to appropriate phase handlers.
			//		Also provides the machinery for managing gesture bubbling.
			// description:
			//		1. e._locking is used to make sure only the most inner node
			//		will be processed for the same gesture, suppose we have:
			//	|	on(inner, dojox.gesture.tap, func1);
			//	|	on(outer, dojox.gesture.tap, func2);
			//		only the inner node will be processed by tap gesture, once matched,
			//		the 'tap' event will be bubbled up from inner to outer, dojo.StopEvent(e)
			//		can be used at any level to stop the 'tap' event.
			//
			//		2. Once a node starts being processed, all it's descendant nodes will be locked.
			//		The same gesture won't be processed on its descendant nodes until the lock is released.
			// element: Object
			//		Gesture element
			// phase: String
			//		Phase of a gesture to be processed, might be 'press'|'move'|'release'|'cancel'
			// e: Event
			//		Native event
			e._locking = e._locking || {};
			if(e._locking[this.defaultEvent] || this.isLocked(e.currentTarget)){
				return;
			}
			// invoking gesture.press()|move()|release()|cancel()
			// #16900: same condition as in dojo/touch, to avoid breaking the editing of input fields.
			if((e.target.tagName != "INPUT" || e.target.type == "radio" || e.target.type == "checkbox")
				&& e.target.tagName != "TEXTAREA"){
				e.preventDefault();
			}
			e._locking[this.defaultEvent] = true;
			this[phase](element.data, e);
		},
		press: function(data, e){
			// summary:
			//		Process the 'press' phase of a gesture
		},
		move: function(data, e){
			// summary:
			//		Process the


// TODO queryParams
      headers: headers,
      payload: {
        'relationalDatabaseName': relationalDatabaseName,
        if (availabilityZone != null) 'availabilityZone': availabilityZone,
        if (publiclyAccessible != null)
          'publiclyAccessible': publiclyAccessible,
        if (relationalDatabaseBundleId != null)
          'relationalDatabaseBundleId': relationalDatabaseBundleId,
        if (relationalDatabaseSnapshotName != null)
          'relationalDatabaseSnapshotName': relationalDatabaseSnapshotName,
        if (restoreTime != null)
          'restoreTime': unixTimestampToJson(restoreTime),
        if (sourceRelationalDatabaseName != null)
          'sourceRelationalDatabaseName': sourceRelationalDatabaseName,
        if (tags != null) 'tags': tags,
        if (useLatestRestorableTime != null)
          'useLatestRestorableTime': useLatestRestorableTime,
      },
    );

    return CreateRelationalDatabaseFromSnapshotResult.fromJson(
        jsonResponse.body);
  }

  /// Creates a snapshot of your database in Amazon Lightsail. You can use
  /// snapshots for backups, to make copies of a database, and to save data
  /// before deleting a database.
  ///
  /// The create relational database snapshot operation supports
  /// tag-based access control via request tags. For more information, see the
  /// Amazon
  /// Lightsail Developer Guide.
  ///
  /// May throw [ServiceException].
  /// May throw [InvalidInputException].
  /// May throw [NotFoundException].
  /// May throw [OperationFailureException].
  /// May throw [AccessDeniedException].
  /// May throw [AccountSetupInProgressException].
  /// May throw [UnauthenticatedException].
  ///
  /// Parameter [relationalDatabaseName] :
  /// The name of the database on which to base your new snapshot.
  ///
  /// Parameter [relationalDatabaseSnapshotName] :
  /// The name for your new database snapshot.
  ///
  /// Constraints:
  ///
  ///

  ///

  /// Must contain from 2 to 255 alphanumeric characters, or hyphens.
  ///

  ///

  /// The first and last character must be a letter or number.
  ///

  ///

  ///
  /// Parameter [tags] :
  /// The tag keys and optional values to add to the resource during create.
  ///
  /// Use the TagResource action to tag a resource after it's
  /// created.
  Future<CreateRelationalDatabaseSnapshotResult>
      createRelationalDatabaseSnapshot({
    required String relationalDatabaseName,
    required String relationalDatabaseSnapshotName,
    List<Tag>? tags,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.1',
      'X-Amz-Target': 'Lightsail_20161128.CreateRelationalDatabaseSnapshot'
    };
    final jsonResponse = await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        'relationalDatabaseName': relationalDatabaseName,
        'relationalDatabaseSnapshotName': relationalDatabaseSnapshotName,
        if (tags != null) 'tags': tags,
      },
    );

    return CreateRelationalDatabaseSnapshotResult.fromJson(jsonResponse.body);
  }

  /// Deletes an alarm.
  ///
  /// An alarm is used to monitor a single metric for one of your resources.
  /// When a metric condition is met, the alarm can notify you by email, SMS
  /// text message, and a banner displayed on the Amazon Lightsail console. For
  /// more information,


y(_remoteBook, null).Accepted.Should().BeTrue();
        }

        [Test]
        public void should_return_true_if_flac()
        {
            WithContainer("FLAC");
            Subject.IsSatisfiedBy(_remoteBook, null).Accepted.Should().BeTrue();
        }

        [Test]
        public void should_return_false_if_vob()
        {
            WithContainer("VOB");
            Subject.IsSatisfiedBy(_remoteBook, null).Accepted.Should().BeFalse();
        }

        [Test]
        public void should_return_false_if_iso()
        {
            WithContainer("ISO");
            Subject.IsSatisfiedBy(_remoteBook, null).Accepted.Should().BeFalse();
        }

        [Test]
        public void should_compare_case_insensitive()
        {
            WithContainer("vob");
            Subject.IsSatisfiedBy(_remoteBook, null).Accepted.Should().BeFalse();
        }
    }
}


HTSPOT_MEDIUM = 402,
	LIGHTSPOT_DARK = 403,
	LIGHTSPOT_SUPERDARK = 404,

	-- ai will not throw grenades near this anchor (not to damage it)
	-- the anchor radius used for distance check
	NOGRENADE_SPOT = 405,	-- used in C++ code too!

	-- do not use as anchor!
	REINFORCEMENT_SPOT = 400,	-- used in C++ code too!

	--FOLLOW_AREA = 801,
	--FOLLOW_PATH = 802,

	INTEREST_SYSTEM_SPOT = 803,

	SCORCHER_SCORCH = 900, -- Interresting positions for scorcher to scorch when idling or to guess where an enemy might be hiding behind.
	GRASS_HIDESPOT = 901,
	HEAVY_ADVANTAGE_POINT = 902,
	SCORCHER_CHOKE = 903, -- A choke-point that the scorcher could block with a 'fire-wall' to prevent an enemy from escaping via the flanks.
	GRENADIER_SPOT = 904, -- A good point to use ranged weapons like LTAG, JAW, ...
	-- DEER_SPOT = 905, -- A position where the deer can run to
}


// Author: Ming Zhang
// Copyright (c) 2022

#pragma once

#include <memory>

#include "dtx/dtx.h"
#include "tatp/tatp_db.h"

/******************** The business logic (Transaction) start ********************/

// Read 1 SUBSCRIBER row
bool TxGetSubsciberData(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

// 1. Read 1 SPECIAL_FACILITY row
// 2. Read up to 3 CALL_FORWARDING rows
// 3. Validate up to 4 rows
bool TxGetNewDestination(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

// Read 1 ACCESS_INFO row
bool TxGetAccessData(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

// Update 1 SUBSCRIBER row and 1 SPECIAL_FACILTY row
bool TxUpdateSubscriberData(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

// 1. Read a SECONDARY_SUBSCRIBER row
// 2. Update a SUBSCRIBER row
bool TxUpdateLocation(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

// 1. Read a SECONDARY_SUBSCRIBER row
// 2. Read a SPECIAL_FACILTY row
// 3. Insert a CALL_FORWARDING row
bool TxInsertCallForwarding(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

// 1. Read a SECONDARY_SUBSCRIBER row
// 2. Delete a CALL_FORWARDING row
bool TxDeleteCallForwarding(TATP* tatp_client, uint64_t* seed, coro_yield_t& yield, tx_id_t tx_id, DTX* dtx);

/******************** The business logic (Transaction) end ********************/