Advertisement
Guest User

resulting intel assembly using gcc

a guest
Nov 17th, 2013
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "main.c"
  2.     .intel_syntax noprefix
  3.     .text
  4.     .globl  handleError
  5.     .type   handleError, @function
  6. handleError:
  7. .LFB2:
  8.     .cfi_startproc
  9.     push    ebp
  10.     .cfi_def_cfa_offset 8
  11.     .cfi_offset 5, -8
  12.     mov ebp, esp
  13.     .cfi_def_cfa_register 5
  14.     sub esp, 20
  15.     push    1
  16.     call    exit
  17.     .cfi_endproc
  18. .LFE2:
  19.     .size   handleError, .-handleError
  20.     .globl  handleWindowClose
  21.     .type   handleWindowClose, @function
  22. handleWindowClose:
  23. .LFB3:
  24.     .cfi_startproc
  25.     push    ebp
  26.     .cfi_def_cfa_offset 8
  27.     .cfi_offset 5, -8
  28.     mov ebp, esp
  29.     .cfi_def_cfa_register 5
  30.     sub esp, 20
  31.     push    0
  32.     call    exit
  33.     .cfi_endproc
  34. .LFE3:
  35.     .size   handleWindowClose, .-handleWindowClose
  36.     .globl  handleKey
  37.     .type   handleKey, @function
  38. handleKey:
  39. .LFB4:
  40.     .cfi_startproc
  41.     push    ebp
  42.     .cfi_def_cfa_offset 8
  43.     .cfi_offset 5, -8
  44.     mov ebp, esp
  45.     .cfi_def_cfa_register 5
  46.     push    ebx
  47.     push    eax
  48.     .cfi_offset 3, -12
  49.     mov edx, DWORD PTR [ebp+20]
  50.     mov ecx, DWORD PTR [ebp+12]
  51.     mov ebx, DWORD PTR [ebp+8]
  52.     cmp edx, 1
  53.     sete    al
  54.     cmp ecx, 256
  55.     jne .L6
  56.     test    al, al
  57.     je  .L6
  58.     sub esp, 12
  59.     push    0
  60.     call    exit
  61. .L6:
  62.     cmp BYTE PTR app+10, 0
  63.     je  .L7
  64.     cmp ecx, 65
  65.     jne .L8
  66.     test    al, al
  67.     jne .L30
  68.     test    edx, edx
  69.     jne .L5
  70.     push    eax
  71.     push    eax
  72.     push    90
  73.     push    ebx
  74.     call    glfwGetKey
  75.     add esp, 16
  76.     dec eax
  77.     jne .L14
  78.     movsd   xmm0, QWORD PTR player1+40
  79.     movsd   QWORD PTR player1+32, xmm0
  80.     jmp .L5
  81. .L8:
  82.     cmp ecx, 90
  83.     jne .L7
  84.     test    al, al
  85.     je  .L12
  86.     movsd   xmm1, QWORD PTR player1+40
  87.     movsd   QWORD PTR player1+32, xmm1
  88.     jmp .L5
  89. .L12:
  90.     test    edx, edx
  91.     jne .L5
  92.     push    ecx
  93.     push    ecx
  94.     push    65
  95.     push    ebx
  96.     call    glfwGetKey
  97.     add esp, 16
  98.     dec eax
  99.     jne .L14
  100. .L30:
  101.     fld QWORD PTR player1+40
  102.     fchs
  103.     fstp    QWORD PTR player1+32
  104.     jmp .L5
  105. .L14:
  106.     fldz
  107.     fstp    QWORD PTR player1+32
  108.     jmp .L5
  109. .L7:
  110.     cmp ecx, 39
  111.     jne .L15
  112.     test    al, al
  113.     jne .L31
  114.     test    edx, edx
  115.     jne .L5
  116.     push    edx
  117.     push    edx
  118.     push    47
  119.     push    ebx
  120.     call    glfwGetKey
  121.     add esp, 16
  122.     dec eax
  123.     jne .L22
  124.     movsd   xmm2, QWORD PTR player2+40
  125.     movsd   QWORD PTR player2+32, xmm2
  126.     jmp .L5
  127. .L15:
  128.     cmp ecx, 47
  129.     jne .L5
  130.     test    al, al
  131.     je  .L21
  132.     movsd   xmm3, QWORD PTR player2+40
  133.     movsd   QWORD PTR player2+32, xmm3
  134.     jmp .L5
  135. .L21:
  136.     test    edx, edx
  137.     jne .L5
  138.     push    eax
  139.     push    eax
  140.     push    39
  141.     push    ebx
  142.     call    glfwGetKey
  143.     add esp, 16
  144.     dec eax
  145.     jne .L22
  146. .L31:
  147.     fld QWORD PTR player2+40
  148.     fchs
  149.     fstp    QWORD PTR player2+32
  150.     jmp .L5
  151. .L22:
  152.     fldz
  153.     fstp    QWORD PTR player2+32
  154. .L5:
  155.     mov ebx, DWORD PTR [ebp-4]
  156.     leave
  157.     .cfi_restore 5
  158.     .cfi_restore 3
  159.     .cfi_def_cfa 4, 4
  160.     ret
  161.     .cfi_endproc
  162. .LFE4:
  163.     .size   handleKey, .-handleKey
  164.     .globl  handleFramebufferSize
  165.     .type   handleFramebufferSize, @function
  166. handleFramebufferSize:
  167. .LFB5:
  168.     .cfi_startproc
  169.     push    ebp
  170.     .cfi_def_cfa_offset 8
  171.     .cfi_offset 5, -8
  172.     mov ebp, esp
  173.     .cfi_def_cfa_register 5
  174.     sub esp, 8
  175.     mov edx, DWORD PTR [ebp+16]
  176.     mov eax, DWORD PTR [ebp+12]
  177.     push    edx
  178.     push    eax
  179.     push    0
  180.     push    0
  181.     mov DWORD PTR app, eax
  182.     mov DWORD PTR app+4, edx
  183.     call    glViewport
  184.     mov DWORD PTR [esp], 5889
  185.     call    glMatrixMode
  186.     call    glLoadIdentity
  187.     push    eax
  188.     push    eax
  189.     fld1
  190.     fst QWORD PTR [esp]
  191.     push    -1074790400
  192.     push    0
  193.     sub esp, 32
  194.     fldz
  195.     fst QWORD PTR [esp+24]
  196.     fxch    st(1)
  197.     fst QWORD PTR [esp+16]
  198.     fstp    QWORD PTR [esp+8]
  199.     fstp    QWORD PTR [esp]
  200.     call    glOrtho
  201.     add esp, 64
  202.     leave
  203.     .cfi_restore 5
  204.     .cfi_def_cfa 4, 4
  205.     ret
  206.     .cfi_endproc
  207. .LFE5:
  208.     .size   handleFramebufferSize, .-handleFramebufferSize
  209.     .globl  fps
  210.     .type   fps, @function
  211. fps:
  212. .LFB6:
  213.     .cfi_startproc
  214.     push    ebp
  215.     .cfi_def_cfa_offset 8
  216.     .cfi_offset 5, -8
  217.     mov ebp, esp
  218.     .cfi_def_cfa_register 5
  219.     sub esp, 8
  220.     call    glfwGetTime
  221.     fst QWORD PTR time.15415
  222.     fld QWORD PTR time_old.15416
  223.     fsubr   st, st(1)
  224.     fld1
  225.     fdivrp  st(1), st
  226.     fst QWORD PTR ret_val.15417
  227.     fxch    st(1)
  228.     fstp    QWORD PTR time_old.15416
  229.     leave
  230.     .cfi_restore 5
  231.     .cfi_def_cfa 4, 4
  232.     ret
  233.     .cfi_endproc
  234. .LFE6:
  235.     .size   fps, .-fps
  236.     .globl  reset
  237.     .type   reset, @function
  238. reset:
  239. .LFB7:
  240.     .cfi_startproc
  241.     push    ebp
  242.     .cfi_def_cfa_offset 8
  243.     .cfi_offset 5, -8
  244.     mov ebp, esp
  245.     .cfi_def_cfa_register 5
  246.     sub esp, 16
  247.     fld QWORD PTR .LC4
  248.     fst QWORD PTR ball
  249.     fstp    QWORD PTR ball+8
  250.     push    0
  251.     fld QWORD PTR .LC7
  252.     fst QWORD PTR player1+8
  253.     push    0
  254.     fstp    QWORD PTR player2+8
  255.     mov DWORD PTR ball+40, 1202590843
  256.     mov DWORD PTR ball+44, 1065646817
  257.     mov DWORD PTR ball+32, -1717986918
  258.     mov DWORD PTR ball+36, 1069128089
  259.     call    glfwSetTime
  260.     add esp, 16
  261.     leave
  262.     .cfi_restore 5
  263.     .cfi_def_cfa 4, 4
  264.     ret
  265.     .cfi_endproc
  266. .LFE7:
  267.     .size   reset, .-reset
  268.     .globl  calcLineY
  269.     .type   calcLineY, @function
  270. calcLineY:
  271. .LFB8:
  272.     .cfi_startproc
  273.     push    ebp
  274.     .cfi_def_cfa_offset 8
  275.     .cfi_offset 5, -8
  276.     mov ebp, esp
  277.     .cfi_def_cfa_register 5
  278.     mov eax, DWORD PTR [ebp+8]
  279.     fld QWORD PTR [eax+8]
  280.     fadd    QWORD PTR [eax+32]
  281.     fldz
  282.     fucomi  st, st(1)
  283.     ja  .L42
  284.     fstp    st(0)
  285.     fld QWORD PTR [eax+24]
  286.     fld st(1)
  287.     fadd    st, st(1)
  288.     fld1
  289.     fxch    st(1)
  290.     fucomip st, st(1)
  291.     jbe .L45
  292.     fstp    st(2)
  293.     fxch    st(1)
  294.     fsubrp  st(1), st
  295.     jmp .L40
  296. .L42:
  297.     fstp    st(1)
  298.     jmp .L40
  299. .L45:
  300.     fstp    st(0)
  301.     fstp    st(0)
  302. .L40:
  303.     fstp    QWORD PTR [eax+8]
  304.     pop ebp
  305.     .cfi_restore 5
  306.     .cfi_def_cfa 4, 4
  307.     ret
  308.     .cfi_endproc
  309. .LFE8:
  310.     .size   calcLineY, .-calcLineY
  311.     .globl  flipY
  312.     .type   flipY, @function
  313. flipY:
  314. .LFB9:
  315.     .cfi_startproc
  316.     push    ebp
  317.     .cfi_def_cfa_offset 8
  318.     .cfi_offset 5, -8
  319.     mov ebp, esp
  320.     .cfi_def_cfa_register 5
  321.     fld QWORD PTR [ebp+8]
  322.     fchs
  323.     pop ebp
  324.     .cfi_restore 5
  325.     .cfi_def_cfa 4, 4
  326.     ret
  327.     .cfi_endproc
  328. .LFE9:
  329.     .size   flipY, .-flipY
  330.     .globl  flipX
  331.     .type   flipX, @function
  332. flipX:
  333. .LFB10:
  334.     .cfi_startproc
  335.     push    ebp
  336.     .cfi_def_cfa_offset 8
  337.     .cfi_offset 5, -8
  338.     fld QWORD PTR .LC8
  339.     mov ebp, esp
  340.     .cfi_def_cfa_register 5
  341.     fsub    QWORD PTR [ebp+8]
  342.     pop ebp
  343.     .cfi_restore 5
  344.     .cfi_def_cfa 4, 4
  345.     ret
  346.     .cfi_endproc
  347. .LFE10:
  348.     .size   flipX, .-flipX
  349.     .globl  calcBall
  350.     .type   calcBall, @function
  351. calcBall:
  352. .LFB11:
  353.     .cfi_startproc
  354.     push    ebp
  355.     .cfi_def_cfa_offset 8
  356.     .cfi_offset 5, -8
  357.     mov ebp, esp
  358.     .cfi_def_cfa_register 5
  359.     push    ebx
  360.     sub esp, 36
  361.     .cfi_offset 3, -12
  362.     mov ebx, DWORD PTR [ebp+8]
  363.     lea edx, [ebp-24]
  364.     lea eax, [ebp-16]
  365.     fld QWORD PTR [ebx+32]
  366.     push    edx
  367.     push    eax
  368.     push    eax
  369.     push    eax
  370.     fst QWORD PTR [esp]
  371.     fstp    QWORD PTR [ebp-32]
  372.     call    sincos
  373.     add esp, 16
  374.     fld QWORD PTR [ebp-16]
  375.     fld QWORD PTR [ebx+40]
  376.     fld QWORD PTR [ebp-24]
  377.     fmul    st, st(1)
  378.     fadd    QWORD PTR [ebx]
  379.     fld QWORD PTR [ebx+8]
  380.     fldz
  381.     fucomi  st, st(2)
  382.     fld QWORD PTR [ebp-32]
  383.     jbe .L64
  384.     fstp    st(0)
  385.     fstp    st(0)
  386.     fstp    st(0)
  387.     fstp    st(0)
  388.     fstp    st(0)
  389.     fstp    st(0)
  390.     inc DWORD PTR player1+48
  391.     jmp .L70
  392. .L64:
  393.     fld1
  394.     fld QWORD PTR [ebx+16]
  395.     fsubr   st, st(1)
  396.     fxch    st(5)
  397.     fucomi  st, st(5)
  398.     fstp    st(5)
  399.     jbe .L65
  400.     fstp    st(0)
  401.     fstp    st(0)
  402.     fstp    st(0)
  403.     fstp    st(0)
  404.     fstp    st(0)
  405.     fstp    st(0)
  406.     fstp    st(0)
  407.     inc DWORD PTR player2+48
  408. .L70:
  409.     mov ebx, DWORD PTR [ebp-4]
  410.     leave
  411.     .cfi_remember_state
  412.     .cfi_restore 5
  413.     .cfi_restore 3
  414.     .cfi_def_cfa 4, 4
  415.     jmp reset
  416. .L65:
  417.     .cfi_restore_state
  418.     fxch    st(6)
  419.     fmul    st, st(5)
  420.     faddp   st(3), st
  421.     fxch    st(3)
  422.     fstp    QWORD PTR [ebx]
  423.     fucomip st, st(1)
  424.     ja  .L71
  425.     fxch    st(3)
  426.     fsub    QWORD PTR [ebx+24]
  427.     fxch    st(3)
  428.     fucomi  st, st(3)
  429.     fstp    st(3)
  430.     jbe .L67
  431.     fstp    st(2)
  432.     fxch    st(1)
  433.     jmp .L69
  434. .L71:
  435.     fstp    st(0)
  436.     fstp    st(2)
  437.     fxch    st(1)
  438. .L69:
  439.     fchs
  440.     fstp    QWORD PTR [ebx+32]
  441.     jmp .L57
  442. .L67:
  443.     fstp    st(0)
  444.     fxch    st(1)
  445.     fstp    QWORD PTR [ebx+8]
  446. .L57:
  447.     fadd    QWORD PTR [ebx+48]
  448.     fstp    QWORD PTR [ebx+40]
  449.     mov ebx, DWORD PTR [ebp-4]
  450.     leave
  451.     .cfi_restore 5
  452.     .cfi_restore 3
  453.     .cfi_def_cfa 4, 4
  454.     ret
  455.     .cfi_endproc
  456. .LFE11:
  457.     .size   calcBall, .-calcBall
  458.     .globl  intersects
  459.     .type   intersects, @function
  460. intersects:
  461. .LFB12:
  462.     .cfi_startproc
  463.     push    ebp
  464.     .cfi_def_cfa_offset 8
  465.     .cfi_offset 5, -8
  466.     mov ebp, esp
  467.     .cfi_def_cfa_register 5
  468.     mov eax, DWORD PTR [ebp+12]
  469.     mov edx, DWORD PTR [ebp+8]
  470.     fld QWORD PTR [eax]
  471.     fld QWORD PTR [edx]
  472.     fld QWORD PTR [edx+16]
  473.     fadd    st, st(1)
  474.     fucomip st, st(2)
  475.     jbe .L87
  476.     fxch    st(1)
  477.     fadd    QWORD PTR [eax+16]
  478.     fucomip st, st(1)
  479.     fstp    st(0)
  480.     jbe .L85
  481.     fld QWORD PTR [eax+8]
  482.     fld QWORD PTR [edx+8]
  483.     fld QWORD PTR [edx+24]
  484.     fadd    st, st(1)
  485.     fucomip st, st(2)
  486.     jbe .L88
  487.     fxch    st(1)
  488.     fadd    QWORD PTR [eax+24]
  489.     fucomip st, st(1)
  490.     fstp    st(0)
  491.     seta    al
  492.     jmp .L73
  493. .L87:
  494.     fstp    st(0)
  495.     fstp    st(0)
  496.     jmp .L85
  497. .L88:
  498.     fstp    st(0)
  499.     fstp    st(0)
  500. .L85:
  501.     xor eax, eax
  502. .L73:
  503.     pop ebp
  504.     .cfi_restore 5
  505.     .cfi_def_cfa 4, 4
  506.     ret
  507.     .cfi_endproc
  508. .LFE12:
  509.     .size   intersects, .-intersects
  510.     .globl  getRelDistFromCenter
  511.     .type   getRelDistFromCenter, @function
  512. getRelDistFromCenter:
  513. .LFB13:
  514.     .cfi_startproc
  515.     push    ebp
  516.     .cfi_def_cfa_offset 8
  517.     .cfi_offset 5, -8
  518.     mov ebp, esp
  519.     .cfi_def_cfa_register 5
  520.     mov edx, DWORD PTR [ebp+8]
  521.     mov eax, DWORD PTR [ebp+12]
  522.     pop ebp
  523.     .cfi_restore 5
  524.     .cfi_def_cfa 4, 4
  525.     fld QWORD PTR [edx+24]
  526.     fld DWORD PTR .LC9
  527.     fld st(1)
  528.     fmul    st, st(1)
  529.     fadd    QWORD PTR [edx+8]
  530.     fxch    st(1)
  531.     fmul    QWORD PTR [eax+24]
  532.     fadd    QWORD PTR [eax+8]
  533.     fsubp   st(1), st
  534.     fdivrp  st(1), st
  535.     ret
  536.     .cfi_endproc
  537. .LFE13:
  538.     .size   getRelDistFromCenter, .-getRelDistFromCenter
  539.     .globl  calc
  540.     .type   calc, @function
  541. calc:
  542. .LFB14:
  543.     .cfi_startproc
  544.     push    ebp
  545.     .cfi_def_cfa_offset 8
  546.     .cfi_offset 5, -8
  547.     mov ebp, esp
  548.     .cfi_def_cfa_register 5
  549.     sub esp, 8
  550.     cmp BYTE PTR app+10, 0
  551.     jne .L92
  552.     fld QWORD PTR ball+8
  553.     fld QWORD PTR player1+8
  554.     fucomi  st, st(1)
  555.     jbe .L110
  556.     fstp    st(0)
  557.     fstp    st(0)
  558.     fld QWORD PTR player1+40
  559.     fchs
  560.     fdiv    QWORD PTR .LC10
  561.     jmp .L113
  562. .L110:
  563.     fxch    st(1)
  564.     fadd    QWORD PTR ball+24
  565.     fxch    st(1)
  566.     fadd    QWORD PTR player1+24
  567.     fxch    st(1)
  568.     fucomip st, st(1)
  569.     fstp    st(0)
  570.     jbe .L111
  571.     fld QWORD PTR .LC10
  572.     fdivr   QWORD PTR player1+40
  573. .L113:
  574.     fstp    QWORD PTR player1+32
  575.     jmp .L92
  576. .L111:
  577.     fldz
  578.     fstp    QWORD PTR player1+32
  579. .L92:
  580.     push    eax
  581.     push    OFFSET FLAT:player1
  582.     call    calcLineY
  583.     mov DWORD PTR [esp], OFFSET FLAT:player2
  584.     call    calcLineY
  585.     pop eax
  586.     pop edx
  587.     call    glfwGetTime
  588.     fld1
  589.     fxch    st(1)
  590.     fucomip st, st(1)
  591.     fstp    st(0)
  592.     jbe .L97
  593.     sub esp, 12
  594.     push    OFFSET FLAT:ball
  595.     call    calcBall
  596.     add esp, 16
  597. .L97:
  598.     push    eax
  599.     push    eax
  600.     push    OFFSET FLAT:ball
  601.     push    OFFSET FLAT:player1
  602.     call    intersects
  603.     add esp, 16
  604.     test    al, al
  605.     je  .L99
  606.     push    eax
  607.     push    eax
  608.     push    OFFSET FLAT:ball
  609.     push    OFFSET FLAT:player1
  610.     call    getRelDistFromCenter
  611.     add esp, 16
  612.     fmul    DWORD PTR .LC11
  613.     fstp    QWORD PTR ball+32
  614. .L99:
  615.     push    ecx
  616.     push    ecx
  617.     push    OFFSET FLAT:ball
  618.     push    OFFSET FLAT:player2
  619.     call    intersects
  620.     add esp, 16
  621.     test    al, al
  622.     je  .L91
  623.     push    edx
  624.     push    edx
  625.     push    OFFSET FLAT:ball
  626.     push    OFFSET FLAT:player2
  627.     call    getRelDistFromCenter
  628.     add esp, 16
  629.     fadd    st, st(0)
  630.     fadd    QWORD PTR .LC8
  631.     fstp    QWORD PTR ball+32
  632. .L91:
  633.     leave
  634.     .cfi_restore 5
  635.     .cfi_def_cfa 4, 4
  636.     ret
  637.     .cfi_endproc
  638. .LFE14:
  639.     .size   calc, .-calc
  640.     .globl  draw
  641.     .type   draw, @function
  642. draw:
  643. .LFB15:
  644.     .cfi_startproc
  645.     push    ebp
  646.     .cfi_def_cfa_offset 8
  647.     .cfi_offset 5, -8
  648.     mov ebp, esp
  649.     .cfi_def_cfa_register 5
  650.     sub esp, 52
  651.     push    16384
  652.     call    glClear
  653.     sub esp, 16
  654.     fld QWORD PTR .LC12
  655.     fst QWORD PTR [esp+16]
  656.     fld QWORD PTR .LC13
  657.     fst QWORD PTR [esp+8]
  658.     fstp    QWORD PTR [ebp-40]
  659.     fstp    QWORD PTR [esp]
  660.     call    glColor3d
  661.     add esp, 20
  662.     push    1
  663.     call    glBegin
  664.     sub esp, 16
  665.     fldz
  666.     fst QWORD PTR [esp+8]
  667.     fstp    QWORD PTR [ebp-32]
  668.     fld DWORD PTR .LC9
  669.     fst QWORD PTR [esp]
  670.     fstp    QWORD PTR [ebp-24]
  671.     call    glVertex2d
  672.     add esp, 16
  673.     fld1
  674.     fst QWORD PTR [esp+8]
  675.     fstp    QWORD PTR [ebp-16]
  676.     fld QWORD PTR [ebp-24]
  677.     fstp    QWORD PTR [esp]
  678.     call    glVertex2d
  679.     call    glEnd
  680.     sub esp, 16
  681.     fld QWORD PTR [ebp-40]
  682.     fst QWORD PTR [esp+16]
  683.     fst QWORD PTR [esp+8]
  684.     fstp    QWORD PTR [esp]
  685.     call    glColor3d
  686.     add esp, 16
  687.     fld QWORD PTR player1+8
  688.     fadd    QWORD PTR player1+24
  689.     fstp    QWORD PTR [esp+8]
  690.     fld QWORD PTR player1
  691.     fadd    QWORD PTR player1+16
  692.     fstp    QWORD PTR [esp]
  693.     push    DWORD PTR player1+12
  694.     push    DWORD PTR player1+8
  695.     push    DWORD PTR player1+4
  696.     push    DWORD PTR player1
  697.     call    glRectd
  698.     add esp, 16
  699.     fld QWORD PTR player2+8
  700.     fadd    QWORD PTR player2+24
  701.     fstp    QWORD PTR [esp+8]
  702.     fld QWORD PTR player2
  703.     fadd    QWORD PTR player2+16
  704.     fstp    QWORD PTR [esp]
  705.     push    DWORD PTR player2+12
  706.     push    DWORD PTR player2+8
  707.     push    DWORD PTR player2+4
  708.     push    DWORD PTR player2
  709.     call    glRectd
  710.     fld QWORD PTR [ebp-32]
  711.     fst QWORD PTR [esp+16]
  712.     fld QWORD PTR [ebp-16]
  713.     fstp    QWORD PTR [esp+8]
  714.     fstp    QWORD PTR [esp]
  715.     call    glColor3d
  716.     add esp, 16
  717.     fld QWORD PTR ball+8
  718.     fadd    QWORD PTR ball+24
  719.     fstp    QWORD PTR [esp+8]
  720.     fld QWORD PTR ball
  721.     fadd    QWORD PTR ball+16
  722.     fstp    QWORD PTR [esp]
  723.     push    DWORD PTR ball+12
  724.     push    DWORD PTR ball+8
  725.     push    DWORD PTR ball+4
  726.     push    DWORD PTR ball
  727.     call    glRectd
  728.     add esp, 32
  729.     call    glFlush
  730.     leave
  731.     .cfi_restore 5
  732.     .cfi_def_cfa 4, 4
  733.     jmp glGetError
  734.     .cfi_endproc
  735. .LFE15:
  736.     .size   draw, .-draw
  737.     .section    .rodata.str1.1,"aMS",@progbits,1
  738. .LC14:
  739.     .string ""
  740. .LC15:
  741.     .string "Pong clone  "
  742. .LC16:
  743.     .string "FPS: "
  744. .LC17:
  745.     .string "%d  "
  746. .LC18:
  747.     .string "Score: "
  748. .LC19:
  749.     .string "%d:%d  "
  750.     .text
  751.     .globl  setTitle
  752.     .type   setTitle, @function
  753. setTitle:
  754. .LFB16:
  755.     .cfi_startproc
  756.     push    ebp
  757.     .cfi_def_cfa_offset 8
  758.     .cfi_offset 5, -8
  759.     mov ebp, esp
  760.     .cfi_def_cfa_register 5
  761.     push    esi
  762.     push    ebx
  763.     sub esp, 136
  764.     .cfi_offset 6, -12
  765.     .cfi_offset 3, -16
  766.     push    OFFSET FLAT:.LC14
  767.     lea ebx, [ebp-108]
  768.     push    ebx
  769.     call    strcpy
  770.     pop esi
  771.     pop eax
  772.     lea esi, [ebp-124]
  773.     push    OFFSET FLAT:.LC15
  774.     push    ebx
  775.     call    strcat
  776.     pop eax
  777.     pop edx
  778.     push    OFFSET FLAT:.LC16
  779.     push    ebx
  780.     call    strcat
  781.     call    fps
  782.     fstp    QWORD PTR [esp]
  783.     call    lround
  784.     push    eax
  785.     push    OFFSET FLAT:.LC17
  786.     push    6
  787.     push    esi
  788.     call    snprintf
  789.     add esp, 24
  790.     push    esi
  791.     push    ebx
  792.     call    strcat
  793.     pop ecx
  794.     pop esi
  795.     lea esi, [ebp-118]
  796.     push    OFFSET FLAT:.LC18
  797.     push    ebx
  798.     call    strcat
  799.     pop eax
  800.     push    DWORD PTR player2+48
  801.     push    DWORD PTR player1+48
  802.     push    OFFSET FLAT:.LC19
  803.     push    10
  804.     push    esi
  805.     call    snprintf
  806.     add esp, 24
  807.     push    esi
  808.     push    ebx
  809.     call    strcat
  810.     pop eax
  811.     pop edx
  812.     push    ebx
  813.     push    DWORD PTR [ebp+8]
  814.     call    glfwSetWindowTitle
  815.     add esp, 16
  816.     lea esp, [ebp-8]
  817.     pop ebx
  818.     .cfi_restore 3
  819.     pop esi
  820.     .cfi_restore 6
  821.     pop ebp
  822.     .cfi_restore 5
  823.     .cfi_def_cfa 4, 4
  824.     ret
  825.     .cfi_endproc
  826. .LFE16:
  827.     .size   setTitle, .-setTitle
  828.     .section    .text.startup,"ax",@progbits
  829.     .globl  main
  830.     .type   main, @function
  831. main:
  832. .LFB17:
  833.     .cfi_startproc
  834.     lea ecx, [esp+4]
  835.     .cfi_def_cfa 1, 0
  836.     and esp, -16
  837.     push    DWORD PTR [ecx-4]
  838.     push    ebp
  839.     .cfi_escape 0x10,0x5,0x2,0x75,0
  840.     mov ebp, esp
  841.     push    ebx
  842.     push    ecx
  843.     .cfi_escape 0xf,0x3,0x75,0x78,0x6
  844.     .cfi_escape 0x10,0x3,0x2,0x75,0x7c
  845.     sub esp, 12
  846.     push    OFFSET FLAT:handleError
  847.     call    glfwSetErrorCallback
  848.     call    glfwInit
  849.     add esp, 16
  850.     test    eax, eax
  851.     jne .L119
  852.     sub esp, 12
  853.     push    1
  854.     call    exit
  855. .L119:
  856.     cmp BYTE PTR app+8, 0
  857.     je  .L120
  858.     sub esp, 12
  859.     push    0
  860.     push    0
  861.     jmp .L124
  862. .L120:
  863.     call    glfwGetPrimaryMonitor
  864.     sub esp, 12
  865.     push    eax
  866.     call    glfwGetVideoMode
  867.     mov edx, DWORD PTR [eax]
  868.     mov eax, DWORD PTR [eax+4]
  869.     mov DWORD PTR app, edx
  870.     mov DWORD PTR app+4, eax
  871.     call    glfwGetPrimaryMonitor
  872.     mov DWORD PTR [esp], 0
  873.     push    eax
  874. .L124:
  875.     push    OFFSET FLAT:.LC14
  876.     push    DWORD PTR app+4
  877.     push    DWORD PTR app
  878.     call    glfwCreateWindow
  879.     add esp, 32
  880.     sub esp, 12
  881.     push    eax
  882.     mov ebx, eax
  883.     call    glfwMakeContextCurrent
  884.     add esp, 12
  885.     push    DWORD PTR app+4
  886.     push    DWORD PTR app
  887.     push    ebx
  888.     call    handleFramebufferSize
  889.     pop ecx
  890.     pop eax
  891.     push    OFFSET FLAT:handleWindowClose
  892.     push    ebx
  893.     call    glfwSetWindowCloseCallback
  894.     pop eax
  895.     pop edx
  896.     push    OFFSET FLAT:handleFramebufferSize
  897.     push    ebx
  898.     call    glfwSetFramebufferSizeCallback
  899.     pop ecx
  900.     pop eax
  901.     push    OFFSET FLAT:handleKey
  902.     push    ebx
  903.     call    glfwSetKeyCallback
  904.     push    0x00000000
  905.     push    0x3dcccccd
  906.     push    0x3dcccccd
  907.     push    0x3dcccccd
  908.     call    glClearColor
  909.     add esp, 20
  910.     push    2852
  911.     call    glEnable
  912.     pop eax
  913.     pop edx
  914.     push    65280
  915.     push    1
  916.     call    glLineStipple
  917.     call    reset
  918. .L125:
  919.     add esp, 16
  920.     sub esp, 12
  921.     push    ebx
  922.     call    setTitle
  923.     call    glfwPollEvents
  924.     call    calc
  925.     call    draw
  926.     mov DWORD PTR [esp], ebx
  927.     call    glfwSwapBuffers
  928.     jmp .L125
  929.     .cfi_endproc
  930. .LFE17:
  931.     .size   main, .-main
  932.     .local  ret_val.15417
  933.     .comm   ret_val.15417,8,8
  934.     .local  time_old.15416
  935.     .comm   time_old.15416,8,8
  936.     .local  time.15415
  937.     .comm   time.15415,8,8
  938.     .globl  ball
  939.     .data
  940.     .align 8
  941.     .type   ball, @object
  942.     .size   ball, 56
  943. ball:
  944.     .long   3092376453
  945.     .long   1071613214
  946.     .long   3092376453
  947.     .long   1071613214
  948.     .long   3951369912
  949.     .long   1066317905
  950.     .long   3951369912
  951.     .long   1066317905
  952.     .long   2576980378
  953.     .long   1069128089
  954.     .long   1202590843
  955.     .long   1065646817
  956.     .long   2296604913
  957.     .long   1055193269
  958.     .globl  player2
  959.     .align 8
  960.     .type   player2, @object
  961.     .size   player2, 52
  962. player2:
  963.     .long   2405181686
  964.     .long   1072494018
  965.     .long   3435973837
  966.     .long   1071434956
  967.     .long   1202590843
  968.     .long   1065646817
  969.     .long   2576980378
  970.     .long   1069128089
  971.     .long   0
  972.     .long   0
  973.     .long   3951369912
  974.     .long   1066317905
  975.     .long   0
  976.     .globl  player1
  977.     .align 8
  978.     .type   player1, @object
  979.     .size   player1, 52
  980. player1:
  981.     .long   2233382994
  982.     .long   1069044203
  983.     .long   3435973837
  984.     .long   1071434956
  985.     .long   1202590843
  986.     .long   1065646817
  987.     .long   2576980378
  988.     .long   1069128089
  989.     .long   0
  990.     .long   0
  991.     .long   3951369912
  992.     .long   1066317905
  993.     .long   0
  994.     .globl  app
  995.     .align 4
  996.     .type   app, @object
  997.     .size   app, 12
  998. app:
  999.     .long   800
  1000.     .long   600
  1001.     .byte   1
  1002.     .byte   1
  1003.     .byte   0
  1004.     .zero   1
  1005.     .section    .rodata.cst8,"aM",@progbits,8
  1006.     .align 8
  1007. .LC4:
  1008.     .long   3092376453
  1009.     .long   1071613214
  1010.     .align 8
  1011. .LC7:
  1012.     .long   3435973837
  1013.     .long   1071434956
  1014.     .align 8
  1015. .LC8:
  1016.     .long   1413754136
  1017.     .long   1074340347
  1018.     .section    .rodata.cst4,"aM",@progbits,4
  1019.     .align 4
  1020. .LC9:
  1021.     .long   1056964608
  1022.     .section    .rodata.cst8
  1023.     .align 8
  1024. .LC10:
  1025.     .long   2576980378
  1026.     .long   1072798105
  1027.     .section    .rodata.cst4
  1028.     .align 4
  1029. .LC11:
  1030.     .long   3221225472
  1031.     .section    .rodata.cst8
  1032.     .align 8
  1033. .LC12:
  1034.     .long   2576980378
  1035.     .long   1070176665
  1036.     .align 8
  1037. .LC13:
  1038.     .long   3435973837
  1039.     .long   1072483532
  1040.     .ident  "GCC: (GNU) 4.8.2"
  1041.     .section    .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement