module std/num/int32std/num/int32
import std/core/undivstd/core/undiv
extern import
c file "int32-inline.c"
pub val max-int32std/num/int32/max-int32: int32 : int32std/core/types/int32: V = 0x7FFF_FFFFliteral: int
dec = 2147483647
hex32= 0x7FFFFFFF
bit32= 0b01111111111111111111111111111111.int32std/num/int32/int32: (i : int) -> int32
pub val min-int32std/num/int32/min-int32: int32 : int32std/core/types/int32: V = -0x8000_0000literal: int
dec = -2147483648
hex32= 0x80000000
bit32= 0b10000000000000000000000000000000.int32std/num/int32/int32: (i : int) -> int32
pub val bits-int32std/num/int32/bits-int32: int32 : int32std/core/types/int32: V = 32literal: int
dec = 32
hex8 = 0x20
bit8 = 0b00100000.int32std/num/int32/int32: (i : int) -> int32
pub fun showstd/num/int32/show: (i : int32) -> string( ii: int32 : int32std/core/types/int32: V )result: -> total string : stringstd/core/types/string: V
showstd/core/int/show: (i : int) -> string(ii: int32.intstd/num/int32/int: (i : int32) -> int)
pub inline fip fun i32std/num/int32/i32: (i : int) -> int32( ii: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
ii: int.int32std/num/int32/int32: (i : int) -> int32
pub inline fip extern int32std/num/int32/int32: (i : int) -> int32( i : intstd/core/types/int: V) : int32std/core/types/int32: V
c "kk_integer_clamp32"
cs "Primitive.IntToInt32"
js "$std_core_types._int_clamp32"
pub inline fip extern intstd/num/int32/int: (i : int32) -> int( i : int32std/core/types/int32: V ) : intstd/core/types/int: V
c "kk_integer_from_int"
cs inline "(new BigInteger(#1))"
js "$std_core_types._int_from_int32"
pub fip fun boolstd/num/int32/bool: (i : int32) -> bool( ii: int32 : int32std/core/types/int32: V )result: -> total bool : boolstd/core/types/bool: V
(ii: int32!=std/num/int32/(!=): (x : int32, y : int32) -> boolzerostd/num/int32/zero: int32)
pub fip fun bool/int32std/num/int32/bool/int32: (b : bool) -> int32( bb: bool : boolstd/core/types/bool: V )result: -> total int32 : int32std/core/types/int32: V
if (bb: bool) then onestd/num/int32/one: int32 else zerostd/num/int32/zero: int32
pub fun show-hexstd/num/int32/show-hex: (i : int32, width : ? int, use-capitals : ? bool, pre : ? string) -> string( ii: int32 : int32std/core/types/int32: V, widthwidth: ? int : intstd/core/types/int: V = 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001, use-capitalsuse-capitals: ? bool : boolstd/core/types/bool: V = Truestd/core/types/True: bool, prepre: ? string : stringstd/core/types/string: V = "0x"literal: string
count= 2 )result: -> total string : stringstd/core/types/string: V
std/core/show/show-hexstd/core/show/show-hex: (i : int, width : ? int, use-capitals : ? bool, pre : ? string) -> string(ii: int32.intstd/num/int32/int: (i : int32) -> int,widthwidth: int,use-capitalsuse-capitals: bool,prepre: string)
pub fun uint32std/num/int32/uint32: (i : int) -> int32( ii: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
if (ii: int >std/core/int/(>): (x : int, y : int) -> bool max-int32std/num/int32/max-int32: int32.intstd/num/int32/int: (i : int32) -> int) then (ii: int -std/core/int/(-): (x : int, y : int) -> int 0x1_0000_0000literal: int
dec = 4294967296
hex64= 0x0000000100000000
bit64= 0b0000000000000000000000000000000100000000000000000000000000000000).int32std/num/int32/int32: (i : int) -> int32 else ii: int.int32std/num/int32/int32: (i : int) -> int32
pub fun uintstd/num/int32/uint: (i : int32) -> int( ii: int32 : int32std/core/types/int32: V )result: -> total int : intstd/core/types/int: V
if (ii: int32.is-negstd/num/int32/is-neg: (i : int32) -> bool) then 0x1_0000_0000literal: int
dec = 4294967296
hex64= 0x0000000100000000
bit64= 0b0000000000000000000000000000000100000000000000000000000000000000 +std/core/int/(+): (x : int, y : int) -> int ii: int32.intstd/num/int32/int: (i : int32) -> int else ii: int32.intstd/num/int32/int: (i : int32) -> int
pub fun show-hex32std/num/int32/show-hex32: (i : int32, width : ? int, use-capitals : ? bool, pre : ? string) -> string( ii: int32 : int32std/core/types/int32: V, widthwidth: ? int : intstd/core/types/int: V = 8literal: int
dec = 8
hex8 = 0x08
bit8 = 0b00001000, use-capitalsuse-capitals: ? bool : boolstd/core/types/bool: V = Truestd/core/types/True: bool, prepre: ? string : stringstd/core/types/string: V = "0x"literal: string
count= 2 )result: -> total string : stringstd/core/types/string: V
std/core/show/show-hexstd/core/show/show-hex: (i : int, width : ? int, use-capitals : ? bool, pre : ? string) -> string(ii: int32.uintstd/num/int32/uint: (i : int32) -> int,widthwidth: int,use-capitalsuse-capitals: bool,prepre: string)
pub inline fip extern (==)std/num/int32/(==): (x : int32, y : int32) -> bool(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : boolstd/core/types/bool: V
inline "(#1 == #2)"
js inline "(#1 === #2)"
pub inline fip extern (!=)std/num/int32/(!=): (x : int32, y : int32) -> bool(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : boolstd/core/types/bool: V
inline "(#1 != #2)"
js inline "(#1 !== #2)"
pub inline fip extern (<=)std/num/int32/(<=): (x : int32, y : int32) -> bool(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : boolstd/core/types/bool: V
inline "(#1 <= #2)"
pub inline fip extern (>=)std/num/int32/(>=): (x : int32, y : int32) -> bool(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : boolstd/core/types/bool: V
inline "(#1 >= #2)"
pub inline fip extern (<)std/num/int32/(<): (x : int32, y : int32) -> bool(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : boolstd/core/types/bool: V
inline "(#1 < #2)"
pub inline fip extern (>)std/num/int32/(>): (x : int32, y : int32) -> bool(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : boolstd/core/types/bool: V
inline "(#1 > #2)"
pub inline fip extern (+)std/num/int32/(+): (x : int32, y : int32) -> int32(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : int32std/core/types/int32: V
c inline "(int32_t)((uint32_t)#1 + (uint32_t)#2)" js inline "((#1 + #2)|0)"
pub inline fip extern (-)std/num/int32/(-): (x : int32, y : int32) -> int32(x : int32std/core/types/int32: V, y : int32std/core/types/int32: V) : int32std/core/types/int32: V
c inline "(int32_t)((uint32_t)#1 - (uint32_t)#2)" js inline "((#1 - #2)|0)"
pub inline fip extern is-negstd/num/int32/is-neg: (i : int32) -> bool( i : int32std/core/types/int32: V ) : boolstd/core/types/bool: V
inline "0 > #1"
pub inline fip extern is-posstd/num/int32/is-pos: (i : int32) -> bool( i : int32std/core/types/int32: V ) : boolstd/core/types/bool: V
inline "0 < #1"
pub inline fip extern is-zerostd/num/int32/is-zero: (i : int32) -> bool( i : int32std/core/types/int32: V ) : boolstd/core/types/bool: V
inline "0 == #1"
js inline "0 === #1"
pub val zerostd/num/int32/zero: int32 = 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32
pub val onestd/num/int32/one: int32 = 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32
pub fip fun signstd/num/int32/sign: (i : int32) -> order( ii: int32 : int32std/core/types/int32: V )result: -> total order : orderstd/core/types/order: V
if (ii: int32.is-posstd/num/int32/is-pos: (i : int32) -> bool) then Gtstd/core/types/Gt: order
elif (ii: int32.is-negstd/num/int32/is-neg: (i : int32) -> bool) then Ltstd/core/types/Lt: order
else Eqstd/core/types/Eq: order
pub fip fun is-oddstd/num/int32/is-odd: (i : int32) -> bool( ii: int32 : int32std/core/types/int32: V )result: -> total bool : boolstd/core/types/bool: V
andstd/num/int32/and: (int32, int32) -> int32(ii: int32,1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32) ==std/num/int32/(==): (x : int32, y : int32) -> bool 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32
pub fip fun is-evenstd/num/int32/is-even: (i : int32) -> bool( ii: int32 : int32std/core/types/int32: V )result: -> total bool : boolstd/core/types/bool: V
andstd/num/int32/and: (int32, int32) -> int32(ii: int32,1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32) ==std/num/int32/(==): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32
pub fip fun incstd/num/int32/inc: (i : int32) -> int32( ii: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
ii: int32 +std/num/int32/(+): (x : int32, y : int32) -> int32 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32
pub fip fun decstd/num/int32/dec: (i : int32) -> int32( ii: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
ii: int32 -std/num/int32/(-): (x : int32, y : int32) -> int32 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32
pub inline fip extern (*)std/num/int32/(*): (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
inline "(int32_t)((uint32_t)#1 * (uint32_t)#2)" js "$std_core_types._int32_multiply"
pub fip fun cmpstd/num/int32/cmp: (x : int32, y : int32) -> order( xx: int32 : int32std/core/types/int32: V, yy: int32 : int32std/core/types/int32: V)result: -> total order : orderstd/core/types/order: V
if (xx: int32 <std/num/int32/(<): (x : int32, y : int32) -> bool yy: int32) then Ltstd/core/types/Lt: order
elif (xx: int32 >std/num/int32/(>): (x : int32, y : int32) -> bool yy: int32) then Gtstd/core/types/Gt: order
else Eqstd/core/types/Eq: order
pub fun absstd/num/int32/abs: (i : int32) -> exn int32( ii: int32 : int32std/core/types/int32: V )result: -> exn int32 : exnstd/core/exn/exn: (E, V) -> V int32std/core/types/int32: V
if (!std/core/types/bool/(!): (b : bool) -> exn boolii: int32.is-negstd/num/int32/is-neg: (i : int32) -> exn bool) then ii: int32
elif (ii: int32 >std/num/int32/(>): (x : int32, y : int32) -> exn bool min-int32std/num/int32/min-int32: int32) then negatestd/num/int32/negate: (i : int32) -> exn int32(ii: int32)
else throwstd/core/exn/throw: (message : string, info : ? exception-info) -> exn int32( "std/num/int32/abs: cannot make min-int32 into a positive int32 without overflow"literal: string
count= 79 )
pub fip fun abs0std/num/int32/abs0: (i : int32) -> int32( ii: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
if (!std/core/types/bool/(!): (b : bool) -> boolii: int32.is-negstd/num/int32/is-neg: (i : int32) -> bool) then ii: int32
elif (ii: int32 >std/num/int32/(>): (x : int32, y : int32) -> bool min-int32std/num/int32/min-int32: int32) then negatestd/num/int32/negate: (i : int32) -> int32(ii: int32)
else 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32
pub inline fip extern andstd/num/int32/and: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
inline "(#1 & #2)";
pub inline fip extern orstd/num/int32/or: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
inline "(#1 | #2)";
pub inline fip extern xorstd/num/int32/xor: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
inline "(#1 ^ #2)";
pub fip fun(^)std/num/int32/(^): (x : int32, y : int32) -> int32( xx: int32 : int32std/core/types/int32: V, yy: int32 : int32std/core/types/int32: V)result: -> total int32 : int32std/core/types/int32: V
xorstd/num/int32/xor: (int32, int32) -> int32(xx: int32,yy: int32)
pub inline fip extern notstd/num/int32/not: (i : int32) -> int32 : ( i : int32std/core/types/int32: V ) -> int32std/core/types/int32: V
inline "(~#1)"
inline fip extern shl32std/num/int32/shl32: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
c inline "kk_shl32(#1,#2)"
js inline "#1 << #2"
pub fip fun shlstd/num/int32/shl: (i : int32, shift : int) -> int32( ii: int32 : int32std/core/types/int32: V, shiftshift: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
shl32std/num/int32/shl32: (int32, int32) -> int32( ii: int32, shiftshift: int.int32std/num/int32/int32: (i : int) -> int32 )
inline fip extern shr32std/num/int32/shr32: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
c inline "(int32_t)kk_shr32(#1,#2)"
cs inline "(Int32)(((UInt32)#1)>>#2)"
js inline "#1 >>> #2"
pub fip fun shrstd/num/int32/shr: (i : int32, shift : int) -> int32( ii: int32 : int32std/core/types/int32: V, shiftshift: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
shr32std/num/int32/shr32: (int32, int32) -> int32( ii: int32, shiftshift: int.int32std/num/int32/int32: (i : int) -> int32 )
inline fip extern sar32std/num/int32/sar32: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
c inline "kk_sar32(#1,#2)"
cs inline "(#1>>#2)"
js inline "#1 >> #2"
pub fip fun sarstd/num/int32/sar: (i : int32, shift : int) -> int32( ii: int32 : int32std/core/types/int32: V, shiftshift: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
sar32std/num/int32/sar32: (int32, int32) -> int32( ii: int32, shiftshift: int.int32std/num/int32/int32: (i : int) -> int32 )
pub fun histd/num/int32/hi: (i : int32) -> int32( ii: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
sar32std/num/int32/sar32: (int32, int32) -> int32(ii: int32,16literal: int
dec = 16
hex8 = 0x10
bit8 = 0b00010000.int32std/num/int32/int32: (i : int) -> int32)
pub fun lostd/num/int32/lo: (i : int32) -> int32( ii: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
andstd/num/int32/and: (int32, int32) -> int32(ii: int32,0xFFFFliteral: int
dec = 65535
hex32= 0x0000FFFF
bit32= 0b00000000000000001111111111111111.int32std/num/int32/int32: (i : int) -> int32)
pub fun hilo/int32std/num/int32/hilo/int32: (hi : int32, lo : int32) -> int32( hihi: int32 : int32std/core/types/int32: V, lolo: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
orstd/num/int32/or: (int32, int32) -> int32( shl32std/num/int32/shl32: (int32, int32) -> int32(hihi: int32,16literal: int
dec = 16
hex8 = 0x10
bit8 = 0b00010000.int32std/num/int32/int32: (i : int) -> int32), andstd/num/int32/and: (int32, int32) -> int32(lolo: int32,0xFFFFliteral: int
dec = 65535
hex32= 0x0000FFFF
bit32= 0b00000000000000001111111111111111.int32std/num/int32/int32: (i : int) -> int32) )
inline fip extern rotl32std/num/int32/rotl32: (i : int32, n : int32) -> int32( i : int32std/core/types/int32: V, n : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "(int32_t)kk_bits_rotl32(#1,#2)"
js "$std_core_types._int32_rotl"
pub fip fun rotlstd/num/int32/rotl: (i : int32, shift : int) -> int32( ii: int32 : int32std/core/types/int32: V, shiftshift: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
rotl32std/num/int32/rotl32: (i : int32, n : int32) -> int32( ii: int32, shiftshift: int.int32std/num/int32/int32: (i : int) -> int32 )
inline fip extern rotr32std/num/int32/rotr32: (i : int32, n : int32) -> int32( i : int32std/core/types/int32: V, n : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "(int32_t)kk_bits_rotr32(#1,#2)"
js "$std_core_types._int32_rotr"
pub fip fun rotrstd/num/int32/rotr: (i : int32, shift : int) -> int32( ii: int32 : int32std/core/types/int32: V, shiftshift: int : intstd/core/types/int: V )result: -> total int32 : int32std/core/types/int32: V
rotr32std/num/int32/rotr32: (i : int32, n : int32) -> int32( ii: int32, shiftshift: int.int32std/num/int32/int32: (i : int) -> int32 )
pub inline fip extern ctzstd/num/int32/ctz: (i : int32) -> int( i : int32std/core/types/int32: V ) : intstd/core/types/int: V
c inline "kk_integer_from_small(kk_bits_ctz32(#1))"
js "$std_core_types._int32_ctz"
pub inline fip extern clzstd/num/int32/clz: (i : int32) -> int( i : int32std/core/types/int32: V ) : intstd/core/types/int: V
c inline "kk_integer_from_small(kk_bits_clz32(#1))"
js "$std_core_types._int32_clz"
pub inline fip extern clrsbstd/num/int32/clrsb: (i : int32) -> int( i : int32std/core/types/int32: V ) : intstd/core/types/int: V
c inline "kk_integer_from_small(kk_bits_clrsb32(#1))"
js "$std_core_types._int32_clrsb"
pub inline fip extern popcountstd/num/int32/popcount: (i : int32) -> int( i : int32std/core/types/int32: V ) : intstd/core/types/int: V
c inline "kk_integer_from_small(kk_bits_popcount32(#1))"
js "$std_core_types._int32_bits_popcount"
pub inline fip extern paritystd/num/int32/parity: (i : int32) -> bool( i : int32std/core/types/int32: V ) : boolstd/core/types/bool: V
c inline "kk_bits_parity32(#1)"
js "$std_core_types._int32_parity"
pub inline fip extern byte-reversestd/num/int32/byte-reverse: (i : int32) -> int32( i : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_bswap32(#1)"
js "$std_core_types._int32_bswap"
pub inline fip extern bit-reversestd/num/int32/bit-reverse: (i : int32) -> int32( i : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_reverse32(#1)"
js "$std_core_types._int32_breverse"
pub inline fip extern bit-gatherstd/num/int32/bit-gather: (i : int32, m : int32) -> int32( i : int32std/core/types/int32: V, m : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_gather32(#1,#2)"
pub inline fip extern bit-scatterstd/num/int32/bit-scatter: (i : int32, m : int32) -> int32( i : int32std/core/types/int32: V, m : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_scatter32(#1,#2)"
pub inline fip extern bit-zipstd/num/int32/bit-zip: (i : int32) -> int32( i : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_zip32(#1)"
pub inline fip extern bit-unzipstd/num/int32/bit-unzip: (i : int32) -> int32( i : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_unzip32(#1)"
pub inline fip extern orcstd/num/int32/orc: (i : int32) -> int32( i : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "kk_bits_orc32(#1)"
pub inline fip extern clmulstd/num/int32/clmul: (x : int32, y : int32) -> int32( x : int32std/core/types/int32: V, y : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "(int32_t)kk_clmul32((uint32_t)#1,(uint32_t)#2)"
pub fip extern clmul_widestd/num/int32/clmul_wide: (x : int32, y : int32) -> (int32, int32)( xx: int32 : int32std/core/types/int32: V, yy: int32 : int32std/core/types/int32: V ) : (std/core/types/tuple2: (V, V) -> Vint32std/core/types/int32: V,int32std/core/types/int32: V)
c "kk_clmul32x_wide"
pub inline fip extern clmulrstd/num/int32/clmulr: (x : int32, y : int32) -> int32( x : int32std/core/types/int32: V, y : int32std/core/types/int32: V ) : int32std/core/types/int32: V
c inline "(int32_t)kk_clmulr32((uint32_t)#1,(uint32_t)#2)"
pub fip fun minstd/num/int32/min: (i : int32, j : int32) -> int32( ii: int32 : int32std/core/types/int32: V, jj: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
if (ii: int32 <=std/num/int32/(<=): (x : int32, y : int32) -> bool jj: int32) then ii: int32 else jj: int32
pub fip fun maxstd/num/int32/max: (i : int32, j : int32) -> int32( ii: int32 : int32std/core/types/int32: V, jj: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
if (ii: int32 >=std/num/int32/(>=): (x : int32, y : int32) -> bool jj: int32) then ii: int32 else jj: int32
pub fip extern umulstd/num/int32/umul: (i : int32, j : int32) -> (int32, int32)( ii: int32 : int32std/core/types/int32: V, jj: int32 : int32std/core/types/int32: V ) : (std/core/types/tuple2: (V, V) -> Vint32std/core/types/int32: V,int32std/core/types/int32: V)
c "kk_umul32x_wide"
js "$std_core_types._int32_umul"
pub fip extern imulstd/num/int32/imul: (i : int32, j : int32) -> (int32, int32)( ii: int32 : int32std/core/types/int32: V, jj: int32 : int32std/core/types/int32: V ) : (std/core/types/tuple2: (V, V) -> Vint32std/core/types/int32: V,int32std/core/types/int32: V)
c "kk_imul32x_wide"
js "$std_core_types._int32_imul"
pub fun hilo/intstd/num/int32/hilo/int: ((int32, int32)) -> int( (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)hihi: int32,lolo: int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) : (std/core/types/tuple2: (V, V) -> Vint32std/core/types/int32: V,int32std/core/types/int32: V) )result: -> total int : intstd/core/types/int: V
hihi: int32.intstd/num/int32/int: (i : int32) -> int *std/core/int/(*): (int, int) -> int 0x1_0000_0000literal: int
dec = 4294967296
hex64= 0x0000000100000000
bit64= 0b0000000000000000000000000000000100000000000000000000000000000000 +std/core/int/(+): (x : int, y : int) -> int lolo: int32.uintstd/num/int32/uint: (i : int32) -> int
pub fun hilo/uintstd/num/int32/hilo/uint: ((int32, int32)) -> int( (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)hihi: int32,lolo: int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) : (std/core/types/tuple2: (V, V) -> Vint32std/core/types/int32: V,int32std/core/types/int32: V) )result: -> total int : intstd/core/types/int: V
hihi: int32.uintstd/num/int32/uint: (i : int32) -> int *std/core/int/(*): (int, int) -> int 0x1_0000_0000literal: int
dec = 4294967296
hex64= 0x0000000100000000
bit64= 0b0000000000000000000000000000000100000000000000000000000000000000 +std/core/int/(+): (x : int, y : int) -> int lolo: int32.uintstd/num/int32/uint: (i : int32) -> int
pub fun cdivstd/num/int32/cdiv: (i : int32, j : int32) -> exn int32(ii: int32:int32std/core/types/int32: V, jj: int32:int32std/core/types/int32: V)result: -> exn int32 : exnstd/core/exn/exn: (E, V) -> V int32std/core/types/int32: V
if (jj: int32.is-zerostd/num/int32/is-zero: (i : int32) -> exn bool) then throwstd/core/exn/throw: (message : string, info : ? exception-info) -> exn int32("std/num/int32/cdiv: modulus by zero"literal: string
count= 35)
elif (jj: int32 ==std/num/int32/(==): (x : int32, y : int32) -> exn bool -1literal: int
dec = -1
hex8 = 0xFF
bit8 = 0b11111111.int32std/num/int32/int32: (i : int) -> exn int32 &&std/core/types/(&&): (x : bool, y : bool) -> exn bool ii: int32==std/num/int32/(==): (x : int32, y : int32) -> exn boolmin-int32std/num/int32/min-int32: int32) then throwstd/core/exn/throw: (message : string, info : ? exception-info) -> exn int32("std/num/int32/cdiv: modulus overflow in cdiv(min-int32, -1.int32)"literal: string
count= 65)
else unsafe-cdivstd/num/int32/unsafe-cdiv: (int32, int32) -> exn int32(ii: int32,jj: int32)
pub fun cmodstd/num/int32/cmod: (i : int32, j : int32) -> exn int32(ii: int32:int32std/core/types/int32: V, jj: int32:int32std/core/types/int32: V)result: -> exn int32 : exnstd/core/exn/exn: (E, V) -> V int32std/core/types/int32: V
if (jj: int32.is-zerostd/num/int32/is-zero: (i : int32) -> exn bool) then throwstd/core/exn/throw: (message : string, info : ? exception-info) -> exn int32("std/num/int32/cmod: modulus by zero"literal: string
count= 35)
elif (jj: int32 ==std/num/int32/(==): (x : int32, y : int32) -> exn bool -1literal: int
dec = -1
hex8 = 0xFF
bit8 = 0b11111111.int32std/num/int32/int32: (i : int) -> exn int32 &&std/core/types/(&&): (x : bool, y : bool) -> exn bool ii: int32==std/num/int32/(==): (x : int32, y : int32) -> exn boolmin-int32std/num/int32/min-int32: int32) then throwstd/core/exn/throw: (message : string, info : ? exception-info) -> exn int32("std/num/int32/cmod: modulus overflow in cmod(min-int32, -1.int32)"literal: string
count= 65)
else unsafe-cmodstd/num/int32/unsafe-cmod: (int32, int32) -> exn int32(ii: int32,jj: int32)
pub inline fip extern unsafe-cdivstd/num/int32/unsafe-cdiv: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
inline "(#1 / #2)"
js inline "((#1/#2)|0)"
pub inline fip extern unsafe-cmodstd/num/int32/unsafe-cmod: (int32, int32) -> int32 : (int32std/core/types/int32: V,int32std/core/types/int32: V) -> int32std/core/types/int32: V
inline "(#1 % #2)"
js inline "((#1 % #2)|0)"
pub inline fip extern float64std/num/int32/float64: (i : int32) -> float64( i : int32std/core/types/int32: V) : float64std/core/types/float64: V
c inline "(double)(#1)"
cs inline "(double)(#1)"
js inline "(#1)"
pub fip fun negatestd/num/int32/negate: (i : int32) -> int32( ii: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
(0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32 -std/num/int32/(-): (x : int32, y : int32) -> int32 ii: int32)
pub fip fun (~)std/num/int32/(~): (i : int32) -> int32(ii: int32 : int32std/core/types/int32: V)result: -> total int32 : totalstd/core/types/total: E int32std/core/types/int32: V
(0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32 -std/num/int32/(-): (x : int32, y : int32) -> int32 ii: int32)
pub fip fun (/)std/num/int32/(/): (x : int32, y : int32) -> int32( xx: int32 : int32std/core/types/int32: V, yy: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
if (yy: int32 ==std/num/int32/(==): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32) then returnreturn: int32 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32
if (yy: int32 ==std/num/int32/(==): (x : int32, y : int32) -> bool -1literal: int
dec = -1
hex8 = 0xFF
bit8 = 0b11111111.int32std/num/int32/int32: (i : int) -> int32 &&std/core/types/(&&): (x : bool, y : bool) -> bool xx: int32==std/num/int32/(==): (x : int32, y : int32) -> boolmin-int32std/num/int32/min-int32: int32) returnreturn: int32 xx: int32
val qq: int32 = unsafe-cdivstd/num/int32/unsafe-cdiv: (int32, int32) -> int32(xx: int32,yy: int32)
val rr: int32 = unsafe-cmodstd/num/int32/unsafe-cmod: (int32, int32) -> int32(xx: int32,yy: int32)
if (rr: int32 >=std/num/int32/(>=): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32) then qq: int32
elif (yy: int32 >std/num/int32/(>): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32) then qq: int32 -std/num/int32/(-): (x : int32, y : int32) -> int32 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32
else qq: int32 +std/num/int32/(+): (x : int32, y : int32) -> int32 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001.int32std/num/int32/int32: (i : int) -> int32
pub fip fun (%)std/num/int32/(%): (x : int32, y : int32) -> int32( xx: int32 : int32std/core/types/int32: V, yy: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
if (yy: int32 ==std/num/int32/(==): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32) then returnreturn: int32 xx: int32
if (yy: int32 ==std/num/int32/(==): (x : int32, y : int32) -> bool -1literal: int
dec = -1
hex8 = 0xFF
bit8 = 0b11111111.int32std/num/int32/int32: (i : int) -> int32 &&std/core/types/(&&): (x : bool, y : bool) -> bool xx: int32==std/num/int32/(==): (x : int32, y : int32) -> boolmin-int32std/num/int32/min-int32: int32) returnreturn: int32 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32
val rr: int32 = unsafe-cmodstd/num/int32/unsafe-cmod: (int32, int32) -> int32(xx: int32,yy: int32)
if (rr: int32 >=std/num/int32/(>=): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32) then rr: int32
elif (yy: int32 >std/num/int32/(>): (x : int32, y : int32) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32) then (rr: int32+std/num/int32/(+): (x : int32, y : int32) -> int32yy: int32)
else (rr: int32 -std/num/int32/(-): (x : int32, y : int32) -> int32 yy: int32)
pub fip fun divmodstd/num/int32/divmod: (x : int32, y : int32) -> (int32, int32)(xx: int32:int32std/core/types/int32: V,yy: int32:int32std/core/types/int32: V)result: -> total (int32, int32) : (std/core/types/tuple2: (V, V) -> Vint32std/core/types/int32: V,int32std/core/types/int32: V)
if (yy: int32.is-zerostd/num/int32/is-zero: (i : int32) -> bool) then returnreturn: (int32, int32) (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)zerostd/num/int32/zero: int32,xx: int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
if (yy: int32 ==std/num/int32/(==): (x : int32, y : int32) -> bool -1literal: int
dec = -1
hex8 = 0xFF
bit8 = 0b11111111.int32std/num/int32/int32: (i : int) -> int32 &&std/core/types/(&&): (x : bool, y : bool) -> bool xx: int32==std/num/int32/(==): (x : int32, y : int32) -> boolmin-int32std/num/int32/min-int32: int32) returnreturn: (int32, int32) (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)xx: int32,0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
val qq: int32 = unsafe-cdivstd/num/int32/unsafe-cdiv: (int32, int32) -> int32(xx: int32,yy: int32)
val rr: int32 = unsafe-cmodstd/num/int32/unsafe-cmod: (int32, int32) -> int32(xx: int32,yy: int32)
if (!std/core/types/bool/(!): (b : bool) -> boolrr: int32.is-negstd/num/int32/is-neg: (i : int32) -> bool) then (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)qq: int32,rr: int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
elif (yy: int32.is-posstd/num/int32/is-pos: (i : int32) -> bool) then (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)qq: int32.decstd/num/int32/dec: (i : int32) -> int32, rr: int32+std/num/int32/(+): (x : int32, y : int32) -> int32yy: int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
else (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)qq: int32.incstd/num/int32/inc: (i : int32) -> int32,rr: int32 -std/num/int32/(-): (x : int32, y : int32) -> int32 yy: int32)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
pub fip fun range/fold-int32std/num/int32/range/fold-int32: forall<a,e> (start : int32, end : int32, init : a, f : (int32, a) -> e a) -> e a( startstart: int32 : int32std/core/types/int32: V, endend: int32 : int32std/core/types/int32: V, initinit: $1803 : aa: V, ^ff: (int32, $1803) -> $1804 $1803 : (int32std/core/types/int32: V,aa: V) -> ee: E aa: V )result: -> 1857 1856 : ee: E aa: V
if (startstart: int32 >std/num/int32/(>): (x : int32, y : int32) -> $1804 bool endend: int32) then initinit: $1803 else
val xx: $1803 = ff: (int32, $1803) -> $1804 $1803(startstart: int32,initinit: $1803)
range/fold-int32std/num/int32/range/fold-int32: (start : int32, end : int32, init : $1803, f : (int32, $1803) -> $1804 $1803) -> $1804 $1803(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int32) -> $1804 int32(startstart: int32.incstd/num/int32/inc: (i : int32) -> $1804 int32), endend: int32, xx: $1803, ff: (int32, $1803) -> $1804 $1803)
pub fip fun fold-int32std/num/int32/fold-int32: forall<a,e> (n : int32, init : a, f : (int32, a) -> e a) -> e a( nn: int32 : int32std/core/types/int32: V, initinit: $1776 : aa: V, ^ff: (int32, $1776) -> $1777 $1776 : (int32std/core/types/int32: V,aa: V) -> ee: E aa: V )result: -> 1802 1801 : ee: E aa: V
range/fold-int32std/num/int32/range/fold-int32: (start : int32, end : int32, init : $1776, f : (int32, $1776) -> $1777 $1776) -> $1777 $1776(zerostd/num/int32/zero: int32, nn: int32.decstd/num/int32/dec: (i : int32) -> $1777 int32, initinit: $1776, ff: (int32, $1776) -> $1777 $1776)
pub fun range/fold-while-int32std/num/int32/range/fold-while-int32: forall<a,e> (start : int32, end : int32, init : a, f : (int32, a) -> e maybe<a>) -> e a( startstart: int32 : int32std/core/types/int32: V, endend: int32 : int32std/core/types/int32: V, initinit: $1901 : aa: V, ff: (int32, $1901) -> $1902 maybe<$1901> : (int32std/core/types/int32: V,aa: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 1963 1962 : ee: E aa: V
if (startstart: int32 >std/num/int32/(>): (x : int32, y : int32) -> $1902 bool endend: int32) then initinit: $1901 else
match ff: (int32, $1901) -> $1902 maybe<$1901>(startstart: int32,initinit: $1901)
Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(xx: $1901) -> range/fold-while-int32std/num/int32/range/fold-while-int32: (start : int32, end : int32, init : $1901, f : (int32, $1901) -> $1902 maybe<$1901>) -> $1902 $1901(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int32) -> $1902 int32(startstart: int32.incstd/num/int32/inc: (i : int32) -> $1902 int32), endend: int32, xx: $1901, ff: (int32, $1901) -> $1902 maybe<$1901>)
Nothingstd/core/types/Nothing: forall<a> maybe<a> -> initinit: $1901
pub fun fold-while-int32std/num/int32/fold-while-int32: forall<a,e> (n : int32, init : a, f : (int32, a) -> e maybe<a>) -> e a( nn: int32 : int32std/core/types/int32: V, initinit: $1874 : aa: V, ff: (int32, $1874) -> $1875 maybe<$1874> : (int32std/core/types/int32: V,aa: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 1900 1899 : ee: E aa: V
range/fold-while-int32std/num/int32/range/fold-while-int32: (start : int32, end : int32, init : $1874, f : (int32, $1874) -> $1875 maybe<$1874>) -> $1875 $1874(zerostd/num/int32/zero: int32, nn: int32.decstd/num/int32/dec: (i : int32) -> $1875 int32, initinit: $1874, ff: (int32, $1874) -> $1875 maybe<$1874>)
pub fun range/for32std/num/int32/range/for32: forall<e> (start : int32, end : int32, action : (int32) -> e ()) -> e ()( startstart: int32: int32std/core/types/int32: V, endend: int32 : int32std/core/types/int32: V, actionaction: (int32) -> $1980 () : (int32std/core/types/int32: V) -> ee: E (std/core/types/unit: V)std/core/types/unit: V )result: -> 2021 () : ee: E (std/core/types/unit: V)std/core/types/unit: V
fun reprep: (i : int32) -> $1980 ()( ii: int32 : int32std/core/types/int32: V )result: -> $1980 ()
if ii: int32 <=std/num/int32/(<=): (x : int32, y : int32) -> $1980 bool endend: int32 then
actionaction: (int32) -> $1980 ()(ii: int32)
reprep: (i : int32) -> $1980 ()(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int32) -> $1980 int32(ii: int32.incstd/num/int32/inc: (i : int32) -> $1980 int32))std/core/types/Unit: ()
reprep: (i : int32) -> $1980 ()(startstart: int32)
pub fun for32std/num/int32/for32: forall<e> (n : int32, action : (int32) -> e ()) -> e ()( nn: int32 : int32std/core/types/int32: V, actionaction: (int32) -> $2025 () : (int32std/core/types/int32: V) -> ee: E (std/core/types/unit: V)std/core/types/unit: V )result: -> 2041 () : ee: E (std/core/types/unit: V)std/core/types/unit: V
range/for32std/num/int32/range/for32: (start : int32, end : int32, action : (int32) -> $2025 ()) -> $2025 ()(zerostd/num/int32/zero: int32,nn: int32.decstd/num/int32/dec: (i : int32) -> $2025 int32,actionaction: (int32) -> $2025 ())
pub fun range/for-while32std/num/int32/range/for-while32: forall<a,e> (start : int32, end : int32, action : (int32) -> e maybe<a>) -> e maybe<a>( startstart: int32: int32std/core/types/int32: V, endend: int32 : int32std/core/types/int32: V, actionaction: (int32) -> $2048 maybe<$2047> : (int32std/core/types/int32: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 2110 maybe<2109> : ee: E maybestd/core/types/maybe: V -> V<aa: V>
fun reprep: (i : int32) -> $2048 maybe<$2047>( ii: int32 : int32std/core/types/int32: V )result: -> $2048 maybe<$2047>
if ii: int32 <=std/num/int32/(<=): (x : int32, y : int32) -> $2048 bool endend: int32 then
match actionaction: (int32) -> $2048 maybe<$2047>(ii: int32)
Nothingstd/core/types/Nothing: forall<a> maybe<a> -> reprep: (i : int32) -> $2048 maybe<$2047>(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int32) -> $2048 int32(ii: int32.incstd/num/int32/inc: (i : int32) -> $2048 int32))
Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(xx: $2047) -> Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(xx: $2047)
else Nothingstd/core/types/Nothing: forall<a> maybe<a>
reprep: (i : int32) -> $2048 maybe<$2047>(startstart: int32)
pub fun for-while32std/num/int32/for-while32: forall<a,e> (n : int32, action : (int32) -> e maybe<a>) -> e maybe<a>( nn: int32: int32std/core/types/int32: V, actionaction: (int32) -> $2118 maybe<$2117> : (int32std/core/types/int32: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 2142 maybe<2141> : ee: E maybestd/core/types/maybe: V -> V<aa: V>
range/for-while32std/num/int32/range/for-while32: (start : int32, end : int32, action : (int32) -> $2118 maybe<$2117>) -> $2118 maybe<$2117>(zerostd/num/int32/zero: int32,nn: int32.decstd/num/int32/dec: (i : int32) -> $2118 int32,actionaction: (int32) -> $2118 maybe<$2117>)
pub fun list32std/num/int32/list32: (lo : int32, hi : int32) -> list<int32>( lolo: int32: int32std/core/types/int32: V, hihi: int32: int32std/core/types/int32: V )result: -> total list<int32> : totalstd/core/types/total: E liststd/core/types/list: V -> V<int32std/core/types/int32: V>
if lolo: int32 <=std/num/int32/(<=): (x : int32, y : int32) -> bool hihi: int32
then Consstd/core/types/Cons: forall<a> (head : a, tail : list<a>) -> list<a>( lolo: int32, list32std/num/int32/list32: (lo : int32, hi : int32) -> list<int32>( pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int32) -> int32(lolo: int32.incstd/num/int32/inc: (i : int32) -> int32), hihi: int32 ) )
else Nilstd/core/types/Nil: forall<a> list<a>
pub fip fun sum32std/num/int32/sum32: (xs : list<int32>) -> int32( ^xsxs: list<int32> : liststd/core/types/list: V -> V<int32std/core/types/int32: V> )result: -> total int32 : int32std/core/types/int32: V
sumacc32std/num/int32/sumacc32: (xs : list<int32>, acc : int32) -> int32(xsxs: list<int32>,0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000.int32std/num/int32/int32: (i : int) -> int32)
fip fun sumacc32std/num/int32/sumacc32: (xs : list<int32>, acc : int32) -> int32( ^xsxs: list<int32> : liststd/core/types/list: V -> V<int32std/core/types/int32: V>, accacc: int32 : int32std/core/types/int32: V )result: -> total int32 : int32std/core/types/int32: V
match xsxs: list<int32>
Consstd/core/types/Cons: forall<a> (head : a, tail : list<a>) -> list<a>(xx: int32,xxxx: list<int32>) -> sumacc32std/num/int32/sumacc32: (xs : list<int32>, acc : int32) -> int32(xxxx: list<int32>,accacc: int32+std/num/int32/(+): (x : int32, y : int32) -> int32xx: int32)
Nilstd/core/types/Nil: forall<a> list<a> -> accacc: int32