Math.inc

Переключить прокрутку окна
Загрузить этот исходный код

;
  ; Реализация среды исполнения языка программирования
  ; Объектно-ориентированный продвинутый векторный транслятор
  ;
  ; Copyright © 2021, 2024 Малик Разработчик
  ;
  ; Это свободная программа: вы можете перераспространять ее и/или изменять
  ; ее на условиях Меньшей Стандартной общественной лицензии GNU в том виде,
  ; в каком она была опубликована Фондом свободного программного обеспечения;
  ; либо версии 3 лицензии, либо (по вашему выбору) любой более поздней версии.
  ;
  ; Эта программа распространяется в надежде, что она будет полезной,
  ; но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
  ; или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Меньшей Стандартной
  ; общественной лицензии GNU.
  ;
  ; Вы должны были получить копию Меньшей Стандартной общественной лицензии GNU
  ; вместе с этой программой. Если это не так, см.
  ; <https://www.gnu.org/licenses/>.
;

; <fold avt.lang.Math — родной код>
    if(used avt.lang.Math$abs$int$) ; <fold returns int>
                    fast        avt.lang.Math$abs$int$, \
                                x, int
                    fenter
                    mov         r00d, [.x]
                    test        r00d, r00d
                    jns         @F
                    neg         r00d
             @@:    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$byte2$) ; <fold returns int>
                    fast        avt.lang.Math$sum$byte2$, \
                                x, byte2
                    fenter
                    movsx       r00d, byte  [.x+$00]
                    movsx       r01d, byte  [.x+$01]
                    lea         r00d, [r00d+r01d*1+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$byte4$) ; <fold returns returns int>
                    fast        avt.lang.Math$sum$byte4$, \
                                x, byte4
                    fenter
                    vpmovsxbd   xmm0, [.x+$00]
                    vpxor       xmm1, xmm0, xmm0
                    vphaddd     xmm0, xmm0, xmm1
                    vphaddd     xmm0, xmm0, xmm1
                    vmovd       r00d, xmm0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$byte8$) ; <fold returns int>
                    fast        avt.lang.Math$sum$byte8$, \
                                x, byte8
                    fenter
                    vpmovsxbd   xmm0, [.x+$00]
                    vpmovsxbd   xmm1, [.x+$04]
                    vpxor       xmm2, xmm0, xmm0
                    vphaddd     xmm0, xmm0, xmm1
                    vphaddd     xmm0, xmm0, xmm2
                    vphaddd     xmm0, xmm0, xmm2
                    vmovd       r00d, xmm0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$short2$) ; <fold returns int>
                    fast        avt.lang.Math$sum$short2$, \
                                x, short2
                    fenter
                    movsx       r00d, word  [.x+$00]
                    movsx       r01d, word  [.x+$02]
                    lea         r00d, [r00d+r01d*1+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$short4$) ; <fold returns int>
                    fast        avt.lang.Math$sum$short4$, \
                                x, short4
                    fenter
                    vpmovsxwd   xmm0, [.x+$00]
                    vpxor       xmm1, xmm0, xmm0
                    vphaddd     xmm0, xmm0, xmm1
                    vphaddd     xmm0, xmm0, xmm1
                    vmovd       r00d, xmm0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$short8$) ; <fold returns int>
                    fast        avt.lang.Math$sum$short8$, \
                                x, short8
                    fenter
                    vpmovsxwd   xmm0, [.x+$00]
                    vpmovsxwd   xmm1, [.x+$08]
                    vpxor       xmm2, xmm0, xmm0
                    vphaddd     xmm0, xmm0, xmm1
                    vphaddd     xmm0, xmm0, xmm2
                    vphaddd     xmm0, xmm0, xmm2
                    vmovd       r00d, xmm0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$int2$) ; <fold returns int2>
                    fast        avt.lang.Math$conj$int2$, \
                                x, int2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpmulld     xmm0, xmm0, [avt.lang.Math$CONJ_MULT_INT]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$int4$) ; <fold returns int4>
                    fast        avt.lang.Math$conj$int4$, \
                                x, int4
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpmulld     xmm0, xmm0, [avt.lang.Math$CONJ_MULT_INT]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$int8$) ; <fold returns int8>
                    fast        avt.lang.Math$conj$int8$, \
                                x, int8
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vpmulld     ymm0, ymm0, [avt.lang.Math$CONJ_MULT_INT]
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$long$) ; <fold returns long>
                    fast        avt.lang.Math$abs$long$, \
                                x, long
                    fenter
                    mov         r00q, [.x]
                    test        r00q, r00q
                    jns         @F
                    neg         r00q
             @@:    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$int2$) ; <fold returns long>
                    fast        avt.lang.Math$sum$int2$, \
                                x, int2
                    fenter
                    movsxd      r00q, [.x+$00]
                    movsxd      r01q, [.x+$04]
                    lea         r00q, [r00+r01*1+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$int4$) ; <fold returns long>
                    fast        avt.lang.Math$sum$int4$, \
                                x, int4
                    fenter
                    vpmovsxdq   xmm0, [.x+$00]
                    vpmovsxdq   xmm1, [.x+$08]
                    vpaddq      xmm0, xmm0, xmm1
                    vpsrldq     xmm1, xmm0, $08
                    vpaddq      xmm0, xmm0, xmm1
                    vmovq       r00q, xmm0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$int8$) ; <fold returns long>
                    fast        avt.lang.Math$sum$int8$, \
                                x, int8
                    fenter
                    vpmovsxdq   ymm0, [.x+$00]
                    vpmovsxdq   ymm1, [.x+$10]
                    vpaddq      ymm0, ymm0, ymm1
                    vextracti128 xmm1, ymm0, $01
                    vpaddq      xmm0, xmm0, xmm1
                    vpsrldq     xmm1, xmm0, $08
                    vpaddq      xmm0, xmm0, xmm1
                    vmovq       r00q, xmm0
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$long2$) ; <fold returns long>
                    fast        avt.lang.Math$sum$long2$, \
                                x, long2
                    fenter
                    mov         r00q, [.x+$00]
                    add         r00q, [.x+$08]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$long4$) ; <fold returns long>
                    fast        avt.lang.Math$sum$long4$, \
                                x, long4
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpaddq      xmm0, xmm0, [.x+$10]
                    vpsrldq     xmm1, xmm0, $08
                    vpaddq      xmm0, xmm0, xmm1
                    vmovq       r00q, xmm0
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$long8$) ; <fold returns long>
                    fast        avt.lang.Math$sum$long8$, \
                                x, long8
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vmovdqu     ymm1, [.x+$20]
                    vpaddq      ymm0, ymm0, ymm1
                    vextracti128 xmm1, ymm0, $01
                    vpaddq      xmm0, xmm0, xmm1
                    vpsrldq     xmm1, xmm0, $08
                    vpaddq      xmm0, xmm0, xmm1
                    vmovq       r00q, xmm0
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$long2$) ; <fold returns long2>
                    fast        avt.lang.Math$conj$long2$, \
                                x, long2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpmullq     xmm0, xmm0, [avt.lang.Math$CONJ_MULT_LONG]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$long4$) ; <fold returns long4>
                    fast        avt.lang.Math$conj$long4$, \
                                x, long4
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vpmullq     ymm0, ymm0, [avt.lang.Math$CONJ_MULT_LONG]
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$long8$) ; <fold returns long8>
                    fast        avt.lang.Math$conj$long8$, \
                                x, long8
                    fenter
                    vmovdqu64   zmm0, [.x+$00]
                    vpmullq     zmm0, zmm0, [avt.lang.Math$CONJ_MULT_LONG]
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$float$) ; <fold returns float>
                    fast        avt.lang.Math$abs$float$, \
                                x, float
                    fenter
                    and         dword [.x+$00], avt.lang.Int$MAX_VALUE
                    vmovd       xmm0, [.x+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$float2$) ; <fold returns float2>
                    fast        avt.lang.Math$conj$float2$, \
                                x, float2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm0, xmm0, [avt.lang.Math$CONJ_XOR_FLOAT2]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$inv$float2$) ; <fold returns float2>
                    fast        avt.lang.Math$inv$float2$, \
                                x, float2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm0, xmm0, [avt.lang.Math$CONJ_XOR_FLOAT2]
                    vmulps      xmm1, xmm0, xmm0
                    vhaddps     xmm1, xmm1, xmm1
                    vshufps     xmm1, xmm1, xmm1, $a0
                    vdivps      xmm0, xmm0, xmm1
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$float4$) ; <fold returns float4>
                    fast        avt.lang.Math$conj$float4$, \
                                x, float4
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm0, xmm0, [avt.lang.Math$CONJ_XOR_FLOAT]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$inv$float4$) ; <fold returns float4>
                    fast        avt.lang.Math$inv$float4$, \
                                x, float4
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm0, xmm0, [avt.lang.Math$CONJ_XOR_FLOAT]
                    vmulps      xmm1, xmm0, xmm0
                    vhaddps     xmm1, xmm1, xmm1
                    vhaddps     xmm1, xmm1, xmm1
                    vdivps      xmm0, xmm0, xmm1
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$float8$) ; <fold returns float8>
                    fast        avt.lang.Math$conj$float8$, \
                                x, float8
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vpxor       ymm0, ymm0, [avt.lang.Math$CONJ_XOR_FLOAT]
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$inv$float8$) ; <fold returns float8>
                    fast        avt.lang.Math$inv$float8$, \
                                x, float8
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vpxor       ymm0, ymm0, [avt.lang.Math$CONJ_XOR_FLOAT]
                    vmulps      ymm1, ymm0, ymm0
                    vextractf128 xmm2, ymm1, $01
                    vhaddps     xmm1, xmm1, xmm2
                    vhaddps     xmm1, xmm1, xmm1
                    vhaddps     xmm1, xmm1, xmm1
                    vinsertf128 ymm1, ymm1, xmm1, $01
                    vdivps      ymm0, ymm0, ymm1
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$double$) ; <fold returns double>
                    fast        avt.lang.Math$abs$double$, \
                                x, double
                    fenter
                    mov         r00q, [avt.lang.Long$MAX_VALUE]
                    and         qword [.x+$00], r00q
                    vmovq       xmm0, [.x+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$float2$) ; <fold returns double>
                    fast        avt.lang.Math$sum$float2$, \
                                x, float2
                    fenter
                    vcvtps2pd   xmm0, [.x+$00]
                    vpxor       xmm1, xmm0, xmm0
                    vhaddpd     xmm0, xmm0, xmm1
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$float4$) ; <fold returns double>
                    fast        avt.lang.Math$sum$float4$, \
                                x, float4
                    fenter
                    vcvtps2pd   ymm0, [.x+$00]
                    vextracti128 xmm1, ymm0, $01
                    vpxor       xmm2, xmm0, xmm0
                    vhaddpd     xmm0, xmm0, xmm1
                    vhaddpd     xmm0, xmm0, xmm2
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$float8$) ; <fold returns double>
                    fast        avt.lang.Math$sum$float8$, \
                                x, float8
                    fenter
                    vcvtps2pd   ymm0, [.x+$00]
                    vcvtps2pd   ymm1, [.x+$10]
                    vaddpd      ymm0, ymm0, ymm1
                    vextracti128 xmm1, ymm0, $01
                    vpxor       xmm2, xmm0, xmm0
                    vhaddpd     xmm0, xmm0, xmm1
                    vhaddpd     xmm0, xmm0, xmm2
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$double2$) ; <fold returns double>
                    fast        avt.lang.Math$sum$double2$, \
                                x, double2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm1, xmm0, xmm0
                    vhaddpd     xmm0, xmm0, xmm1
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$double4$) ; <fold returns double>
                    fast        avt.lang.Math$sum$double4$, \
                                x, double4
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vmovdqa     xmm1, [.x+$10]
                    vpxor       xmm2, xmm0, xmm0
                    vhaddpd     xmm0, xmm0, xmm1
                    vhaddpd     xmm0, xmm0, xmm2
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sum$double8$) ; <fold returns double>
                    fast        avt.lang.Math$sum$double8$, \
                                x, double8
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vmovdqu     ymm1, [.x+$20]
                    vaddpd      ymm0, ymm0, ymm1
                    vextracti128 xmm1, ymm0, $01
                    vpxor       xmm2, xmm0, xmm0
                    vhaddpd     xmm0, xmm0, xmm1
                    vhaddpd     xmm0, xmm0, xmm2
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$rotc$real$) ; <fold returns double2>
                    fast        avt.lang.Math$rotc$real$, \
                                x, real
                    floc        result, double2
                    fenter
                    fld         tbyte [.x+$00]
                    fsincos
                    fnstsw      r00w
                    test        r00d, $0400
                    jz          .L.EXIT
                    fld         tbyte [avt.lang.Math$CONST_2_0_PI]
                    fxch
             @@:    fprem
                    fnstsw      r00w
                    test        r00d, $0400
                    jnz         @B
                    fstp        esc1
                    fsincos
        .L.EXIT:    fstp        qword [.result+$00]
                    fstp        qword [.result+$08]
                    vmovdqa     xmm0, [.result+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$double2$) ; <fold returns double2>
                    fast        avt.lang.Math$conj$double2$, \
                                x, double2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm0, xmm0, [avt.lang.Math$CONJ_XOR_DOUBLE]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$inv$double2$) ; <fold returns double2>
                    fast        avt.lang.Math$inv$double2$, \
                                x, double2
                    fenter
                    vmovdqa     xmm0, [.x+$00]
                    vpxor       xmm0, xmm0, [avt.lang.Math$CONJ_XOR_DOUBLE]
                    vmulpd      xmm1, xmm0, xmm0
                    vhaddpd     xmm1, xmm1, xmm1
                    vdivpd      xmm0, xmm0, xmm1
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$rotq$real$double4$) ; <fold returns double4>
                    fast        avt.lang.Math$rotq$real$double4$, \
                                x, real, \
                                u, double4
                    floc        result, double2
                    fenter
                    fld         tbyte [.x+$00]
                    fld         tbyte [avt.lang.Math$CONST_0_5]
                    fmulp
                    fsincos
                    fnstsw      r00w
                    test        r00d, $0400
                    jz          .L.EXIT
                    fld         tbyte [avt.lang.Math$CONST_2_0_PI]
                    fxch
             @@:    fprem
                    fnstsw      r00w
                    test        r00d, $0400
                    jnz         @B
                    fstp        esc1
                    fsincos
        .L.EXIT:    fstp        qword [.result+$00]
                    fstp        qword [.result+$08]
                    vmovq       xmm0, [.result+$00]
                    vmovdqu     ymm1, [.u+$00]
                    vbroadcastsd ymm2, [.result+$08]
                    vmulpd      ymm1, ymm1, ymm2
                    vaddpd      ymm0, ymm0, ymm1
                    fcltag_y    u
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$double4$) ; <fold returns double4>
                    fast        avt.lang.Math$conj$double4$, \
                                x, double4
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vpxor       ymm0, ymm0, [avt.lang.Math$CONJ_XOR_DOUBLE]
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$inv$double4$) ; <fold returns double4>
                    fast        avt.lang.Math$inv$double4$, \
                                x, double4
                    fenter
                    vmovdqu     ymm0, [.x+$00]
                    vpxor       ymm0, ymm0, [avt.lang.Math$CONJ_XOR_DOUBLE]
                    vmulpd      ymm1, ymm0, ymm0
                    vextractf128 xmm2, ymm1, $01
                    vhaddpd     xmm1, xmm1, xmm2
                    vhaddpd     xmm1, xmm1, xmm1
                    vinsertf128 ymm1, ymm1, xmm1, $01
                    vdivpd      ymm0, ymm0, ymm1
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$conj$double8$) ; <fold returns double8>
                    fast        avt.lang.Math$conj$double8$, \
                                x, double8
                    fenter
                    vmovdqu64   zmm0, [.x+$00]
                    vpxorq      zmm0, zmm0, [avt.lang.Math$CONJ_XOR_DOUBLE]
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$inv$double8$) ; <fold returns double8>
                    fast        avt.lang.Math$inv$double8$, \
                                x, double8
                    fenter
                    vmovdqu64   zmm0, [.x+$00]
                    vpxorq      zmm0, zmm0, [avt.lang.Math$CONJ_XOR_DOUBLE]
                    vmulpd      zmm1, zmm0, zmm0
                    vextractf64x2 xmm2, zmm1, $01
                    vextractf64x2 xmm3, zmm1, $02
                    vextractf64x2 xmm4, zmm1, $03
                    vhaddpd     xmm1, xmm1, xmm2
                    vhaddpd     xmm2, xmm3, xmm4
                    vhaddpd     xmm1, xmm1, xmm2
                    vhaddpd     xmm1, xmm1, xmm1
                    vbroadcastsd zmm1, xmm1
                    vdivpd      zmm0, zmm0, zmm1
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sumr$long2$) ; <fold returns real>
                    fast        avt.lang.Math$sumr$long2$, \
                                x, long2
                    fenter
                    fild        qword [.x+$00]
                    fild        qword [.x+$08]
                    faddp       esc1, esc0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sumr$long4$) ; <fold returns real>
                    fast        avt.lang.Math$sumr$long4$, \
                                x, long4
                    fenter
                    fild        qword [.x+$00]
                    fild        qword [.x+$08]
                    fild        qword [.x+$10]
                    fild        qword [.x+$18]
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sumr$long8$) ; <fold returns real>
                    fast        avt.lang.Math$sumr$long8$, \
                                x, long8
                    fenter
                    fild        qword [.x+$00]
                    fild        qword [.x+$08]
                    fild        qword [.x+$10]
                    fild        qword [.x+$18]
                    fild        qword [.x+$20]
                    fild        qword [.x+$28]
                    fild        qword [.x+$30]
                    fild        qword [.x+$38]
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sumr$double2$) ; <fold returns real>
                    fast        avt.lang.Math$sumr$double2$, \
                                x, double2
                    fenter
                    fld         qword [.x+$00]
                    fld         qword [.x+$08]
                    faddp       esc1, esc0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sumr$double4$) ; <fold returns real>
                    fast        avt.lang.Math$sumr$double4$, \
                                x, double4
                    fenter
                    fld         qword [.x+$00]
                    fld         qword [.x+$08]
                    fld         qword [.x+$10]
                    fld         qword [.x+$18]
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sumr$double8$) ; <fold returns real>
                    fast        avt.lang.Math$sumr$double8$, \
                                x, double8
                    fenter
                    fld         qword [.x+$00]
                    fld         qword [.x+$08]
                    fld         qword [.x+$10]
                    fld         qword [.x+$18]
                    fld         qword [.x+$20]
                    fld         qword [.x+$28]
                    fld         qword [.x+$30]
                    fld         qword [.x+$38]
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    faddp       esc1, esc0
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$int2$) ; <fold returns real>
                    fast        avt.lang.Math$abs$int2$, \
                                x, int2
                    fenter
                    fild        dword [.x+$00]
                    fmul        esc0, esc0
                    fild        dword [.x+$04]
                    fmul        esc0, esc0
                    faddp       esc1, esc0
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$int4$) ; <fold returns real>
                    fast        avt.lang.Math$abs$int4$, \
                                x, int4
                    fenter
                    mov         r01d, $04
        .L.0000:    fild        dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$int8$) ; <fold returns real>
                    fast        avt.lang.Math$abs$int8$, \
                                x, int8
                    fenter
                    mov         r01d, $08
        .L.0000:    fild        dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$long2$) ; <fold returns real>
                    fast        avt.lang.Math$abs$long2$, \
                                x, long2
                    fenter
                    fild        qword [.x+$00]
                    fmul        esc0, esc0
                    fild        qword [.x+$08]
                    fmul        esc0, esc0
                    faddp       esc1, esc0
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$long4$) ; <fold returns real>
                    fast        avt.lang.Math$abs$long4$, \
                                x, long4
                    fenter
                    mov         r01d, $04
        .L.0000:    fild        qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$long8$) ; <fold returns real>
                    fast        avt.lang.Math$abs$long8$, \
                                x, long8
                    fenter
                    mov         r01d, $08
        .L.0000:    fild        qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$float2$) ; <fold returns real>
                    fast        avt.lang.Math$abs$float2$, \
                                x, float2
                    fenter
                    fld         dword [.x+$00]
                    fmul        esc0, esc0
                    fld         dword [.x+$04]
                    fmul        esc0, esc0
                    faddp       esc1, esc0
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$float4$) ; <fold returns real>
                    fast        avt.lang.Math$abs$float4$, \
                                x, float4
                    fenter
                    mov         r01d, $04
        .L.0000:    fld         dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$float8$) ; <fold returns real>
                    fast        avt.lang.Math$abs$float8$, \
                                x, float8
                    fenter
                    mov         r01d, $08
        .L.0000:    fld         dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$double2$) ; <fold returns real>
                    fast        avt.lang.Math$abs$double2$, \
                                x, double2
                    fenter
                    fld         qword [.x+$00]
                    fmul        esc0, esc0
                    fld         qword [.x+$08]
                    fmul        esc0, esc0
                    faddp       esc1, esc0
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$double4$) ; <fold returns real>
                    fast        avt.lang.Math$abs$double4$, \
                                x, double4
                    fenter
                    mov         r01d, $04
        .L.0000:    fld         qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$double8$) ; <fold returns real>
                    fast        avt.lang.Math$abs$double8$, \
                                x, double8
                    fenter
                    mov         r01d, $08
        .L.0000:    fld         qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$abs$real$) ; <fold returns real>
                    fast        avt.lang.Math$abs$real$, \
                                x, real
                    fenter
                    and         dword [.x+$08], avt.lang.Short$MAX_VALUE
                    fld         tbyte [.x+$00]
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$int2$) ; <fold returns real>
                    fast        avt.lang.Math$arg$int2$, \
                                x, int2
                    fenter
                    fild        dword [.x+$04]
                    fild        dword [.x+$00]
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$int4$) ; <fold returns real>
                    fast        avt.lang.Math$arg$int4$, \
                                x, int4
                    fenter
                    mov         r01d, $04
                    fild        dword [.x+$00]
        .L.0000:    fild        dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$int8$) ; <fold returns real>
                    fast        avt.lang.Math$arg$int8$, \
                                x, int8
                    fenter
                    mov         r01d, $08
                    fild        dword [.x+$00]
        .L.0000:    fild        dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$long2$) ; <fold returns real>
                    fast        avt.lang.Math$arg$long2$, \
                                x, long2
                    fenter
                    fild        qword [.x+$08]
                    fild        qword [.x+$00]
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$long4$) ; <fold returns real>
                    fast        avt.lang.Math$arg$long4$, \
                                x, long4
                    fenter
                    mov         r01d, $04
                    fild        qword [.x+$00]
        .L.0000:    fild        qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$long8$) ; <fold returns real>
                    fast        avt.lang.Math$arg$long8$, \
                                x, long8
                    fenter
                    mov         r01d, $08
                    fild        qword [.x+$00]
        .L.0000:    fild        qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$float2$) ; <fold returns real>
                    fast        avt.lang.Math$arg$float2$, \
                                x, float2
                    fenter
                    fld         dword [.x+$04]
                    fld         dword [.x+$00]
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$float4$) ; <fold returns real>
                    fast        avt.lang.Math$arg$float4$, \
                                x, float4
                    fenter
                    mov         r01d, $04
                    fld         dword [.x+$00]
        .L.0000:    fld         dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$float8$) ; <fold returns real>
                    fast        avt.lang.Math$arg$float8$, \
                                x, float8
                    fenter
                    mov         r01d, $08
                    fld         dword [.x+$00]
        .L.0000:    fld         dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$double2$) ; <fold returns real>
                    fast        avt.lang.Math$arg$double2$, \
                                x, double2
                    fenter
                    fld         qword [.x+$08]
                    fld         qword [.x+$00]
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$double4$) ; <fold returns real>
                    fast        avt.lang.Math$arg$double4$, \
                                x, double4
                    fenter
                    mov         r01d, $04
                    fld         qword [.x+$00]
        .L.0000:    fld         qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$double8$) ; <fold returns real>
                    fast        avt.lang.Math$arg$double8$, \
                                x, double8
                    fenter
                    mov         r01d, $08
                    fld         qword [.x+$00]
        .L.0000:    fld         qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$int4$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$int4$int$, \
                                x, int4, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $04
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $04
                    fild        dword [.x+r00*4-$00]
        .L.0000:    fild        dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$int8$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$int8$int$, \
                                x, int8, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $08
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $08
                    fild        dword [.x+r00*4-$00]
        .L.0000:    fild        dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$long4$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$long4$int$, \
                                x, long4, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $04
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $04
                    fild        qword [.x+r00*8-$00]
        .L.0000:    fild        qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$long8$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$long8$int$, \
                                x, long8, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $08
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $08
                    fild        qword [.x+r00*8-$00]
        .L.0000:    fild        qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fsubp       esc1, esc0
                    fmul        esc0, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$float4$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$float4$int$, \
                                x, float4, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $04
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $04
                    fld         dword [.x+r00*4-$00]
        .L.0000:    fld         dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$float8$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$float8$int$, \
                                x, float8, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $08
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $08
                    fld         dword [.x+r00*4-$00]
        .L.0000:    fld         dword [.x+r01*4-$04]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$double4$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$double4$int$, \
                                x, double4, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $04
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $04
                    fld         qword [.x+r00*8-$00]
        .L.0000:    fld         qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $04
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_y    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$arg$double8$int$) ; <fold returns real>
                    fast        avt.lang.Math$arg$double8$int$, \
                                x, double8, \
                                i, int
                    fenter
                    mov         r00d, [.i+$00]
                    cmp         r00d, $08
                    jb          @F
                    fthrow      VectorIndexOutOfBoundsException
             @@:    mov         r01d, $08
                    fld         qword [.x+r00*8-$00]
        .L.0000:    fld         qword [.x+r01*8-$08]
                    fmul        esc0, esc0
                    cmp         r01d, $08
                    jge         .L.0001
                    faddp       esc1, esc0
        .L.0001:    loop        .L.0000
                    fsqrt
                    fdivp       esc1, esc0
                    fcomi       esc0, esc0
                    jp          .L.EXIT
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
        .L.EXIT:    fcltag_z    x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sin$real$) ; <fold returns real>
                    fast        avt.lang.Math$sin$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fsin
                    fnstsw      r00w
                    test        r00d, $0400
                    jz          .L.EXIT
                    fld         tbyte [avt.lang.Math$CONST_2_0_PI]
                    fxch
             @@:    fprem
                    fnstsw      r00w
                    test        r00d, $0400
                    jnz         @B
                    fstp        esc1
                    fsin
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$cos$real$) ; <fold returns real>
                    fast        avt.lang.Math$cos$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fcos
                    fnstsw      r00w
                    test        r00d, $0400
                    jz          .L.EXIT
                    fld         tbyte [avt.lang.Math$CONST_2_0_PI]
                    fxch
             @@:    fprem
                    fnstsw      r00w
                    test        r00d, $0400
                    jnz         @B
                    fstp        esc1
                    fcos
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$tan$real$) ; <fold returns real>
                    fast        avt.lang.Math$tan$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fptan
                    fnstsw      r00w
                    test        r00d, $0400
                    jz          .L.EXIT
                    fldpi
                    fxch
             @@:    fprem
                    fnstsw      r00w
                    test        r00d, $0400
                    jnz         @B
                    fstp        esc1
                    fptan
        .L.EXIT:    ffree       esc0
                    fincstp
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$asin$real$) ; <fold returns real>
                    fast        avt.lang.Math$asin$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$acos$real$) ; <fold returns real>
                    fast        avt.lang.Math$acos$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fld1
                    fld         esc1
                    fmul        esc0, esc0
                    fsubp       esc1, esc0
                    fsqrt
                    fxch
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$atan$real$) ; <fold returns real>
                    fast        avt.lang.Math$atan$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fld1
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$exp$real$) ; <fold returns real>
                    fast        avt.lang.Math$exp$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fldl2e
                    fmulp       esc1, esc0
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    jne         @F
                    ffree       esc0
                    fincstp
                    fldz
                    freturn
             @@:    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$exp2$real$) ; <fold returns real>
                    fast        avt.lang.Math$exp2$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    jne         @F
                    ffree       esc0
                    fincstp
                    fldz
                    freturn
             @@:    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$exp10$real$) ; <fold returns real>
                    fast        avt.lang.Math$exp10$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fldl2t
                    fmulp       esc1, esc0
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    jne         @F
                    ffree       esc0
                    fincstp
                    fldz
                    freturn
             @@:    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$log$real$) ; <fold returns real>
                    fast        avt.lang.Math$log$real$, \
                                x, real
                    fenter
                    fldln2
                    fld         tbyte [.x+$00]
                    fyl2x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$log2$real$) ; <fold returns real>
                    fast        avt.lang.Math$log2$real$, \
                                x, real
                    fenter
                    fld1
                    fld         tbyte [.x+$00]
                    fyl2x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$log10$real$) ; <fold returns real>
                    fast        avt.lang.Math$log10$real$, \
                                x, real
                    fenter
                    fldlg2
                    fld         tbyte [.x+$00]
                    fyl2x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$sqrt$real$) ; <fold returns real>
                    fast        avt.lang.Math$sqrt$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fsqrt
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$cbrt$real$) ; <fold returns real>
                    fast        avt.lang.Math$cbrt$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +0
                    cmp         r00d, $4000
                    je          .L.EXIT
                    ; –0
                    cmp         r00d, $4200
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    je          .L.EXIT
                    ; остальные значения
                    test        r00d, $0200
                    jz          @F
                    fchs
             @@:    fld         tbyte [avt.lang.Math$CONST_0_333333333]
                    fxch
                    fyl2x
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
                    test        r00d, $0200
                    jz          .L.EXIT
                    fchs
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$sinh$real$) ; <fold returns real>
                    fast        avt.lang.Math$sinh$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fldl2e
                    fmulp       esc1, esc0
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    je          .L.EXIT
                    ; +0
                    cmp         r00d, $4000
                    je          .L.EXIT
                    ; –0
                    cmp         r00d, $4200
                    je          .L.EXIT
                    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
                    fld1
                    fld         esc1
                    fdivp       esc1, esc0
                    fsubp       esc1, esc0
                    fld         tbyte [avt.lang.Math$CONST_0_5]
                    fmulp       esc1, esc0
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$cosh$real$) ; <fold returns real>
                    fast        avt.lang.Math$cosh$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fldl2e
                    fmulp       esc1, esc0
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    jne         @F
                    fchs
                    freturn
             @@:    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
                    fld1
                    fld         esc1
                    fdivp       esc1, esc0
                    faddp       esc1, esc0
                    fld         tbyte [avt.lang.Math$CONST_0_5]
                    fmulp       esc1, esc0
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$tanh$real$) ; <fold returns real>
                    fast        avt.lang.Math$tanh$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    fldl2e
                    fmulp       esc1, esc0
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    jne         @F
                    ffree       esc0
                    fincstp
                    fld1
                    freturn
             @@:    ; –∞
                    cmp         r00d, $0700
                    jne         @F
                    ffree       esc0
                    fincstp
                    fld         tbyte [avt.lang.Math$CONST_MINUS_1_0]
                    freturn
             @@:    ; +0
                    cmp         r00d, $4000
                    je          .L.EXIT
                    ; –0
                    cmp         r00d, $4200
                    je          .L.EXIT
                    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
                    fld1
                    fld         esc1
                    fdivp       esc1, esc0
                    fld         esc1
                    fld         esc1
                    fsubp       esc1, esc0
                    fxch        esc2
                    fxch        esc1
                    faddp       esc1, esc0
                    fdivp       esc1, esc0
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$asinh$real$) ; <fold returns real>
                    fast        avt.lang.Math$asinh$real$, \
                                x, real
                    fenter
                    fldln2
                    fld         tbyte [.x+$00]
                    fld         esc0
                    fmul        esc0, esc0
                    fld1
                    faddp       esc1, esc0
                    fsqrt
                    faddp       esc1, esc0
                    fyl2x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$acosh$real$) ; <fold returns real>
                    fast        avt.lang.Math$acosh$real$, \
                                x, real
                    fenter
                    fldln2
                    fld         tbyte [.x+$00]
                    fld         esc0
                    fmul        esc0, esc0
                    fld1
                    fsubp       esc1, esc0
                    fsqrt
                    faddp       esc1, esc0
                    fyl2x
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$atanh$real$) ; <fold returns real>
                    fast        avt.lang.Math$atanh$real$, \
                                x, real
                    fenter
                    fld         tbyte [avt.lang.Math$CONST_0_5]
                    fldln2
                    fld1
                    fld         tbyte [.x+$00]
                    fld1
                    fld         esc1
                    faddp       esc1, esc0
                    fxch        esc2
                    fxch        esc1
                    fsubp       esc1, esc0
                    fdivp       esc1, esc0
                    fyl2x
                    fmulp       esc1, esc0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$ceil$real$) ; <fold returns real>
                    fast        avt.lang.Math$ceil$real$, \
                                x, real
                    fenter
                    mov         r01d, avt.lang.Math$ROUND_UP
                    call        avt.lang.Math$setRoundMode$int$
                    fld         tbyte [.x+$00]
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$floor$real$) ; <fold returns real>
                    fast        avt.lang.Math$floor$real$, \
                                x, real
                    fenter
                    mov         r01d, avt.lang.Math$ROUND_DOWN
                    call        avt.lang.Math$setRoundMode$int$
                    fld         tbyte [.x+$00]
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$round$real$) ; <fold returns real>
                    fast        avt.lang.Math$round$real$, \
                                x, real
                    fenter
                    fld         tbyte [.x+$00]
                    frndint
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$intPart$real$) ; <fold returns real>
                    fast        avt.lang.Math$intPart$real$, \
                                x, real
                    fenter
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         tbyte [.x+$00]
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$fracPart$real$) ; <fold returns real>
                    fast        avt.lang.Math$fracPart$real$, \
                                x, real
                    fenter
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         tbyte [.x+$00]
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$atan2$real$real$) ; <fold returns real>
                    fast        avt.lang.Math$atan2$real$real$, \
                                x, real, \
                                y, real
                    fenter
                    fld         tbyte [.y+$00]
                    fld         tbyte [.x+$00]
                    fpatan
                    fleave
    end if ; </fold>

    if(used avt.lang.Math$pow$real$real$) ; <fold returns real>
                    fast        avt.lang.Math$pow$real$real$, \
                                x, real, \
                                y, real
                    fenter
                    fld         tbyte [.y+$00]
                    fld         tbyte [.x+$00]
                    fyl2x
                    fxam
                    fnstsw      r00w
                    and         r00d, $4700
                    ; не-число
                    cmp         r00d, $0100
                    je          .L.EXIT
                    cmp         r00d, $0300
                    je          .L.EXIT
                    ; +∞
                    cmp         r00d, $0500
                    je          .L.EXIT
                    ; –∞
                    cmp         r00d, $0700
                    jne         @F
                    ffree       esc0
                    fincstp
                    fldz
                    freturn
             @@:    ; остальные значения
                    mov         r01d, avt.lang.Math$ROUND_TOWARD_ZERO
                    call        avt.lang.Math$setRoundMode$int$
                    fld         esc0
                    fld         esc0
                    frndint
                    mov         r01d, avt.lang.Math$ROUND_TO_NEAREST
                    call        avt.lang.Math$setRoundMode$int$
                    fsubp       esc1, esc0
                    f2xm1
                    fld1
                    faddp       esc1, esc0
                    fscale
                    fstp        esc1
        .L.EXIT:    fleave
    end if ; </fold>

    if(used avt.lang.Math$setRoundMode$int$) ; <fold скрытый метод>
                    proc        avt.lang.Math$setRoundMode$int$
                    lea         rsp,  [rsp-$08]
                    fnstcw      word  [rsp+$00]
                    and         qword [rsp+$00], $f3ff
                    or          qword [rsp+$00], r01q
                    fldcw       word  [rsp+$00]
                    lea         rsp,  [rsp+$08]
                    ret
                    end_proc
    end if ; </fold>
; </fold>