1.set noreorder 2.global __clone 3.hidden __clone 4.type __clone,@function 5__clone: 6 # Save function pointer and argument pointer on new thread stack 7 and $5, $5, -8 8 subu $5, $5, 16 9 sw $4, 0($5) 10 sw $7, 4($5) 11 # Shuffle (fn,sp,fl,arg,ptid,tls,ctid) to (fl,sp,ptid,tls,ctid) 12 move $4, $6 13 lw $6, 16($sp) 14 lw $7, 20($sp) 15 lw $9, 24($sp) 16 subu $sp, $sp, 16 17 sw $9, 16($sp) 18 li $2, 4120 19 syscall 20 beq $7, $0, 1f 21 nop 22 addu $sp, $sp, 16 23 jr $ra 24 subu $2, $0, $2 251: beq $2, $0, 1f 26 nop 27 addu $sp, $sp, 16 28 jr $ra 29 nop 301: lw $25, 0($sp) 31 lw $4, 4($sp) 32 jalr $25 33 nop 34 move $4, $2 35 li $2, 4001 36 syscall 37