import Postbox
import UIKit
import TelegramCore
import SyncCore
import SwiftSignalKit
import Display
import TelegramPresentationData
import MergeLists

enum ChatMediaInputGridEntryStableId: Equatable, Hashable {
    case search
    case peerSpecificSetup
    case sticker(ItemCollectionId, ItemCollectionItemIndex.Id)
    case trending(ItemCollectionId)
}

enum ChatMediaInputGridEntryIndex: Equatable, Comparable {
    case search
    case peerSpecificSetup(dismissed: Bool)
    case collectionIndex(ItemCollectionViewEntryIndex)
    case trending(ItemCollectionId, Int)

    var stableId: ChatMediaInputGridEntryStableId {
        switch self {
        case .search:
            return .search
        case .peerSpecificSetup:
            return .peerSpecificSetup
        case let .collectionIndex(index):
            return .sticker(index.collectionId, index.itemIndex.id)
        case let .trending(id, index):
            return .trending(id)
        }
    }

    static func <(lhs: ChatMediaInputGridEntryIndex, rhs: ChatMediaInputGridEntryIndex) -> Bool {
        switch lhs {
        case .search:
            if case .search = rhs {
                return false
            } else {
                return true
            }
        case let .peerSpecificSetup(lhsDismissed):
            switch rhs {
            case .search, .peerSpecificSetup:
                return false
            case let .collectionIndex(index):
                if lhsDismissed {
                    return false
                } else {
                    if index.collectionId.id == 0 {
                        return false
                    } else {
                        return true
                    }
                }
            case .trending:
                return true
            }
        case let .collectionIndex(lhsIndex):
            switch rhs {
            case .search:
                return false
            case let .peerSpecificSetup(dismissed):
                if dismissed {
                    return true
                } else {
                    return false
                }
            case let .collectionIndex(rhsIndex):
                return lhsIndex < rhsIndex
            case .trending:
                return true
            }
        case let .trending(_, lhsIndex):
            switch rhs {
            case .search, .peerSpecificSetup, .collectionIndex:
                return false
            case let .trending(_, rhsIndex):
                return lhsIndex < rhsIndex
            }
        }
    }
}

enum ChatMediaInputGridEntry: Equatable, Comparable, Identifiable {
    case search(theme: PresentationTheme, strings: PresentationStrings)
    case peerSpecificSetup(theme: PresentationTheme, strings: PresentationStrings, dismissed: Bool)
    case sticker(index: ItemCollectionViewEntryIndex, stickerItem: StickerPackItem, stickerPackInfo: StickerPackCollectionInfo?, canManagePeerSpecificPack: Bool?, maybeManageable: Bool, theme: PresentationTheme)
    case trending(TrendingPanePackEntry)

    var index: ChatMediaInputGridEntryIndex {
        switch self {
        case .search:
            return .search
        case let .peerSpecificSetup(_, _, dismissed):
            return .peerSpecificSetup(dismissed: dismissed)
        case let .sticker(index, _, _, _, _, _):
            return .collectionIndex(index)
        case let .trending(entry):
            return .trending(entry.info.id, entry.index)
        }
    }

    var stableId: ChatMediaInputGridEntryStableId {
        return self.index.stableId
    }

    static func ==(lhs: ChatMediaInputGridEntry, rhs: ChatMediaInputGridEntry) -> Bool {
        switch lhs {
        case let .search(lhsTheme, lhsStrings):
            if case let .search(rhsTheme, rhsStrings) = rhs {
                if lhsTheme !== rhsTheme {
                    return false
                }
                if lhsStrings !== rhsStrings {
                    return false
                }
                return true
            } else {
                return false
            }
        case let .peerSpecificSetup(lhsTheme, lhsStrings, lhsDismissed):
            if case let .peerSpecificSetup(rhsTheme, rhsStrings, rhsDismissed) = rhs, lhsTheme === rhsTheme, lhsStrings === rhsStrings, lhsDismissed == rhsDismissed {
                return true
            } else {
                return false
            }
        case let .sticker(lhsIndex, lhsStickerItem, lhsStickerPackInfo, lhsCanManagePeerSpecificPack, lhsMaybeManageable, lhsTheme):
            if case let .sticker(rhsIndex, rhsStickerItem, rhsStickerPackInfo, rhsCanManagePeerSpecificPack, rhsMaybeManageable, rhsTheme) = rhs {
                if lhsIndex != rhsIndex {
                    return false
                }
                if lhsStickerItem != rhsStickerItem {
                    return false
                }
                if lhsStickerPackInfo != rhsStickerPackInfo {
                    return false
                }
                if lhsCanManagePeerSpecificPack != rhsCanManagePeerSpecificPack {
                    return false
                }
                if lhsMaybeManageable != rhsMaybeManageable {
                    return false
                }
                if lhsTheme !== rhsTheme {
                    return false
                }
                return true
            } else {
                return false
            }
        case let .trending(entry):
            if case .trending(entry) = rhs {
                return true
            } else {
                return false
            }
        }
    }

    static func <(lhs: ChatMediaInputGridEntry, rhs: ChatMediaInputGridEntry) -> Bool {
        return lhs.index < rhs.index
    }

    func item(account: Account, interfaceInteraction: ChatControllerInteraction, inputNodeInteraction: ChatMediaInputNodeInteraction, trendingInteraction: TrendingPaneInteraction) -> GridItem {
        switch self {
        case let .search(theme, strings):
            return PaneSearchBarPlaceholderItem(theme: theme, strings: strings, type: .stickers, activate: {
                inputNodeInteraction.toggleSearch(true, .sticker, "")
            })
        case let .peerSpecificSetup(theme, strings, dismissed):
            return StickerPanePeerSpecificSetupGridItem(theme: theme, strings: strings, setup: {
                inputNodeInteraction.openPeerSpecificSettings()
            }, dismiss: dismissed ? nil : {
                inputNodeInteraction.dismissPeerSpecificSettings()
            })
        case let .sticker(index, stickerItem, stickerPackInfo, canManagePeerSpecificPack, maybeManageable, theme):
            return ChatMediaInputStickerGridItem(account: account, collectionId: index.collectionId, stickerPackInfo: stickerPackInfo, index: index, stickerItem: stickerItem, canManagePeerSpecificPack: canManagePeerSpecificPack, interfaceInteraction: interfaceInteraction, inputNodeInteraction: inputNodeInteraction, hasAccessory: maybeManageable, theme: theme, selected: {  })
        case let .trending(entry):
            return entry.item(account: account, interaction: trendingInteraction, grid: false)
        }
    }
}

{'repo_name': 'TelegramMessenger/Telegram-iOS', 'stars': '1614', 'repo_language': 'Swift', 'file_name': 'prepare_buck_source.sh', 'mime_type': 'text/x-shellscript', 'hash': 7895290737963373071, 'source_dataset': 'data'}


<!DOCTYPE HTML>
<html>
<head>
<title>Test to ensure left/right and start/end are offset by text width for rtl text</title>
</head>
<body>
<canvas id="c" width="128" height="64" style="direction:rtl"></canvas>
<script type="text/javascript">
  var canvas = document.getElementById('c');
  var ctx = canvas.getContext('2d');

  ctx.fillStyle = 'black';
  ctx.font = '20px sans-serif';
  ctx.textBaseline = 'top';

  var str = 'TEXT';
  var wid = ctx.measureText(str).width;

  ctx.textAlign = 'left';
  ctx.fillText(str, 64, 0);
  ctx.textAlign = 'start';
  ctx.fillText(str, 64, 20);
  ctx.textAlign = 'center';
  ctx.fillText(str, 64, 40);

</script>
</body>
</html>

{'repo_name': 'ricardoquesada/Spidermonkey', 'stars': '201', 'repo_language': 'C++', 'file_name': 'panelUI.css', 'mime_type': 'text/plain', 'hash': 4815443396395935461, 'source_dataset': 'data'}


/*
 * Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hazelcast.client.impl.protocol.task.queue;

import com.hazelcast.client.impl.protocol.ClientMessage;
import com.hazelcast.client.impl.protocol.codec.QueueRemainingCapacityCodec;
import com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask;
import com.hazelcast.collection.impl.queue.QueueService;
import com.hazelcast.collection.impl.queue.operations.RemainingCapacityOperation;
import com.hazelcast.instance.impl.Node;
import com.hazelcast.internal.nio.Connection;
import com.hazelcast.security.permission.ActionConstants;
import com.hazelcast.security.permission.QueuePermission;
import com.hazelcast.spi.impl.operationservice.Operation;

import java.security.Permission;

/**
 * Client Protocol Task for handling messages with type ID:
 * {@link com.hazelcast.client.impl.protocol.codec.QueueMessageType#QUEUE_REMAININGCAPACITY}
 */
public class QueueRemainingCapacityMessageTask
        extends AbstractPartitionMessageTask<String> {

    public QueueRemainingCapacityMessageTask(ClientMessage clientMessage, Node node, Connection connection) {
        super(clientMessage, node, connection);
    }

    @Override
    protected Operation prepareOperation() {
        return new RemainingCapacityOperation(parameters);
    }

    @Override
    protected String decodeClientMessage(ClientMessage clientMessage) {
        return QueueRemainingCapacityCodec.decodeRequest(clientMessage);
    }

    @Override
    protected ClientMessage encodeResponse(Object response) {
        int result = response != null ? (Integer) response : 0;
        return QueueRemainingCapacityCodec.encodeResponse(result);
    }

    @Override
    public Permission getRequiredPermission() {
        return new QueuePermission(parameters, ActionConstants.ACTION_READ);
    }

    @Override
    public String getMethodName() {
        return "remainingCapacity";
    }

    @Override
    public String getServiceName() {
        return QueueService.SERVICE_NAME;
    }

    @Override
    public Object[] getParameters() {
        return null;
    }

    @Override
    public String getDistributedObjectName() {
        return parameters;
    }
}

{'repo_name': 'hazelcast/hazelcast', 'stars': '3823', 'repo_language': 'Java', 'file_name': 'ClassHeader.txt', 'mime_type': 'text/plain', 'hash': -2660390505861644355, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
    <test name="StorefrontAddGroupedProductToShoppingCartTest">
        <annotations>
            <stories value="Shopping Cart"/>
            <title value="Create grouped product with three simple product and Add grouped product to the cart"/>
            <description value="Create grouped product with three simple product and Add grouped product to the cart"/>
            <testCaseId value="MC-14718"/>
            <severity value="CRITICAL"/>
            <group value="mtf_migrated"/>
        </annotations>

        <before>
            <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
            <magentoCLI command="config:set {{EnableFlatRateDefaultPriceConfigData.path}} {{EnableFlatRateDefaultPriceConfigData.value}}" stepKey="enableFlatRateDefaultPrice"/>
            <!--Create Grouped product with three simple product -->
            <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2">
                <field key="price">100.00</field>
            </createData>
            <createData entity="ApiProductWithDescription" stepKey="simple2" before="simple3">
                <field key="price">200.00</field>
            </createData>
            <createData entity="ApiProductWithDescription" stepKey="simple3" before="product">
                <field key="price">300.00</field>
            </createData>
            <createData entity="ApiGroupedProduct" stepKey="product"/>
            <createData entity="OneSimpleProductLink" stepKey="addProductOne">
                <requiredEntity createDataKey="product"/>
                <requiredEntity createDataKey="simple1"/>
            </createData>
            <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductTwo">
                <requiredEntity createDataKey="product"/>
                <requiredEntity createDataKey="simple2"/>
            </updateData>
            <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductThree">
                <requiredEntity createDataKey="product"/>
                <requiredEntity createDataKey="simple3"/>
            </updateData>
            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
                <argument name="tags" value=""/>
            </actionGroup>
        </before>
        <after>
            <deleteData createDataKey="simple1" stepKey="deleteProduct1"/>
            <deleteData createDataKey="simple2" stepKey="deleteProduct2"/>
            <deleteData createDataKey="simple3" stepKey="deleteProduct3"/>
            <deleteData createDataKey="product" stepKey="deleteGroupProduct"/>
        </after>

        <!-- Fill Quantity and add Product to the cart -->
        <actionGroup ref="StorefrontAddThreeGroupedProductToTheCartActionGroup" stepKey="addGropedProductsToTheCart">
            <argument name="urlKey" value="$$product.custom_attributes[url_key]$$"/>
            <argument name="product1" value="$$simple1.name$$"/>
            <argument name="product2" value="$$simple2.name$$"/>
            <argument name="product3" value="$$simple3.name$$"/>
            <argument name="qty1" value="1"/>
            <argument name="qty2" value="2"/>
            <argument name="qty3" value="3"/>
        </actionGroup>

        <!-- Select Mini Cart and select 'View And Edit Cart' -->
        <actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="selectViewAndEditCart"/>

        <!--Assert Product1 items in cart -->
        <actionGroup ref="AssertStorefrontCheckoutCartItemsActionGroup" stepKey="assertSimpleProduct1ItemsInCheckOutCart">
            <argument name="productName" value="$$simple1.name$$"/>
            <argument name="productSku" value="$$simple1.sku$$"/>
            <argument name="productPrice" value="$100.00"/>
            <argument name="subtotal" value="$100.00" />
            <argument name="qty" value="1"/>
        </actionGroup>

        <!--Assert Product2 items in cart -->
        <actionGroup ref="AssertStorefrontCheckoutCartItemsActionGroup" stepKey="assertSimpleProduct2ItemsInCheckOutCart">
            <argument name="productName" value="$$simple2.name$$"/>
            <argument name="productSku" value="$$simple2.sku$$"/>
            <argument name="productPrice" value="$200.00"/>
            <argument name="subtotal" value="$400.00" />
            <argument name="qty" value="2"/>
        </actionGroup>

        <!--Assert Product3 items in cart -->
        <actionGroup ref="AssertStorefrontCheckoutCartItemsActionGroup" stepKey="assertSimpleProduct3ItemsInCheckOutCart">
            <argument name="productName" value="$$simple3.name$$"/>
            <argument name="productSku" value="$$simple3.sku$$"/>
            <argument name="productPrice" value="$300.00"/>
            <argument name="subtotal" value="$900.00" />
            <argument name="qty" value="3"/>
        </actionGroup>

        <!--Assert Shopping Cart Summary-->
        <actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
            <argument name="subtotal" value="$1,400.00"/>
            <argument name="shipping" value="30.00"/>
            <argument name="total" value="1,430.00"/>
        </actionGroup>

        <!-- Assert product1 details in Mini Cart -->
        <actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
        <actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart">
            <argument name="productName" value="$$simple3.name$$"/>
            <argument name="productPrice" value="$300.00"/>
            <argument name="cartSubtotal" value="$1,400.00" />
            <argument name="qty" value="3"/>
        </actionGroup>

        <!-- Assert product2 details in Mini Cart -->
        <actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct2MiniCart">
            <argument name="productName" value="$$simple2.name$$"/>
            <argument name="productPrice" value="$200.00"/>
            <argument name="cartSubtotal" value="$1,400.00" />
            <argument name="qty" value="2"/>
        </actionGroup>

        <!-- Assert product3 details in Mini Cart -->
        <actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct1MiniCart">
            <argument name="productName" value="$$simple1.name$$"/>
            <argument name="productPrice" value="$100.00"/>
            <argument name="cartSubtotal" value="$1,400.00" />
            <argument name="qty" value="1"/>
        </actionGroup>
    </test>
</tests>

{'repo_name': 'magento/magento2', 'stars': '8767', 'repo_language': 'PHP', 'file_name': 'report.phtml', 'mime_type': 'text/x-php', 'hash': 6735319314602289779, 'source_dataset': 'data'}


pipeline {
    agent { label 'upbound-gce' }

    parameters {
        string(name: 'version', defaultValue: '', description: 'The version you are releasing, for example v0.4.0')
        string(name: 'commit', defaultValue: '', description: 'Optional commit hash for this release, for example 56b65dba917e50132b0a540ae6ff4c5bbfda2db6. If empty the latest commit hash will be used.')
    }

    options {
        disableConcurrentBuilds()
        timestamps()
    }

    environment {
        GITHUB_UPBOUND_BOT = credentials('github-upbound-jenkins')
    }

    stages {

        stage('Prepare') {
            steps {
                 // github credentials are not setup to push over https in jenkins. add the github token to the url
                sh "git config remote.origin.url https://${GITHUB_UPBOUND_BOT_USR}:${GITHUB_UPBOUND_BOT_PSW}@\$(git config --get remote.origin.url | sed -e 's/https:\\/\\///')"
                sh 'git config user.name "upbound-bot"'
                sh 'git config user.email "info@crossplane.io"'
                sh 'echo "machine github.com login upbound-bot password $GITHUB_UPBOUND_BOT" > ~/.netrc'
            }
        }

        stage('Tag Release') {
            steps {
                sh "./build/run make -j\$(nproc) tag VERSION=${params.version} COMMIT_HASH=${params.commit}"
            }
        }
    }

    post {
        always {
            deleteDir()
        }
    }
}

{'repo_name': 'crossplane/crossplane', 'stars': '2252', 'repo_language': 'Go', 'file_name': 'design-doc-upbound-ui-spec.md', 'mime_type': 'text/plain', 'hash': 2959066836160876619, 'source_dataset': 'data'}


# (C) 2001-2017 Intel Corporation. All rights reserved.
# Your use of Intel Corporation's design tools, logic functions and other
# software and tools, and its AMPP partner logic functions, and any output
# files from any of the foregoing (including device programming or simulation
# files), and any associated documentation or information are expressly subject
# to the terms and conditions of the Intel Program License Subscription
# Agreement, Intel FPGA IP License Agreement, or other applicable
# license agreement, including, without limitation, that your use is for the
# sole purpose of programming logic devices manufactured by Intel and sold by
# Intel or its authorized distributors.  Please refer to the applicable
# agreement for further details.

set_false_path -from [get_registers *altera_jtag_src_crosser:*|sink_data_buffer*] -to [get_registers *altera_jtag_src_crosser:*|src_data*]

{'repo_name': 'stanford-ppl/spatial', 'stars': '184', 'repo_language': 'Scala', 'file_name': 'arria10.list', 'mime_type': 'text/plain', 'hash': 7690029783235700391, 'source_dataset': 'data'}


//===----------------------------------------------------------------------===////
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===////

#ifndef ATOMIC_SUPPORT_H
#define ATOMIC_SUPPORT_H

#include "__config"
#include "memory" // for __libcpp_relaxed_load

#if defined(__clang__) && __has_builtin(__atomic_load_n)             \
                       && __has_builtin(__atomic_store_n)            \
                       && __has_builtin(__atomic_add_fetch)          \
                       && __has_builtin(__atomic_exchange_n)         \
                       && __has_builtin(__atomic_compare_exchange_n) \
                       && defined(__ATOMIC_RELAXED)                  \
                       && defined(__ATOMIC_CONSUME)                  \
                       && defined(__ATOMIC_ACQUIRE)                  \
                       && defined(__ATOMIC_RELEASE)                  \
                       && defined(__ATOMIC_ACQ_REL)                  \
                       && defined(__ATOMIC_SEQ_CST)
#   define _LIBCPP_HAS_ATOMIC_BUILTINS
#elif !defined(__clang__) && defined(_GNUC_VER) && _GNUC_VER >= 407
#   define _LIBCPP_HAS_ATOMIC_BUILTINS
#endif

#if !defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
# if defined(_LIBCPP_WARNING)
    _LIBCPP_WARNING("Building libc++ without __atomic builtins is unsupported")
# else
#   warning Building libc++ without __atomic builtins is unsupported
# endif
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

namespace {

#if defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)

enum __libcpp_atomic_order {
    _AO_Relaxed = __ATOMIC_RELAXED,
    _AO_Consume = __ATOMIC_CONSUME,
    _AO_Acquire = __ATOMIC_ACQUIRE,
    _AO_Release = __ATOMIC_RELEASE,
    _AO_Acq_Rel = __ATOMIC_ACQ_REL,
    _AO_Seq     = __ATOMIC_SEQ_CST
};

template <class _ValueType, class _FromType>
inline _LIBCPP_INLINE_VISIBILITY
void __libcpp_atomic_store(_ValueType* __dest, _FromType __val,
                           int __order = _AO_Seq)
{
    __atomic_store_n(__dest, __val, __order);
}

template <class _ValueType, class _FromType>
inline _LIBCPP_INLINE_VISIBILITY
void __libcpp_relaxed_store(_ValueType* __dest, _FromType __val)
{
    __atomic_store_n(__dest, __val, _AO_Relaxed);
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_load(_ValueType const* __val,
                                int __order = _AO_Seq)
{
    return __atomic_load_n(__val, __order);
}

template <class _ValueType, class _AddType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_add(_ValueType* __val, _AddType __a,
                               int __order = _AO_Seq)
{
    return __atomic_add_fetch(__val, __a, __order);
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_exchange(_ValueType* __target,
                                    _ValueType __value, int __order = _AO_Seq)
{
    return __atomic_exchange_n(__target, __value, __order);
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
bool __libcpp_atomic_compare_exchange(_ValueType* __val,
    _ValueType* __expected, _ValueType __after,
    int __success_order = _AO_Seq,
    int __fail_order = _AO_Seq)
{
    return __atomic_compare_exchange_n(__val, __expected, __after, true,
                                       __success_order, __fail_order);
}

#else // _LIBCPP_HAS_NO_THREADS

enum __libcpp_atomic_order {
    _AO_Relaxed,
    _AO_Consume,
    _AO_Acquire,
    _AO_Release,
    _AO_Acq_Rel,
    _AO_Seq
};

template <class _ValueType, class _FromType>
inline _LIBCPP_INLINE_VISIBILITY
void __libcpp_atomic_store(_ValueType* __dest, _FromType __val,
                           int = 0)
{
    *__dest = __val;
}

template <class _ValueType, class _FromType>
inline _LIBCPP_INLINE_VISIBILITY
void __libcpp_relaxed_store(_ValueType* __dest, _FromType __val)
{
    *__dest = __val;
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_load(_ValueType const* __val,
                                int = 0)
{
    return *__val;
}

template <class _ValueType, class _AddType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_add(_ValueType* __val, _AddType __a,
                               int = 0)
{
    return *__val += __a;
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_atomic_exchange(_ValueType* __target,
                                    _ValueType __value, int __order = _AO_Seq)
{
    _ValueType old = *__target;
    *__target = __value;
    return old;
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
bool __libcpp_atomic_compare_exchange(_ValueType* __val,
    _ValueType* __expected, _ValueType __after,
    int = 0, int = 0)
{
    if (*__val == *__expected) {
        *__val = __after;
        return true;
    }
    *__expected = *__val;
    return false;
}

#endif // _LIBCPP_HAS_NO_THREADS

} // end namespace

_LIBCPP_END_NAMESPACE_STD

#endif // ATOMIC_SUPPORT_H

{'repo_name': 'intel/llvm', 'stars': '317', 'repo_language': 'C++', 'file_name': 'is_error_code_enum_io_errc.pass.cpp', 'mime_type': 'text/x-c', 'hash': -4524076136449236836, 'source_dataset': 'data'}