Advertisement
Guest User

Untitled

a guest
Dec 4th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. std::abs(double):
  2.         push    rbp
  3.         mov     rbp, rsp
  4.         movsd   QWORD PTR [rbp-8], xmm0
  5.         movsd   xmm0, QWORD PTR [rbp-8]
  6.         movq    xmm1, QWORD PTR .LC0[rip]
  7.         andpd   xmm0, xmm1
  8.         pop     rbp
  9.         ret
  10. std::log(float):
  11.         push    rbp
  12.         mov     rbp, rsp
  13.         sub     rsp, 16
  14.         movss   DWORD PTR [rbp-4], xmm0
  15.         movss   xmm0, DWORD PTR [rbp-4]
  16.         call    logf
  17.         leave
  18.         ret
  19. .LC4:
  20.         .string " "
  21. .LC5:
  22.         .string "11 TO4EK"
  23. .LC22:
  24.         .string "r = "
  25. main:
  26.         push    rbp
  27.         mov     rbp, rsp
  28.         push    rbx
  29.         sub     rsp, 104
  30.         mov     DWORD PTR [rbp-28], 1
  31.         mov     DWORD PTR [rbp-32], 3
  32.         mov     DWORD PTR [rbp-36], 5
  33.         movss   xmm0, DWORD PTR .LC1[rip]
  34.         movss   DWORD PTR [rbp-40], xmm0
  35.         pxor    xmm0, xmm0
  36.         movss   DWORD PTR [rbp-24], xmm0
  37.         mov     DWORD PTR [rbp-20], 1
  38. .L7:
  39.         mov     eax, DWORD PTR [rbp-20]
  40.         cmp     eax, DWORD PTR [rbp-36]
  41.         jg      .L6
  42.         mov     edx, DWORD PTR [rbp-28]
  43.         mov     eax, DWORD PTR [rbp-32]
  44.         add     eax, edx
  45.         cvtsi2sd        xmm1, eax
  46.         movsd   xmm0, QWORD PTR .LC3[rip]
  47.         mulsd   xmm1, xmm0
  48.         movsd   QWORD PTR [rbp-104], xmm1
  49.         mov     eax, DWORD PTR [rbp-32]
  50.         sub     eax, DWORD PTR [rbp-28]
  51.         cvtsi2sd        xmm1, eax
  52.         movsd   xmm0, QWORD PTR .LC3[rip]
  53.         movapd  xmm4, xmm1
  54.         mulsd   xmm4, xmm0
  55.         movsd   QWORD PTR [rbp-112], xmm4
  56.         cvtss2sd        xmm1, DWORD PTR [rbp-40]
  57.         movsd   xmm0, QWORD PTR .LC3[rip]
  58.         mulsd   xmm1, xmm0
  59.         mov     eax, DWORD PTR [rbp-20]
  60.         add     eax, eax
  61.         sub     eax, 1
  62.         cvtsi2sd        xmm0, eax
  63.         mulsd   xmm0, xmm1
  64.         cvtsi2sd        xmm1, DWORD PTR [rbp-36]
  65.         divsd   xmm0, xmm1
  66.         call    cos
  67.         mulsd   xmm0, QWORD PTR [rbp-112]
  68.         addsd   xmm0, QWORD PTR [rbp-104]
  69.         cvtsd2ss        xmm7, xmm0
  70.         movss   DWORD PTR [rbp-44], xmm7
  71.         movss   xmm0, DWORD PTR [rbp-44]
  72.         mov     edi, OFFSET FLAT:_ZSt4cout
  73.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(float)
  74.         mov     esi, OFFSET FLAT:.LC4
  75.         mov     rdi, rax
  76.         call    std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
  77.         mov     rbx, rax
  78.         movss   xmm0, DWORD PTR [rbp-44]
  79.         mulss   xmm0, DWORD PTR [rbp-44]
  80.         movss   DWORD PTR [rbp-104], xmm0
  81.         movss   xmm0, DWORD PTR [rbp-44]
  82.         call    std::log(float)
  83.         addss   xmm0, xmm0
  84.         movss   xmm3, DWORD PTR [rbp-104]
  85.         subss   xmm3, xmm0
  86.         movaps  xmm0, xmm3
  87.         mov     rdi, rbx
  88.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(float)
  89.         mov     esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
  90.         mov     rdi, rax
  91.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
  92.         add     DWORD PTR [rbp-20], 1
  93.         jmp     .L7
  94. .L6:
  95.         mov     esi, OFFSET FLAT:.LC5
  96.         mov     edi, OFFSET FLAT:_ZSt4cout
  97.         call    std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
  98.         mov     esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
  99.         mov     rdi, rax
  100.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
  101.         movss   xmm0, DWORD PTR .LC6[rip]
  102.         movss   DWORD PTR [rbp-96], xmm0
  103.         movss   xmm0, DWORD PTR .LC7[rip]
  104.         movss   DWORD PTR [rbp-92], xmm0
  105.         movss   xmm0, DWORD PTR .LC8[rip]
  106.         movss   DWORD PTR [rbp-88], xmm0
  107.         movss   xmm0, DWORD PTR .LC9[rip]
  108.         movss   DWORD PTR [rbp-84], xmm0
  109.         movss   xmm0, DWORD PTR .LC10[rip]
  110.         movss   DWORD PTR [rbp-80], xmm0
  111.         movss   xmm0, DWORD PTR .LC11[rip]
  112.         movss   DWORD PTR [rbp-76], xmm0
  113.         movss   xmm0, DWORD PTR .LC12[rip]
  114.         movss   DWORD PTR [rbp-72], xmm0
  115.         movss   xmm0, DWORD PTR .LC13[rip]
  116.         movss   DWORD PTR [rbp-68], xmm0
  117.         movss   xmm0, DWORD PTR .LC14[rip]
  118.         movss   DWORD PTR [rbp-64], xmm0
  119.         movss   xmm0, DWORD PTR .LC15[rip]
  120.         movss   DWORD PTR [rbp-60], xmm0
  121.         movss   xmm0, DWORD PTR .LC16[rip]
  122.         movss   DWORD PTR [rbp-56], xmm0
  123.         mov     DWORD PTR [rbp-20], 0
  124. .L10:
  125.         cmp     DWORD PTR [rbp-20], 10
  126.         jg      .L8
  127.         mov     eax, DWORD PTR [rbp-20]
  128.         cdqe
  129.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  130.         mov     edi, 4
  131.         call    __gnu_cxx::__promote_2<float, int, __gnu_cxx::__promote<float, std::__is_integer<float>::__value>::__type, __gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type>::__type std::pow<float, int>(float, int)
  132.         movapd  xmm1, xmm0
  133.         movsd   xmm0, QWORD PTR .LC17[rip]
  134.         mulsd   xmm1, xmm0
  135.         movsd   QWORD PTR [rbp-104], xmm1
  136.         mov     eax, DWORD PTR [rbp-20]
  137.         cdqe
  138.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  139.         mov     edi, 3
  140.         call    __gnu_cxx::__promote_2<float, int, __gnu_cxx::__promote<float, std::__is_integer<float>::__value>::__type, __gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type>::__type std::pow<float, int>(float, int)
  141.         movapd  xmm1, xmm0
  142.         movsd   xmm0, QWORD PTR .LC18[rip]
  143.         mulsd   xmm0, xmm1
  144.         addsd   xmm0, QWORD PTR [rbp-104]
  145.         movsd   QWORD PTR [rbp-104], xmm0
  146.         mov     eax, DWORD PTR [rbp-20]
  147.         cdqe
  148.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  149.         mov     edi, 2
  150.         call    __gnu_cxx::__promote_2<float, int, __gnu_cxx::__promote<float, std::__is_integer<float>::__value>::__type, __gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type>::__type std::pow<float, int>(float, int)
  151.         movapd  xmm1, xmm0
  152.         movsd   xmm0, QWORD PTR .LC19[rip]
  153.         mulsd   xmm0, xmm1
  154.         movsd   xmm1, QWORD PTR [rbp-104]
  155.         subsd   xmm1, xmm0
  156.         mov     eax, DWORD PTR [rbp-20]
  157.         cdqe
  158.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  159.         cvtss2sd        xmm2, xmm0
  160.         movsd   xmm0, QWORD PTR .LC20[rip]
  161.         mulsd   xmm0, xmm2
  162.         addsd   xmm0, xmm1
  163.         movsd   xmm1, QWORD PTR .LC21[rip]
  164.         subsd   xmm0, xmm1
  165.         cvtsd2ss        xmm2, xmm0
  166.         movss   DWORD PTR [rbp-44], xmm2
  167.         movss   xmm0, DWORD PTR [rbp-44]
  168.         mov     edi, OFFSET FLAT:_ZSt4cout
  169.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(float)
  170.         mov     esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
  171.         mov     rdi, rax
  172.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
  173.         mov     eax, DWORD PTR [rbp-20]
  174.         cdqe
  175.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  176.         mov     edi, 2
  177.         call    __gnu_cxx::__promote_2<float, int, __gnu_cxx::__promote<float, std::__is_integer<float>::__value>::__type, __gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type>::__type std::pow<float, int>(float, int)
  178.         movsd   QWORD PTR [rbp-104], xmm0
  179.         mov     eax, DWORD PTR [rbp-20]
  180.         cdqe
  181.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  182.         call    std::log(float)
  183.         addss   xmm0, xmm0
  184.         cvtss2sd        xmm0, xmm0
  185.         movsd   xmm5, QWORD PTR [rbp-104]
  186.         subsd   xmm5, xmm0
  187.         movapd  xmm0, xmm5
  188.         cvtss2sd        xmm1, DWORD PTR [rbp-44]
  189.         subsd   xmm0, xmm1
  190.         call    std::abs(double)
  191.         movapd  xmm1, xmm0
  192.         cvtss2sd        xmm0, DWORD PTR [rbp-24]
  193.         comisd  xmm1, xmm0
  194.         seta    al
  195.         test    al, al
  196.         je      .L9
  197.         mov     eax, DWORD PTR [rbp-20]
  198.         cdqe
  199.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  200.         mov     edi, 2
  201.         call    __gnu_cxx::__promote_2<float, int, __gnu_cxx::__promote<float, std::__is_integer<float>::__value>::__type, __gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type>::__type std::pow<float, int>(float, int)
  202.         movsd   QWORD PTR [rbp-104], xmm0
  203.         mov     eax, DWORD PTR [rbp-20]
  204.         cdqe
  205.         movss   xmm0, DWORD PTR [rbp-96+rax*4]
  206.         call    std::log(float)
  207.         addss   xmm0, xmm0
  208.         cvtss2sd        xmm0, xmm0
  209.         movsd   xmm6, QWORD PTR [rbp-104]
  210.         subsd   xmm6, xmm0
  211.         movapd  xmm0, xmm6
  212.         cvtss2sd        xmm1, DWORD PTR [rbp-44]
  213.         subsd   xmm0, xmm1
  214.         call    std::abs(double)
  215.         cvtsd2ss        xmm7, xmm0
  216.         movss   DWORD PTR [rbp-24], xmm7
  217. .L9:
  218.         add     DWORD PTR [rbp-20], 1
  219.         jmp     .L10
  220. .L8:
  221.         mov     esi, OFFSET FLAT:.LC22
  222.         mov     edi, OFFSET FLAT:_ZSt4cout
  223.         call    std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
  224.         movss   xmm0, DWORD PTR [rbp-24]
  225.         mov     rdi, rax
  226.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(float)
  227.         mov     esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
  228.         mov     rdi, rax
  229.         call    std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
  230.         mov     eax, 0
  231.         add     rsp, 104
  232.         pop     rbx
  233.         pop     rbp
  234.         ret
  235. __gnu_cxx::__promote_2<float, int, __gnu_cxx::__promote<float, std::__is_integer<float>::__value>::__type, __gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type>::__type std::pow<float, int>(float, int):
  236.         push    rbp
  237.         mov     rbp, rsp
  238.         sub     rsp, 16
  239.         movss   DWORD PTR [rbp-4], xmm0
  240.         mov     DWORD PTR [rbp-8], edi
  241.         cvtsi2sd        xmm1, DWORD PTR [rbp-8]
  242.         cvtss2sd        xmm0, DWORD PTR [rbp-4]
  243.         call    pow
  244.         movq    rax, xmm0
  245.         mov     QWORD PTR [rbp-16], rax
  246.         movsd   xmm0, QWORD PTR [rbp-16]
  247.         leave
  248.         ret
  249. __static_initialization_and_destruction_0(int, int):
  250.         push    rbp
  251.         mov     rbp, rsp
  252.         sub     rsp, 16
  253.         mov     DWORD PTR [rbp-4], edi
  254.         mov     DWORD PTR [rbp-8], esi
  255.         cmp     DWORD PTR [rbp-4], 1
  256.         jne     .L16
  257.         cmp     DWORD PTR [rbp-8], 65535
  258.         jne     .L16
  259.         mov     edi, OFFSET FLAT:_ZStL8__ioinit
  260.         call    std::ios_base::Init::Init() [complete object constructor]
  261.         mov     edx, OFFSET FLAT:__dso_handle
  262.         mov     esi, OFFSET FLAT:_ZStL8__ioinit
  263.         mov     edi, OFFSET FLAT:_ZNSt8ios_base4InitD1Ev
  264.         call    __cxa_atexit
  265. .L16:
  266.         nop
  267.         leave
  268.         ret
  269. _GLOBAL__sub_I_main:
  270.         push    rbp
  271.         mov     rbp, rsp
  272.         mov     esi, 65535
  273.         mov     edi, 1
  274.         call    __static_initialization_and_destruction_0(int, int)
  275.         pop     rbp
  276.         ret
  277. .LC0:
  278.         .long   4294967295
  279.         .long   2147483647
  280.         .long   0
  281.         .long   0
  282. .LC1:
  283.         .long   1078530000
  284. .LC3:
  285.         .long   0
  286.         .long   1071644672
  287. .LC6:
  288.         .long   1065353216
  289. .LC7:
  290.         .long   1067030938
  291. .LC8:
  292.         .long   1068708659
  293. .LC9:
  294.         .long   1070386381
  295. .LC10:
  296.         .long   1072064102
  297. .LC11:
  298.         .long   1073741824
  299. .LC12:
  300.         .long   1074580685
  301. .LC13:
  302.         .long   1075419546
  303. .LC14:
  304.         .long   1076258406
  305. .LC15:
  306.         .long   1077097267
  307. .LC16:
  308.         .long   1077936128
  309. .LC17:
  310.         .long   2769394912
  311.         .long   -1075330627
  312. .LC18:
  313.         .long   1958505087
  314.         .long   1075271827
  315. .LC19:
  316.         .long   707810610
  317.         .long   1076753321
  318. .LC20:
  319.         .long   1539316279
  320.         .long   1076928800
  321. .LC21:
  322.         .long   542883866
  323.         .long   1075261761
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement