/** @file OcGuardLib Copyright (c) 2020, vit9696 All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include #if defined(MDE_CPU_IA32) && defined(__clang__) && defined(__apple_build_version__) && __apple_build_version__ < 11000000 /** Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned result. This function is generated by older clang compilers, like ones from Xcode 10.1, when using overflow builtins. The issue is fixed in Xcode 11. @param Dividend A 64-bit unsigned value. @param Divisor A 64-bit unsigned value. @return Dividend / Divisor. **/ UINT64 __udivdi3 ( IN UINT64 Dividend, IN UINT64 Divisor ) { return DivU64x64Remainder (Dividend, Divisor, NULL); } #endif