Commits

Anonymous committed 461eb4c

ビルドできるように追加
js_of_ocamlがなくても動くように追加

  • Participants
  • Parent commits 6fa3e9f

Comments (0)

Files changed (5)

+open Js ;;
+
+let js = string ;;
+
+let (!%) = Printf.sprintf ;;
+
+let st = Js.string ;;
+
+module H = Dom_html ;;
+module E = Lwt_js_events ;;
+
+module Array = ArrayLabels ;;
+module List = ListLabels ;;
+
+let foi = float_of_int ;;
+let iof = int_of_float ;;
+
+let debug = true ;;
+
+let debug s =
+  if debug then Firebug.console##log (js s) ;;
+
+(* constants *)
+module C = struct
+  let w = 800. ;;
+  let h = 400. ;;
+
+  let field = 700. ;;
+  let field_h = 300. ;;
+  let space = (w -. field) /. 2. ;;
+  
+  (* 1目盛りの大きさ *)
+  let scale = 70. ;;
+
+  let fps = 50 ;;
+
+  let vel_f = scale /. foi fps
+  let vel = 1. /. (field /. scale) /. foi fps;;
+
+  let eps = 0.007
+  let pi = 3.141592
+end
+;;
+
+let cur_vel = ref C.vel ;;
+
+let document = H.document ;;
+
+let get ?(message="") () o = Opt.get o (fun () -> failwith message) ;;
+
+let button name callback =
+  let res = document##createDocumentFragment() in
+  let input = H.createInput ~_type:(js"submit") document in
+  input##value <- js name;
+  input##onclick <- H.handler (callback input);
+  Dom.appendChild res input;
+  res
+;;
+
+let radio name values callback =
+  let res = document##createDocumentFragment() in
+  let input = H.createInput ~_type:(js"radio") document in
+  let buts = List.map values ~f:(fun value ->
+    let label = H.createLabel document in
+    label##innerHTML <- js value;
+    let input = H.createInput ~name:(js name) ~_type:(js"radio") document in
+    input##value <- js value;
+    input##onchange <- H.handler (callback input);
+    Dom.appendChild label input;
+    label
+  ) in
+  List.iter buts ~f:(fun b -> Dom.appendChild res b |> ignore);
+  res
+;;
+  
+let get_canvas w h =
+  let div = Dom_html.document##getElementById (Js.string "canvas") |> get () in
+  let c = Dom_html.createCanvas Dom_html.document in
+  c##width <- w;
+  c##height <- h;
+  Dom.appendChild div c;
+  c
+;;
+
+let drawline ctx x1 y1 x2 y2 =
+  ctx##beginPath();
+  ctx##moveTo(y1, x1);
+  ctx##lineTo(y2, x2);
+  ctx##closePath();
+  ctx##stroke();
+;;
+
+let draw_init ctx = begin
+  let open C in
+  (* 枠線 *)
+  drawline ctx 0. 0. 0. w;
+  drawline ctx h  0. h  w;
+  drawline ctx 0. 0. h  0.;
+  drawline ctx 0. w  h  w;
+  (* 地面 *)
+  drawline ctx field_h space field_h (field +. space);
+
+  for i = 0 to iof (field /. scale) do
+    let x = foi i *. scale +. space in
+    let y = field_h in
+    drawline ctx (y -. 5.) x (y +. 5.) x
+  done
+end
+;;
+
+let convert_coord x =
+  if x < 50 then 0.
+  else if 750 < x then 1.
+  else begin
+    let open C in
+    let x = x - iof space in
+    foi (x - (x mod iof scale)) /. field
+  end
+;;
+
+let to_pos x = (x *. C.field +. C.space, C.field_h)
+;;
+
+let draw_rect ctx x =
+  let x = float_of_int x in
+  ctx##fillRect (x *. 70. +. 50., 230., 70., 70.);
+;;
+
+type ant = {color : string; mutable dir : float; id : int; mutable x : float} ;;
+
+let ants : ant list ref = ref [] ;;
+let counter = ref 0 ;;
+
+let next_id = ref 0 ;;
+let next_id () =
+  let i = !next_id in
+  incr next_id;
+  i
+;;
+
+let new_ant e =
+  let new_ant x =
+    let f i = 63 + 64 * i in
+    let i = !counter in
+    incr counter;
+    let r, g, b = f (i mod 4), f ((i / 4) mod 4), f ((i / 16) mod 4) in
+    {color = !% "rgb(%d, %d, %d)" r g b;
+     dir = 1.; id = next_id (); x = x} in
+  
+  let x, y = e##clientX, e##clientY in
+  let ant_x = convert_coord x in
+  try
+    let a = List.find !ants ~f:(fun a -> abs_float @@ a.x -. ant_x < C.eps) in
+    a.dir <- -. a.dir;
+  with
+  | Not_found -> ants := new_ant ant_x :: !ants
+;;
+
+type crash = {cx : float; mutable cy : float; mutable alpha : float} ;;
+let crashes : crash list ref = ref [] ;;
+
+let new_crash x =
+  {cx = x; cy = 0.; alpha = 1.}
+;;
+    
+let move_ants () =
+  let in_field nextx = nextx >= 0. && nextx < 1. in
+
+  let nextx a = a.dir *. !cur_vel +. a.x in
+  
+  List.iter !ants ~f:(fun a ->
+    List.iter !ants ~f:(fun b ->
+      if a.id <> b.id &&
+        a.dir *. b.dir < 0. &&
+        a.dir *. (b.x -. a.x) > 0. &&
+        b.dir *. (a.x -. b.x) > 0. &&
+        abs_float (a.x -. b.x) < C.eps then begin
+          crashes := new_crash a.x :: !crashes;
+          a.dir <- -. a.dir;
+          b.dir <- -. b.dir;
+        end
+    ));
+  
+  ants := List.filter !ants ~f:(fun a ->
+    let nextx = nextx a in
+    if in_field nextx then begin a.x <- nextx; true end
+    else false)
+;;
+
+let draw_arrow ctx x y w h vec =
+  ctx##translate (x,y);
+  vec ctx;
+  ctx##beginPath ();
+  ctx##moveTo (-.w,-.h);
+  ctx##lineTo (0.,-.h);
+  ctx##lineTo (0.,-.w);
+  ctx##lineTo (w, 0.);
+  ctx##lineTo (0.,w);
+  ctx##lineTo (0.,h);
+  ctx##lineTo (-.w,h);
+  ctx##lineTo (-.w,-.h);
+  ctx##stroke ();
+  ctx##fill ();
+  ctx##closePath ();
+  ctx##setTransform(1.,0.,0.,1.,0.,0.);
+;;
+
+let draw_pos ctx a =
+  let (x, y) = to_pos a.x in
+  ctx##fillStyle <- js a.color;
+  draw_arrow ctx x (y +. 10.) 10. 5. (fun ctx -> ctx##rotate (-. C.pi /. 2.))
+;;
+
+let draw_vec ctx a = begin
+  let (x, y) = to_pos a.x in
+  ctx##fillStyle <- js a.color;
+  draw_arrow ctx x (y -. 20.) 10. 5. (fun ctx -> ctx##rotate (if a.dir > 0. then 0. else -. C.pi));
+end
+
+let draw_ants ctx =
+  ctx##clearRect (0., 0., 800., 400.);
+  draw_init ctx;
+  
+  List.iter !ants ~f:(fun a ->
+    ctx##fillStyle <- (string a.color);
+    draw_pos ctx a; draw_vec ctx a)
+;;
+
+let draw_crash ctx =
+  List.iter !crashes ~f:(fun c ->
+    let convert_crash x y =
+      let open C in
+      let x = x *. C.field +. C.space in
+      let y = field_h -. 25. -. y *. 80. in
+      (x, y) in
+    let (x, y) = convert_crash c.cx c.cy in
+
+    ctx##fillStyle <- js (!% "rgba(255, 0, 0, %.1f)" c.alpha);
+    ctx##font <- js "12px 'Times New Roman'";
+    ctx##fillText (js "crash!!", x, y))
+;;
+
+let move_crash ctx =
+  List.iter !crashes ~f:(fun c ->
+    c.cy <- c.cy +. 0.01;
+    c.alpha <- c.alpha -. 0.05;);
+  crashes := List.filter !crashes ~f:(fun c -> c.alpha > 0.);
+;;
+
+let event_init ctx canvas =
+  E.mousedowns canvas (fun e _ ->
+    new_ant e;
+    draw_ants ctx;
+    Lwt.return ()) |> ignore;
+  
+  let moving = ref None in
+  let but_div = Dom_html.document##getElementById (js "button") |> get () in
+  Dom.appendChild but_div (button "move" (fun input _ -> begin
+    match !moving with
+    | None ->
+      input##value <- js "stop";
+      let open Lwt in
+      let getsec () = (jsnew date_now ())##getTime () in
+      let i = ref (to_float @@ getsec ()) in
+      let rec iter () =
+        move_ants (); draw_ants ctx;
+        move_crash ctx; draw_crash ctx;
+        Lwt_js.sleep
+          (max (1. /. foi C.fps -. (to_float (getsec ()) -. !i) /. 1000.) 0. ) >>= fun () ->
+        i := to_float @@ getsec ();
+        iter () in
+      moving := Some (iter ())
+    | Some s ->
+      input##value <- js "move";
+      Lwt.cancel s; moving := None
+  end; _false));
+
+  let fps_div = Dom_html.document##getElementById (js "fps") |> get () in
+  Dom.appendChild fps_div (radio "fps" ["x1"; "x2"; "x4"] (fun e _ ->
+    debug "called";
+    begin
+      if e##value = js "x1" then
+        cur_vel := C.vel
+      else if e##value = js "x2" then
+        cur_vel := C.vel *. 2.
+      else 
+        cur_vel := C.vel *. 4.
+    end; _false))
+;;    
+
+let onload () =
+  let c = get_canvas 800 400 in
+  let ctx = c##getContext (H._2d_) in
+  ctx##fillStyle <- (string "rgb(0, 0, 0)");
+  draw_init ctx;
+  event_init ctx c;
+;;
+
+let () = H.window##onload <- H.handler (fun _ -> onload (); _false) ;;
+filename=$1
+base=${filename%.*}
+
+ocamlfind ocamlc -syntax camlp4o -package lwt,js_of_ocaml.syntax -g -c $1 &&
+ocamlfind ocamlc -package lwt,js_of_ocaml -linkpkg -o $base.byte -g $base.cmo &&
+js_of_ocaml -pretty -noinline $base.byte
+#!/bin/sh
+
+./jso ant.ml
+// This program was compiled from OCaml by js_of_ocaml 1.4
+function caml_raise_with_arg (tag, arg) { throw [0, tag, arg]; }
+function caml_raise_with_string (tag, msg) {
+  caml_raise_with_arg (tag, new MlWrappedString (msg));
+}
+function caml_invalid_argument (msg) {
+  caml_raise_with_string(caml_global_data[4], msg);
+}
+function caml_array_bound_error () {
+  caml_invalid_argument("index out of bounds");
+}
+function caml_str_repeat(n, s) {
+  if (!n) { return ""; }
+  if (n & 1) { return caml_str_repeat(n - 1, s) + s; }
+  var r = caml_str_repeat(n >> 1, s);
+  return r + r;
+}
+function MlString(param) {
+  if (param != null) {
+    this.bytes = this.fullBytes = param;
+    this.last = this.len = param.length;
+  }
+}
+MlString.prototype = {
+  string:null,
+  bytes:null,
+  fullBytes:null,
+  array:null,
+  len:null,
+  last:0,
+  toJsString:function() {
+    return this.string = decodeURIComponent (escape(this.getFullBytes()));
+  },
+  toBytes:function() {
+    if (this.string != null)
+      var b = unescape (encodeURIComponent (this.string));
+    else {
+      var b = "", a = this.array, l = a.length;
+      for (var i = 0; i < l; i ++) b += String.fromCharCode (a[i]);
+    }
+    this.bytes = this.fullBytes = b;
+    this.last = this.len = b.length;
+    return b;
+  },
+  getBytes:function() {
+    var b = this.bytes;
+    if (b == null) b = this.toBytes();
+    return b;
+  },
+  getFullBytes:function() {
+    var b = this.fullBytes;
+    if (b !== null) return b;
+    b = this.bytes;
+    if (b == null) b = this.toBytes ();
+    if (this.last < this.len) {
+      this.bytes = (b += caml_str_repeat(this.len - this.last, '\0'));
+      this.last = this.len;
+    }
+    this.fullBytes = b;
+    return b;
+  },
+  toArray:function() {
+    var b = this.bytes;
+    if (b == null) b = this.toBytes ();
+    var a = [], l = this.last;
+    for (var i = 0; i < l; i++) a[i] = b.charCodeAt(i);
+    for (l = this.len; i < l; i++) a[i] = 0;
+    this.string = this.bytes = this.fullBytes = null;
+    this.last = this.len;
+    this.array = a;
+    return a;
+  },
+  getArray:function() {
+    var a = this.array;
+    if (!a) a = this.toArray();
+    return a;
+  },
+  getLen:function() {
+    var len = this.len;
+    if (len !== null) return len;
+    this.toBytes();
+    return this.len;
+  },
+  toString:function() { var s = this.string; return s?s:this.toJsString(); },
+  valueOf:function() { var s = this.string; return s?s:this.toJsString(); },
+  blitToArray:function(i1, a2, i2, l) {
+    var a1 = this.array;
+    if (a1) {
+      if (i2 <= i1) {
+        for (var i = 0; i < l; i++) a2[i2 + i] = a1[i1 + i];
+      } else {
+        for (var i = l - 1; i >= 0; i--) a2[i2 + i] = a1[i1 + i];
+      }
+    } else {
+      var b = this.bytes;
+      if (b == null) b = this.toBytes();
+      var l1 = this.last - i1;
+      if (l <= l1)
+        for (var i = 0; i < l; i++) a2 [i2 + i] = b.charCodeAt(i1 + i);
+      else {
+        for (var i = 0; i < l1; i++) a2 [i2 + i] = b.charCodeAt(i1 + i);
+        for (; i < l; i++) a2 [i2 + i] = 0;
+      }
+    }
+  },
+  get:function (i) {
+    var a = this.array;
+    if (a) return a[i];
+    var b = this.bytes;
+    if (b == null) b = this.toBytes();
+    return (i<this.last)?b.charCodeAt(i):0;
+  },
+  safeGet:function (i) {
+    if (this.len == null) this.toBytes();
+    if ((i < 0) || (i >= this.len)) caml_array_bound_error ();
+    return this.get(i);
+  },
+  set:function (i, c) {
+    var a = this.array;
+    if (!a) {
+      if (this.last == i) {
+        this.bytes += String.fromCharCode (c & 0xff);
+        this.last ++;
+        return 0;
+      }
+      a = this.toArray();
+    } else if (this.bytes != null) {
+      this.bytes = this.fullBytes = this.string = null;
+    }
+    a[i] = c & 0xff;
+    return 0;
+  },
+  safeSet:function (i, c) {
+    if (this.len == null) this.toBytes ();
+    if ((i < 0) || (i >= this.len)) caml_array_bound_error ();
+    this.set(i, c);
+  },
+  fill:function (ofs, len, c) {
+    if (ofs >= this.last && this.last && c == 0) return;
+    var a = this.array;
+    if (!a) a = this.toArray();
+    else if (this.bytes != null) {
+      this.bytes = this.fullBytes = this.string = null;
+    }
+    var l = ofs + len;
+    for (var i = ofs; i < l; i++) a[i] = c;
+  },
+  compare:function (s2) {
+    if (this.string != null && s2.string != null) {
+      if (this.string < s2.string) return -1;
+      if (this.string > s2.string) return 1;
+      return 0;
+    }
+    var b1 = this.getFullBytes ();
+    var b2 = s2.getFullBytes ();
+    if (b1 < b2) return -1;
+    if (b1 > b2) return 1;
+    return 0;
+  },
+  equal:function (s2) {
+    if (this.string != null && s2.string != null)
+      return this.string == s2.string;
+    return this.getFullBytes () == s2.getFullBytes ();
+  },
+  lessThan:function (s2) {
+    if (this.string != null && s2.string != null)
+      return this.string < s2.string;
+    return this.getFullBytes () < s2.getFullBytes ();
+  },
+  lessEqual:function (s2) {
+    if (this.string != null && s2.string != null)
+      return this.string <= s2.string;
+    return this.getFullBytes () <= s2.getFullBytes ();
+  }
+}
+function MlWrappedString (s) { this.string = s; }
+MlWrappedString.prototype = new MlString();
+function MlMakeString (l) { this.bytes = ""; this.len = l; }
+MlMakeString.prototype = new MlString ();
+function caml_array_get (array, index) {
+  if ((index < 0) || (index >= array.length - 1)) caml_array_bound_error();
+  return array[index+1];
+}
+function caml_array_set (array, index, newval) {
+  if ((index < 0) || (index >= array.length - 1)) caml_array_bound_error();
+  array[index+1]=newval; return 0;
+}
+function caml_blit_string(s1, i1, s2, i2, len) {
+  if (len === 0) return;
+  if (i2 === s2.last && s2.bytes != null) {
+    var b = s1.bytes;
+    if (b == null) b = s1.toBytes ();
+    if (i1 > 0 || s1.last > len) b = b.slice(i1, i1 + len);
+    s2.bytes += b;
+    s2.last += b.length;
+    return;
+  }
+  var a = s2.array;
+  if (!a) a = s2.toArray(); else { s2.bytes = s2.string = null; }
+  s1.blitToArray (i1, a, i2, len);
+}
+function caml_call_gen(f, args) {
+  if(f.fun)
+    return caml_call_gen(f.fun, args);
+  var n = f.length;
+  var d = n - args.length;
+  if (d == 0)
+    return f.apply(null, args);
+  else if (d < 0)
+    return caml_call_gen(f.apply(null, args.slice(0,n)), args.slice(n));
+  else
+    return function (x){ return caml_call_gen(f, args.concat([x])); };
+}
+function caml_classify_float (x) {
+  if (isFinite (x)) {
+    if (Math.abs(x) >= 2.2250738585072014e-308) return 0;
+    if (x != 0) return 1;
+    return 2;
+  }
+  return isNaN(x)?4:3;
+}
+function caml_int64_compare(x,y) {
+  var x3 = x[3] << 16;
+  var y3 = y[3] << 16;
+  if (x3 > y3) return 1;
+  if (x3 < y3) return -1;
+  if (x[2] > y[2]) return 1;
+  if (x[2] < y[2]) return -1;
+  if (x[1] > y[1]) return 1;
+  if (x[1] < y[1]) return -1;
+  return 0;
+}
+function caml_int_compare (a, b) {
+  if (a < b) return (-1); if (a == b) return 0; return 1;
+}
+function caml_compare_val (a, b, total) {
+  var stack = [];
+  for(;;) {
+    if (!(total && a === b)) {
+      if (a instanceof MlString) {
+        if (b instanceof MlString) {
+            if (a != b) {
+		var x = a.compare(b);
+		if (x != 0) return x;
+	    }
+        } else
+          return 1;
+      } else if (a instanceof Array && a[0] === (a[0]|0)) {
+        var ta = a[0];
+        if (ta === 250) {
+          a = a[1];
+          continue;
+        } else if (b instanceof Array && b[0] === (b[0]|0)) {
+          var tb = b[0];
+          if (tb === 250) {
+            b = b[1];
+            continue;
+          } else if (ta != tb) {
+            return (ta < tb)?-1:1;
+          } else {
+            switch (ta) {
+            case 248: {
+		var x = caml_int_compare(a[2], b[2]);
+		if (x != 0) return x;
+		break;
+	    }
+            case 255: {
+		var x = caml_int64_compare(a, b);
+		if (x != 0) return x;
+		break;
+	    }
+            default:
+              if (a.length != b.length) return (a.length < b.length)?-1:1;
+              if (a.length > 1) stack.push(a, b, 1);
+            }
+          }
+        } else
+          return 1;
+      } else if (b instanceof MlString ||
+                 (b instanceof Array && b[0] === (b[0]|0))) {
+        return -1;
+      } else {
+        if (a < b) return -1;
+        if (a > b) return 1;
+        if (total && a != b) {
+          if (a == a) return 1;
+          if (b == b) return -1;
+        }
+      }
+    }
+    if (stack.length == 0) return 0;
+    var i = stack.pop();
+    b = stack.pop();
+    a = stack.pop();
+    if (i + 1 < a.length) stack.push(a, b, i + 1);
+    a = a[i];
+    b = b[i];
+  }
+}
+function caml_compare (a, b) { return caml_compare_val (a, b, true); }
+function caml_convert_raw_backtrace () {
+  caml_invalid_argument
+    ("Primitive 'caml_convert_raw_backtrace' not implemented");
+}
+function caml_create_string(len) {
+  if (len < 0) caml_invalid_argument("String.create");
+  return new MlMakeString(len);
+}
+function caml_equal (x, y) { return +(caml_compare_val(x,y,false) == 0); }
+function caml_fill_string(s, i, l, c) { s.fill (i, l, c); }
+function caml_parse_format (fmt) {
+  fmt = fmt.toString ();
+  var len = fmt.length;
+  if (len > 31) caml_invalid_argument("format_int: format too long");
+  var f =
+    { justify:'+', signstyle:'-', filler:' ', alternate:false,
+      base:0, signedconv:false, width:0, uppercase:false,
+      sign:1, prec:-1, conv:'f' };
+  for (var i = 0; i < len; i++) {
+    var c = fmt.charAt(i);
+    switch (c) {
+    case '-':
+      f.justify = '-'; break;
+    case '+': case ' ':
+      f.signstyle = c; break;
+    case '0':
+      f.filler = '0'; break;
+    case '#':
+      f.alternate = true; break;
+    case '1': case '2': case '3': case '4': case '5':
+    case '6': case '7': case '8': case '9':
+      f.width = 0;
+      while (c=fmt.charCodeAt(i) - 48, c >= 0 && c <= 9) {
+        f.width = f.width * 10 + c; i++
+      }
+      i--;
+     break;
+    case '.':
+      f.prec = 0;
+      i++;
+      while (c=fmt.charCodeAt(i) - 48, c >= 0 && c <= 9) {
+        f.prec = f.prec * 10 + c; i++
+      }
+      i--;
+    case 'd': case 'i':
+      f.signedconv = true; /* fallthrough */
+    case 'u':
+      f.base = 10; break;
+    case 'x':
+      f.base = 16; break;
+    case 'X':
+      f.base = 16; f.uppercase = true; break;
+    case 'o':
+      f.base = 8; break;
+    case 'e': case 'f': case 'g':
+      f.signedconv = true; f.conv = c; break;
+    case 'E': case 'F': case 'G':
+      f.signedconv = true; f.uppercase = true;
+      f.conv = c.toLowerCase (); break;
+    }
+  }
+  return f;
+}
+function caml_finish_formatting(f, rawbuffer) {
+  if (f.uppercase) rawbuffer = rawbuffer.toUpperCase();
+  var len = rawbuffer.length;
+  if (f.signedconv && (f.sign < 0 || f.signstyle != '-')) len++;
+  if (f.alternate) {
+    if (f.base == 8) len += 1;
+    if (f.base == 16) len += 2;
+  }
+  var buffer = "";
+  if (f.justify == '+' && f.filler == ' ')
+    for (var i = len; i < f.width; i++) buffer += ' ';
+  if (f.signedconv) {
+    if (f.sign < 0) buffer += '-';
+    else if (f.signstyle != '-') buffer += f.signstyle;
+  }
+  if (f.alternate && f.base == 8) buffer += '0';
+  if (f.alternate && f.base == 16) buffer += "0x";
+  if (f.justify == '+' && f.filler == '0')
+    for (var i = len; i < f.width; i++) buffer += '0';
+  buffer += rawbuffer;
+  if (f.justify == '-')
+    for (var i = len; i < f.width; i++) buffer += ' ';
+  return new MlWrappedString (buffer);
+}
+function caml_format_float (fmt, x) {
+  var s, f = caml_parse_format(fmt);
+  var prec = (f.prec < 0)?6:f.prec;
+  if (x < 0) { f.sign = -1; x = -x; }
+  if (isNaN(x)) { s = "nan"; f.filler = ' '; }
+  else if (!isFinite(x)) { s = "inf"; f.filler = ' '; }
+  else
+    switch (f.conv) {
+    case 'e':
+      var s = x.toExponential(prec);
+      var i = s.length;
+      if (s.charAt(i - 3) == 'e')
+        s = s.slice (0, i - 1) + '0' + s.slice (i - 1);
+      break;
+    case 'f':
+      s = x.toFixed(prec); break;
+    case 'g':
+      prec = prec?prec:1;
+      s = x.toExponential(prec - 1);
+      var j = s.indexOf('e');
+      var exp = +s.slice(j + 1);
+      if (exp < -4 || x.toFixed(0).length > prec) {
+        var i = j - 1; while (s.charAt(i) == '0') i--;
+        if (s.charAt(i) == '.') i--;
+        s = s.slice(0, i + 1) + s.slice(j);
+        i = s.length;
+        if (s.charAt(i - 3) == 'e')
+          s = s.slice (0, i - 1) + '0' + s.slice (i - 1);
+        break;
+      } else {
+        var p = prec;
+        if (exp < 0) { p -= exp + 1; s = x.toFixed(p); }
+        else while (s = x.toFixed(p), s.length > prec + 1) p--;
+        if (p) {
+          var i = s.length - 1; while (s.charAt(i) == '0') i--;
+          if (s.charAt(i) == '.') i--;
+          s = s.slice(0, i + 1);
+        }
+      }
+      break;
+    }
+  return caml_finish_formatting(f, s);
+}
+function caml_format_int(fmt, i) {
+  if (fmt.toString() == "%d") return new MlWrappedString(""+i);
+  var f = caml_parse_format(fmt);
+  if (i < 0) { if (f.signedconv) { f.sign = -1; i = -i; } else i >>>= 0; }
+  var s = i.toString(f.base);
+  if (f.prec >= 0) {
+    f.filler = ' ';
+    var n = f.prec - s.length;
+    if (n > 0) s = caml_str_repeat (n, '0') + s;
+  }
+  return caml_finish_formatting(f, s);
+}
+function caml_get_exception_raw_backtrace () {
+  caml_invalid_argument
+    ("Primitive 'caml_get_exception_raw_backtrace' not implemented");
+}
+function caml_greaterequal (x, y) { return +(caml_compare(x,y,false) >= 0); }
+function caml_int64_is_negative(x) {
+  return (x[3] << 16) < 0;
+}
+function caml_int64_neg (x) {
+  var y1 = - x[1];
+  var y2 = - x[2] + (y1 >> 24);
+  var y3 = - x[3] + (y2 >> 24);
+  return [255, y1 & 0xffffff, y2 & 0xffffff, y3 & 0xffff];
+}
+function caml_int64_of_int32 (x) {
+  return [255, x & 0xffffff, (x >> 24) & 0xffffff, (x >> 31) & 0xffff]
+}
+function caml_int64_ucompare(x,y) {
+  if (x[3] > y[3]) return 1;
+  if (x[3] < y[3]) return -1;
+  if (x[2] > y[2]) return 1;
+  if (x[2] < y[2]) return -1;
+  if (x[1] > y[1]) return 1;
+  if (x[1] < y[1]) return -1;
+  return 0;
+}
+function caml_int64_lsl1 (x) {
+  x[3] = (x[3] << 1) | (x[2] >> 23);
+  x[2] = ((x[2] << 1) | (x[1] >> 23)) & 0xffffff;
+  x[1] = (x[1] << 1) & 0xffffff;
+}
+function caml_int64_lsr1 (x) {
+  x[1] = ((x[1] >>> 1) | (x[2] << 23)) & 0xffffff;
+  x[2] = ((x[2] >>> 1) | (x[3] << 23)) & 0xffffff;
+  x[3] = x[3] >>> 1;
+}
+function caml_int64_sub (x, y) {
+  var z1 = x[1] - y[1];
+  var z2 = x[2] - y[2] + (z1 >> 24);
+  var z3 = x[3] - y[3] + (z2 >> 24);
+  return [255, z1 & 0xffffff, z2 & 0xffffff, z3 & 0xffff];
+}
+function caml_int64_udivmod (x, y) {
+  var offset = 0;
+  var modulus = x.slice ();
+  var divisor = y.slice ();
+  var quotient = [255, 0, 0, 0];
+  while (caml_int64_ucompare (modulus, divisor) > 0) {
+    offset++;
+    caml_int64_lsl1 (divisor);
+  }
+  while (offset >= 0) {
+    offset --;
+    caml_int64_lsl1 (quotient);
+    if (caml_int64_ucompare (modulus, divisor) >= 0) {
+      quotient[1] ++;
+      modulus = caml_int64_sub (modulus, divisor);
+    }
+    caml_int64_lsr1 (divisor);
+  }
+  return [0,quotient, modulus];
+}
+function caml_int64_to_int32 (x) {
+  return x[1] | (x[2] << 24);
+}
+function caml_int64_is_zero(x) {
+  return (x[3]|x[2]|x[1]) == 0;
+}
+function caml_int64_format (fmt, x) {
+  var f = caml_parse_format(fmt);
+  if (f.signedconv && caml_int64_is_negative(x)) {
+    f.sign = -1; x = caml_int64_neg(x);
+  }
+  var buffer = "";
+  var wbase = caml_int64_of_int32(f.base);
+  var cvtbl = "0123456789abcdef";
+  do {
+    var p = caml_int64_udivmod(x, wbase);
+    x = p[1];
+    buffer = cvtbl.charAt(caml_int64_to_int32(p[2])) + buffer;
+  } while (! caml_int64_is_zero(x));
+  if (f.prec >= 0) {
+    f.filler = ' ';
+    var n = f.prec - buffer.length;
+    if (n > 0) buffer = caml_str_repeat (n, '0') + buffer;
+  }
+  return caml_finish_formatting(f, buffer);
+}
+function caml_parse_sign_and_base (s) {
+  var i = 0, base = 10, sign = s.get(0) == 45?(i++,-1):1;
+  if (s.get(i) == 48)
+    switch (s.get(i + 1)) {
+    case 120: case 88: base = 16; i += 2; break;
+    case 111: case 79: base =  8; i += 2; break;
+    case  98: case 66: base =  2; i += 2; break;
+    }
+  return [i, sign, base];
+}
+function caml_parse_digit(c) {
+  if (c >= 48 && c <= 57)  return c - 48;
+  if (c >= 65 && c <= 90)  return c - 55;
+  if (c >= 97 && c <= 122) return c - 87;
+  return -1;
+}
+var caml_global_data = [0];
+function caml_failwith (msg) {
+  caml_raise_with_string(caml_global_data[3], msg);
+}
+function caml_int_of_string (s) {
+  var r = caml_parse_sign_and_base (s);
+  var i = r[0], sign = r[1], base = r[2];
+  var threshold = -1 >>> 0;
+  var c = s.get(i);
+  var d = caml_parse_digit(c);
+  if (d < 0 || d >= base) caml_failwith("int_of_string");
+  var res = d;
+  for (;;) {
+    i++;
+    c = s.get(i);
+    if (c == 95) continue;
+    d = caml_parse_digit(c);
+    if (d < 0 || d >= base) break;
+    res = base * res + d;
+    if (res > threshold) caml_failwith("int_of_string");
+  }
+  if (i != s.getLen()) caml_failwith("int_of_string");
+  res = sign * res;
+  if ((res | 0) != res) caml_failwith("int_of_string");
+  return res;
+}
+function caml_is_printable(c) { return +(c > 31 && c < 127); }
+function caml_js_call(f, o, args) { return f.apply(o, args.slice(1)); }
+function caml_js_get_console () {
+  var c = this.console?this.console:{};
+  var m = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+           "trace", "group", "groupCollapsed", "groupEnd", "time", "timeEnd"];
+  function f () {}
+  for (var i = 0; i < m.length; i++) if (!c[m[i]]) c[m[i]]=f;
+  return c;
+}
+var caml_js_regexps = { amp:/&/g, lt:/</g, quot:/\"/g, all:/[&<\"]/ };
+function caml_js_html_escape (s) {
+  if (!caml_js_regexps.all.test(s)) return s;
+  return s.replace(caml_js_regexps.amp, "&amp;")
+          .replace(caml_js_regexps.lt, "&lt;")
+          .replace(caml_js_regexps.quot, "&quot;");
+}
+function caml_js_wrap_callback(f) {
+  var toArray = Array.prototype.slice;
+  return function () {
+    var args = (arguments.length > 0)?toArray.call (arguments):[undefined];
+    return caml_call_gen(f, args);
+  }
+}
+function caml_make_vect (len, init) {
+  var b = [0]; for (var i = 1; i <= len; i++) b[i] = init; return b;
+}
+function caml_ml_flush () { return 0; }
+function caml_ml_open_descriptor_out () { return 0; }
+function caml_ml_out_channels_list () { return 0; }
+function caml_ml_output () { return 0; }
+function caml_raise_constant (tag) { throw [0, tag]; }
+function caml_raise_zero_divide () {
+  caml_raise_constant(caml_global_data[6]);
+}
+function caml_mod(x,y) {
+  if (y == 0) caml_raise_zero_divide ();
+  return x%y;
+}
+function caml_mul(x,y) {
+  return ((((x >> 16) * y) << 16) + (x & 0xffff) * y)|0;
+}
+function caml_notequal (x, y) { return +(caml_compare_val(x,y,false) != 0); }
+function caml_obj_is_block (x) { return +(x instanceof Array); }
+function caml_obj_tag (x) { return (x instanceof Array)?x[0]:1000; }
+function caml_register_global (n, v) { caml_global_data[n + 1] = v; }
+var caml_named_values = {};
+function caml_register_named_value(nm,v) {
+  caml_named_values[nm] = v; return 0;
+}
+function caml_sys_const_word_size () { return 32; }
+function caml_update_dummy (x, y) {
+  if( typeof y==="function" ) { x.fun = y; return 0; }
+  if( y.fun ) { x.fun = y.fun; return 0; }
+  var i = y.length; while (i--) x[i] = y[i]; return 0;
+}
+(function()
+   {function _oS_(_y8_,_y9_,_y__,_y$_,_za_,_zb_,_zc_)
+     {return _y8_.length==6
+              ?_y8_(_y9_,_y__,_y$_,_za_,_zb_,_zc_)
+              :caml_call_gen(_y8_,[_y9_,_y__,_y$_,_za_,_zb_,_zc_]);}
+    function _nZ_(_y3_,_y4_,_y5_,_y6_,_y7_)
+     {return _y3_.length==4
+              ?_y3_(_y4_,_y5_,_y6_,_y7_)
+              :caml_call_gen(_y3_,[_y4_,_y5_,_y6_,_y7_]);}
+    function _fx_(_yZ_,_y0_,_y1_,_y2_)
+     {return _yZ_.length==3
+              ?_yZ_(_y0_,_y1_,_y2_)
+              :caml_call_gen(_yZ_,[_y0_,_y1_,_y2_]);}
+    function _cy_(_yW_,_yX_,_yY_)
+     {return _yW_.length==2?_yW_(_yX_,_yY_):caml_call_gen(_yW_,[_yX_,_yY_]);}
+    function _cl_(_yU_,_yV_)
+     {return _yU_.length==1?_yU_(_yV_):caml_call_gen(_yU_,[_yV_]);}
+    var
+     _a_=[0,new MlString("Failure")],
+     _b_=[0,new MlString("Invalid_argument")],
+     _c_=[0,new MlString("Not_found")],
+     _d_=[0,new MlString("Assert_failure")],
+     _e_=new MlString("File \"%s\", line %d, characters %d-%d: %s");
+    caml_register_global(6,_c_);
+    caml_register_global(5,[0,new MlString("Division_by_zero")]);
+    caml_register_global(3,_b_);
+    caml_register_global(2,_a_);
+    var
+     _bw_=[0,new MlString("Out_of_memory")],
+     _bv_=[0,new MlString("Match_failure")],
+     _bu_=[0,new MlString("Stack_overflow")],
+     _bt_=[0,new MlString("Undefined_recursive_module")],
+     _bs_=new MlString("%.12g"),
+     _br_=new MlString("."),
+     _bq_=new MlString("%d"),
+     _bp_=new MlString("true"),
+     _bo_=new MlString("false"),
+     _bn_=new MlString("Pervasives.do_at_exit"),
+     _bm_=new MlString("\\b"),
+     _bl_=new MlString("\\t"),
+     _bk_=new MlString("\\n"),
+     _bj_=new MlString("\\r"),
+     _bi_=new MlString("\\\\"),
+     _bh_=new MlString("\\'"),
+     _bg_=new MlString("String.blit"),
+     _bf_=new MlString("String.sub"),
+     _be_=new MlString("Map.remove_min_elt"),
+     _bd_=[0,0,0,0],
+     _bc_=[0,new MlString("map.ml"),270,10],
+     _bb_=[0,0,0],
+     _ba_=new MlString("Map.bal"),
+     _a$_=new MlString("Map.bal"),
+     _a__=new MlString("Map.bal"),
+     _a9_=new MlString("Map.bal"),
+     _a8_=new MlString("Queue.Empty"),
+     _a7_=new MlString("Buffer.add: cannot grow buffer"),
+     _a6_=new MlString(""),
+     _a5_=new MlString(""),
+     _a4_=new MlString("%.12g"),
+     _a3_=new MlString("\""),
+     _a2_=new MlString("\""),
+     _a1_=new MlString("'"),
+     _a0_=new MlString("'"),
+     _aZ_=new MlString("nan"),
+     _aY_=new MlString("neg_infinity"),
+     _aX_=new MlString("infinity"),
+     _aW_=new MlString("."),
+     _aV_=new MlString("printf: bad positional specification (0)."),
+     _aU_=new MlString("%_"),
+     _aT_=[0,new MlString("printf.ml"),143,8],
+     _aS_=new MlString("'"),
+     _aR_=new MlString("Printf: premature end of format string '"),
+     _aQ_=new MlString("'"),
+     _aP_=new MlString(" in format string '"),
+     _aO_=new MlString(", at char number "),
+     _aN_=new MlString("Printf: bad conversion %"),
+     _aM_=new MlString("Sformat.index_of_int: negative argument "),
+     _aL_=new MlString(""),
+     _aK_=new MlString(", %s%s"),
+     _aJ_=[1,1],
+     _aI_=new MlString("%s\n"),
+     _aH_=
+      new
+       MlString
+       ("(Program not linked with -g, cannot print stack backtrace)\n"),
+     _aG_=new MlString("Raised at"),
+     _aF_=new MlString("Re-raised at"),
+     _aE_=new MlString("Raised by primitive operation at"),
+     _aD_=new MlString("Called from"),
+     _aC_=new MlString("%s file \"%s\", line %d, characters %d-%d"),
+     _aB_=new MlString("%s unknown location"),
+     _aA_=new MlString("Out of memory"),
+     _az_=new MlString("Stack overflow"),
+     _ay_=new MlString("Pattern matching failed"),
+     _ax_=new MlString("Assertion failed"),
+     _aw_=new MlString("Undefined recursive module"),
+     _av_=new MlString("(%s%s)"),
+     _au_=new MlString(""),
+     _at_=new MlString(""),
+     _as_=new MlString("(%s)"),
+     _ar_=new MlString("%d"),
+     _aq_=new MlString("%S"),
+     _ap_=new MlString("_"),
+     _ao_=[0,new MlString("src/core/lwt.ml"),799,20],
+     _an_=[0,new MlString("src/core/lwt.ml"),801,8],
+     _am_=[0,new MlString("src/core/lwt.ml"),692,20],
+     _al_=[0,new MlString("src/core/lwt.ml"),695,8],
+     _ak_=[0,new MlString("src/core/lwt.ml"),648,20],
+     _aj_=[0,new MlString("src/core/lwt.ml"),651,8],
+     _ai_=[0,new MlString("src/core/lwt.ml"),498,8],
+     _ah_=[0,new MlString("src/core/lwt.ml"),487,9],
+     _ag_=new MlString("Lwt.wakeup_result"),
+     _af_=new MlString("Lwt.Canceled"),
+     _ae_=new MlString("on"),
+     _ad_=new MlString("\""),
+     _ac_=new MlString(" name=\""),
+     _ab_=new MlString("\""),
+     _aa_=new MlString(" type=\""),
+     _$_=new MlString("<"),
+     ___=new MlString(">"),
+     _Z_=new MlString(""),
+     _Y_=new MlString("<input name=\"x\">"),
+     _X_=new MlString("input"),
+     _W_=new MlString("x"),
+     _V_=new MlString("canvas"),
+     _U_=new MlString("div"),
+     _T_=new MlString("label"),
+     _S_=new MlString("input"),
+     _R_=new MlString("mousedown"),
+     _Q_=new MlString("2d"),
+     _P_=new MlString("Dom_html.Canvas_not_available"),
+     _O_=new MlString("Exception during Lwt.async: "),
+     _N_=new MlString("Lwt_js_event"),
+     _M_=new MlString("transitionend"),
+     _L_=new MlString("transition"),
+     _K_=new MlString("otransitionend"),
+     _J_=new MlString("oTransitionEnd"),
+     _I_=new MlString("OTransition"),
+     _H_=new MlString("transitionend"),
+     _G_=new MlString("MozTransition"),
+     _F_=new MlString("webkitTransitionEnd"),
+     _E_=new MlString("WebkitTransition"),
+     _D_=new MlString("rgb(0, 0, 0)"),
+     _C_=new MlString("called"),
+     _B_=new MlString("x1"),
+     _A_=new MlString("x2"),
+     _z_=new MlString("move"),
+     _y_=new MlString("stop"),
+     _x_=new MlString("button"),
+     _w_=new MlString("move"),
+     _v_=new MlString("fps"),
+     _u_=
+      [0,new MlString("x1"),[0,new MlString("x2"),[0,new MlString("x4"),0]]],
+     _t_=new MlString("fps"),
+     _s_=new MlString("rgba(255, 0, 0, %.1f)"),
+     _r_=new MlString("12px 'Times New Roman'"),
+     _q_=new MlString("crash!!"),
+     _p_=new MlString("rgb(%d, %d, %d)"),
+     _o_=new MlString("canvas"),
+     _n_=new MlString("radio"),
+     _m_=new MlString("radio"),
+     _l_=new MlString("submit"),
+     _k_=new MlString("");
+    function _j_(s_f_){throw [0,_a_,s_f_];}
+    function _bx_(s_g_){throw [0,_b_,s_g_];}
+    function _bP_(x_i_,y_h_){return caml_greaterequal(x_i_,y_h_)?x_i_:y_h_;}
+    function _bJ_(s1_by_,s2_bA_)
+     {var
+       l1_bz_=s1_by_.getLen(),
+       l2_bB_=s2_bA_.getLen(),
+       s_bC_=caml_create_string(l1_bz_+l2_bB_|0);
+      caml_blit_string(s1_by_,0,s_bC_,0,l1_bz_);
+      caml_blit_string(s2_bA_,0,s_bC_,l1_bz_,l2_bB_);
+      return s_bC_;}
+    function string_of_bool_bR_(b_bD_){return b_bD_?_bp_:_bo_;}
+    function string_of_int_bQ_(n_bE_){return caml_format_int(_bq_,n_bE_);}
+    function valid_float_lexem_bO_(s_bF_)
+     {var l_bI_=s_bF_.getLen();
+      return function(i_bG_)
+               {var i_bH_=i_bG_;
+                for(;;)
+                 {if(l_bI_<=i_bH_)return _bJ_(s_bF_,_br_);
+                  var
+                   _bK_=s_bF_.safeGet(i_bH_),
+                   _bL_=48<=_bK_?58<=_bK_?0:1:45===_bK_?1:0;
+                  if(_bL_){var _bM_=i_bH_+1|0,i_bH_=_bM_;continue;}
+                  return s_bF_;}}
+              (0);}
+    var stderr_bS_=caml_ml_open_descriptor_out(2);
+    function string_of_float_b5_(f_bN_)
+     {return valid_float_lexem_bO_(caml_format_float(_bs_,f_bN_));}
+    function flush_all_b1_(param_bX_)
+     {return function(param_bT_)
+               {var param_bU_=param_bT_;
+                for(;;)
+                 {if(param_bU_)
+                   {var l_bV_=param_bU_[2];
+                    try {}catch(_bW_){}
+                    var param_bU_=l_bV_;
+                    continue;}
+                  return 0;}}
+              (caml_ml_out_channels_list(0));}
+    function output_string_b6_(oc_bZ_,s_bY_)
+     {return caml_ml_output(oc_bZ_,s_bY_,0,s_bY_.getLen());}
+    function prerr_char_b7_(c_b0_)
+     {return caml_ml_output_char(stderr_bS_,c_b0_);}
+    function do_at_exit_b3_(param_b2_){return flush_all_b1_(0);}
+    function exit_b8_(retcode_b4_)
+     {do_at_exit_b3_(0);return caml_sys_exit(retcode_b4_);}
+    caml_register_named_value(_bn_,do_at_exit_b3_);
+    function _ca_(_b__,_b9_){return caml_ml_output_char(_b__,_b9_);}
+    function _cP_(_b$_){return caml_ml_flush(_b$_);}
+    function _ch_(l1_cb_,l2_cd_)
+     {var l1_cc_=l1_cb_,l2_ce_=l2_cd_;
+      for(;;)
+       {if(l1_cc_)
+         {var
+           l_cf_=l1_cc_[2],
+           _cg_=[0,l1_cc_[1],l2_ce_],
+           l1_cc_=l_cf_,
+           l2_ce_=_cg_;
+          continue;}
+        return l2_ce_;}}
+    function _cO_(l_ci_){return _ch_(l_ci_,0);}
+    function _cn_(f_ck_,param_cj_)
+     {if(param_cj_)
+       {var l_cm_=param_cj_[2],r_co_=_cl_(f_ck_,param_cj_[1]);
+        return [0,r_co_,_cn_(f_ck_,l_cm_)];}
+      return 0;}
+    function _cQ_(f_cr_,param_cp_)
+     {var param_cq_=param_cp_;
+      for(;;)
+       {if(param_cq_)
+         {var l_cs_=param_cq_[2];
+          _cl_(f_cr_,param_cq_[1]);
+          var param_cq_=l_cs_;
+          continue;}
+        return 0;}}
+    function _cS_(f_cx_,accu_ct_,l_cv_)
+     {var accu_cu_=accu_ct_,l_cw_=l_cv_;
+      for(;;)
+       {if(l_cw_)
+         {var
+           l_cz_=l_cw_[2],
+           _cA_=_cy_(f_cx_,accu_cu_,l_cw_[1]),
+           accu_cu_=_cA_,
+           l_cw_=l_cz_;
+          continue;}
+        return accu_cu_;}}
+    function _cR_(p_cE_,param_cB_)
+     {var param_cC_=param_cB_;
+      for(;;)
+       {if(param_cC_)
+         {var x_cD_=param_cC_[1],l_cF_=param_cC_[2];
+          if(_cl_(p_cE_,x_cD_))return x_cD_;
+          var param_cC_=l_cF_;
+          continue;}
+        throw [0,_c_];}}
+    function _cT_(p_cM_)
+     {return _cl_
+              (function(accu_cG_,param_cI_)
+                {var accu_cH_=accu_cG_,param_cJ_=param_cI_;
+                 for(;;)
+                  {if(param_cJ_)
+                    {var l_cK_=param_cJ_[2],x_cL_=param_cJ_[1];
+                     if(_cl_(p_cM_,x_cL_))
+                      {var _cN_=[0,x_cL_,accu_cH_],accu_cH_=_cN_,param_cJ_=l_cK_;
+                       continue;}
+                     var param_cJ_=l_cK_;
+                     continue;}
+                   return _cO_(accu_cH_);}},
+               0);}
+    function _dq_(c_cU_)
+     {if(39===c_cU_)return _bh_;
+      if(92===c_cU_)return _bi_;
+      if(!(14<=c_cU_))
+       switch(c_cU_)
+        {case 8:return _bm_;
+         case 9:return _bl_;
+         case 10:return _bk_;
+         case 13:return _bj_;
+         default:}
+      if(caml_is_printable(c_cU_))
+       {var s_cV_=caml_create_string(1);s_cV_.safeSet(0,c_cU_);return s_cV_;}
+      var s_cW_=caml_create_string(4);
+      s_cW_.safeSet(0,92);
+      s_cW_.safeSet(1,48+(c_cU_/100|0)|0);
+      s_cW_.safeSet(2,48+((c_cU_/10|0)%10|0)|0);
+      s_cW_.safeSet(3,48+(c_cU_%10|0)|0);
+      return s_cW_;}
+    function _dp_(n_cX_,c_cZ_)
+     {var s_cY_=caml_create_string(n_cX_);
+      caml_fill_string(s_cY_,0,n_cX_,c_cZ_);
+      return s_cY_;}
+    function _dr_(s_c2_,ofs_c0_,len_c1_)
+     {if(0<=ofs_c0_&&0<=len_c1_&&!((s_c2_.getLen()-len_c1_|0)<ofs_c0_))
+       {var r_c3_=caml_create_string(len_c1_);
+        caml_blit_string(s_c2_,ofs_c0_,r_c3_,0,len_c1_);
+        return r_c3_;}
+      return _bx_(_bf_);}
+    function _ds_(s1_c6_,ofs1_c5_,s2_c8_,ofs2_c7_,len_c4_)
+     {if
+       (0<=
+        len_c4_&&
+        0<=
+        ofs1_c5_&&
+        !((s1_c6_.getLen()-len_c4_|0)<ofs1_c5_)&&
+        0<=
+        ofs2_c7_&&
+        !((s2_c8_.getLen()-len_c4_|0)<ofs2_c7_))
+       return caml_blit_string(s1_c6_,ofs1_c5_,s2_c8_,ofs2_c7_,len_c4_);
+      return _bx_(_bg_);}
+    var
+     _dt_=caml_sys_const_word_size(0),
+     _du_=caml_mul(_dt_/8|0,(1<<(_dt_-10|0))-1|0)-1|0;
+    function _iy_(s_c$_)
+     {var n_c9_=[0,0],_c__=0,_da_=s_c$_.getLen()-1|0;
+      if(!(_da_<_c__))
+       {var i_db_=_c__;
+        for(;;)
+         {var
+           _dc_=s_c$_.safeGet(i_db_),
+           _dd_=
+            14<=_dc_
+             ?34===_dc_?1:92===_dc_?1:0
+             :11<=_dc_?13<=_dc_?1:0:8<=_dc_?1:0,
+           _de_=_dd_?2:caml_is_printable(_dc_)?1:4;
+          n_c9_[1]=n_c9_[1]+_de_|0;
+          var _df_=i_db_+1|0;
+          if(_da_!==i_db_){var i_db_=_df_;continue;}
+          break;}}
+      if(n_c9_[1]===s_c$_.getLen())return s_c$_;
+      var s__dg_=caml_create_string(n_c9_[1]);
+      n_c9_[1]=0;
+      var _dh_=0,_di_=s_c$_.getLen()-1|0;
+      if(!(_di_<_dh_))
+       {var i_dj_=_dh_;
+        for(;;)
+         {var _dk_=s_c$_.safeGet(i_dj_),_dl_=_dk_-34|0;
+          if(_dl_<0||58<_dl_)
+           if(-20<=_dl_)
+            var _dm_=1;
+           else
+            {switch(_dl_+34|0)
+              {case 8:
+                s__dg_.safeSet(n_c9_[1],92);
+                n_c9_[1]+=1;
+                s__dg_.safeSet(n_c9_[1],98);
+                var _dn_=1;
+                break;
+               case 9:
+                s__dg_.safeSet(n_c9_[1],92);
+                n_c9_[1]+=1;
+                s__dg_.safeSet(n_c9_[1],116);
+                var _dn_=1;
+                break;
+               case 10:
+                s__dg_.safeSet(n_c9_[1],92);
+                n_c9_[1]+=1;
+                s__dg_.safeSet(n_c9_[1],110);
+                var _dn_=1;
+                break;
+               case 13:
+                s__dg_.safeSet(n_c9_[1],92);
+                n_c9_[1]+=1;
+                s__dg_.safeSet(n_c9_[1],114);
+                var _dn_=1;
+                break;
+               default:var _dm_=1,_dn_=0;}
+             if(_dn_)var _dm_=0;}
+          else
+           var
+            _dm_=
+             (_dl_-1|0)<0||56<(_dl_-1|0)
+              ?(s__dg_.safeSet(n_c9_[1],92),
+                n_c9_[1]+=
+                1,
+                s__dg_.safeSet(n_c9_[1],_dk_),
+                0)
+              :1;
+          if(_dm_)
+           if(caml_is_printable(_dk_))
+            s__dg_.safeSet(n_c9_[1],_dk_);
+           else
+            {s__dg_.safeSet(n_c9_[1],92);
+             n_c9_[1]+=1;
+             s__dg_.safeSet(n_c9_[1],48+(_dk_/100|0)|0);
+             n_c9_[1]+=1;
+             s__dg_.safeSet(n_c9_[1],48+((_dk_/10|0)%10|0)|0);
+             n_c9_[1]+=1;
+             s__dg_.safeSet(n_c9_[1],48+(_dk_%10|0)|0);}
+          n_c9_[1]+=1;
+          var _do_=i_dj_+1|0;
+          if(_di_!==i_dj_){var i_dj_=_do_;continue;}
+          break;}}
+      return s__dg_;}
+    var _ix_=252,_iw_=253;
+    function _it_(_ec_)
+     {function _dw_(param_dv_){return param_dv_?param_dv_[5]:0;}
+      function _dP_(l_dx_,x_dD_,d_dC_,r_dz_)
+       {var
+         hl_dy_=_dw_(l_dx_),
+         hr_dA_=_dw_(r_dz_),
+         _dB_=hr_dA_<=hl_dy_?hl_dy_+1|0:hr_dA_+1|0;
+        return [0,l_dx_,x_dD_,d_dC_,r_dz_,_dB_];}
+      function _d6_(x_dF_,d_dE_){return [0,0,x_dF_,d_dE_,0,1];}
+      function _d7_(l_dG_,x_dR_,d_dQ_,r_dI_)
+       {var hl_dH_=l_dG_?l_dG_[5]:0,hr_dJ_=r_dI_?r_dI_[5]:0;
+        if((hr_dJ_+2|0)<hl_dH_)
+         {if(l_dG_)
+           {var
+             lr_dK_=l_dG_[4],
+             ld_dL_=l_dG_[3],
+             lv_dM_=l_dG_[2],
+             ll_dN_=l_dG_[1],
+             _dO_=_dw_(lr_dK_);
+            if(_dO_<=_dw_(ll_dN_))
+             return _dP_(ll_dN_,lv_dM_,ld_dL_,_dP_(lr_dK_,x_dR_,d_dQ_,r_dI_));
+            if(lr_dK_)
+             {var
+               lrd_dU_=lr_dK_[3],
+               lrv_dT_=lr_dK_[2],
+               lrl_dS_=lr_dK_[1],
+               _dV_=_dP_(lr_dK_[4],x_dR_,d_dQ_,r_dI_);
+              return _dP_
+                      (_dP_(ll_dN_,lv_dM_,ld_dL_,lrl_dS_),lrv_dT_,lrd_dU_,_dV_);}
+            return _bx_(_ba_);}
+          return _bx_(_a$_);}
+        if((hl_dH_+2|0)<hr_dJ_)
+         {if(r_dI_)
+           {var
+             rr_dW_=r_dI_[4],
+             rd_dX_=r_dI_[3],
+             rv_dY_=r_dI_[2],
+             rl_dZ_=r_dI_[1],
+             _d0_=_dw_(rl_dZ_);
+            if(_d0_<=_dw_(rr_dW_))
+             return _dP_(_dP_(l_dG_,x_dR_,d_dQ_,rl_dZ_),rv_dY_,rd_dX_,rr_dW_);
+            if(rl_dZ_)
+             {var
+               rld_d3_=rl_dZ_[3],
+               rlv_d2_=rl_dZ_[2],
+               rll_d1_=rl_dZ_[1],
+               _d4_=_dP_(rl_dZ_[4],rv_dY_,rd_dX_,rr_dW_);
+              return _dP_
+                      (_dP_(l_dG_,x_dR_,d_dQ_,rll_d1_),rlv_d2_,rld_d3_,_d4_);}
+            return _bx_(_a__);}
+          return _bx_(_a9_);}
+        var _d5_=hr_dJ_<=hl_dH_?hl_dH_+1|0:hr_dJ_+1|0;
+        return [0,l_dG_,x_dR_,d_dQ_,r_dI_,_d5_];}
+      var _im_=0;
+      function _in_(param_d8_){return param_d8_?0:1;}
+      function _eh_(x_ed_,data_eg_,param_d9_)
+       {if(param_d9_)
+         {var
+           r_d__=param_d9_[4],
+           d_d$_=param_d9_[3],
+           v_ea_=param_d9_[2],
+           l_eb_=param_d9_[1],
+           h_ef_=param_d9_[5],
+           c_ee_=_cy_(_ec_[1],x_ed_,v_ea_);
+          return 0===c_ee_
+                  ?[0,l_eb_,x_ed_,data_eg_,r_d__,h_ef_]
+                  :0<=c_ee_
+                    ?_d7_(l_eb_,v_ea_,d_d$_,_eh_(x_ed_,data_eg_,r_d__))
+                    :_d7_(_eh_(x_ed_,data_eg_,l_eb_),v_ea_,d_d$_,r_d__);}
+        return [0,0,x_ed_,data_eg_,0,1];}
+      function _io_(x_ek_,param_ei_)
+       {var param_ej_=param_ei_;
+        for(;;)
+         {if(param_ej_)
+           {var
+             r_eo_=param_ej_[4],
+             d_en_=param_ej_[3],
+             l_em_=param_ej_[1],
+             c_el_=_cy_(_ec_[1],x_ek_,param_ej_[2]);
+            if(0===c_el_)return d_en_;
+            var _ep_=0<=c_el_?r_eo_:l_em_,param_ej_=_ep_;
+            continue;}
+          throw [0,_c_];}}
+      function _ip_(x_es_,param_eq_)
+       {var param_er_=param_eq_;
+        for(;;)
+         {if(param_er_)
+           {var
+             r_ev_=param_er_[4],
+             l_eu_=param_er_[1],
+             c_et_=_cy_(_ec_[1],x_es_,param_er_[2]),
+             _ew_=0===c_et_?1:0;
+            if(_ew_)return _ew_;
+            var _ex_=0<=c_et_?r_ev_:l_eu_,param_er_=_ex_;
+            continue;}
+          return 0;}}
+      function _eO_(param_ey_)
+       {var param_ez_=param_ey_;
+        for(;;)
+         {if(param_ez_)
+           {var _eA_=param_ez_[1];
+            if(_eA_){var param_ez_=_eA_;continue;}
+            return [0,param_ez_[2],param_ez_[3]];}
+          throw [0,_c_];}}
+      function _iq_(param_eB_)
+       {var param_eC_=param_eB_;
+        for(;;)
+         {if(param_eC_)
+           {var _eD_=param_eC_[4],_eE_=param_eC_[3],_eF_=param_eC_[2];
+            if(_eD_){var param_eC_=_eD_;continue;}
+            return [0,_eF_,_eE_];}
+          throw [0,_c_];}}
+      function _eI_(param_eG_)
+       {if(param_eG_)
+         {var _eH_=param_eG_[1];
+          if(_eH_)
+           {var r_eL_=param_eG_[4],d_eK_=param_eG_[3],x_eJ_=param_eG_[2];
+            return _d7_(_eI_(_eH_),x_eJ_,d_eK_,r_eL_);}
+          return param_eG_[4];}
+        return _bx_(_be_);}
+      function _eZ_(t1_eM_,t2_eN_)
+       {if(t1_eM_)
+         {if(t2_eN_)
+           {var match_eP_=_eO_(t2_eN_),d_eR_=match_eP_[2],x_eQ_=match_eP_[1];
+            return _d7_(t1_eM_,x_eQ_,d_eR_,_eI_(t2_eN_));}
+          return t1_eM_;}
+        return t2_eN_;}
+      function _e0_(x_eX_,param_eS_)
+       {if(param_eS_)
+         {var
+           r_eT_=param_eS_[4],
+           d_eU_=param_eS_[3],
+           v_eV_=param_eS_[2],
+           l_eW_=param_eS_[1],
+           c_eY_=_cy_(_ec_[1],x_eX_,v_eV_);
+          return 0===c_eY_
+                  ?_eZ_(l_eW_,r_eT_)
+                  :0<=c_eY_
+                    ?_d7_(l_eW_,v_eV_,d_eU_,_e0_(x_eX_,r_eT_))
+                    :_d7_(_e0_(x_eX_,l_eW_),v_eV_,d_eU_,r_eT_);}
+        return 0;}
+      function _e3_(f_e4_,param_e1_)
+       {var param_e2_=param_e1_;
+        for(;;)
+         {if(param_e2_)
+           {var r_e7_=param_e2_[4],d_e6_=param_e2_[3],v_e5_=param_e2_[2];
+            _e3_(f_e4_,param_e2_[1]);
+            _cy_(f_e4_,v_e5_,d_e6_);
+            var param_e2_=r_e7_;
+            continue;}
+          return 0;}}
+      function _e9_(f_e__,param_e8_)
+       {if(param_e8_)
+         {var
+           h_fc_=param_e8_[5],
+           r_fb_=param_e8_[4],
+           d_fa_=param_e8_[3],
+           v_e$_=param_e8_[2],
+           l__fd_=_e9_(f_e__,param_e8_[1]),
+           d__fe_=_cl_(f_e__,d_fa_);
+          return [0,l__fd_,v_e$_,d__fe_,_e9_(f_e__,r_fb_),h_fc_];}
+        return 0;}
+      function _fh_(f_fi_,param_ff_)
+       {if(param_ff_)
+         {var
+           v_fg_=param_ff_[2],
+           h_fl_=param_ff_[5],
+           r_fk_=param_ff_[4],
+           d_fj_=param_ff_[3],
+           l__fm_=_fh_(f_fi_,param_ff_[1]),
+           d__fn_=_cy_(f_fi_,v_fg_,d_fj_);
+          return [0,l__fm_,v_fg_,d__fn_,_fh_(f_fi_,r_fk_),h_fl_];}
+        return 0;}
+      function _fs_(f_ft_,m_fo_,accu_fq_)
+       {var m_fp_=m_fo_,accu_fr_=accu_fq_;
+        for(;;)
+         {if(m_fp_)
+           {var
+             r_fw_=m_fp_[4],
+             d_fv_=m_fp_[3],
+             v_fu_=m_fp_[2],
+             _fy_=_fx_(f_ft_,v_fu_,d_fv_,_fs_(f_ft_,m_fp_[1],accu_fr_)),
+             m_fp_=r_fw_,
+             accu_fr_=_fy_;
+            continue;}
+          return accu_fr_;}}
+      function _fF_(p_fB_,param_fz_)
+       {var param_fA_=param_fz_;
+        for(;;)
+         {if(param_fA_)
+           {var
+             r_fE_=param_fA_[4],
+             l_fD_=param_fA_[1],
+             _fC_=_cy_(p_fB_,param_fA_[2],param_fA_[3]);
+            if(_fC_)
+             {var _fG_=_fF_(p_fB_,l_fD_);
+              if(_fG_){var param_fA_=r_fE_;continue;}
+              var _fH_=_fG_;}
+            else
+             var _fH_=_fC_;
+            return _fH_;}
+          return 1;}}
+      function _fP_(p_fK_,param_fI_)
+       {var param_fJ_=param_fI_;
+        for(;;)
+         {if(param_fJ_)
+           {var
+             r_fN_=param_fJ_[4],
+             l_fM_=param_fJ_[1],
+             _fL_=_cy_(p_fK_,param_fJ_[2],param_fJ_[3]);
+            if(_fL_)
+             var _fO_=_fL_;
+            else
+             {var _fQ_=_fP_(p_fK_,l_fM_);
+              if(!_fQ_){var param_fJ_=r_fN_;continue;}
+              var _fO_=_fQ_;}
+            return _fO_;}
+          return 0;}}
+      function _fS_(k_fU_,v_fT_,param_fR_)
+       {if(param_fR_)
+         {var r_fX_=param_fR_[4],d_fW_=param_fR_[3],x_fV_=param_fR_[2];
+          return _d7_(_fS_(k_fU_,v_fT_,param_fR_[1]),x_fV_,d_fW_,r_fX_);}
+        return _d6_(k_fU_,v_fT_);}
+      function _fZ_(k_f1_,v_f0_,param_fY_)
+       {if(param_fY_)
+         {var d_f4_=param_fY_[3],x_f3_=param_fY_[2],l_f2_=param_fY_[1];
+          return _d7_(l_f2_,x_f3_,d_f4_,_fZ_(k_f1_,v_f0_,param_fY_[4]));}
+        return _d6_(k_f1_,v_f0_);}
+      function _f9_(l_f5_,v_f$_,d_f__,r_f6_)
+       {if(l_f5_)
+         {if(r_f6_)
+           {var
+             rh_f7_=r_f6_[5],
+             lh_f8_=l_f5_[5],
+             rr_gf_=r_f6_[4],
+             rd_gg_=r_f6_[3],
+             rv_gh_=r_f6_[2],
+             rl_ge_=r_f6_[1],
+             lr_ga_=l_f5_[4],
+             ld_gb_=l_f5_[3],
+             lv_gc_=l_f5_[2],
+             ll_gd_=l_f5_[1];
+            return (rh_f7_+2|0)<lh_f8_
+                    ?_d7_(ll_gd_,lv_gc_,ld_gb_,_f9_(lr_ga_,v_f$_,d_f__,r_f6_))
+                    :(lh_f8_+2|0)<rh_f7_
+                      ?_d7_(_f9_(l_f5_,v_f$_,d_f__,rl_ge_),rv_gh_,rd_gg_,rr_gf_)
+                      :_dP_(l_f5_,v_f$_,d_f__,r_f6_);}
+          return _fZ_(v_f$_,d_f__,l_f5_);}
+        return _fS_(v_f$_,d_f__,r_f6_);}
+      function _gr_(t1_gi_,t2_gj_)
+       {if(t1_gi_)
+         {if(t2_gj_)
+           {var match_gk_=_eO_(t2_gj_),d_gm_=match_gk_[2],x_gl_=match_gk_[1];
+            return _f9_(t1_gi_,x_gl_,d_gm_,_eI_(t2_gj_));}
+          return t1_gi_;}
+        return t2_gj_;}
+      function _gU_(t1_gq_,v_gp_,d_gn_,t2_go_)
+       {return d_gn_?_f9_(t1_gq_,v_gp_,d_gn_[1],t2_go_):_gr_(t1_gq_,t2_go_);}
+      function _gz_(x_gx_,param_gs_)
+       {if(param_gs_)
+         {var
+           r_gt_=param_gs_[4],
+           d_gu_=param_gs_[3],
+           v_gv_=param_gs_[2],
+           l_gw_=param_gs_[1],
+           c_gy_=_cy_(_ec_[1],x_gx_,v_gv_);
+          if(0===c_gy_)return [0,l_gw_,[0,d_gu_],r_gt_];
+          if(0<=c_gy_)
+           {var
+             match_gA_=_gz_(x_gx_,r_gt_),
+             rr_gC_=match_gA_[3],
+             pres_gB_=match_gA_[2];
+            return [0,_f9_(l_gw_,v_gv_,d_gu_,match_gA_[1]),pres_gB_,rr_gC_];}
+          var
+           match_gD_=_gz_(x_gx_,l_gw_),
+           pres_gF_=match_gD_[2],
+           ll_gE_=match_gD_[1];
+          return [0,ll_gE_,pres_gF_,_f9_(match_gD_[3],v_gv_,d_gu_,r_gt_)];}
+        return _bd_;}
+      function _gO_(f_gP_,s1_gG_,s2_gI_)
+       {if(s1_gG_)
+         {var
+           v1_gH_=s1_gG_[2],
+           h1_gM_=s1_gG_[5],
+           r1_gL_=s1_gG_[4],
+           d1_gK_=s1_gG_[3],
+           l1_gJ_=s1_gG_[1];
+          if(_dw_(s2_gI_)<=h1_gM_)
+           {var
+             match_gN_=_gz_(v1_gH_,s2_gI_),
+             d2_gR_=match_gN_[2],
+             l2_gQ_=match_gN_[1],
+             _gS_=_gO_(f_gP_,r1_gL_,match_gN_[3]),
+             _gT_=_fx_(f_gP_,v1_gH_,[0,d1_gK_],d2_gR_);
+            return _gU_(_gO_(f_gP_,l1_gJ_,l2_gQ_),v1_gH_,_gT_,_gS_);}}
+        else
+         if(!s2_gI_)return 0;
+        if(s2_gI_)
+         {var
+           v2_gV_=s2_gI_[2],
+           r2_gZ_=s2_gI_[4],
+           d2_gY_=s2_gI_[3],
+           l2_gX_=s2_gI_[1],
+           match_gW_=_gz_(v2_gV_,s1_gG_),
+           d1_g1_=match_gW_[2],
+           l1_g0_=match_gW_[1],
+           _g2_=_gO_(f_gP_,match_gW_[3],r2_gZ_),
+           _g3_=_fx_(f_gP_,v2_gV_,d1_g1_,[0,d2_gY_]);
+          return _gU_(_gO_(f_gP_,l1_g0_,l2_gX_),v2_gV_,_g3_,_g2_);}
+        throw [0,_d_,_bc_];}
+      function _g7_(p_g8_,param_g4_)
+       {if(param_g4_)
+         {var
+           d_g5_=param_g4_[3],
+           v_g6_=param_g4_[2],
+           r_g__=param_g4_[4],
+           l__g9_=_g7_(p_g8_,param_g4_[1]),
+           pvd_ha_=_cy_(p_g8_,v_g6_,d_g5_),
+           r__g$_=_g7_(p_g8_,r_g__);
+          return pvd_ha_?_f9_(l__g9_,v_g6_,d_g5_,r__g$_):_gr_(l__g9_,r__g$_);}
+        return 0;}
+      function _he_(p_hf_,param_hb_)
+       {if(param_hb_)
+         {var
+           d_hc_=param_hb_[3],
+           v_hd_=param_hb_[2],
+           r_hh_=param_hb_[4],
+           match_hg_=_he_(p_hf_,param_hb_[1]),
+           lf_hi_=match_hg_[2],
+           lt_hj_=match_hg_[1],
+           pvd_hl_=_cy_(p_hf_,v_hd_,d_hc_),
+           match_hk_=_he_(p_hf_,r_hh_),
+           rf_hm_=match_hk_[2],
+           rt_hn_=match_hk_[1];
+          if(pvd_hl_)
+           {var _ho_=_gr_(lf_hi_,rf_hm_);
+            return [0,_f9_(lt_hj_,v_hd_,d_hc_,rt_hn_),_ho_];}
+          var _hp_=_f9_(lf_hi_,v_hd_,d_hc_,rf_hm_);
+          return [0,_gr_(lt_hj_,rt_hn_),_hp_];}
+        return _bb_;}
+      function _hJ_(m_hq_,e_hs_)
+       {var m_hr_=m_hq_,e_ht_=e_hs_;
+        for(;;)
+         {if(m_hr_)
+           {var
+             l_hu_=m_hr_[1],
+             _hv_=[0,m_hr_[2],m_hr_[3],m_hr_[4],e_ht_],
+             m_hr_=l_hu_,
+             e_ht_=_hv_;
+            continue;}
+          return e_ht_;}}
+      function _ir_(cmp_hH_,m1_hO_,m2_hM_)
+       {function compare_aux_hN_(e1_hw_,e2_hy_)
+         {var e1_hx_=e1_hw_,e2_hz_=e2_hy_;
+          for(;;)
+           {if(e1_hx_)
+             {if(e2_hz_)
+               {var
+                 e2_hG_=e2_hz_[4],
+                 r2_hF_=e2_hz_[3],
+                 d2_hE_=e2_hz_[2],
+                 e1_hD_=e1_hx_[4],
+                 r1_hC_=e1_hx_[3],
+                 d1_hB_=e1_hx_[2],
+                 c_hA_=_cy_(_ec_[1],e1_hx_[1],e2_hz_[1]);
+                if(0===c_hA_)
+                 {var c_hI_=_cy_(cmp_hH_,d1_hB_,d2_hE_);
+                  if(0===c_hI_)
+                   {var
+                     _hK_=_hJ_(r2_hF_,e2_hG_),
+                     _hL_=_hJ_(r1_hC_,e1_hD_),
+                     e1_hx_=_hL_,
+                     e2_hz_=_hK_;
+                    continue;}
+                  return c_hI_;}
+                return c_hA_;}
+              return 1;}
+            return e2_hz_?-1:0;}}
+        var _hP_=_hJ_(m2_hM_,0);
+        return compare_aux_hN_(_hJ_(m1_hO_,0),_hP_);}
+      function _is_(cmp_h1_,m1_h8_,m2_h6_)
+       {function equal_aux_h7_(e1_hQ_,e2_hS_)
+         {var e1_hR_=e1_hQ_,e2_hT_=e2_hS_;
+          for(;;)
+           {if(e1_hR_)
+             {if(e2_hT_)
+               {var
+                 e2_hZ_=e2_hT_[4],
+                 r2_hY_=e2_hT_[3],
+                 d2_hX_=e2_hT_[2],
+                 e1_hW_=e1_hR_[4],
+                 r1_hV_=e1_hR_[3],
+                 d1_hU_=e1_hR_[2],
+                 _h0_=0===_cy_(_ec_[1],e1_hR_[1],e2_hT_[1])?1:0;
+                if(_h0_)
+                 {var _h2_=_cy_(cmp_h1_,d1_hU_,d2_hX_);
+                  if(_h2_)
+                   {var
+                     _h3_=_hJ_(r2_hY_,e2_hZ_),
+                     _h4_=_hJ_(r1_hV_,e1_hW_),
+                     e1_hR_=_h4_,
+                     e2_hT_=_h3_;
+                    continue;}
+                  var _h5_=_h2_;}
+                else
+                 var _h5_=_h0_;
+                return _h5_;}
+              return 0;}
+            return e2_hT_?0:1;}}
+        var _h9_=_hJ_(m2_h6_,0);
+        return equal_aux_h7_(_hJ_(m1_h8_,0),_h9_);}
+      function _h$_(param_h__)
+       {if(param_h__)
+         {var l_ia_=param_h__[1],_ib_=_h$_(param_h__[4]);
+          return (_h$_(l_ia_)+1|0)+_ib_|0;}
+        return 0;}
+      function _ig_(accu_ic_,param_ie_)
+       {var accu_id_=accu_ic_,param_if_=param_ie_;
+        for(;;)
+         {if(param_if_)
+           {var
+             d_ij_=param_if_[3],
+             v_ii_=param_if_[2],
+             l_ih_=param_if_[1],
+             _ik_=[0,[0,v_ii_,d_ij_],_ig_(accu_id_,param_if_[4])],
+             accu_id_=_ik_,
+             param_if_=l_ih_;
+            continue;}
+          return accu_id_;}}
+      return [0,
+              _dw_,
+              _dP_,
+              _d6_,
+              _d7_,
+              _im_,
+              _in_,
+              _eh_,
+              _io_,
+              _ip_,
+              _eO_,
+              _iq_,
+              _eI_,
+              _eZ_,
+              _e0_,
+              _e3_,
+              _e9_,
+              _fh_,
+              _fs_,
+              _fF_,
+              _fP_,
+              _fS_,
+              _fZ_,
+              _f9_,
+              _gr_,
+              _gU_,
+              _gz_,
+              _gO_,
+              _g7_,
+              _he_,
+              _hJ_,
+              _ir_,
+              _is_,
+              _h$_,
+              _ig_,
+              function(s_il_){return _ig_(0,s_il_);},
+              _eO_];}
+    function _iF_(_iu_)
+     {var _iv_=_it_(_iu_);
+      return [0,
+              _iv_[5],
+              _iv_[6],
+              _iv_[9],
+              _iv_[7],
+              _iv_[3],
+              _iv_[14],
+              _iv_[27],
+              _iv_[31],
+              _iv_[32],
+              _iv_[15],
+              _iv_[18],
+              _iv_[19],
+              _iv_[20],
+              _iv_[28],
+              _iv_[29],
+              _iv_[33],
+              _iv_[35],
+              _iv_[10],
+              _iv_[11],
+              _iv_[36],
+              _iv_[26],
+              _iv_[8],
+              _iv_[16],
+              _iv_[17]];}
+    var _iB_=[0,_a8_];
+    function _iG_(param_iz_){return [0,0,0];}
+    function _iH_(q_iA_)
+     {if(0===q_iA_[1])throw [0,_iB_];
+      q_iA_[1]=q_iA_[1]-1|0;
+      var tail_iC_=q_iA_[2],head_iD_=tail_iC_[2];
+      if(head_iD_===tail_iC_)q_iA_[2]=0;else tail_iC_[2]=head_iD_[2];
+      return head_iD_[1];}
+    function _i1_(q_iE_){return 0===q_iE_[1]?1:0;}
+    function _i0_(n_iI_)
+     {var
+       n_iJ_=1<=n_iI_?n_iI_:1,
+       n_iK_=_du_<n_iJ_?_du_:n_iJ_,
+       s_iL_=caml_create_string(n_iK_);
+      return [0,s_iL_,0,n_iK_,s_iL_];}
+    function _i2_(b_iM_){return _dr_(b_iM_[1],0,b_iM_[2]);}
+    function _i3_(b_iN_){b_iN_[2]=0;return 0;}
+    function _iU_(b_iO_,more_iQ_)
+     {var new_len_iP_=[0,b_iO_[3]];
+      for(;;)
+       {if(new_len_iP_[1]<(b_iO_[2]+more_iQ_|0))
+         {new_len_iP_[1]=2*new_len_iP_[1]|0;continue;}
+        if(_du_<new_len_iP_[1])
+         if((b_iO_[2]+more_iQ_|0)<=_du_)new_len_iP_[1]=_du_;else _j_(_a7_);
+        var new_buffer_iR_=caml_create_string(new_len_iP_[1]);
+        _ds_(b_iO_[1],0,new_buffer_iR_,0,b_iO_[2]);
+        b_iO_[1]=new_buffer_iR_;
+        b_iO_[3]=new_len_iP_[1];
+        return 0;}}
+    function _i4_(b_iS_,c_iV_)
+     {var pos_iT_=b_iS_[2];
+      if(b_iS_[3]<=pos_iT_)_iU_(b_iS_,1);
+      b_iS_[1].safeSet(pos_iT_,c_iV_);
+      b_iS_[2]=pos_iT_+1|0;
+      return 0;}
+    function _i5_(b_iY_,s_iW_)
+     {var len_iX_=s_iW_.getLen(),new_position_iZ_=b_iY_[2]+len_iX_|0;
+      if(b_iY_[3]<new_position_iZ_)_iU_(b_iY_,len_iX_);
+      _ds_(s_iW_,0,b_iY_[1],b_iY_[2],len_iX_);
+      b_iY_[2]=new_position_iZ_;
+      return 0;}
+    function index_of_int_i9_(i_i6_)
+     {return 0<=i_i6_?i_i6_:_j_(_bJ_(_aM_,string_of_int_bQ_(i_i6_)));}
+    function add_int_index_i__(i_i7_,idx_i8_)
+     {return index_of_int_i9_(i_i7_+idx_i8_|0);}
+    var _i$_=_cl_(add_int_index_i__,1);
+    function _mC_(p_ja_){return index_of_int_i9_(p_ja_-1|0);}
+    function _jf_(fmt_jd_,idx_jc_,len_jb_)
+     {return _dr_(fmt_jd_,idx_jc_,len_jb_);}
+    function _jl_(fmt_je_){return _jf_(fmt_je_,0,fmt_je_.getLen());}
+    function bad_conversion_jn_(sfmt_jg_,i_jh_,c_jj_)
+     {var
+       _ji_=_bJ_(_aP_,_bJ_(sfmt_jg_,_aQ_)),
+       _jk_=_bJ_(_aO_,_bJ_(string_of_int_bQ_(i_jh_),_ji_));
+      return _bx_(_bJ_(_aN_,_bJ_(_dp_(1,c_jj_),_jk_)));}
+    function bad_conversion_format_kI_(fmt_jm_,i_jp_,c_jo_)
+     {return bad_conversion_jn_(_jl_(fmt_jm_),i_jp_,c_jo_);}
+    function incomplete_format_kJ_(fmt_jq_)
+     {return _bx_(_bJ_(_aR_,_bJ_(_jl_(fmt_jq_),_aS_)));}
+    function parse_string_conversion_jK_(sfmt_jv_)
+     {function parse_jA_(neg_jr_,i_jt_)
+       {var neg_js_=neg_jr_,i_ju_=i_jt_;
+        for(;;)
+         {if(sfmt_jv_.getLen()<=i_ju_)return [0,0,neg_js_];
+          var _jw_=sfmt_jv_.safeGet(i_ju_);
+          if(49<=_jw_)
+           {if(!(58<=_jw_))
+             return [0,
+                     caml_int_of_string
+                      (_dr_(sfmt_jv_,i_ju_,(sfmt_jv_.getLen()-i_ju_|0)-1|0)),
+                     neg_js_];}
+          else
+           if(45===_jw_)
+            {var _jy_=i_ju_+1|0,_jx_=1,neg_js_=_jx_,i_ju_=_jy_;continue;}
+          var _jz_=i_ju_+1|0,i_ju_=_jz_;
+          continue;}}
+      try
+       {var _jB_=parse_jA_(0,1);}
+      catch(_jC_)
+       {if(_jC_[1]===_a_)return bad_conversion_jn_(sfmt_jv_,0,115);
+        throw _jC_;}
+      return _jB_;}
+    function pad_string_jO_(pad_char_jH_,p_jD_,neg_jJ_,s_jG_,i_jF_,len_jE_)
+     {if(p_jD_===len_jE_&&0===i_jF_)return s_jG_;
+      if(p_jD_<=len_jE_)return _dr_(s_jG_,i_jF_,len_jE_);
+      var res_jI_=_dp_(p_jD_,pad_char_jH_);
+      if(neg_jJ_)
+       _ds_(s_jG_,i_jF_,res_jI_,0,len_jE_);
+      else
+       _ds_(s_jG_,i_jF_,res_jI_,p_jD_-len_jE_|0,len_jE_);
+      return res_jI_;}
+    function format_string_nG_(sfmt_jL_,s_jN_)
+     {var match_jM_=parse_string_conversion_jK_(sfmt_jL_);
+      return pad_string_jO_
+              (32,match_jM_[1],match_jM_[2],s_jN_,0,s_jN_.getLen());}
+    function extract_format_j$_(fmt_jP_,start_jW_,stop_jY_,widths_j9_)
+     {function skip_positional_spec_jV_(start_jQ_)
+       {return (fmt_jP_.safeGet(start_jQ_)-48|0)<
+                0||
+                9<
+                (fmt_jP_.safeGet(start_jQ_)-48|0)
+                ?start_jQ_
+                :function(i_jR_)
+                   {var i_jS_=i_jR_;
+                    for(;;)
+                     {var _jT_=fmt_jP_.safeGet(i_jS_);
+                      if(48<=_jT_)
+                       {if(!(58<=_jT_)){var _jU_=i_jS_+1|0,i_jS_=_jU_;continue;}}
+                      else
+                       if(36===_jT_)return i_jS_+1|0;
+                      return start_jQ_;}}
+                  (start_jQ_+1|0);}
+      var
+       start_jX_=skip_positional_spec_jV_(start_jW_+1|0),
+       b_jZ_=_i0_((stop_jY_-start_jX_|0)+10|0);
+      _i4_(b_jZ_,37);
+      function fill_format_j__(i_j0_,widths_j2_)
+       {var i_j1_=i_j0_,widths_j3_=widths_j2_;
+        for(;;)
+         {var _j4_=i_j1_<=stop_jY_?1:0;
+          if(_j4_)
+           {var _j5_=fmt_jP_.safeGet(i_j1_);
+            if(42===_j5_)
+             {if(widths_j3_)
+               {var t_j6_=widths_j3_[2];
+                _i5_(b_jZ_,string_of_int_bQ_(widths_j3_[1]));
+                var
+                 i_j7_=skip_positional_spec_jV_(i_j1_+1|0),
+                 i_j1_=i_j7_,
+                 widths_j3_=t_j6_;
+                continue;}
+              throw [0,_d_,_aT_];}
+            _i4_(b_jZ_,_j5_);
+            var _j8_=i_j1_+1|0,i_j1_=_j8_;
+            continue;}
+          return _j4_;}}
+      fill_format_j__(start_jX_,_cO_(widths_j9_));
+      return _i2_(b_jZ_);}
+    function extract_format_int_nj_
+     (conv_kf_,fmt_kd_,start_kc_,stop_kb_,widths_ka_)
+     {var sfmt_ke_=extract_format_j$_(fmt_kd_,start_kc_,stop_kb_,widths_ka_);
+      if(78!==conv_kf_&&110!==conv_kf_)return sfmt_ke_;
+      sfmt_ke_.safeSet(sfmt_ke_.getLen()-1|0,117);
+      return sfmt_ke_;}
+    function extract_format_float_nR_
+     (conv_kl_,fmt_kj_,start_ki_,stop_kh_,widths_kg_)
+     {var sfmt_kk_=extract_format_j$_(fmt_kj_,start_ki_,stop_kh_,widths_kg_);
+      return 70===conv_kl_
+              ?(sfmt_kk_.safeSet(sfmt_kk_.getLen()-1|0,103),sfmt_kk_)
+              :sfmt_kk_;}
+    function sub_format_kK_
+     (incomplete_format_ks_,bad_conversion_format_kD_,conv_kG_,fmt_km_,i_kF_)
+     {var len_kn_=fmt_km_.getLen();
+      function sub_fmt_kE_(c_ko_,i_kC_)
+       {var close_kp_=40===c_ko_?41:125;
+        function sub_kB_(j_kq_)
+         {var j_kr_=j_kq_;
+          for(;;)
+           {if(len_kn_<=j_kr_)return _cl_(incomplete_format_ks_,fmt_km_);
+            if(37===fmt_km_.safeGet(j_kr_))return sub_sub_kt_(j_kr_+1|0);
+            var _ku_=j_kr_+1|0,j_kr_=_ku_;
+            continue;}}
+        function sub_sub_kt_(j_kv_)
+         {if(len_kn_<=j_kv_)return _cl_(incomplete_format_ks_,fmt_km_);
+          var _kw_=fmt_km_.safeGet(j_kv_),_kx_=_kw_-40|0;
+          if(_kx_<0||1<_kx_)
+           {var _ky_=_kx_-83|0;
+            if(_ky_<0||2<_ky_)
+             var _kz_=1;
+            else
+             switch(_ky_)
+              {case 1:var _kz_=1;break;
+               case 2:var _kA_=1,_kz_=0;break;
+               default:var _kA_=0,_kz_=0;}
+            if(_kz_)return sub_kB_(j_kv_+1|0);}
+          else
+           var _kA_=0===_kx_?0:1;
+          return _kA_
+                  ?_kw_===close_kp_
+                    ?j_kv_+1|0
+                    :_fx_(bad_conversion_format_kD_,fmt_km_,i_kC_,_kw_)
+                  :sub_kB_(sub_fmt_kE_(_kw_,j_kv_+1|0)+1|0);}
+        return sub_kB_(i_kC_);}
+      return sub_fmt_kE_(conv_kG_,i_kF_);}
+    function sub_format_for_printf_k8_(conv_kH_)
+     {return _fx_
+              (sub_format_kK_,
+               incomplete_format_kJ_,
+               bad_conversion_format_kI_,
+               conv_kH_);}
+    function iter_on_format_args_lq_(fmt_kL_,add_conv_kV_,add_char_k5_)
+     {var lim_kM_=fmt_kL_.getLen()-1|0;
+      function scan_flags_lf_(skip_kN_,i_kP_)
+       {var skip_kO_=skip_kN_,i_kQ_=i_kP_;
+        for(;;)
+         {if(lim_kM_<i_kQ_)return incomplete_format_kJ_(fmt_kL_);
+          var _kR_=fmt_kL_.safeGet(i_kQ_);
+          if(58<=_kR_)
+           {if(95===_kR_)
+             {var _kT_=i_kQ_+1|0,_kS_=1,skip_kO_=_kS_,i_kQ_=_kT_;continue;}}
+          else
+           if(32<=_kR_)
+            switch(_kR_-32|0)
+             {case 1:
+              case 2:
+              case 4:
+              case 5:
+              case 6:
+              case 7:
+              case 8:
+              case 9:
+              case 12:
+              case 15:break;
+              case 0:
+              case 3:
+              case 11:
+              case 13:var _kU_=i_kQ_+1|0,i_kQ_=_kU_;continue;
+              case 10:
+               var _kW_=_fx_(add_conv_kV_,skip_kO_,i_kQ_,105),i_kQ_=_kW_;
+               continue;
+              default:var _kX_=i_kQ_+1|0,i_kQ_=_kX_;continue;}
+          return scan_conv_kY_(skip_kO_,i_kQ_);}}
+      function scan_conv_kY_(skip_k2_,i_kZ_)
+       {var i_k0_=i_kZ_;
+        for(;;)
+         {if(lim_kM_<i_k0_)return incomplete_format_kJ_(fmt_kL_);
+          var _k1_=fmt_kL_.safeGet(i_k0_);
+          if(!(126<=_k1_))
+           switch(_k1_)
+            {case 78:
+             case 88:
+             case 100:
+             case 105:
+             case 111:
+             case 117:
+             case 120:return _fx_(add_conv_kV_,skip_k2_,i_k0_,105);
+             case 69:
+             case 70:
+             case 71:
+             case 101:
+             case 102:
+             case 103:return _fx_(add_conv_kV_,skip_k2_,i_k0_,102);
+             case 33:
+             case 37:
+             case 44:
+             case 64:return i_k0_+1|0;
+             case 83:
+             case 91:
+             case 115:return _fx_(add_conv_kV_,skip_k2_,i_k0_,115);
+             case 97:
+             case 114:
+             case 116:return _fx_(add_conv_kV_,skip_k2_,i_k0_,_k1_);
+             case 76:
+             case 108:
+             case 110:
+              var j_k3_=i_k0_+1|0;
+              if(lim_kM_<j_k3_)return _fx_(add_conv_kV_,skip_k2_,i_k0_,105);
+              var _k4_=fmt_kL_.safeGet(j_k3_)-88|0;
+              if(!(_k4_<0||32<_k4_))
+               switch(_k4_)
+                {case 0:
+                 case 12:
+                 case 17:
+                 case 23:
+                 case 29:
+                 case 32:
+                  return _cy_
+                          (add_char_k5_,_fx_(add_conv_kV_,skip_k2_,i_k0_,_k1_),105);
+                 default:}
+              return _fx_(add_conv_kV_,skip_k2_,i_k0_,105);
+             case 67:
+             case 99:return _fx_(add_conv_kV_,skip_k2_,i_k0_,99);
+             case 66:
+             case 98:return _fx_(add_conv_kV_,skip_k2_,i_k0_,66);
+             case 41:
+             case 125:return _fx_(add_conv_kV_,skip_k2_,i_k0_,_k1_);
+             case 40:
+              return scan_fmt_k6_(_fx_(add_conv_kV_,skip_k2_,i_k0_,_k1_));
+             case 123:
+              var
+               i_k7_=_fx_(add_conv_kV_,skip_k2_,i_k0_,_k1_),
+               j_k9_=_fx_(sub_format_for_printf_k8_,_k1_,fmt_kL_,i_k7_);
+              (function(j_k9_)
+                  {return function(i_k__)
+                    {var i_k$_=i_k__;
+                     for(;;)
+                      {var _la_=i_k$_<(j_k9_-2|0)?1:0;
+                       if(_la_)
+                        {var
+                          _lb_=_cy_(add_char_k5_,i_k$_,fmt_kL_.safeGet(i_k$_)),
+                          i_k$_=_lb_;
+                         continue;}
+                       return _la_;}};}
+                 (j_k9_)
+                (i_k7_));
+              var _lc_=j_k9_-1|0,i_k0_=_lc_;
+              continue;
+             default:}
+          return bad_conversion_format_kI_(fmt_kL_,i_k0_,_k1_);}}
+      function scan_fmt_k6_(i_ld_)
+       {var i_le_=i_ld_;
+        for(;;)
+         {if(i_le_<lim_kM_)
+           {if(37===fmt_kL_.safeGet(i_le_))
+             {var _lg_=scan_flags_lf_(0,i_le_+1|0),i_le_=_lg_;continue;}
+            var _lh_=i_le_+1|0,i_le_=_lh_;
+            continue;}
+          return i_le_;}}
+      scan_fmt_k6_(0);
+      return 0;}
+    function summarize_format_type_nM_(fmt_li_)
+     {var b_lj_=_i0_(fmt_li_.getLen());
+      function add_char_ln_(i_ll_,c_lk_){_i4_(b_lj_,c_lk_);return i_ll_+1|0;}
+      iter_on_format_args_lq_
+       (fmt_li_,
+        function(skip_lm_,i_lp_,c_lo_)
+         {if(skip_lm_)_i5_(b_lj_,_aU_);else _i4_(b_lj_,37);
+          return add_char_ln_(i_lp_,c_lo_);},
+        add_char_ln_);
+      return _i2_(b_lj_);}
+    function ac_of_format_lF_(fmt_lE_)
+     {var ac_lr_=[0,0,0,0];
+      function incr_ac_ly_(skip_lu_,c_ls_)
+       {var inc_lt_=97===c_ls_?2:1;
+        if(114===c_ls_)ac_lr_[3]=ac_lr_[3]+1|0;
+        return skip_lu_
+                ?(ac_lr_[2]=ac_lr_[2]+inc_lt_|0,0)
+                :(ac_lr_[1]=ac_lr_[1]+inc_lt_|0,0);}
+      function add_conv_lD_(skip_lz_,i_lA_,c_lv_)
+       {var _lw_=41!==c_lv_?1:0,_lx_=_lw_?125!==c_lv_?1:0:_lw_;
+        if(_lx_)incr_ac_ly_(skip_lz_,c_lv_);
+        return i_lA_+1|0;}
+      iter_on_format_args_lq_
+       (fmt_lE_,add_conv_lD_,function(i_lB_,param_lC_){return i_lB_+1|0;});
+      return ac_lr_;}
+    function count_printing_arguments_of_format_lQ_(fmt_lG_)
+     {return ac_of_format_lF_(fmt_lG_)[1];}
+    function list_iter_i_lX_(f_lN_,l_lP_)
+     {return function(i_lH_,param_lJ_)
+               {var i_lI_=i_lH_,param_lK_=param_lJ_;
+                for(;;)
+                 {if(param_lK_)
+                   {var _lL_=param_lK_[2],_lM_=param_lK_[1];
+                    if(_lL_)
+                     {_cy_(f_lN_,i_lI_,_lM_);
+                      var _lO_=i_lI_+1|0,i_lI_=_lO_,param_lK_=_lL_;
+                      continue;}
+                    return _cy_(f_lN_,i_lI_,_lM_);}
+                  return 0;}}
+              (0,l_lP_);}
+    function kapr_oN_(kpr_lZ_,fmt_lR_)
+     {var _lS_=count_printing_arguments_of_format_lQ_(fmt_lR_);
+      if(_lS_<0||6<_lS_)
+       {var
+         loop_l1_=
+          function(i_lT_,args_lY_)
+           {if(_lS_<=i_lT_)
+             {var a_lU_=caml_make_vect(_lS_,0);
+              list_iter_i_lX_
+               (function(i_lV_,arg_lW_)
+                 {return caml_array_set(a_lU_,(_lS_-i_lV_|0)-1|0,arg_lW_);},
+                args_lY_);
+              return _cy_(kpr_lZ_,fmt_lR_,a_lU_);}
+            return function(x_l0_)
+             {return loop_l1_(i_lT_+1|0,[0,x_l0_,args_lY_]);};};
+        return loop_l1_(0,0);}
+      switch(_lS_)
+       {case 1:
+         return function(x_l3_)
+          {var a_l2_=caml_make_vect(1,0);
+           caml_array_set(a_l2_,0,x_l3_);
+           return _cy_(kpr_lZ_,fmt_lR_,a_l2_);};
+        case 2:
+         return function(x_l5_,y_l6_)
+          {var a_l4_=caml_make_vect(2,0);
+           caml_array_set(a_l4_,0,x_l5_);
+           caml_array_set(a_l4_,1,y_l6_);
+           return _cy_(kpr_lZ_,fmt_lR_,a_l4_);};
+        case 3:
+         return function(x_l8_,y_l9_,z_l__)
+          {var a_l7_=caml_make_vect(3,0);
+           caml_array_set(a_l7_,0,x_l8_);
+           caml_array_set(a_l7_,1,y_l9_);
+           caml_array_set(a_l7_,2,z_l__);
+           return _cy_(kpr_lZ_,fmt_lR_,a_l7_);};
+        case 4:
+         return function(x_ma_,y_mb_,z_mc_,t_md_)
+          {var a_l$_=caml_make_vect(4,0);
+           caml_array_set(a_l$_,0,x_ma_);
+           caml_array_set(a_l$_,1,y_mb_);
+           caml_array_set(a_l$_,2,z_mc_);
+           caml_array_set(a_l$_,3,t_md_);
+           return _cy_(kpr_lZ_,fmt_lR_,a_l$_);};
+        case 5:
+         return function(x_mf_,y_mg_,z_mh_,t_mi_,u_mj_)
+          {var a_me_=caml_make_vect(5,0);
+           caml_array_set(a_me_,0,x_mf_);
+           caml_array_set(a_me_,1,y_mg_);
+           caml_array_set(a_me_,2,z_mh_);
+           caml_array_set(a_me_,3,t_mi_);
+           caml_array_set(a_me_,4,u_mj_);
+           return _cy_(kpr_lZ_,fmt_lR_,a_me_);};
+        case 6:
+         return function(x_ml_,y_mm_,z_mn_,t_mo_,u_mp_,v_mq_)
+          {var a_mk_=caml_make_vect(6,0);
+           caml_array_set(a_mk_,0,x_ml_);
+           caml_array_set(a_mk_,1,y_mm_);
+           caml_array_set(a_mk_,2,z_mn_);
+           caml_array_set(a_mk_,3,t_mo_);
+           caml_array_set(a_mk_,4,u_mp_);
+           caml_array_set(a_mk_,5,v_mq_);
+           return _cy_(kpr_lZ_,fmt_lR_,a_mk_);};
+        default:return _cy_(kpr_lZ_,fmt_lR_,[0]);}}
+    function scan_positional_spec_m1_(fmt_mr_,got_spec_mu_,i_ms_)
+     {var _mt_=fmt_mr_.safeGet(i_ms_);
+      return (_mt_-48|0)<0||9<(_mt_-48|0)
+              ?_cy_(got_spec_mu_,0,i_ms_)
+              :function(accu_mv_,j_mx_)
+                 {var accu_mw_=accu_mv_,j_my_=j_mx_;
+                  for(;;)
+                   {var _mz_=fmt_mr_.safeGet(j_my_);
+                    if(48<=_mz_)
+                     {if(!(58<=_mz_))
+                       {var
+                         _mB_=j_my_+1|0,
+                         _mA_=(10*accu_mw_|0)+(_mz_-48|0)|0,
+                         accu_mw_=_mA_,
+                         j_my_=_mB_;
+                        continue;}}
+                    else
+                     if(36===_mz_)
+                      return 0===accu_mw_
+                              ?_j_(_aV_)
+                              :_cy_(got_spec_mu_,[0,_mC_(accu_mw_)],j_my_+1|0);
+                    return _cy_(got_spec_mu_,0,i_ms_);}}
+                (_mt_-48|0,i_ms_+1|0);}
+    function next_index_m$_(spec_mD_,n_mE_)
+     {return spec_mD_?n_mE_:_cl_(_i$_,n_mE_);}
+    function get_index_mS_(spec_mF_,n_mG_){return spec_mF_?spec_mF_[1]:n_mG_;}
+    function make_valid_float_lexeme_mR_(s_mH_)
+     {var l_mK_=s_mH_.getLen();
+      return function(i_mI_)
+               {var i_mJ_=i_mI_;
+                for(;;)
+                 {if(l_mK_<=i_mJ_)return _bJ_(s_mH_,_aW_);
+                  var
+                   _mL_=s_mH_.safeGet(i_mJ_)-46|0,
+                   _mM_=
+                    _mL_<0||23<_mL_
+                     ?55===_mL_?1:0
+                     :(_mL_-1|0)<0||21<(_mL_-1|0)?1:0;
+                  if(_mM_)return s_mH_;
+                  var _mN_=i_mJ_+1|0,i_mJ_=_mN_;
+                  continue;}}
+              (0);}
+    function _nT_(sfmt_mQ_,x_mO_)
+     {var _mP_=caml_classify_float(x_mO_);