# Input file for gen-x86-prologues.rb

# The ".c" and ".exp" files are not auto-regenerated; after changing
# this file, you must re-run the ruby script.

# "Karma8V10" is an OS built entirely with gcc 3.3 and "gcc 3.5" (a very
# early version of gcc 4.0).

# SOURCE: Karma8V10 libSystem.B.dylib _lu_data_index
# PROLOGUE
   push %ebp
   or   $0xffffffff, %ecx  # [ 0x83 0xc9 0xff ]
   mov  %esp,%ebp
   test %edx,%edx
# EPILOGUE
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib __fixunsxfsi
# PROLOGUE
   call L1           # [ 0xe0 0x00 0x00 000 0x00 ]
L1:
   pop   %ecx        # [ 0x59 ]
   push  %ebp
   mov   %esp, %ebp
   sub   $0x18, %esp
# EPILOGUE
   add $0x18, %esp
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib OSReadSwapInt32
# PROLOGUE
   push %ebp
   add %edx, %eax # [ 0x01 0xd0 ]
   mov %esp, %ebp
   push %ecx
   push %ecx
# EPILOGUE
   pop %ecx
   pop %ecx
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib InternalTXTRecordSearch
# PROLOGUE
   push %ebp
   movzwl %ax,%eax # [ 0x0f 0xb7 0xc0 ]
   mov %esp, %ebp
# EPILOGUE
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib tiny_malloc_from_region_no_lock
# PROLOGUE
   push %ebp
   movzwl %dx,%edx # [ 0x0f 0xb7 0xd2 ]
   mov %esp, %ebp
# EPILOGUE
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib free_rpc
# PROLOGUE
   push %ebp
   test %eax, %eax # [ 0x85 0xc0 ]
   mov  %esp, %ebp
# EPILOGUE
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib inet6_insert_padopt
# PROLOGUE
   push %ebp
   test %edx,%edx  # [ 0x85 0xd2 ]
   mov %esp,%ebp
# EPILOGUE
   pop %ebp
   ret

# SOURCE: Karma8V10 libSystem.B.dylib mklower
# PROLOGUE
  push %ebp
  test $0xffffff80,%eax  # [ 0xa9 0x80 0xff 0xff 0xff ]
  mov %esp,%ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libSystem.B.dylib __grow_type_table
# PROLOGUE
  push %ebp
  inc %eax # [ 0x40 ]
  mov %esp,%ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libSystem.B.dylib monsetup
# PROLOGUE
  push %ebp
  add  $0x3, %ecx # [ 0x83 0xc1 0x03 ]
  mov %esp,%ebp
# EPILOGUE
  pop  %ebp
  ret

# SOURCE: Karma8V10 libSystem.B.dylib copyfile_unpack
# PROLOGUE
  push %ebp
  mov %eax,%ecx # [ 0x89 0xc1 ]
  mov %esp,%ebp
# EPILOGUE
  pop  %ebp
  ret

# SOURCE: Karma8V10 libSystem.B.dylib launchd_msg_recv
# PROLOGUE
  push %ebp
  cld # [ 0xfc ]
  xor  %eax,%eax
  mov %esp, %ebp
# EPILOGUE
  pop  %ebp
  ret

# SOURCE: Karma8V10 libSystem.B.dylib flush_out
# PROLOGUE
  push %ebp
  dec %edx # [ 0x4a ]
  mov %esp, %ebp
# EPILOGUE
  pop  %ebp
  ret

# SOURCE: Karma8V10 libSystem.B.dylib hash_nkey
# PROLOGUE
  mov  %eax, %ecx # [ 0x89 0xc1 ]
  mov  %edx, %eax # [ 0x89 0xd0 ]
  xor  %edx, %edx # [ 0x31 0xd2 ]
  div  %ecx # [ 0xf7 0xf1 ]
  push %ebp
  mov %esp, %ebp
# EPILOGUE
  pop  %ebp
  ret

# SOURCE: Karma8V10 AppKit.framework -[NSBrowser _resizeColumnByDelta:resizeInfo:]
# PROLOGUE
  push  %ebp
  fldz # [ 0xd9 0xee ]
  mov   %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libstdc++.6.0.3.dylib _ZN14__gnu_internal10fopen_modeESt13_Ios_Openmode
# PROLOGUE
  and  $0x3d, %eax # [ 0x83 0xe0 0x3d ]
  push %ebp
  sub  $0x8, %eax # [ 0x83 0xe8 0x08 ]
  mov  %esp, %ebp
# EPILOGUE
  pop  %ebp
  ret

# SOURCE: Karma8V10 mach_kernel Debugger
# PROLOGUE
  push  %ebp
  cmpl  $0x0,_main # From mach_kernel: [ 0x83 0x3d 0x54 0x42 0x3a 0xc0 0x00 ]
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 AudioToolbox.framework _ZN18MacFile_DataSource10WriteBytesEtxmPKvPm
# PROLOGUE
  push %ebp
  mov $0xffffffce, %eax # [ 0xb8 0xce 0xff 0xff 0xff ]
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libobjc.A.dylib _objc_msgForward
# PROLOGUE
  cmp $0x0, %edx # [ 0x83 0xfa 0x00 ]
  je LM2  # [ 0x74 0x54 (54 being a disp8, so 0x00 in this case) ]
LM2:
  push %ebp
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libbz2.1.0.2.dylib dyld_stub_binding_helper
# PROLOGUE
  push %eax
  pop  %eax # [ 0x58 ]
  mov  $_main, %eax
  pushl 0x104(%eax) # [ 0xff 0xb0 0x7f 0xf8 0xff 0x0f ]
  pop  %eax
  push %ebp
  jmp LM3   # Skip over some instructions that aren't actually correct here..
  mov 268436759(%eax), %eax # [ 0x8b 0x80 0x27 0x05 0x00 0x10 ]
  jmp *%eax # [ 0xff 0xe0 ]
LM3:
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libcom_err.dylib gssint_lib_init
# PROLOGUE
  push %ebp
  mov  $0x18, %dx # [ 0x66 0xba 0x18 0x00 ]
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Fix and continue prologue padding
# PROLOGUE
  nop # [ 0x90 ]
  nop
  nop
  nop
  nop
  nop
  push %ebp
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libtdom0.8.0.dylib (part of Tcl) unicode_byte_type
# PROLOGUE
  push %ebp
  movzbl %al, %eax # [ 0x0f 0xb6 0xc0 ]
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 libtdom0.8.0.dylib (part of Tcl) checkCharRefNumber
# PROLOGUE
  push %ebp
  mov %eax, %edx # [ 0x89 0xc2 ]
  sar $0x8, %eax # [ 0xc1 0xf8 0x08 ]
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

# SOURCE: Karma8V10 DrawSprocket.framework DSpGetVersion
# PROLOGUE
  push %ebp
  and  $0xffffff, %eax # [ 0x25 0xff 0xff 0xff 0x00 ]
  mov %esp, %ebp
# EPILOGUE
  pop %ebp
  ret

