University stuff.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

fasit.s 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. .file "fasit.c"
  2. .text
  3. .globl writebyte
  4. .type writebyte, @function
  5. writebyte:
  6. .LFB5:
  7. .cfi_startproc
  8. pushl %ebp
  9. .cfi_def_cfa_offset 8
  10. .cfi_offset 5, -8
  11. movl %esp, %ebp
  12. .cfi_def_cfa_register 5
  13. subl $24, %esp
  14. movl 12(%ebp), %eax
  15. movb %al, -12(%ebp)
  16. pushl 8(%ebp)
  17. pushl $1
  18. pushl $1
  19. leal -12(%ebp), %eax
  20. pushl %eax
  21. call fwrite
  22. addl $16, %esp
  23. nop
  24. leave
  25. .cfi_restore 5
  26. .cfi_def_cfa 4, 4
  27. ret
  28. .cfi_endproc
  29. .LFE5:
  30. .size writebyte, .-writebyte
  31. .globl writeutf8char
  32. .type writeutf8char, @function
  33. writeutf8char:
  34. .LFB6:
  35. .cfi_startproc
  36. pushl %ebp
  37. .cfi_def_cfa_offset 8
  38. .cfi_offset 5, -8
  39. movl %esp, %ebp
  40. .cfi_def_cfa_register 5
  41. subl $24, %esp
  42. cmpl $127, 12(%ebp)
  43. ja .L3
  44. movl 12(%ebp), %eax
  45. movzbl %al, %eax
  46. subl $8, %esp
  47. pushl %eax
  48. pushl 8(%ebp)
  49. call writebyte
  50. addl $16, %esp
  51. jmp .L2
  52. .L3:
  53. cmpl $65535, 12(%ebp)
  54. jbe .L5
  55. movl $18, -12(%ebp)
  56. movl -12(%ebp), %eax
  57. movl 12(%ebp), %edx
  58. movl %eax, %ecx
  59. shrl %cl, %edx
  60. movl %edx, %eax
  61. andl $7, %eax
  62. orl $-16, %eax
  63. movzbl %al, %eax
  64. subl $8, %esp
  65. pushl %eax
  66. pushl 8(%ebp)
  67. call writebyte
  68. addl $16, %esp
  69. jmp .L6
  70. .L5:
  71. cmpl $2047, 12(%ebp)
  72. jbe .L7
  73. movl $12, -12(%ebp)
  74. movl -12(%ebp), %eax
  75. movl 12(%ebp), %edx
  76. movl %eax, %ecx
  77. shrl %cl, %edx
  78. movl %edx, %eax
  79. andl $15, %eax
  80. orl $-32, %eax
  81. movzbl %al, %eax
  82. subl $8, %esp
  83. pushl %eax
  84. pushl 8(%ebp)
  85. call writebyte
  86. addl $16, %esp
  87. jmp .L6
  88. .L7:
  89. movl $6, -12(%ebp)
  90. movl -12(%ebp), %eax
  91. movl 12(%ebp), %edx
  92. movl %eax, %ecx
  93. shrl %cl, %edx
  94. movl %edx, %eax
  95. andl $31, %eax
  96. orl $-64, %eax
  97. movzbl %al, %eax
  98. subl $8, %esp
  99. pushl %eax
  100. pushl 8(%ebp)
  101. call writebyte
  102. addl $16, %esp
  103. .L6:
  104. subl $6, -12(%ebp)
  105. movl -12(%ebp), %eax
  106. movl 12(%ebp), %edx
  107. movl %eax, %ecx
  108. shrl %cl, %edx
  109. movl %edx, %eax
  110. andl $63, %eax
  111. orl $-128, %eax
  112. movzbl %al, %eax
  113. subl $8, %esp
  114. pushl %eax
  115. pushl 8(%ebp)
  116. call writebyte
  117. addl $16, %esp
  118. cmpl $0, -12(%ebp)
  119. jg .L6
  120. .L2:
  121. leave
  122. .cfi_restore 5
  123. .cfi_def_cfa 4, 4
  124. ret
  125. .cfi_endproc
  126. .LFE6:
  127. .size writeutf8char, .-writeutf8char
  128. .globl readbyte
  129. .type readbyte, @function
  130. readbyte:
  131. .LFB7:
  132. .cfi_startproc
  133. pushl %ebp
  134. .cfi_def_cfa_offset 8
  135. .cfi_offset 5, -8
  136. movl %esp, %ebp
  137. .cfi_def_cfa_register 5
  138. subl $24, %esp
  139. pushl 8(%ebp)
  140. pushl $1
  141. pushl $1
  142. leal -13(%ebp), %eax
  143. pushl %eax
  144. call fread
  145. addl $16, %esp
  146. movl %eax, -12(%ebp)
  147. cmpl $0, -12(%ebp)
  148. jg .L9
  149. movl $-1, %eax
  150. jmp .L11
  151. .L9:
  152. movzbl -13(%ebp), %eax
  153. movzbl %al, %eax
  154. .L11:
  155. leave
  156. .cfi_restore 5
  157. .cfi_def_cfa 4, 4
  158. ret
  159. .cfi_endproc
  160. .LFE7:
  161. .size readbyte, .-readbyte
  162. .globl readutf8char
  163. .type readutf8char, @function
  164. readutf8char:
  165. .LFB8:
  166. .cfi_startproc
  167. pushl %ebp
  168. .cfi_def_cfa_offset 8
  169. .cfi_offset 5, -8
  170. movl %esp, %ebp
  171. .cfi_def_cfa_register 5
  172. subl $8, %esp
  173. subl $12, %esp
  174. pushl 8(%ebp)
  175. call readbyte
  176. addl $16, %esp
  177. leave
  178. .cfi_restore 5
  179. .cfi_def_cfa 4, 4
  180. ret
  181. .cfi_endproc
  182. .LFE8:
  183. .size readutf8char, .-readutf8char
  184. .ident "GCC: (GNU) 6.3.1 20170306"
  185. .section .note.GNU-stack,"",@progbits