[case testIntNeq]
def f(x: int, y: int) -> bool:
    return x != y
[out]
def f(x, y):
    x, y :: int
    r0 :: bit
L0:
    r0 = int_ne x, y
    return r0

[case testShortIntComparisons]
def f(x: int) -> int:
    if x == 3:
        return 1
    elif x != 4:
        return 2
    elif 5 == x:
        return 3
    elif 6 != x:
        return 4
    elif x < 4:
        return 5
    return 6
[out]
def f(x):
    x :: int
    r0, r1, r2, r3, r4 :: bit
L0:
    r0 = int_eq x, 6
    if r0 goto L1 else goto L2 :: bool
L1:
    return 2
L2:
    r1 = int_ne x, 8
    if r1 goto L3 else goto L4 :: bool
L3:
    return 4
L4:
    r2 = int_eq 10, x
    if r2 goto L5 else goto L6 :: bool
L5:
    return 6
L6:
    r3 = int_ne 12, x
    if r3 goto L7 else goto L8 :: bool
L7:
    return 8
L8:
    r4 = int_lt x, 8
    if r4 goto L9 else goto L10 :: bool
L9:
    return 10
L10:
L11:
L12:
L13:
L14:
    return 12

[case testIntMin]
def f(x: int, y: int) -> int:
    return min(x, y)
[out]
def f(x, y):
    x, y :: int
    r0 :: bit
    r1 :: int
L0:
    r0 = int_lt y, x
    if r0 goto L1 else goto L2 :: bool
L1:
    r1 = y
    goto L3
L2:
    r1 = x
L3:
    return r1

[case testIntFloorDivideByPowerOfTwo]
def divby1(x: int) -> int:
    return x // 1
def divby2(x: int) -> int:
    return x // 2
def divby3(x: int) -> int:
    return x // 3
def divby4(x: int) -> int:
    return x // 4
def divby8(x: int) -> int:
    return x // 8
[out]
def divby1(x):
    x, r0 :: int
L0:
    r0 = CPyTagged_FloorDivide(x, 2)
    return r0
def divby2(x):
    x, r0 :: int
L0:
    r0 = CPyTagged_Rshift(x, 2)
    return r0
def divby3(x):
    x, r0 :: int
L0:
    r0 = CPyTagged_FloorDivide(x, 6)
    return r0
def divby4(x):
    x, r0 :: int
L0:
    r0 = CPyTagged_Rshift(x, 4)
    return r0
def divby8(x):
    x, r0 :: int
L0:
    r0 = CPyTagged_Rshift(x, 6)
    return r0

[case testFinalConstantFolding]
from typing_extensions import Final

X: Final = -1
Y: Final = -(1 + 3*2)
Z: Final = Y + 1

class C:
    A: Final = 1
    B: Final = -1

def f1() -> int:
    return X

def f2() -> int:
    return X + Y

def f3() -> int:
    return Z

def f4() -> int:
    return C.A

def f5() -> int:
    return C.B
[out]
def C.__mypyc_defaults_setup(__mypyc_self__):
    __mypyc_self__ :: __main__.C
L0:
    __mypyc_self__.A = 2
    __mypyc_self__.B = -2
    return 1
def f1():
L0:
    return -2
def f2():
L0:
    return -16
def f3():
L0:
    return -12
def f4():
L0:
    return 2
def f5():
L0:
    return -2

[case testConvertIntegralToInt]
def bool_to_int(b: bool) -> int:
    return int(b)

def int_to_int(n: int) -> int:
    return int(n)
[out]
def bool_to_int(b):
    b, r0 :: bool
    r1 :: int
L0:
    r0 = b << 1
    r1 = extend r0: builtins.bool to builtins.int
    return r1
def int_to_int(n):
    n :: int
L0:
    return n

[case testIntUnaryPlus]
def unary_plus(n: int) -> int:
    x = +n
    return x
[out]
def unary_plus(n):
    n, x :: int
L0:
    x = n
    return x
