Original Shark

This is what the original Shark made of String.hashCode(). The new version is here.

0xd0380010:     mflr    r0
0xd0380014:     stw     r0,4(r1)
0xd0380018:     stwu    r1,-48(r1)
0xd038001c:     stw     r26,44(r1)
0xd0380020:     stw     r27,40(r1)
0xd0380024:     stw     r28,36(r1)
0xd0380028:     stw     r29,32(r1)
0xd038002c:     stw     r30,28(r1)
 abi frame setup
0xd0380030:     lwz     r6,712(r4)
0xd0380034:     lwz     r7,704(r4)
0xd0380038:     addi    r30,r6,-44
0xd038003c:     cmplw   r30,r7
0xd0380040:     addi    r29,r4,712
0xd0380044:     addi    r28,r4,716
0xd0380048:     blt-    0xd0380278
0xd038004c:     stw     r30,0(r29)
0xd0380050:     stw     r3,12(r30)
0xd0380054:     li      r4,3
0xd0380058:     stw     r4,16(r30)
0xd038005c:     li      r4,0
0xd0380060:     stw     r4,24(r30)
0xd0380064:     stw     r4,28(r30)
0xd0380068:     stw     r4,32(r30)
0xd038006c:     stw     r4,36(r30)
0xd0380070:     lwz     r4,0(r28)
0xd0380074:     addi    r6,r30,20
0xd0380078:     stw     r4,20(r30)
0xd038007c:     stw     r6,0(r28)
 zero frame setup
0xd0380080:     lwz     r4,44(r30)
0xd0380084:     addi    r27,r30,12
0xd0380088:     stw     r4,8(r30)
0xd038008c:     cmplwi  r4,0
0xd0380090:     beq-    0xd0380288
0xd0380094:     lwz     r4,20(r4)
0xd0380098:     stw     r4,-4(r27)
0xd038009c:     stw     r4,40(r30)
0xd03800a0:     stw     r4,-4(r27)
0xd03800a4:     cmplwi  r4,0
0xd03800a8:     bne-    0xd038020c
 0: aload_0
 1: getfield <Field java.lang.String.hash int>
 4: istore_1
 5: iload_1
 6: ifne 58
0xd03800ac:     lwz     r3,44(r30)
0xd03800b0:     stw     r3,-4(r27)
0xd03800b4:     cmplwi  r3,0
0xd03800b8:     beq-    0xd0380288
0xd03800bc:     lwz     r3,12(r3)
0xd03800c0:     stw     r3,-4(r27)
0xd03800c4:     stw     r3,36(r30)
0xd03800c8:     lwz     r3,44(r30)
0xd03800cc:     stw     r3,-4(r27)
0xd03800d0:     cmplwi  r3,0
0xd03800d4:     beq-    0xd0380288
0xd03800d8:     lwz     r3,8(r3)
0xd03800dc:     stw     r3,-4(r27)
0xd03800e0:     stw     r3,32(r30)
0xd03800e4:     lwz     r3,44(r30)
0xd03800e8:     stw     r3,-4(r27)
0xd03800ec:     cmplwi  r3,0
0xd03800f0:     beq-    0xd0380288
0xd03800f4:     lwz     r3,16(r3)
0xd03800f8:     li      r4,0
0xd03800fc:     stw     r3,-4(r27)
0xd0380100:     stw     r3,28(r30)
0xd0380104:     stw     r4,-4(r27)
0xd0380108:     stw     r4,24(r30)
0xd038010c:     mr      r3,r27
0xd0380110:     b       0xd038019c
 9: aload_0
10: getfield <Field java.lang.String.offset int>
13: istore_2
14: aload_0
15: getfield <Field java.lang.String.value char[]>
18: astore_3
19: aload_0
20: getfield <Field java.lang.String.count int>
23: istore 4
25: iconst_0
26: istore 5
28: goto 46
0xd0380114:     li      r4,31
0xd0380118:     stw     r4,-4(r3)
0xd038011c:     lwz     r4,40(r30)
0xd0380120:     addi    r6,r3,-4
0xd0380124:     stw     r4,-8(r3)
0xd0380128:     lwz     r7,-4(r3)
0xd038012c:     mullw   r4,r7,r4
0xd0380130:     stw     r4,-4(r3)
0xd0380134:     lwz     r4,32(r30)
0xd0380138:     stw     r4,-8(r3)
0xd038013c:     lwz     r4,36(r30)
0xd0380140:     stw     r4,-12(r3)
0xd0380144:     lwz     r4,36(r30)
0xd0380148:     addi    r4,r4,1
0xd038014c:     stw     r4,36(r30)
0xd0380150:     lwz     r4,-8(r3)
0xd0380154:     lwz     r3,-12(r3)
0xd0380158:     cmplwi  r4,0
0xd038015c:     beq-    0xd0380288
0xd0380160:     lwz     r7,8(r4)
0xd0380164:     cmpw    r3,r7
0xd0380168:     bge-    0xd0380298
0xd038016c:     rlwinm  r3,r3,1,0,30
0xd0380170:     add     r3,r4,r3
0xd0380174:     lhz     r4,12(r3)
0xd0380178:     addi    r3,r6,4
0xd038017c:     stw     r4,-4(r6)
0xd0380180:     lwz     r7,0(r6)
0xd0380184:     add     r4,r7,r4
0xd0380188:     stw     r4,0(r6)
0xd038018c:     stw     r4,40(r30)
0xd0380190:     lwz     r4,24(r30)
0xd0380194:     addi    r4,r4,1
0xd0380198:     stw     r4,24(r30)
0xd038019c:     lwz     r4,24(r30)
0xd03801a0:     lis     r6,4031
0xd03801a4:     stw     r4,-4(r3)
0xd03801a8:     lwz     r4,28(r30)
0xd03801ac:     stw     r4,-8(r3)
0xd03801b0:     lwz     r4,-8096(r6)
0xd03801b4:     addi    r26,r3,-8
0xd03801b8:     cmplwi  r4,1
0xd03801bc:     bne-    0xd03801d4
0xd03801c0:     lis     r3,4000
0xd03801c4:     li      r4,495
0xd03801c8:     ori     r3,r3,32700
0xd03801cc:     bl      0xd037ffd8
0xd03801d0:     lwz     r5,0(r27)
0xd03801d4:     lwz     r4,4(r26)
0xd03801d8:     lwz     r5,0(r26)
0xd03801dc:     addi    r3,r26,8
0xd03801e0:     cmpw    r4,r5
0xd03801e4:     blt+    0xd0380114
31: bipush 31
33: iload_1
34: imul
35: aload_3
36: iload_2
37: iinc 2 1
40: caload
41: iadd
42: istore_1
43: iinc 5 1
0xd03801e8:     lwz     r27,44(r30)
0xd03801ec:     stw     r27,-4(r3)
0xd03801f0:     lwz     r27,40(r30)
0xd03801f4:     stw     r27,-8(r3)
0xd03801f8:     lwz     r4,-4(r3)
0xd03801fc:     cmplwi  r4,0
0xd0380200:     beq-    0xd0380288
0xd0380204:     stw     r27,20(r4)
0xd0380208:     mr      r27,r3
53: aload_0
54: iload_1
55: putfield <Field java.lang.String.hash int>
0xd038020c:     lwz     r3,40(r30)
0xd0380210:     lis     r4,4031
0xd0380214:     stw     r3,-4(r27)
0xd0380218:     lwz     r3,-8096(r4)
0xd038021c:     cmplwi  r3,1
0xd0380220:     addi    r30,r27,-4
0xd0380224:     bne-    0xd0380238
0xd0380228:     lis     r3,4000
0xd038022c:     li      r4,495
0xd0380230:     ori     r3,r3,32700
0xd0380234:     bl      0xd037ffd8
58: iload_1
59: ireturn
0xd0380238:     lwz     r3,0(r30)
0xd038023c:     lwz     r4,0(r28)
0xd0380240:     stw     r3,24(r4)
0xd0380244:     addi    r3,r4,24
0xd0380248:     stw     r3,0(r29)
0xd038024c:     lwz     r3,0(r4)
0xd0380250:     stw     r3,0(r28)
zero frame teardown
0xd0380254:     lwz     r30,28(r1)
0xd0380258:     lwz     r29,32(r1)
0xd038025c:     lwz     r28,36(r1)
0xd0380260:     lwz     r27,40(r1)
0xd0380264:     lwz     r26,44(r1)
0xd0380268:     addi    r1,r1,48
0xd038026c:     lwz     r0,4(r1)
0xd0380270:     mtlr    r0
0xd0380274:     blr
abi frame teardown
0xd0380278:     lis     r30,4000
0xd038027c:     li      r4,289
0xd0380280:     ori     r3,r30,32700
0xd0380284:     bl      0xd037ffd8
stack overflow handler (unimplemented)
0xd0380288:     lis     r30,4000
0xd038028c:     li      r4,298
0xd0380290:     ori     r3,r30,32700
0xd0380294:     bl      0xd037ffd8
null pointer handler (unimplemented)
0xd0380298:     lis     r3,4000
0xd038029c:     li      r4,717
0xd03802a0:     ori     r3,r3,35304
0xd03802a4:     bl      0xd037ffd8
array out of bounds handler (unimplemented)