// --- BOOL LOGICAL OPERATORS ---

func infix &&(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.band(lhs, rhs)
}

func infix ||(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.bor(lhs, rhs)
}

func prefix !(operand: Bool) -> Bool {
    return Builtin.bnot(operand)
}

// --- BOOL LOGICAL FUNCTIONS ---

func band(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.band(lhs, rhs)
}

func bor(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.bor(lhs, rhs)
}

func bxor(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.bxor(lhs, rhs)
}

func bnand(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.bnand(lhs, rhs)
}

func bnor(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.bnor(lhs, rhs)
}

func bxnor(lhs: Bool, rhs: Bool) -> Bool {
    return Builtin.bxnor(lhs, rhs)
}

func bnot(operand: Bool) -> Bool {
    return Builtin.bnot(operand)
}

// --- INT LOGICAL OPERATORS ---

func infix &(lhs: Int, rhs: Int) -> Int {
    return Builtin.iand(lhs, rhs)
}

func infix |(lhs: Int, rhs: Int) -> Int {
    return Builtin.ior(lhs, rhs)
}

func infix ^(lhs: Int, rhs: Int) -> Int {
    return Builtin.ixor(lhs, rhs)
}

func infix <<(lhs: Int, rhs: Int) -> Int {
    return Builtin.ishl(lhs, rhs)
}

func infix >>(lhs: Int, rhs: Int) -> Int {
    return Builtin.sshr(lhs, rhs)
}

func prefix ~(operand: Int) -> Int {
    return Builtin.inot(operand)
}

// --- INT LOGICAL FUNCTIONS ---

func iand(lhs: Int, rhs: Int) -> Int {
    return Builtin.iand(lhs, rhs)
}

func ior(lhs: Int, rhs: Int) -> Int {
    return Builtin.ior(lhs, rhs)
}

func ixor(lhs: Int, rhs: Int) -> Int {
    return Builtin.ixor(lhs, rhs)
}

func inand(lhs: Int, rhs: Int) -> Int {
    return Builtin.inand(lhs, rhs)
}

func inor(lhs: Int, rhs: Int) -> Int {
    return Builtin.inor(lhs, rhs)
}

func ixnor(lhs: Int, rhs: Int) -> Int {
    return Builtin.ixnor(lhs, rhs)
}

func inot(operand: Int) -> Int {
    return Builtin.inot(operand)
}
