# Path: pyjvm/bytecode.py
# def bytecode(code):
#     def cl(func):
#         BYTECODE[hex(code)] = func
#         return func
# 
#     return cl
# 
# Path: pyjvm/jassert.py
# def jassert_double(value):
#     assert type(value) is tuple and value[0] == "double"
# 
# Path: pyjvm/jassert.py
# def jassert_float(value):
#     assert type(value) is tuple and value[0] == "float"
# 
# Path: pyjvm/jassert.py
# def jassert_int(value):
#     assert type(value) is int or type(value) is long
#     assert -2147483648 <= value <= 2147483647
# 
# Path: pyjvm/jassert.py
# def jassert_long(value):
#     assert type(value) is tuple and value[0] == "long"
#     assert -9223372036854775808 <= value[1] <= 9223372036854775807


import logging
import struct
from pyjvm.bytecode import bytecode
from pyjvm.jassert import jassert_double
from pyjvm.jassert import jassert_float
from pyjvm.jassert import jassert_int
from pyjvm.jassert import jassert_long
        value &= 0xFFFFFFFF
        value ^= 0xFFFFFFFF
        value += 1
        value *= -1
    else:
        value &= 0xFFFFFFFF
    jassert_int(value)
    return int(value)


def cut_to_long(value):
    if -9223372036854775808 <= value <= 9223372036854775807:
        return long(value)
    if value & FLAG64:
        value &= 0xFFFFFFFFFFFFFFFF
        value ^= 0xFFFFFFFFFFFFFFFF
        value += 1
        value *= -1
    else:
        value &= 0xFFFFFFFFFFFFFFFF
    jassert_long(("long", value))
    return long(value)


@bytecode(code=0x60)
def iadd(frame):
    value2 = frame.stack.pop()
    value1 = frame.stack.pop()
    result = value1 + value2
    result = cut_to_int(result)

# Path: pyjvm/bytecode.py
# def bytecode(code):
#     def cl(func):
#         BYTECODE[hex(code)] = func
#         return func
# 
#     return cl
# 
# Path: pyjvm/jassert.py
# def jassert_double(value):
#     assert type(value) is tuple and value[0] == "double"
# 
# Path: pyjvm/jassert.py
# def jassert_float(value):
#     assert type(value) is tuple and value[0] == "float"
# 
# Path: pyjvm/jassert.py
# def jassert_int(value):
#     assert type(value) is int or type(value) is long
#     assert -2147483648 <= value <= 2147483647
# 
# Path: pyjvm/jassert.py
# def jassert_long(value):
#     assert type(value) is tuple and value[0] == "long"
#     assert -9223372036854775808 <= value[1] <= 9223372036854775807


# Path: pyjvm/ops/ops_calc.py
import logging
import struct
from pyjvm.bytecode import bytecode
from pyjvm.jassert import jassert_double
from pyjvm.jassert import jassert_float
from pyjvm.jassert import jassert_int
from pyjvm.jassert import jassert_long

        value &= 0xFFFFFFFF
        value ^= 0xFFFFFFFF
        value += 1
        value *= -1
    else:
        value &= 0xFFFFFFFF
    jassert_int(value)
    return int(value)


def cut_to_long(value):
    if -9223372036854775808 <= value <= 9223372036854775807:
        return long(value)
    if value & FLAG64:
        value &= 0xFFFFFFFFFFFFFFFF
        value ^= 0xFFFFFFFFFFFFFFFF
        value += 1
        value *= -1
    else:
        value &= 0xFFFFFFFFFFFFFFFF
    jassert_long(("long", value))
    return long(value)


@bytecode(code=0x60)
def iadd(frame):
    value2 = frame.stack.pop()
    value1 = frame.stack.pop()
    result = value1 + value2
    result = cut_to_int(result)

    jassert_int(result)