mirror of
https://github.com/hanzoai/wasm2go.git
synced 2026-10-30 15:06:48 +00:00
41 lines
604 B
Go
41 lines
604 B
Go
// Code generated by wasm2go. DO NOT EDIT.
|
|
|
|
package ncruces
|
|
|
|
type Module struct {
|
|
}
|
|
|
|
func New() *Module {
|
|
m := new(Module)
|
|
return m
|
|
}
|
|
func (m *Module) Xis_prime(v0 int32) int32 {
|
|
var v1 int32
|
|
if uint32(v0) < uint32(i32(2)) {
|
|
return i32(0)
|
|
}
|
|
if v0 == i32(2) {
|
|
return i32(1)
|
|
}
|
|
t0 := int32(uint32(v0) % uint32(i32(2)))
|
|
if t0 == i32(0) {
|
|
return i32(0)
|
|
}
|
|
v1 = i32(3)
|
|
l1:
|
|
{
|
|
if uint32(v1) >= uint32(v0) {
|
|
return i32(1)
|
|
}
|
|
t1 := int32(uint32(v0) % uint32(v1))
|
|
if t1 == i32(0) {
|
|
return i32(0)
|
|
}
|
|
v1 = v1 + i32(2)
|
|
goto l1
|
|
}
|
|
}
|
|
|
|
//go:nosplit
|
|
func i32(x int32) int32 { return x }
|