#if canImport(Darwin) import Darwin #elseif canImport(SwiftWASILibc) import SwiftWASILibc #elseif canImport(ucrt) import ucrt #elseif canImport(SwiftGlibc) import SwiftGlibc #endif func square(_ x: Int) -> Int { return x * x } func euclid2(_ a: Int, _ b: Int) -> Int { return square(a) + square(b) } @main struct Inlining { static func main() { if CommandLine.argc != 3 { print("usage: Inlining ") exit(1) } guard let a = Int(CommandLine.arguments[1]) else { print("Argument must be a number") exit(1) } guard let b = Int(CommandLine.arguments[2]) else { print("Argument must be a number") exit(1) } let result = euclid2(a, b) print("\(a) * \(a) + \(b) * \(b) = \(result)") } }