RTEMS-6
Annotated Report
libcrypt
Sun Feb 28 22:40:02 2021
40002ad0 <_crypt_b64_from_24bit>:
{
uint32_t w;
int i;
#if defined(__rtems__)
w = ((uint32_t)B2 << 16) | ((uint32_t)B1 << 8) | B0;
40002ad0: 93 2a 60 08 sll %o1, 8, %o1
40002ad4: 91 2a 20 10 sll %o0, 0x10, %o0
40002ad8: 94 12 40 0a or %o1, %o2, %o2
#else
w = (B2 << 16) | (B1 << 8) | B0;
#endif
for (i = 0; i < n; i++) {
40002adc: 80 a2 e0 00 cmp %o3, 0
40002ae0: 04 80 00 16 ble 40002b38 <_crypt_b64_from_24bit+0x68> <== NEVER TAKEN
40002ae4: 94 12 80 08 or %o2, %o0, %o2
40002ae8: 13 10 00 86 sethi %hi(0x40021800), %o1
**cp = itoa64[w&0x3f];
40002aec: c2 03 40 00 ld [ %o5 ], %g1
for (i = 0; i < n; i++) {
40002af0: 84 10 20 00 clr %g2
40002af4: 10 80 00 05 b 40002b08 <_crypt_b64_from_24bit+0x38>
40002af8: 92 12 63 c0 or %o1, 0x3c0, %o1
40002afc: 80 a2 c0 02 cmp %o3, %g2
40002b00: 02 80 00 0e be 40002b38 <_crypt_b64_from_24bit+0x68>
40002b04: 95 32 a0 06 srl %o2, 6, %o2
**cp = itoa64[w&0x3f];
40002b08: 86 0a a0 3f and %o2, 0x3f, %g3
40002b0c: c6 0a 40 03 ldub [ %o1 + %g3 ], %g3
40002b10: c6 28 40 00 stb %g3, [ %g1 ]
for (i = 0; i < n; i++) {
40002b14: 84 00 a0 01 inc %g2
(*cp)++;
40002b18: c2 03 40 00 ld [ %o5 ], %g1
if ((*buflen)-- < 0)
40002b1c: c6 03 00 00 ld [ %o4 ], %g3
(*cp)++;
40002b20: 82 00 60 01 inc %g1
40002b24: c2 23 40 00 st %g1, [ %o5 ]
if ((*buflen)-- < 0)
40002b28: 88 00 ff ff add %g3, -1, %g4
40002b2c: 80 a0 e0 00 cmp %g3, 0
40002b30: 16 bf ff f3 bge 40002afc <_crypt_b64_from_24bit+0x2c> <== ALWAYS TAKEN
40002b34: c8 23 00 00 st %g4, [ %o4 ]
break;
w >>= 6;
}
}
40002b38: 81 c3 e0 08 retl
40002b3c: 01 00 00 00 nop
40002a98 <_crypt_to64>:
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
void
_crypt_to64(char *s, u_long v, int n)
{
while (--n >= 0) {
40002a98: 80 a2 a0 00 cmp %o2, 0
40002a9c: 04 80 00 0b ble 40002ac8 <_crypt_to64+0x30> <== NEVER TAKEN
40002aa0: 05 10 00 86 sethi %hi(0x40021800), %g2
40002aa4: 94 02 00 0a add %o0, %o2, %o2
40002aa8: 84 10 a3 c0 or %g2, 0x3c0, %g2
*s++ = itoa64[v&0x3f];
40002aac: 82 0a 60 3f and %o1, 0x3f, %g1
40002ab0: c2 08 80 01 ldub [ %g2 + %g1 ], %g1
40002ab4: c2 2a 00 00 stb %g1, [ %o0 ]
40002ab8: 90 02 20 01 inc %o0
while (--n >= 0) {
40002abc: 80 a2 80 08 cmp %o2, %o0
40002ac0: 12 bf ff fb bne 40002aac <_crypt_to64+0x14>
40002ac4: 93 32 60 06 srl %o1, 6, %o1
v >>= 6;
}
}
40002ac8: 81 c3 e0 08 retl
40002acc: 01 00 00 00 nop
40001624 <crypt_add_format>:
&cf_default
};
void crypt_add_format(struct crypt_format *cf)
{
if (cf->link.sle_next == NULL)
40001624: c2 02 00 00 ld [ %o0 ], %g1
40001628: 80 a0 60 00 cmp %g1, 0
4000162c: 02 80 00 04 be 4000163c <crypt_add_format+0x18> <== ALWAYS TAKEN
40001630: 03 10 00 93 sethi %hi(0x40024c00), %g1
SLIST_INSERT_HEAD(&cf_head, cf, link);
}
40001634: 81 c3 e0 08 retl <== NOT EXECUTED
40001638: 01 00 00 00 nop <== NOT EXECUTED
SLIST_INSERT_HEAD(&cf_head, cf, link);
4000163c: c4 00 60 3c ld [ %g1 + 0x3c ], %g2
40001640: c4 22 00 00 st %g2, [ %o0 ]
}
40001644: 81 c3 e0 08 retl
40001648: d0 20 60 3c st %o0, [ %g1 + 0x3c ]
400016d0 <crypt_md5_r>:
* UNIX password
*/
char *
crypt_md5_r(const char *pw, const char *salt, struct crypt_data *data)
{
400016d0: 9d e3 be c0 save %sp, -320, %sp
/* Refine the Salt first */
sp = salt;
/* If it starts with the magic string, then skip that */
if(!strncmp(sp, magic, strlen(magic)))
400016d4: c2 0e 40 00 ldub [ %i1 ], %g1
400016d8: 80 a0 60 24 cmp %g1, 0x24
400016dc: 32 80 00 07 bne,a 400016f8 <crypt_md5_r+0x28> <== NEVER TAKEN
400016e0: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED
400016e4: c2 0e 60 01 ldub [ %i1 + 1 ], %g1
400016e8: 80 a0 60 31 cmp %g1, 0x31
400016ec: 22 80 01 09 be,a 40001b10 <crypt_md5_r+0x440> <== ALWAYS TAKEN
400016f0: c2 0e 60 02 ldub [ %i1 + 2 ], %g1
sp += strlen(magic);
/* It stops at the first '$', max 8 chars */
for(ep = sp; *ep && *ep != '$' && ep < (sp + 8); ep++)
400016f4: c2 4e 40 00 ldsb [ %i1 ], %g1
400016f8: 80 a0 60 24 cmp %g1, 0x24
400016fc: 02 80 01 0a be 40001b24 <crypt_md5_r+0x454> <== NEVER TAKEN
40001700: 80 a0 60 00 cmp %g1, 0
40001704: 02 80 01 08 be 40001b24 <crypt_md5_r+0x454> <== NEVER TAKEN
40001708: 84 06 60 08 add %i1, 8, %g2
4000170c: a6 10 00 19 mov %i1, %l3
40001710: c2 4c e0 01 ldsb [ %l3 + 1 ], %g1
40001714: 80 a0 60 00 cmp %g1, 0
40001718: 02 80 00 07 be 40001734 <crypt_md5_r+0x64>
4000171c: a6 04 e0 01 inc %l3
40001720: 80 a0 60 24 cmp %g1, 0x24
40001724: 02 80 00 04 be 40001734 <crypt_md5_r+0x64>
40001728: 80 a4 c0 02 cmp %l3, %g2
4000172c: 32 bf ff fa bne,a 40001714 <crypt_md5_r+0x44> <== ALWAYS TAKEN
40001730: c2 4c e0 01 ldsb [ %l3 + 1 ], %g1
continue;
/* get the length of the true salt */
sl = ep - sp;
40001734: a6 24 c0 19 sub %l3, %i1, %l3
MD5Init(&ctx);
40001738: 40 00 13 a2 call 400065c0 <MD5Init>
4000173c: 90 07 bf 30 add %fp, -208, %o0
/* The password first, since that is what is most unknown */
MD5Update(&ctx, (const u_char *)pw, strlen(pw));
40001740: 40 00 64 ac call 4001a9f0 <strlen>
40001744: 90 10 00 18 mov %i0, %o0
40001748: 92 10 00 18 mov %i0, %o1
4000174c: 94 10 00 08 mov %o0, %o2
40001750: 40 00 13 ab call 400065fc <MD5Update>
40001754: 90 07 bf 30 add %fp, -208, %o0
/* Then our magic string */
MD5Update(&ctx, (const u_char *)magic, strlen(magic));
40001758: 94 10 20 03 mov 3, %o2
4000175c: 90 07 bf 30 add %fp, -208, %o0
40001760: 37 10 00 86 sethi %hi(0x40021800), %i3
40001764: 40 00 13 a6 call 400065fc <MD5Update>
40001768: 92 16 e3 70 or %i3, 0x370, %o1 ! 40021b70 <magic.0>
/* Then the raw salt */
MD5Update(&ctx, (const u_char *)sp, (u_int)sl);
4000176c: 94 10 00 13 mov %l3, %o2
40001770: 92 10 00 19 mov %i1, %o1
40001774: 40 00 13 a2 call 400065fc <MD5Update>
40001778: 90 07 bf 30 add %fp, -208, %o0
/* Then just as many characters of the MD5(pw,salt,pw) */
MD5Init(&ctx1);
4000177c: 40 00 13 91 call 400065c0 <MD5Init>
40001780: 90 07 bf 98 add %fp, -104, %o0
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
40001784: 40 00 64 9b call 4001a9f0 <strlen>
40001788: 90 10 00 18 mov %i0, %o0
4000178c: 92 10 00 18 mov %i0, %o1
40001790: 94 10 00 08 mov %o0, %o2
40001794: 40 00 13 9a call 400065fc <MD5Update>
40001798: 90 07 bf 98 add %fp, -104, %o0
MD5Update(&ctx1, (const u_char *)sp, (u_int)sl);
4000179c: 94 10 00 13 mov %l3, %o2
400017a0: 92 10 00 19 mov %i1, %o1
400017a4: 40 00 13 96 call 400065fc <MD5Update>
400017a8: 90 07 bf 98 add %fp, -104, %o0
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
400017ac: 40 00 64 91 call 4001a9f0 <strlen>
400017b0: 90 10 00 18 mov %i0, %o0
400017b4: 92 10 00 18 mov %i0, %o1
400017b8: 94 10 00 08 mov %o0, %o2
400017bc: 40 00 13 90 call 400065fc <MD5Update>
400017c0: 90 07 bf 98 add %fp, -104, %o0
MD5Final(final, &ctx1);
400017c4: 92 07 bf 98 add %fp, -104, %o1
400017c8: 40 00 13 c1 call 400066cc <MD5Final>
400017cc: 90 07 bf 20 add %fp, -224, %o0
for(pl = (int)strlen(pw); pl > 0; pl -= MD5_SIZE)
400017d0: 40 00 64 88 call 4001a9f0 <strlen>
400017d4: 90 10 00 18 mov %i0, %o0
400017d8: ba 92 20 00 orcc %o0, 0, %i5
400017dc: 02 80 00 10 be 4000181c <crypt_md5_r+0x14c> <== NEVER TAKEN
400017e0: 82 07 7f ff add %i5, -1, %g1
400017e4: b8 07 7f f0 add %i5, -16, %i4
400017e8: 82 08 7f f0 and %g1, -16, %g1
400017ec: b8 27 00 01 sub %i4, %g1, %i4
MD5Update(&ctx, (const u_char *)final,
400017f0: 92 07 bf 20 add %fp, -224, %o1
400017f4: 90 07 bf 30 add %fp, -208, %o0
(u_int)(pl > MD5_SIZE ? MD5_SIZE : pl));
400017f8: 80 a7 60 10 cmp %i5, 0x10
400017fc: 04 80 00 03 ble 40001808 <crypt_md5_r+0x138> <== ALWAYS TAKEN
40001800: 94 10 00 1d mov %i5, %o2
40001804: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
MD5Update(&ctx, (const u_char *)final,
40001808: 40 00 13 7d call 400065fc <MD5Update>
4000180c: ba 07 7f f0 add %i5, -16, %i5
for(pl = (int)strlen(pw); pl > 0; pl -= MD5_SIZE)
40001810: 80 a7 40 1c cmp %i5, %i4
40001814: 12 bf ff f8 bne 400017f4 <crypt_md5_r+0x124> <== NEVER TAKEN
40001818: 92 07 bf 20 add %fp, -224, %o1
/* Don't leave anything around in vm they could use. */
memset(final, 0, sizeof(final));
4000181c: c0 27 bf 20 clr [ %fp + -224 ]
/* Then something really weird... */
for (i = strlen(pw); i; i >>= 1)
40001820: 90 10 00 18 mov %i0, %o0
memset(final, 0, sizeof(final));
40001824: c0 27 bf 24 clr [ %fp + -220 ]
40001828: c0 27 bf 28 clr [ %fp + -216 ]
for (i = strlen(pw); i; i >>= 1)
4000182c: 40 00 64 71 call 4001a9f0 <strlen>
40001830: c0 27 bf 2c clr [ %fp + -212 ]
40001834: ba 92 20 00 orcc %o0, 0, %i5
40001838: 12 80 00 0c bne 40001868 <crypt_md5_r+0x198> <== ALWAYS TAKEN
4000183c: 80 8f 60 01 btst 1, %i5
MD5Update(&ctx, (const u_char *)final, 1);
else
MD5Update(&ctx, (const u_char *)pw, 1);
/* Now make the output string */
strcpy(passwd, magic);
40001840: 10 80 00 14 b 40001890 <crypt_md5_r+0x1c0> <== NOT EXECUTED
40001844: c8 0e e3 70 ldub [ %i3 + 0x370 ], %g4 <== NOT EXECUTED
MD5Update(&ctx, (const u_char *)final, 1);
40001848: 92 07 bf 20 add %fp, -224, %o1
4000184c: 40 00 13 6c call 400065fc <MD5Update>
40001850: 90 07 bf 30 add %fp, -208, %o0
for (i = strlen(pw); i; i >>= 1)
40001854: bb 37 60 01 srl %i5, 1, %i5
40001858: 80 a7 60 00 cmp %i5, 0
4000185c: 02 80 00 0d be 40001890 <crypt_md5_r+0x1c0>
40001860: c8 0e e3 70 ldub [ %i3 + 0x370 ], %g4
if(i & 1)
40001864: 80 8f 60 01 btst 1, %i5
40001868: 12 bf ff f8 bne 40001848 <crypt_md5_r+0x178>
4000186c: 94 10 20 01 mov 1, %o2
MD5Update(&ctx, (const u_char *)pw, 1);
40001870: 92 10 00 18 mov %i0, %o1
40001874: 40 00 13 62 call 400065fc <MD5Update>
40001878: 90 07 bf 30 add %fp, -208, %o0
for (i = strlen(pw); i; i >>= 1)
4000187c: bb 37 60 01 srl %i5, 1, %i5
40001880: 80 a7 60 00 cmp %i5, 0
40001884: 12 bf ff f9 bne 40001868 <crypt_md5_r+0x198> <== ALWAYS TAKEN
40001888: 80 8f 60 01 btst 1, %i5
strcpy(passwd, magic);
4000188c: c8 0e e3 70 ldub [ %i3 + 0x370 ], %g4 <== NOT EXECUTED
40001890: 82 16 e3 70 or %i3, 0x370, %g1
40001894: c6 08 60 01 ldub [ %g1 + 1 ], %g3
40001898: c4 08 60 02 ldub [ %g1 + 2 ], %g2
4000189c: c2 08 60 03 ldub [ %g1 + 3 ], %g1
400018a0: c8 2e 80 00 stb %g4, [ %i2 ]
strncat(passwd, sp, (u_int)sl);
400018a4: 94 10 00 13 mov %l3, %o2
strcpy(passwd, magic);
400018a8: c6 2e a0 01 stb %g3, [ %i2 + 1 ]
strncat(passwd, sp, (u_int)sl);
400018ac: 92 10 00 19 mov %i1, %o1
strcpy(passwd, magic);
400018b0: c4 2e a0 02 stb %g2, [ %i2 + 2 ]
strncat(passwd, sp, (u_int)sl);
400018b4: 90 10 00 1a mov %i2, %o0
strcpy(passwd, magic);
400018b8: c2 2e a0 03 stb %g1, [ %i2 + 3 ]
strncat(passwd, sp, (u_int)sl);
400018bc: 40 00 64 77 call 4001aa98 <strncat>
400018c0: 25 2a aa aa sethi %hi(0xaaaaa800), %l2
strcat(passwd, "$");
400018c4: 40 00 64 4b call 4001a9f0 <strlen>
400018c8: 90 10 00 1a mov %i2, %o0
400018cc: 82 10 20 24 mov 0x24, %g1
400018d0: c2 2e 80 08 stb %g1, [ %i2 + %o0 ]
400018d4: 90 06 80 08 add %i2, %o0, %o0
400018d8: c0 2a 20 01 clrb [ %o0 + 1 ]
MD5Final(final, &ctx);
400018dc: 92 07 bf 30 add %fp, -208, %o1
400018e0: 90 07 bf 20 add %fp, -224, %o0
if(i & 1)
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
else
MD5Update(&ctx1, (const u_char *)final, MD5_SIZE);
if(i % 3)
400018e4: 23 15 55 55 sethi %hi(0x55555400), %l1
MD5Update(&ctx1, (const u_char *)sp, (u_int)sl);
400018e8: 21 2d b6 db sethi %hi(0xb6db6c00), %l0
if(i % 7)
400018ec: 37 09 24 92 sethi %hi(0x24924800), %i3
MD5Final(final, &ctx);
400018f0: 40 00 13 77 call 400066cc <MD5Final>
400018f4: ba 10 20 00 clr %i5
MD5Update(&ctx1, (const u_char *)final, MD5_SIZE);
400018f8: a4 14 a2 ab or %l2, 0x2ab, %l2
if(i % 3)
400018fc: a2 14 61 55 or %l1, 0x155, %l1
MD5Update(&ctx1, (const u_char *)sp, (u_int)sl);
40001900: a0 14 21 b7 or %l0, 0x1b7, %l0
if(i % 7)
40001904: 10 80 00 1c b 40001974 <crypt_md5_r+0x2a4>
40001908: b6 16 e1 24 or %i3, 0x124, %i3
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
4000190c: 40 00 64 39 call 4001a9f0 <strlen>
40001910: 90 10 00 18 mov %i0, %o0
40001914: 92 10 00 18 mov %i0, %o1
40001918: 94 10 00 08 mov %o0, %o2
4000191c: 40 00 13 38 call 400065fc <MD5Update>
40001920: 90 07 bf 98 add %fp, -104, %o0
MD5Update(&ctx1, (const u_char *)final, MD5_SIZE);
40001924: 82 5f 40 12 smul %i5, %l2, %g1
if(i % 3)
40001928: 80 a0 40 11 cmp %g1, %l1
4000192c: 18 80 00 1f bgu 400019a8 <crypt_md5_r+0x2d8>
40001930: 94 10 00 13 mov %l3, %o2
MD5Update(&ctx1, (const u_char *)sp, (u_int)sl);
40001934: 82 5f 40 10 smul %i5, %l0, %g1
if(i % 7)
40001938: 80 a0 40 1b cmp %g1, %i3
4000193c: 18 80 00 22 bgu 400019c4 <crypt_md5_r+0x2f4>
40001940: 80 a7 20 00 cmp %i4, 0
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
if(i & 1)
40001944: 02 80 00 29 be 400019e8 <crypt_md5_r+0x318>
40001948: 94 10 20 10 mov 0x10, %o2
MD5Update(&ctx1, (const u_char *)final, MD5_SIZE);
4000194c: 92 07 bf 20 add %fp, -224, %o1
40001950: 40 00 13 2b call 400065fc <MD5Update>
40001954: 90 07 bf 98 add %fp, -104, %o0
else
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
MD5Final(final, &ctx1);
40001958: 92 07 bf 98 add %fp, -104, %o1
4000195c: 40 00 13 5c call 400066cc <MD5Final>
40001960: 90 07 bf 20 add %fp, -224, %o0
for(i = 0; i < 1000; i++) {
40001964: ba 07 60 01 inc %i5
40001968: 80 a7 63 e8 cmp %i5, 0x3e8
4000196c: 02 80 00 2c be 40001a1c <crypt_md5_r+0x34c>
40001970: 01 00 00 00 nop
MD5Init(&ctx1);
40001974: 40 00 13 13 call 400065c0 <MD5Init>
40001978: 90 07 bf 98 add %fp, -104, %o0
if(i & 1)
4000197c: b8 8f 60 01 andcc %i5, 1, %i4
40001980: 12 bf ff e3 bne 4000190c <crypt_md5_r+0x23c>
40001984: 94 10 20 10 mov 0x10, %o2
MD5Update(&ctx1, (const u_char *)final, MD5_SIZE);
40001988: 92 07 bf 20 add %fp, -224, %o1
4000198c: 40 00 13 1c call 400065fc <MD5Update>
40001990: 90 07 bf 98 add %fp, -104, %o0
40001994: 82 5f 40 12 smul %i5, %l2, %g1
if(i % 3)
40001998: 80 a0 40 11 cmp %g1, %l1
4000199c: 08 bf ff e7 bleu 40001938 <crypt_md5_r+0x268>
400019a0: 82 5f 40 10 smul %i5, %l0, %g1
MD5Update(&ctx1, (const u_char *)sp, (u_int)sl);
400019a4: 94 10 00 13 mov %l3, %o2
400019a8: 92 10 00 19 mov %i1, %o1
400019ac: 40 00 13 14 call 400065fc <MD5Update>
400019b0: 90 07 bf 98 add %fp, -104, %o0
400019b4: 82 5f 40 10 smul %i5, %l0, %g1
if(i % 7)
400019b8: 80 a0 40 1b cmp %g1, %i3
400019bc: 08 bf ff e2 bleu 40001944 <crypt_md5_r+0x274>
400019c0: 80 a7 20 00 cmp %i4, 0
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
400019c4: 40 00 64 0b call 4001a9f0 <strlen>
400019c8: 90 10 00 18 mov %i0, %o0
400019cc: 92 10 00 18 mov %i0, %o1
400019d0: 94 10 00 08 mov %o0, %o2
400019d4: 40 00 13 0a call 400065fc <MD5Update>
400019d8: 90 07 bf 98 add %fp, -104, %o0
if(i & 1)
400019dc: 80 a7 20 00 cmp %i4, 0
400019e0: 12 bf ff db bne 4000194c <crypt_md5_r+0x27c>
400019e4: 94 10 20 10 mov 0x10, %o2
MD5Update(&ctx1, (const u_char *)pw, strlen(pw));
400019e8: 40 00 64 02 call 4001a9f0 <strlen>
400019ec: 90 10 00 18 mov %i0, %o0
400019f0: 92 10 00 18 mov %i0, %o1
400019f4: 94 10 00 08 mov %o0, %o2
400019f8: 40 00 13 01 call 400065fc <MD5Update>
400019fc: 90 07 bf 98 add %fp, -104, %o0
MD5Final(final, &ctx1);
40001a00: 92 07 bf 98 add %fp, -104, %o1
40001a04: 40 00 13 32 call 400066cc <MD5Final>
40001a08: 90 07 bf 20 add %fp, -224, %o0
for(i = 0; i < 1000; i++) {
40001a0c: ba 07 60 01 inc %i5
40001a10: 80 a7 63 e8 cmp %i5, 0x3e8
40001a14: 12 bf ff d8 bne 40001974 <crypt_md5_r+0x2a4> <== ALWAYS TAKEN
40001a18: 01 00 00 00 nop
}
p = passwd + strlen(passwd);
40001a1c: 40 00 63 f5 call 4001a9f0 <strlen>
40001a20: 90 10 00 1a mov %i2, %o0
l = (final[ 0]<<16) | (final[ 6]<<8) | final[12];
40001a24: c2 0f bf 20 ldub [ %fp + -224 ], %g1
40001a28: c4 0f bf 26 ldub [ %fp + -218 ], %g2
40001a2c: d2 0f bf 2c ldub [ %fp + -212 ], %o1
40001a30: 85 28 a0 08 sll %g2, 8, %g2
40001a34: 83 28 60 10 sll %g1, 0x10, %g1
40001a38: 82 10 40 02 or %g1, %g2, %g1
p = passwd + strlen(passwd);
40001a3c: ba 06 80 08 add %i2, %o0, %i5
_crypt_to64(p, l, 4); p += 4;
40001a40: 92 10 40 09 or %g1, %o1, %o1
40001a44: 90 10 00 1d mov %i5, %o0
40001a48: 40 00 04 14 call 40002a98 <_crypt_to64>
40001a4c: 94 10 20 04 mov 4, %o2
l = (final[ 1]<<16) | (final[ 7]<<8) | final[13];
40001a50: c2 0f bf 21 ldub [ %fp + -223 ], %g1
40001a54: c4 0f bf 27 ldub [ %fp + -217 ], %g2
40001a58: d2 0f bf 2d ldub [ %fp + -211 ], %o1
40001a5c: 85 28 a0 08 sll %g2, 8, %g2
40001a60: 83 28 60 10 sll %g1, 0x10, %g1
40001a64: 82 10 40 02 or %g1, %g2, %g1
_crypt_to64(p, l, 4); p += 4;
40001a68: 90 07 60 04 add %i5, 4, %o0
40001a6c: 92 10 40 09 or %g1, %o1, %o1
40001a70: 40 00 04 0a call 40002a98 <_crypt_to64>
40001a74: 94 10 20 04 mov 4, %o2
l = (final[ 2]<<16) | (final[ 8]<<8) | final[14];
40001a78: c2 0f bf 22 ldub [ %fp + -222 ], %g1
40001a7c: c4 0f bf 28 ldub [ %fp + -216 ], %g2
40001a80: d2 0f bf 2e ldub [ %fp + -210 ], %o1
40001a84: 85 28 a0 08 sll %g2, 8, %g2
40001a88: 83 28 60 10 sll %g1, 0x10, %g1
40001a8c: 82 10 40 02 or %g1, %g2, %g1
_crypt_to64(p, l, 4); p += 4;
40001a90: 90 07 60 08 add %i5, 8, %o0
40001a94: 92 10 40 09 or %g1, %o1, %o1
40001a98: 40 00 04 00 call 40002a98 <_crypt_to64>
40001a9c: 94 10 20 04 mov 4, %o2
l = (final[ 3]<<16) | (final[ 9]<<8) | final[15];
40001aa0: c2 0f bf 23 ldub [ %fp + -221 ], %g1
40001aa4: c4 0f bf 29 ldub [ %fp + -215 ], %g2
40001aa8: d2 0f bf 2f ldub [ %fp + -209 ], %o1
40001aac: 85 28 a0 08 sll %g2, 8, %g2
40001ab0: 83 28 60 10 sll %g1, 0x10, %g1
40001ab4: 82 10 40 02 or %g1, %g2, %g1
_crypt_to64(p, l, 4); p += 4;
40001ab8: 90 07 60 0c add %i5, 0xc, %o0
40001abc: 92 10 40 09 or %g1, %o1, %o1
40001ac0: 40 00 03 f6 call 40002a98 <_crypt_to64>
40001ac4: 94 10 20 04 mov 4, %o2
l = (final[ 4]<<16) | (final[10]<<8) | final[ 5];
40001ac8: c2 0f bf 24 ldub [ %fp + -220 ], %g1
40001acc: c4 0f bf 2a ldub [ %fp + -214 ], %g2
40001ad0: 85 28 a0 08 sll %g2, 8, %g2
40001ad4: d2 0f bf 25 ldub [ %fp + -219 ], %o1
40001ad8: 83 28 60 10 sll %g1, 0x10, %g1
40001adc: 82 10 40 02 or %g1, %g2, %g1
_crypt_to64(p, l, 4); p += 4;
40001ae0: 90 07 60 10 add %i5, 0x10, %o0
40001ae4: 92 10 40 09 or %g1, %o1, %o1
40001ae8: 40 00 03 ec call 40002a98 <_crypt_to64>
40001aec: 94 10 20 04 mov 4, %o2
l = final[11];
_crypt_to64(p, l, 2); p += 2;
40001af0: d2 0f bf 2b ldub [ %fp + -213 ], %o1
40001af4: 94 10 20 02 mov 2, %o2
40001af8: 90 07 60 14 add %i5, 0x14, %o0
40001afc: 40 00 03 e7 call 40002a98 <_crypt_to64>
40001b00: b0 10 00 1a mov %i2, %i0
*p = '\0';
40001b04: c0 2f 60 16 clrb [ %i5 + 0x16 ]
/* Don't leave anything around in vm they could use. */
memset(final, 0, sizeof(final));
return (passwd);
}
40001b08: 81 c7 e0 08 ret
40001b0c: 81 e8 00 00 restore
if(!strncmp(sp, magic, strlen(magic)))
40001b10: 80 a0 60 24 cmp %g1, 0x24
40001b14: 22 bf fe f8 be,a 400016f4 <crypt_md5_r+0x24> <== ALWAYS TAKEN
40001b18: b2 06 60 03 add %i1, 3, %i1
for(ep = sp; *ep && *ep != '$' && ep < (sp + 8); ep++)
40001b1c: 10 bf fe f7 b 400016f8 <crypt_md5_r+0x28> <== NOT EXECUTED
40001b20: c2 4e 40 00 ldsb [ %i1 ], %g1 <== NOT EXECUTED
40001b24: 10 bf ff 05 b 40001738 <crypt_md5_r+0x68> <== NOT EXECUTED
40001b28: a6 10 20 00 clr %l3 <== NOT EXECUTED
4000164c <crypt_r>:
char *
crypt_r(const char *passwd, const char *salt, struct crypt_data *data)
{
4000164c: 9d e3 bf a0 save %sp, -96, %sp
const struct crypt_format *cf;
SLIST_FOREACH(cf, &cf_head, link)
40001650: 03 10 00 93 sethi %hi(0x40024c00), %g1
40001654: f8 00 60 3c ld [ %g1 + 0x3c ], %i4 ! 40024c3c <cf_head>
40001658: 80 a7 20 00 cmp %i4, 0
4000165c: 22 80 00 11 be,a 400016a0 <crypt_r+0x54> <== NEVER TAKEN
40001660: c2 07 20 04 ld [ %i4 + 4 ], %g1 <== NOT EXECUTED
40001664: ba 10 00 1c mov %i4, %i5
if (cf->magic != NULL && strstr(salt, cf->magic) == salt)
40001668: d2 07 60 08 ld [ %i5 + 8 ], %o1
4000166c: 80 a2 60 00 cmp %o1, 0
40001670: 02 80 00 07 be 4000168c <crypt_r+0x40>
40001674: 90 10 00 19 mov %i1, %o0
40001678: 40 00 66 ae call 4001b130 <strstr>
4000167c: 01 00 00 00 nop
40001680: 80 a6 40 08 cmp %i1, %o0
40001684: 22 80 00 0d be,a 400016b8 <crypt_r+0x6c>
40001688: c2 07 60 04 ld [ %i5 + 4 ], %g1
SLIST_FOREACH(cf, &cf_head, link)
4000168c: fa 07 40 00 ld [ %i5 ], %i5
40001690: 80 a7 60 00 cmp %i5, 0
40001694: 32 bf ff f6 bne,a 4000166c <crypt_r+0x20>
40001698: d2 07 60 08 ld [ %i5 + 8 ], %o1
return (cf->func(passwd, salt, data));
cf = SLIST_FIRST(&cf_head);
return (cf->func(passwd, salt, data));
4000169c: c2 07 20 04 ld [ %i4 + 4 ], %g1
400016a0: 94 10 00 1a mov %i2, %o2
400016a4: 92 10 00 19 mov %i1, %o1
400016a8: 9f c0 40 00 call %g1
400016ac: 90 10 00 18 mov %i0, %o0
}
400016b0: 81 c7 e0 08 ret
400016b4: 91 e8 00 08 restore %g0, %o0, %o0
return (cf->func(passwd, salt, data));
400016b8: 94 10 00 1a mov %i2, %o2
400016bc: 92 10 00 19 mov %i1, %o1
400016c0: 9f c0 40 00 call %g1
400016c4: 90 10 00 18 mov %i0, %o0
}
400016c8: 81 c7 e0 08 ret
400016cc: 91 e8 00 08 restore %g0, %o0, %o0
40001b2c <crypt_sha256_r>:
/* Maximum number of rounds. */
#define ROUNDS_MAX 999999999
char *
crypt_sha256_r(const char *key, const char *salt, struct crypt_data *data)
{
40001b2c: 9d e3 be 78 save %sp, -392, %sp
size_t salt_len, key_len, cnt, rounds;
char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp;
const char *num;
bool rounds_custom;
char *buffer = &data->buffer[0];
int buflen = (int)sizeof(data->buffer);
40001b30: 82 10 21 00 mov 0x100, %g1
40001b34: c2 27 be ec st %g1, [ %fp + -276 ]
{
40001b38: a0 10 00 18 mov %i0, %l0
rounds = ROUNDS_DEFAULT;
rounds_custom = false;
/* Find beginning of salt string. The prefix should normally always
* be present. Just in case it is not. */
if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0)
40001b3c: c4 0e 40 00 ldub [ %i1 ], %g2
40001b40: 82 10 20 24 mov 0x24, %g1
40001b44: 80 a0 40 02 cmp %g1, %g2
40001b48: 12 80 00 06 bne 40001b60 <crypt_sha256_r+0x34> <== NEVER TAKEN
40001b4c: b0 10 00 1a mov %i2, %i0
40001b50: c4 0e 60 01 ldub [ %i1 + 1 ], %g2
40001b54: 80 a0 a0 35 cmp %g2, 0x35
40001b58: 22 80 01 67 be,a 400020f4 <crypt_sha256_r+0x5c8> <== ALWAYS TAKEN
40001b5c: c4 0e 60 02 ldub [ %i1 + 2 ], %g2
/* Skip salt prefix. */
salt += sizeof(sha256_salt_prefix) - 1;
if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1)
40001b60: 03 10 00 86 sethi %hi(0x40021800), %g1 <== NOT EXECUTED
40001b64: 94 10 20 07 mov 7, %o2 <== NOT EXECUTED
40001b68: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
40001b6c: 40 00 63 f8 call 4001ab4c <strncmp> <== NOT EXECUTED
40001b70: 92 10 63 98 or %g1, 0x398, %o1 <== NOT EXECUTED
40001b74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
40001b78: 02 80 01 6b be 40002124 <crypt_sha256_r+0x5f8> <== NOT EXECUTED
40001b7c: 94 10 20 0a mov 0xa, %o2 <== NOT EXECUTED
rounds_custom = false;
40001b80: c0 2f be df clrb [ %fp + -289 ] <== NOT EXECUTED
rounds = ROUNDS_DEFAULT;
40001b84: 25 00 00 04 sethi %hi(0x1000), %l2
40001b88: a4 14 a3 88 or %l2, 0x388, %l2 ! 1388 <_ISR_Stack_size+0x388>
rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX));
rounds_custom = true;
}
}
salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX);
40001b8c: 90 10 00 19 mov %i1, %o0
40001b90: 13 10 00 86 sethi %hi(0x40021800), %o1
40001b94: 40 00 63 75 call 4001a968 <strcspn>
40001b98: 92 12 63 80 or %o1, 0x380, %o1 ! 40021b80 <magic.0+0x10>
40001b9c: 80 a2 20 0f cmp %o0, 0xf
40001ba0: 08 80 00 03 bleu 40001bac <crypt_sha256_r+0x80>
40001ba4: b6 10 00 08 mov %o0, %i3
40001ba8: b6 10 20 10 mov 0x10, %i3
key_len = strlen(key);
40001bac: 40 00 63 91 call 4001a9f0 <strlen>
40001bb0: 90 10 00 10 mov %l0, %o0
40001bb4: b8 10 00 08 mov %o0, %i4
/* Prepare for the real work. */
SHA256_Init(&ctx);
40001bb8: 40 00 1d 02 call 40008fc0 <SHA256_Init>
40001bbc: 90 07 bf 30 add %fp, -208, %o0
/* Add the key string. */
SHA256_Update(&ctx, key, key_len);
40001bc0: 94 10 00 1c mov %i4, %o2
40001bc4: 92 10 00 10 mov %l0, %o1
40001bc8: 40 00 1d 19 call 4000902c <SHA256_Update>
40001bcc: 90 07 bf 30 add %fp, -208, %o0
/* The last part is the salt string. This must be at most 8
* characters and it ends at the first `$' character (for
* compatibility with existing implementations). */
SHA256_Update(&ctx, salt, salt_len);
40001bd0: 94 10 00 1b mov %i3, %o2
40001bd4: 92 10 00 19 mov %i1, %o1
40001bd8: 40 00 1d 15 call 4000902c <SHA256_Update>
40001bdc: 90 07 bf 30 add %fp, -208, %o0
/* Compute alternate SHA256 sum with input KEY, SALT, and KEY. The
* final result will be added to the first context. */
SHA256_Init(&alt_ctx);
40001be0: 40 00 1c f8 call 40008fc0 <SHA256_Init>
40001be4: 90 07 bf 98 add %fp, -104, %o0
/* Add key. */
SHA256_Update(&alt_ctx, key, key_len);
40001be8: 94 10 00 1c mov %i4, %o2
40001bec: 92 10 00 10 mov %l0, %o1
40001bf0: 40 00 1d 0f call 4000902c <SHA256_Update>
40001bf4: 90 07 bf 98 add %fp, -104, %o0
/* Add salt. */
SHA256_Update(&alt_ctx, salt, salt_len);
40001bf8: 94 10 00 1b mov %i3, %o2
40001bfc: 92 10 00 19 mov %i1, %o1
40001c00: 40 00 1d 0b call 4000902c <SHA256_Update>
40001c04: 90 07 bf 98 add %fp, -104, %o0
/* Add key again. */
SHA256_Update(&alt_ctx, key, key_len);
40001c08: 94 10 00 1c mov %i4, %o2
40001c0c: 92 10 00 10 mov %l0, %o1
40001c10: 40 00 1d 07 call 4000902c <SHA256_Update>
40001c14: 90 07 bf 98 add %fp, -104, %o0
/* Now get result of this (32 bytes) and add it to the other context. */
SHA256_Final(alt_result, &alt_ctx);
40001c18: 92 07 bf 98 add %fp, -104, %o1
40001c1c: 40 00 1d 31 call 400090e0 <SHA256_Final>
40001c20: 90 07 be f0 add %fp, -272, %o0
/* Add for any character in the key one byte of the alternate sum. */
for (cnt = key_len; cnt > 32; cnt -= 32)
40001c24: 80 a7 20 20 cmp %i4, 0x20
40001c28: 08 80 01 72 bleu 400021f0 <crypt_sha256_r+0x6c4>
40001c2c: ba 10 00 1c mov %i4, %i5
SHA256_Update(&ctx, alt_result, 32);
40001c30: 94 10 20 20 mov 0x20, %o2
40001c34: 92 07 be f0 add %fp, -272, %o1
40001c38: 40 00 1c fd call 4000902c <SHA256_Update>
40001c3c: 90 07 bf 30 add %fp, -208, %o0
for (cnt = key_len; cnt > 32; cnt -= 32)
40001c40: ba 07 7f e0 add %i5, -32, %i5
40001c44: 80 a7 60 20 cmp %i5, 0x20
40001c48: 18 bf ff fb bgu 40001c34 <crypt_sha256_r+0x108>
40001c4c: 94 10 20 20 mov 0x20, %o2
40001c50: 82 07 3f df add %i4, -33, %g1
40001c54: 82 08 7f e0 and %g1, -32, %g1
40001c58: 94 07 3f e0 add %i4, -32, %o2
SHA256_Update(&ctx, alt_result, cnt);
40001c5c: 92 07 be f0 add %fp, -272, %o1
40001c60: 94 22 80 01 sub %o2, %g1, %o2
40001c64: 40 00 1c f2 call 4000902c <SHA256_Update>
40001c68: 90 07 bf 30 add %fp, -208, %o0
key_len = strlen(key);
40001c6c: 10 80 00 09 b 40001c90 <crypt_sha256_r+0x164>
40001c70: ba 10 00 1c mov %i4, %i5
/* Take the binary representation of the length of the key and for
* every 1 add the alternate sum, for every 0 the key. */
for (cnt = key_len; cnt > 0; cnt >>= 1)
if ((cnt & 1) != 0)
SHA256_Update(&ctx, alt_result, 32);
40001c74: 92 07 be f0 add %fp, -272, %o1
40001c78: 40 00 1c ed call 4000902c <SHA256_Update>
40001c7c: 90 07 bf 30 add %fp, -208, %o0
for (cnt = key_len; cnt > 0; cnt >>= 1)
40001c80: bb 37 60 01 srl %i5, 1, %i5
40001c84: 80 a7 60 00 cmp %i5, 0
40001c88: 02 80 00 0e be 40001cc0 <crypt_sha256_r+0x194>
40001c8c: 90 07 be f0 add %fp, -272, %o0
if ((cnt & 1) != 0)
40001c90: 80 8f 60 01 btst 1, %i5
40001c94: 12 bf ff f8 bne 40001c74 <crypt_sha256_r+0x148>
40001c98: 94 10 20 20 mov 0x20, %o2
else
SHA256_Update(&ctx, key, key_len);
40001c9c: 94 10 00 1c mov %i4, %o2
40001ca0: 92 10 00 10 mov %l0, %o1
40001ca4: 40 00 1c e2 call 4000902c <SHA256_Update>
40001ca8: 90 07 bf 30 add %fp, -208, %o0
for (cnt = key_len; cnt > 0; cnt >>= 1)
40001cac: bb 37 60 01 srl %i5, 1, %i5
40001cb0: 80 a7 60 00 cmp %i5, 0
40001cb4: 12 bf ff f8 bne 40001c94 <crypt_sha256_r+0x168> <== ALWAYS TAKEN
40001cb8: 80 8f 60 01 btst 1, %i5
/* Create intermediate result. */
SHA256_Final(alt_result, &ctx);
40001cbc: 90 07 be f0 add %fp, -272, %o0 <== NOT EXECUTED
40001cc0: 40 00 1d 08 call 400090e0 <SHA256_Final>
40001cc4: 92 07 bf 30 add %fp, -208, %o1
/* Start computation of P byte sequence. */
SHA256_Init(&alt_ctx);
40001cc8: 40 00 1c be call 40008fc0 <SHA256_Init>
40001ccc: 90 07 bf 98 add %fp, -104, %o0
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < key_len; ++cnt)
SHA256_Update(&alt_ctx, key, key_len);
40001cd0: 94 10 00 1c mov %i4, %o2
40001cd4: 92 10 00 10 mov %l0, %o1
40001cd8: 40 00 1c d5 call 4000902c <SHA256_Update>
40001cdc: 90 07 bf 98 add %fp, -104, %o0
for (cnt = 0; cnt < key_len; ++cnt)
40001ce0: ba 07 60 01 inc %i5
40001ce4: 80 a7 00 1d cmp %i4, %i5
40001ce8: 18 bf ff fb bgu 40001cd4 <crypt_sha256_r+0x1a8>
40001cec: 94 10 00 1c mov %i4, %o2
/* Finish the digest. */
SHA256_Final(temp_result, &alt_ctx);
40001cf0: ba 07 bf 10 add %fp, -240, %i5
40001cf4: 92 07 bf 98 add %fp, -104, %o1
40001cf8: 40 00 1c fa call 400090e0 <SHA256_Final>
40001cfc: 90 10 00 1d mov %i5, %o0
/* Create byte sequence P. */
cp = p_bytes = alloca(key_len);
40001d00: 82 07 20 0b add %i4, 0xb, %g1
40001d04: 82 08 7f f8 and %g1, -8, %g1
40001d08: 9c 23 80 01 sub %sp, %g1, %sp
40001d0c: a2 03 a0 60 add %sp, 0x60, %l1
40001d10: e2 27 be e4 st %l1, [ %fp + -284 ]
for (cnt = key_len; cnt >= 32; cnt -= 32) {
40001d14: 80 a7 20 1f cmp %i4, 0x1f
40001d18: 08 80 01 4a bleu 40002240 <crypt_sha256_r+0x714>
40001d1c: 90 10 00 11 mov %l1, %o0
40001d20: a0 10 00 1c mov %i4, %l0
memcpy(cp, temp_result, 32);
40001d24: 94 10 20 20 mov 0x20, %o2
40001d28: 40 00 61 70 call 4001a2e8 <memcpy>
40001d2c: 92 10 00 1d mov %i5, %o1
cp += 32;
40001d30: d0 07 be e4 ld [ %fp + -284 ], %o0
40001d34: 90 02 20 20 add %o0, 0x20, %o0
for (cnt = key_len; cnt >= 32; cnt -= 32) {
40001d38: a0 04 3f e0 add %l0, -32, %l0
40001d3c: 80 a4 20 1f cmp %l0, 0x1f
40001d40: 18 bf ff f9 bgu 40001d24 <crypt_sha256_r+0x1f8>
40001d44: d0 27 be e4 st %o0, [ %fp + -284 ]
40001d48: 94 0f 20 1f and %i4, 0x1f, %o2
}
memcpy(cp, temp_result, cnt);
40001d4c: 40 00 61 67 call 4001a2e8 <memcpy>
40001d50: 92 10 00 1d mov %i5, %o1
/* Start computation of S byte sequence. */
SHA256_Init(&alt_ctx);
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
40001d54: a0 10 20 00 clr %l0
SHA256_Init(&alt_ctx);
40001d58: 40 00 1c 9a call 40008fc0 <SHA256_Init>
40001d5c: 90 07 bf 98 add %fp, -104, %o0
SHA256_Update(&alt_ctx, salt, salt_len);
40001d60: 94 10 00 1b mov %i3, %o2
40001d64: 92 10 00 19 mov %i1, %o1
40001d68: 40 00 1c b1 call 4000902c <SHA256_Update>
40001d6c: 90 07 bf 98 add %fp, -104, %o0
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
40001d70: c2 0f be f0 ldub [ %fp + -272 ], %g1
40001d74: a0 04 20 01 inc %l0
40001d78: 82 00 60 10 add %g1, 0x10, %g1
40001d7c: 80 a0 40 10 cmp %g1, %l0
40001d80: 18 bf ff f9 bgu 40001d64 <crypt_sha256_r+0x238>
40001d84: 94 10 00 1b mov %i3, %o2
/* Finish the digest. */
SHA256_Final(temp_result, &alt_ctx);
40001d88: 90 10 00 1d mov %i5, %o0
40001d8c: 40 00 1c d5 call 400090e0 <SHA256_Final>
40001d90: 92 07 bf 98 add %fp, -104, %o1
/* Create byte sequence S. */
cp = s_bytes = alloca(salt_len);
40001d94: 82 06 e0 0b add %i3, 0xb, %g1
40001d98: 82 08 7f f8 and %g1, -8, %g1
for (cnt = salt_len; cnt >= 32; cnt -= 32) {
memcpy(cp, temp_result, 32);
cp += 32;
}
memcpy(cp, temp_result, cnt);
40001d9c: 92 10 00 1d mov %i5, %o1
cp = s_bytes = alloca(salt_len);
40001da0: 9c 23 80 01 sub %sp, %g1, %sp
memcpy(cp, temp_result, cnt);
40001da4: 94 10 00 1b mov %i3, %o2
cp = s_bytes = alloca(salt_len);
40001da8: ae 03 a0 60 add %sp, 0x60, %l7
/* Add key or last result. */
if ((cnt & 1) != 0)
SHA256_Update(&ctx, p_bytes, key_len);
else
SHA256_Update(&ctx, alt_result, 32);
40001dac: 2d 2a aa aa sethi %hi(0xaaaaa800), %l6
cp = s_bytes = alloca(salt_len);
40001db0: ee 27 be e4 st %l7, [ %fp + -284 ]
memcpy(cp, temp_result, cnt);
40001db4: 90 10 00 17 mov %l7, %o0
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0)
40001db8: 2b 15 55 55 sethi %hi(0x55555400), %l5
SHA256_Update(&ctx, s_bytes, salt_len);
40001dbc: 29 2d b6 db sethi %hi(0xb6db6c00), %l4
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0)
40001dc0: 27 09 24 92 sethi %hi(0x24924800), %l3
memcpy(cp, temp_result, cnt);
40001dc4: 40 00 61 49 call 4001a2e8 <memcpy>
40001dc8: ba 10 20 00 clr %i5
SHA256_Update(&ctx, alt_result, 32);
40001dcc: ac 15 a2 ab or %l6, 0x2ab, %l6
if (cnt % 3 != 0)
40001dd0: aa 15 61 55 or %l5, 0x155, %l5
SHA256_Update(&ctx, s_bytes, salt_len);
40001dd4: a8 15 21 b7 or %l4, 0x1b7, %l4
if (cnt % 7 != 0)
40001dd8: 10 80 00 1b b 40001e44 <crypt_sha256_r+0x318>
40001ddc: a6 14 e1 24 or %l3, 0x124, %l3
SHA256_Update(&ctx, p_bytes, key_len);
40001de0: 92 10 00 11 mov %l1, %o1
40001de4: 40 00 1c 92 call 4000902c <SHA256_Update>
40001de8: 90 07 bf 30 add %fp, -208, %o0
SHA256_Update(&ctx, alt_result, 32);
40001dec: 82 5f 40 16 smul %i5, %l6, %g1
if (cnt % 3 != 0)
40001df0: 80 a0 40 15 cmp %g1, %l5
40001df4: 18 80 00 22 bgu 40001e7c <crypt_sha256_r+0x350>
40001df8: 94 10 00 1b mov %i3, %o2
SHA256_Update(&ctx, s_bytes, salt_len);
40001dfc: 82 5f 40 14 smul %i5, %l4, %g1
if (cnt % 7 != 0)
40001e00: 80 a0 40 13 cmp %g1, %l3
40001e04: 18 80 00 26 bgu 40001e9c <crypt_sha256_r+0x370>
40001e08: 94 10 00 1c mov %i4, %o2
SHA256_Update(&ctx, p_bytes, key_len);
/* Add key or last result. */
if ((cnt & 1) != 0)
40001e0c: 80 a4 20 00 cmp %l0, 0
40001e10: 02 80 00 2a be 40001eb8 <crypt_sha256_r+0x38c>
40001e14: 94 10 00 1c mov %i4, %o2
SHA256_Update(&ctx, alt_result, 32);
40001e18: 94 10 20 20 mov 0x20, %o2
40001e1c: 92 07 be f0 add %fp, -272, %o1
40001e20: 40 00 1c 83 call 4000902c <SHA256_Update>
40001e24: 90 07 bf 30 add %fp, -208, %o0
else
SHA256_Update(&ctx, p_bytes, key_len);
/* Create intermediate result. */
SHA256_Final(alt_result, &ctx);
40001e28: 92 07 bf 30 add %fp, -208, %o1
40001e2c: 40 00 1c ad call 400090e0 <SHA256_Final>
40001e30: 90 07 be f0 add %fp, -272, %o0
for (cnt = 0; cnt < rounds; ++cnt) {
40001e34: ba 07 60 01 inc %i5
40001e38: 80 a4 80 1d cmp %l2, %i5
40001e3c: 22 80 00 2a be,a 40001ee4 <crypt_sha256_r+0x3b8>
40001e40: fa 07 be ec ld [ %fp + -276 ], %i5
SHA256_Init(&ctx);
40001e44: 40 00 1c 5f call 40008fc0 <SHA256_Init>
40001e48: 90 07 bf 30 add %fp, -208, %o0
if ((cnt & 1) != 0)
40001e4c: a0 8f 60 01 andcc %i5, 1, %l0
40001e50: 12 bf ff e4 bne 40001de0 <crypt_sha256_r+0x2b4>
40001e54: 94 10 00 1c mov %i4, %o2
SHA256_Update(&ctx, alt_result, 32);
40001e58: 94 10 20 20 mov 0x20, %o2
40001e5c: 92 07 be f0 add %fp, -272, %o1
40001e60: 40 00 1c 73 call 4000902c <SHA256_Update>
40001e64: 90 07 bf 30 add %fp, -208, %o0
40001e68: 82 5f 40 16 smul %i5, %l6, %g1
if (cnt % 3 != 0)
40001e6c: 80 a0 40 15 cmp %g1, %l5
40001e70: 08 bf ff e4 bleu 40001e00 <crypt_sha256_r+0x2d4>
40001e74: 82 5f 40 14 smul %i5, %l4, %g1
SHA256_Update(&ctx, s_bytes, salt_len);
40001e78: 94 10 00 1b mov %i3, %o2
40001e7c: 92 10 00 17 mov %l7, %o1
40001e80: 40 00 1c 6b call 4000902c <SHA256_Update>
40001e84: 90 07 bf 30 add %fp, -208, %o0
40001e88: 82 5f 40 14 smul %i5, %l4, %g1
if (cnt % 7 != 0)
40001e8c: 80 a0 40 13 cmp %g1, %l3
40001e90: 08 bf ff e0 bleu 40001e10 <crypt_sha256_r+0x2e4>
40001e94: 80 a4 20 00 cmp %l0, 0
SHA256_Update(&ctx, p_bytes, key_len);
40001e98: 94 10 00 1c mov %i4, %o2
40001e9c: 92 10 00 11 mov %l1, %o1
40001ea0: 40 00 1c 63 call 4000902c <SHA256_Update>
40001ea4: 90 07 bf 30 add %fp, -208, %o0
if ((cnt & 1) != 0)
40001ea8: 80 a4 20 00 cmp %l0, 0
40001eac: 12 bf ff dc bne 40001e1c <crypt_sha256_r+0x2f0>
40001eb0: 94 10 20 20 mov 0x20, %o2
SHA256_Update(&ctx, p_bytes, key_len);
40001eb4: 94 10 00 1c mov %i4, %o2
40001eb8: 92 10 00 11 mov %l1, %o1
40001ebc: 40 00 1c 5c call 4000902c <SHA256_Update>
40001ec0: 90 07 bf 30 add %fp, -208, %o0
SHA256_Final(alt_result, &ctx);
40001ec4: 92 07 bf 30 add %fp, -208, %o1
40001ec8: 40 00 1c 86 call 400090e0 <SHA256_Final>
40001ecc: 90 07 be f0 add %fp, -272, %o0
for (cnt = 0; cnt < rounds; ++cnt) {
40001ed0: ba 07 60 01 inc %i5
40001ed4: 80 a4 80 1d cmp %l2, %i5
40001ed8: 12 bf ff db bne 40001e44 <crypt_sha256_r+0x318>
40001edc: 01 00 00 00 nop
}
/* Now we can construct the result string. It consists of three
* parts. */
cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen));
40001ee0: fa 07 be ec ld [ %fp + -276 ], %i5
40001ee4: 94 38 00 1d xnor %g0, %i5, %o2
40001ee8: 13 10 00 86 sethi %hi(0x40021800), %o1
40001eec: 95 3a a0 1f sra %o2, 0x1f, %o2
40001ef0: 92 12 63 a0 or %o1, 0x3a0, %o1
40001ef4: 94 0f 40 0a and %i5, %o2, %o2
40001ef8: 90 10 00 1a mov %i2, %o0
40001efc: 40 00 62 0f call 4001a738 <stpncpy>
40001f00: ba 07 7f fd add %i5, -3, %i5
buflen -= sizeof(sha256_salt_prefix) - 1;
40001f04: fa 27 be ec st %i5, [ %fp + -276 ]
if (rounds_custom) {
n = snprintf(cp, MAX(0, buflen), "%s%zu$",
40001f08: 92 38 00 1d xnor %g0, %i5, %o1
cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen));
40001f0c: d0 27 be e4 st %o0, [ %fp + -284 ]
n = snprintf(cp, MAX(0, buflen), "%s%zu$",
40001f10: 93 3a 60 1f sra %o1, 0x1f, %o1
if (rounds_custom) {
40001f14: c4 0f be df ldub [ %fp + -289 ], %g2
cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen));
40001f18: 82 10 00 08 mov %o0, %g1
if (rounds_custom) {
40001f1c: 80 88 a0 ff btst 0xff, %g2
40001f20: 12 80 00 93 bne 4000216c <crypt_sha256_r+0x640>
40001f24: 92 0f 40 09 and %i5, %o1, %o1
cp += n;
buflen -= n;
}
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
40001f28: 80 a6 c0 09 cmp %i3, %o1
40001f2c: 08 80 00 03 bleu 40001f38 <crypt_sha256_r+0x40c> <== ALWAYS TAKEN
40001f30: 94 10 00 1b mov %i3, %o2
40001f34: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
40001f38: 90 10 00 01 mov %g1, %o0
40001f3c: 40 00 61 ff call 4001a738 <stpncpy>
40001f40: 92 10 00 19 mov %i1, %o1
40001f44: d0 27 be e4 st %o0, [ %fp + -284 ]
buflen -= MIN((size_t)MAX(0, buflen), salt_len);
40001f48: c4 07 be ec ld [ %fp + -276 ], %g2
40001f4c: 82 38 00 02 xnor %g0, %g2, %g1
40001f50: 83 38 60 1f sra %g1, 0x1f, %g1
40001f54: 82 08 80 01 and %g2, %g1, %g1
40001f58: 80 a0 40 1b cmp %g1, %i3
40001f5c: 38 80 00 02 bgu,a 40001f64 <crypt_sha256_r+0x438> <== ALWAYS TAKEN
40001f60: 82 10 00 1b mov %i3, %g1
40001f64: 82 20 80 01 sub %g2, %g1, %g1
if (buflen > 0) {
40001f68: 80 a0 60 00 cmp %g1, 0
40001f6c: 04 80 00 09 ble 40001f90 <crypt_sha256_r+0x464> <== NEVER TAKEN
40001f70: c2 27 be ec st %g1, [ %fp + -276 ]
*cp++ = '$';
40001f74: 82 02 20 01 add %o0, 1, %g1
40001f78: c2 27 be e4 st %g1, [ %fp + -284 ]
40001f7c: 82 10 20 24 mov 0x24, %g1
40001f80: c2 2a 00 00 stb %g1, [ %o0 ]
--buflen;
40001f84: c2 07 be ec ld [ %fp + -276 ], %g1
40001f88: 82 00 7f ff add %g1, -1, %g1
40001f8c: c2 27 be ec st %g1, [ %fp + -276 ]
}
b64_from_24bit(alt_result[0], alt_result[10], alt_result[20], 4, &buflen, &cp);
40001f90: 96 10 20 04 mov 4, %o3
40001f94: d4 0f bf 04 ldub [ %fp + -252 ], %o2
40001f98: d2 0f be fa ldub [ %fp + -262 ], %o1
40001f9c: d0 0f be f0 ldub [ %fp + -272 ], %o0
40001fa0: 9a 07 be e4 add %fp, -284, %o5
40001fa4: 40 00 02 cb call 40002ad0 <_crypt_b64_from_24bit>
40001fa8: 98 07 be ec add %fp, -276, %o4
b64_from_24bit(alt_result[21], alt_result[1], alt_result[11], 4, &buflen, &cp);
40001fac: d4 0f be fb ldub [ %fp + -261 ], %o2
40001fb0: d2 0f be f1 ldub [ %fp + -271 ], %o1
40001fb4: d0 0f bf 05 ldub [ %fp + -251 ], %o0
40001fb8: 9a 07 be e4 add %fp, -284, %o5
40001fbc: 98 07 be ec add %fp, -276, %o4
40001fc0: 40 00 02 c4 call 40002ad0 <_crypt_b64_from_24bit>
40001fc4: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[12], alt_result[22], alt_result[2], 4, &buflen, &cp);
40001fc8: d4 0f be f2 ldub [ %fp + -270 ], %o2
40001fcc: d2 0f bf 06 ldub [ %fp + -250 ], %o1
40001fd0: d0 0f be fc ldub [ %fp + -260 ], %o0
40001fd4: 9a 07 be e4 add %fp, -284, %o5
40001fd8: 98 07 be ec add %fp, -276, %o4
40001fdc: 40 00 02 bd call 40002ad0 <_crypt_b64_from_24bit>
40001fe0: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[3], alt_result[13], alt_result[23], 4, &buflen, &cp);
40001fe4: d4 0f bf 07 ldub [ %fp + -249 ], %o2
40001fe8: d2 0f be fd ldub [ %fp + -259 ], %o1
40001fec: d0 0f be f3 ldub [ %fp + -269 ], %o0
40001ff0: 9a 07 be e4 add %fp, -284, %o5
40001ff4: 98 07 be ec add %fp, -276, %o4
40001ff8: 40 00 02 b6 call 40002ad0 <_crypt_b64_from_24bit>
40001ffc: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[24], alt_result[4], alt_result[14], 4, &buflen, &cp);
40002000: d4 0f be fe ldub [ %fp + -258 ], %o2
40002004: d2 0f be f4 ldub [ %fp + -268 ], %o1
40002008: d0 0f bf 08 ldub [ %fp + -248 ], %o0
4000200c: 9a 07 be e4 add %fp, -284, %o5
40002010: 98 07 be ec add %fp, -276, %o4
40002014: 40 00 02 af call 40002ad0 <_crypt_b64_from_24bit>
40002018: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[15], alt_result[25], alt_result[5], 4, &buflen, &cp);
4000201c: d4 0f be f5 ldub [ %fp + -267 ], %o2
40002020: d2 0f bf 09 ldub [ %fp + -247 ], %o1
40002024: d0 0f be ff ldub [ %fp + -257 ], %o0
40002028: 9a 07 be e4 add %fp, -284, %o5
4000202c: 98 07 be ec add %fp, -276, %o4
40002030: 40 00 02 a8 call 40002ad0 <_crypt_b64_from_24bit>
40002034: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[6], alt_result[16], alt_result[26], 4, &buflen, &cp);
40002038: d4 0f bf 0a ldub [ %fp + -246 ], %o2
4000203c: d2 0f bf 00 ldub [ %fp + -256 ], %o1
40002040: d0 0f be f6 ldub [ %fp + -266 ], %o0
40002044: 9a 07 be e4 add %fp, -284, %o5
40002048: 98 07 be ec add %fp, -276, %o4
4000204c: 40 00 02 a1 call 40002ad0 <_crypt_b64_from_24bit>
40002050: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[27], alt_result[7], alt_result[17], 4, &buflen, &cp);
40002054: d4 0f bf 01 ldub [ %fp + -255 ], %o2
40002058: d2 0f be f7 ldub [ %fp + -265 ], %o1
4000205c: d0 0f bf 0b ldub [ %fp + -245 ], %o0
40002060: 9a 07 be e4 add %fp, -284, %o5
40002064: 98 07 be ec add %fp, -276, %o4
40002068: 40 00 02 9a call 40002ad0 <_crypt_b64_from_24bit>
4000206c: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[18], alt_result[28], alt_result[8], 4, &buflen, &cp);
40002070: d4 0f be f8 ldub [ %fp + -264 ], %o2
40002074: d2 0f bf 0c ldub [ %fp + -244 ], %o1
40002078: d0 0f bf 02 ldub [ %fp + -254 ], %o0
4000207c: 9a 07 be e4 add %fp, -284, %o5
40002080: 98 07 be ec add %fp, -276, %o4
40002084: 40 00 02 93 call 40002ad0 <_crypt_b64_from_24bit>
40002088: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[9], alt_result[19], alt_result[29], 4, &buflen, &cp);
4000208c: d4 0f bf 0d ldub [ %fp + -243 ], %o2
40002090: d2 0f bf 03 ldub [ %fp + -253 ], %o1
40002094: d0 0f be f9 ldub [ %fp + -263 ], %o0
40002098: 9a 07 be e4 add %fp, -284, %o5
4000209c: 98 07 be ec add %fp, -276, %o4
400020a0: 40 00 02 8c call 40002ad0 <_crypt_b64_from_24bit>
400020a4: 96 10 20 04 mov 4, %o3
b64_from_24bit(0, alt_result[31], alt_result[30], 3, &buflen, &cp);
400020a8: d4 0f bf 0e ldub [ %fp + -242 ], %o2
400020ac: d2 0f bf 0f ldub [ %fp + -241 ], %o1
400020b0: 9a 07 be e4 add %fp, -284, %o5
400020b4: 98 07 be ec add %fp, -276, %o4
400020b8: 96 10 20 03 mov 3, %o3
400020bc: 40 00 02 85 call 40002ad0 <_crypt_b64_from_24bit>
400020c0: 90 10 20 00 clr %o0
if (buflen <= 0) {
400020c4: c2 07 be ec ld [ %fp + -276 ], %g1
400020c8: 80 a0 60 00 cmp %g1, 0
400020cc: 04 80 00 38 ble 400021ac <crypt_sha256_r+0x680> <== NEVER TAKEN
400020d0: c2 07 be e4 ld [ %fp + -284 ], %g1
errno = ERANGE;
buffer = NULL;
}
else
*cp = '\0'; /* Terminate the string. */
400020d4: c0 28 40 00 clrb [ %g1 ]
/* Clear the buffer for the intermediate result so that people
* attaching to processes or reading core dumps cannot get any
* information. We do it in this way to clear correct_words[] inside
* the SHA256 implementation as well. */
SHA256_Init(&ctx);
400020d8: 40 00 1b ba call 40008fc0 <SHA256_Init>
400020dc: 90 07 bf 30 add %fp, -208, %o0
SHA256_Final(alt_result, &ctx);
400020e0: 92 07 bf 30 add %fp, -208, %o1
400020e4: 40 00 1b ff call 400090e0 <SHA256_Final>
400020e8: 90 07 be f0 add %fp, -272, %o0
memset(copied_key, '\0', key_len);
if (copied_salt != NULL)
memset(copied_salt, '\0', salt_len);
return buffer;
}
400020ec: 81 c7 e0 08 ret
400020f0: 81 e8 00 00 restore
if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0)
400020f4: 80 a0 40 02 cmp %g1, %g2
400020f8: 12 bf fe 9a bne 40001b60 <crypt_sha256_r+0x34> <== NEVER TAKEN
400020fc: 03 10 00 86 sethi %hi(0x40021800), %g1
salt += sizeof(sha256_salt_prefix) - 1;
40002100: b2 06 60 03 add %i1, 3, %i1
if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1)
40002104: 94 10 20 07 mov 7, %o2
40002108: 90 10 00 19 mov %i1, %o0
4000210c: 40 00 62 90 call 4001ab4c <strncmp>
40002110: 92 10 63 98 or %g1, 0x398, %o1
40002114: 80 a2 20 00 cmp %o0, 0
40002118: 32 bf fe 9b bne,a 40001b84 <crypt_sha256_r+0x58>
4000211c: c0 2f be df clrb [ %fp + -289 ]
srounds = strtoul(num, &endp, 10);
40002120: 94 10 20 0a mov 0xa, %o2
40002124: 92 07 be e8 add %fp, -280, %o1
40002128: 40 00 65 28 call 4001b5c8 <strtoul>
4000212c: 90 06 60 07 add %i1, 7, %o0
if (*endp == '$') {
40002130: c2 07 be e8 ld [ %fp + -280 ], %g1
40002134: c4 48 40 00 ldsb [ %g1 ], %g2
40002138: 80 a0 a0 24 cmp %g2, 0x24
4000213c: 32 bf fe 92 bne,a 40001b84 <crypt_sha256_r+0x58> <== NEVER TAKEN
40002140: c0 2f be df clrb [ %fp + -289 ] <== NOT EXECUTED
salt = endp + 1;
40002144: b2 00 60 01 add %g1, 1, %i1
rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX));
40002148: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1
4000214c: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <RAM_SIZE+0x3b5ac9ff>
40002150: 80 a2 00 01 cmp %o0, %g1
40002154: 08 80 00 21 bleu 400021d8 <crypt_sha256_r+0x6ac> <== ALWAYS TAKEN
40002158: a4 10 00 08 mov %o0, %l2
4000215c: a4 10 00 01 mov %g1, %l2 <== NOT EXECUTED
rounds_custom = true;
40002160: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
40002164: 10 bf fe 8a b 40001b8c <crypt_sha256_r+0x60>
40002168: c2 2f be df stb %g1, [ %fp + -289 ]
n = snprintf(cp, MAX(0, buflen), "%s%zu$",
4000216c: 03 10 00 86 sethi %hi(0x40021800), %g1
40002170: 98 10 00 12 mov %l2, %o4
40002174: 96 10 63 98 or %g1, 0x398, %o3
40002178: 15 10 00 86 sethi %hi(0x40021800), %o2
4000217c: 40 00 61 3b call 4001a668 <snprintf>
40002180: 94 12 a3 88 or %o2, 0x388, %o2 ! 40021b88 <magic.0+0x18>
cp += n;
40002184: c2 07 be e4 ld [ %fp + -284 ], %g1
buflen -= n;
40002188: fa 07 be ec ld [ %fp + -276 ], %i5
4000218c: ba 27 40 08 sub %i5, %o0, %i5
cp += n;
40002190: 82 00 40 08 add %g1, %o0, %g1
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
40002194: 92 38 00 1d xnor %g0, %i5, %o1
buflen -= n;
40002198: fa 27 be ec st %i5, [ %fp + -276 ]
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
4000219c: 93 3a 60 1f sra %o1, 0x1f, %o1
cp += n;
400021a0: c2 27 be e4 st %g1, [ %fp + -284 ]
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
400021a4: 10 bf ff 61 b 40001f28 <crypt_sha256_r+0x3fc>
400021a8: 92 0f 40 09 and %i5, %o1, %o1
errno = ERANGE;
400021ac: 40 00 60 28 call 4001a24c <__errno> <== NOT EXECUTED
400021b0: b0 10 20 00 clr %i0 <== NOT EXECUTED
400021b4: 82 10 20 22 mov 0x22, %g1 <== NOT EXECUTED
400021b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
SHA256_Init(&ctx);
400021bc: 40 00 1b 81 call 40008fc0 <SHA256_Init> <== NOT EXECUTED
400021c0: 90 07 bf 30 add %fp, -208, %o0 <== NOT EXECUTED
SHA256_Final(alt_result, &ctx);
400021c4: 92 07 bf 30 add %fp, -208, %o1 <== NOT EXECUTED
400021c8: 40 00 1b c6 call 400090e0 <SHA256_Final> <== NOT EXECUTED
400021cc: 90 07 be f0 add %fp, -272, %o0 <== NOT EXECUTED
}
400021d0: 81 c7 e0 08 ret <== NOT EXECUTED
400021d4: 81 e8 00 00 restore <== NOT EXECUTED
400021d8: 80 a2 23 e8 cmp %o0, 0x3e8
rounds_custom = true;
400021dc: 1a bf ff e2 bcc 40002164 <crypt_sha256_r+0x638>
400021e0: 82 10 20 01 mov 1, %g1
400021e4: a4 10 23 e8 mov 0x3e8, %l2
400021e8: 10 bf fe 69 b 40001b8c <crypt_sha256_r+0x60>
400021ec: c2 2f be df stb %g1, [ %fp + -289 ]
SHA256_Update(&ctx, alt_result, cnt);
400021f0: 94 10 00 1c mov %i4, %o2
400021f4: 92 07 be f0 add %fp, -272, %o1
400021f8: 40 00 1b 8d call 4000902c <SHA256_Update>
400021fc: 90 07 bf 30 add %fp, -208, %o0
for (cnt = key_len; cnt > 0; cnt >>= 1)
40002200: 80 a7 20 00 cmp %i4, 0
40002204: 12 bf fe 9a bne 40001c6c <crypt_sha256_r+0x140> <== ALWAYS TAKEN
40002208: 92 07 bf 30 add %fp, -208, %o1
SHA256_Final(alt_result, &ctx);
4000220c: 40 00 1b b5 call 400090e0 <SHA256_Final> <== NOT EXECUTED
40002210: 90 07 be f0 add %fp, -272, %o0 <== NOT EXECUTED
SHA256_Init(&alt_ctx);
40002214: 40 00 1b 6b call 40008fc0 <SHA256_Init> <== NOT EXECUTED
40002218: 90 07 bf 98 add %fp, -104, %o0 <== NOT EXECUTED
SHA256_Final(temp_result, &alt_ctx);
4000221c: ba 07 bf 10 add %fp, -240, %i5 <== NOT EXECUTED
40002220: 92 07 bf 98 add %fp, -104, %o1 <== NOT EXECUTED
40002224: 40 00 1b af call 400090e0 <SHA256_Final> <== NOT EXECUTED
40002228: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
cp = p_bytes = alloca(key_len);
4000222c: a2 03 a0 5c add %sp, 0x5c, %l1 <== NOT EXECUTED
40002230: 94 10 20 00 clr %o2 <== NOT EXECUTED
40002234: e2 27 be e4 st %l1, [ %fp + -284 ] <== NOT EXECUTED
40002238: 10 bf fe c5 b 40001d4c <crypt_sha256_r+0x220> <== NOT EXECUTED
4000223c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
for (cnt = key_len; cnt >= 32; cnt -= 32) {
40002240: 10 bf fe c3 b 40001d4c <crypt_sha256_r+0x220>
40002244: 94 10 00 1c mov %i4, %o2
40002248 <crypt_sha512_r>:
/* Maximum number of rounds. */
#define ROUNDS_MAX 999999999
char *
crypt_sha512_r(const char *key, const char *salt, struct crypt_data *data)
{
40002248: 9d e3 bd 68 save %sp, -664, %sp
size_t salt_len, key_len, cnt, rounds;
char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp;
const char *num;
bool rounds_custom;
char *buffer = &data->buffer[0];
int buflen = (int)sizeof(data->buffer);
4000224c: 82 10 21 00 mov 0x100, %g1
40002250: c2 27 bd dc st %g1, [ %fp + -548 ]
{
40002254: a0 10 00 18 mov %i0, %l0
rounds = ROUNDS_DEFAULT;
rounds_custom = false;
/* Find beginning of salt string. The prefix should normally always
* be present. Just in case it is not. */
if (strncmp(sha512_salt_prefix, salt, sizeof(sha512_salt_prefix) - 1) == 0)
40002258: c4 0e 40 00 ldub [ %i1 ], %g2
4000225c: 82 10 20 24 mov 0x24, %g1
40002260: 80 a0 40 02 cmp %g1, %g2
40002264: 12 80 00 06 bne 4000227c <crypt_sha512_r+0x34>
40002268: b0 10 00 1a mov %i2, %i0
4000226c: c4 0e 60 01 ldub [ %i1 + 1 ], %g2
40002270: 80 a0 a0 36 cmp %g2, 0x36
40002274: 22 80 01 b4 be,a 40002944 <crypt_sha512_r+0x6fc> <== ALWAYS TAKEN
40002278: c4 0e 60 02 ldub [ %i1 + 2 ], %g2
/* Skip salt prefix. */
salt += sizeof(sha512_salt_prefix) - 1;
if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1)
4000227c: 03 10 00 86 sethi %hi(0x40021800), %g1
40002280: 94 10 20 07 mov 7, %o2
40002284: 90 10 00 19 mov %i1, %o0
40002288: 40 00 62 31 call 4001ab4c <strncmp>
4000228c: 92 10 63 b0 or %g1, 0x3b0, %o1
40002290: 80 a2 20 00 cmp %o0, 0
40002294: 02 80 01 b8 be 40002974 <crypt_sha512_r+0x72c> <== NEVER TAKEN
40002298: 94 10 20 0a mov 0xa, %o2
rounds_custom = false;
4000229c: c0 2f bd cf clrb [ %fp + -561 ]
rounds = ROUNDS_DEFAULT;
400022a0: 25 00 00 04 sethi %hi(0x1000), %l2
400022a4: a4 14 a3 88 or %l2, 0x388, %l2 ! 1388 <_ISR_Stack_size+0x388>
rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX));
rounds_custom = true;
}
}
salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX);
400022a8: 90 10 00 19 mov %i1, %o0
400022ac: 13 10 00 86 sethi %hi(0x40021800), %o1
400022b0: 40 00 61 ae call 4001a968 <strcspn>
400022b4: 92 12 63 80 or %o1, 0x380, %o1 ! 40021b80 <magic.0+0x10>
400022b8: 80 a2 20 0f cmp %o0, 0xf
400022bc: 08 80 00 03 bleu 400022c8 <crypt_sha512_r+0x80>
400022c0: b6 10 00 08 mov %o0, %i3
400022c4: b6 10 20 10 mov 0x10, %i3
key_len = strlen(key);
400022c8: 40 00 61 ca call 4001a9f0 <strlen>
400022cc: 90 10 00 10 mov %l0, %o0
400022d0: b8 10 00 08 mov %o0, %i4
/* Prepare for the real work. */
SHA512_Init(&ctx);
400022d4: 40 00 39 21 call 40010758 <SHA512_Init>
400022d8: 90 07 be 60 add %fp, -416, %o0
/* Add the key string. */
SHA512_Update(&ctx, key, key_len);
400022dc: 94 10 00 1c mov %i4, %o2
400022e0: 92 10 00 10 mov %l0, %o1
400022e4: 40 00 39 4a call 4001080c <SHA512_Update>
400022e8: 90 07 be 60 add %fp, -416, %o0
/* The last part is the salt string. This must be at most 8
* characters and it ends at the first `$' character (for
* compatibility with existing implementations). */
SHA512_Update(&ctx, salt, salt_len);
400022ec: 94 10 00 1b mov %i3, %o2
400022f0: 92 10 00 19 mov %i1, %o1
400022f4: 40 00 39 46 call 4001080c <SHA512_Update>
400022f8: 90 07 be 60 add %fp, -416, %o0
/* Compute alternate SHA512 sum with input KEY, SALT, and KEY. The
* final result will be added to the first context. */
SHA512_Init(&alt_ctx);
400022fc: 40 00 39 17 call 40010758 <SHA512_Init>
40002300: 90 07 bf 30 add %fp, -208, %o0
/* Add key. */
SHA512_Update(&alt_ctx, key, key_len);
40002304: 94 10 00 1c mov %i4, %o2
40002308: 92 10 00 10 mov %l0, %o1
4000230c: 40 00 39 40 call 4001080c <SHA512_Update>
40002310: 90 07 bf 30 add %fp, -208, %o0
/* Add salt. */
SHA512_Update(&alt_ctx, salt, salt_len);
40002314: 94 10 00 1b mov %i3, %o2
40002318: 92 10 00 19 mov %i1, %o1
4000231c: 40 00 39 3c call 4001080c <SHA512_Update>
40002320: 90 07 bf 30 add %fp, -208, %o0
/* Add key again. */
SHA512_Update(&alt_ctx, key, key_len);
40002324: 94 10 00 1c mov %i4, %o2
40002328: 92 10 00 10 mov %l0, %o1
4000232c: 40 00 39 38 call 4001080c <SHA512_Update>
40002330: 90 07 bf 30 add %fp, -208, %o0
/* Now get result of this (64 bytes) and add it to the other context. */
SHA512_Final(alt_result, &alt_ctx);
40002334: 92 07 bf 30 add %fp, -208, %o1
40002338: 40 00 39 72 call 40010900 <SHA512_Final>
4000233c: 90 07 bd e0 add %fp, -544, %o0
/* Add for any character in the key one byte of the alternate sum. */
for (cnt = key_len; cnt > 64; cnt -= 64)
40002340: 80 a7 20 40 cmp %i4, 0x40
40002344: 08 80 01 bf bleu 40002a40 <crypt_sha512_r+0x7f8>
40002348: ba 10 00 1c mov %i4, %i5
SHA512_Update(&ctx, alt_result, 64);
4000234c: 94 10 20 40 mov 0x40, %o2
40002350: 92 07 bd e0 add %fp, -544, %o1
40002354: 40 00 39 2e call 4001080c <SHA512_Update>
40002358: 90 07 be 60 add %fp, -416, %o0
for (cnt = key_len; cnt > 64; cnt -= 64)
4000235c: ba 07 7f c0 add %i5, -64, %i5
40002360: 80 a7 60 40 cmp %i5, 0x40
40002364: 18 bf ff fb bgu 40002350 <crypt_sha512_r+0x108> <== NEVER TAKEN
40002368: 94 10 20 40 mov 0x40, %o2
4000236c: 82 07 3f bf add %i4, -65, %g1
40002370: 82 08 7f c0 and %g1, -64, %g1
40002374: 94 07 3f c0 add %i4, -64, %o2
SHA512_Update(&ctx, alt_result, cnt);
40002378: 92 07 bd e0 add %fp, -544, %o1
4000237c: 94 22 80 01 sub %o2, %g1, %o2
40002380: 40 00 39 23 call 4001080c <SHA512_Update>
40002384: 90 07 be 60 add %fp, -416, %o0
key_len = strlen(key);
40002388: 10 80 00 09 b 400023ac <crypt_sha512_r+0x164>
4000238c: ba 10 00 1c mov %i4, %i5
/* Take the binary representation of the length of the key and for
* every 1 add the alternate sum, for every 0 the key. */
for (cnt = key_len; cnt > 0; cnt >>= 1)
if ((cnt & 1) != 0)
SHA512_Update(&ctx, alt_result, 64);
40002390: 92 07 bd e0 add %fp, -544, %o1
40002394: 40 00 39 1e call 4001080c <SHA512_Update>
40002398: 90 07 be 60 add %fp, -416, %o0
for (cnt = key_len; cnt > 0; cnt >>= 1)
4000239c: bb 37 60 01 srl %i5, 1, %i5
400023a0: 80 a7 60 00 cmp %i5, 0
400023a4: 02 80 00 0e be 400023dc <crypt_sha512_r+0x194>
400023a8: 90 07 bd e0 add %fp, -544, %o0
if ((cnt & 1) != 0)
400023ac: 80 8f 60 01 btst 1, %i5
400023b0: 12 bf ff f8 bne 40002390 <crypt_sha512_r+0x148>
400023b4: 94 10 20 40 mov 0x40, %o2
else
SHA512_Update(&ctx, key, key_len);
400023b8: 94 10 00 1c mov %i4, %o2
400023bc: 92 10 00 10 mov %l0, %o1
400023c0: 40 00 39 13 call 4001080c <SHA512_Update>
400023c4: 90 07 be 60 add %fp, -416, %o0
for (cnt = key_len; cnt > 0; cnt >>= 1)
400023c8: bb 37 60 01 srl %i5, 1, %i5
400023cc: 80 a7 60 00 cmp %i5, 0
400023d0: 12 bf ff f8 bne 400023b0 <crypt_sha512_r+0x168> <== ALWAYS TAKEN
400023d4: 80 8f 60 01 btst 1, %i5
/* Create intermediate result. */
SHA512_Final(alt_result, &ctx);
400023d8: 90 07 bd e0 add %fp, -544, %o0 <== NOT EXECUTED
400023dc: 40 00 39 49 call 40010900 <SHA512_Final>
400023e0: 92 07 be 60 add %fp, -416, %o1
/* Start computation of P byte sequence. */
SHA512_Init(&alt_ctx);
400023e4: 40 00 38 dd call 40010758 <SHA512_Init>
400023e8: 90 07 bf 30 add %fp, -208, %o0
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < key_len; ++cnt)
SHA512_Update(&alt_ctx, key, key_len);
400023ec: 94 10 00 1c mov %i4, %o2
400023f0: 92 10 00 10 mov %l0, %o1
400023f4: 40 00 39 06 call 4001080c <SHA512_Update>
400023f8: 90 07 bf 30 add %fp, -208, %o0
for (cnt = 0; cnt < key_len; ++cnt)
400023fc: ba 07 60 01 inc %i5
40002400: 80 a7 00 1d cmp %i4, %i5
40002404: 18 bf ff fb bgu 400023f0 <crypt_sha512_r+0x1a8>
40002408: 94 10 00 1c mov %i4, %o2
/* Finish the digest. */
SHA512_Final(temp_result, &alt_ctx);
4000240c: ba 07 be 20 add %fp, -480, %i5
40002410: 92 07 bf 30 add %fp, -208, %o1
40002414: 40 00 39 3b call 40010900 <SHA512_Final>
40002418: 90 10 00 1d mov %i5, %o0
/* Create byte sequence P. */
cp = p_bytes = alloca(key_len);
4000241c: 82 07 20 0b add %i4, 0xb, %g1
40002420: 82 08 7f f8 and %g1, -8, %g1
40002424: 9c 23 80 01 sub %sp, %g1, %sp
40002428: a2 03 a0 60 add %sp, 0x60, %l1
4000242c: e2 27 bd d4 st %l1, [ %fp + -556 ]
for (cnt = key_len; cnt >= 64; cnt -= 64) {
40002430: 80 a7 20 3f cmp %i4, 0x3f
40002434: 08 80 01 97 bleu 40002a90 <crypt_sha512_r+0x848>
40002438: 90 10 00 11 mov %l1, %o0
4000243c: a0 10 00 1c mov %i4, %l0
memcpy(cp, temp_result, 64);
40002440: 94 10 20 40 mov 0x40, %o2
40002444: 40 00 5f a9 call 4001a2e8 <memcpy>
40002448: 92 10 00 1d mov %i5, %o1
cp += 64;
4000244c: d0 07 bd d4 ld [ %fp + -556 ], %o0
40002450: 90 02 20 40 add %o0, 0x40, %o0
for (cnt = key_len; cnt >= 64; cnt -= 64) {
40002454: a0 04 3f c0 add %l0, -64, %l0
40002458: 80 a4 20 3f cmp %l0, 0x3f
4000245c: 18 bf ff f9 bgu 40002440 <crypt_sha512_r+0x1f8> <== NEVER TAKEN
40002460: d0 27 bd d4 st %o0, [ %fp + -556 ]
40002464: 94 0f 20 3f and %i4, 0x3f, %o2
}
memcpy(cp, temp_result, cnt);
40002468: 40 00 5f a0 call 4001a2e8 <memcpy>
4000246c: 92 10 00 1d mov %i5, %o1
/* Start computation of S byte sequence. */
SHA512_Init(&alt_ctx);
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
40002470: a0 10 20 00 clr %l0
SHA512_Init(&alt_ctx);
40002474: 40 00 38 b9 call 40010758 <SHA512_Init>
40002478: 90 07 bf 30 add %fp, -208, %o0
SHA512_Update(&alt_ctx, salt, salt_len);
4000247c: 94 10 00 1b mov %i3, %o2
40002480: 92 10 00 19 mov %i1, %o1
40002484: 40 00 38 e2 call 4001080c <SHA512_Update>
40002488: 90 07 bf 30 add %fp, -208, %o0
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
4000248c: c2 0f bd e0 ldub [ %fp + -544 ], %g1
40002490: a0 04 20 01 inc %l0
40002494: 82 00 60 10 add %g1, 0x10, %g1
40002498: 80 a0 40 10 cmp %g1, %l0
4000249c: 18 bf ff f9 bgu 40002480 <crypt_sha512_r+0x238>
400024a0: 94 10 00 1b mov %i3, %o2
/* Finish the digest. */
SHA512_Final(temp_result, &alt_ctx);
400024a4: 90 10 00 1d mov %i5, %o0
400024a8: 40 00 39 16 call 40010900 <SHA512_Final>
400024ac: 92 07 bf 30 add %fp, -208, %o1
/* Create byte sequence S. */
cp = s_bytes = alloca(salt_len);
400024b0: 82 06 e0 0b add %i3, 0xb, %g1
400024b4: 82 08 7f f8 and %g1, -8, %g1
for (cnt = salt_len; cnt >= 64; cnt -= 64) {
memcpy(cp, temp_result, 64);
cp += 64;
}
memcpy(cp, temp_result, cnt);
400024b8: 92 10 00 1d mov %i5, %o1
cp = s_bytes = alloca(salt_len);
400024bc: 9c 23 80 01 sub %sp, %g1, %sp
memcpy(cp, temp_result, cnt);
400024c0: 94 10 00 1b mov %i3, %o2
cp = s_bytes = alloca(salt_len);
400024c4: ae 03 a0 60 add %sp, 0x60, %l7
/* Add key or last result. */
if ((cnt & 1) != 0)
SHA512_Update(&ctx, p_bytes, key_len);
else
SHA512_Update(&ctx, alt_result, 64);
400024c8: 2d 2a aa aa sethi %hi(0xaaaaa800), %l6
cp = s_bytes = alloca(salt_len);
400024cc: ee 27 bd d4 st %l7, [ %fp + -556 ]
memcpy(cp, temp_result, cnt);
400024d0: 90 10 00 17 mov %l7, %o0
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0)
400024d4: 2b 15 55 55 sethi %hi(0x55555400), %l5
SHA512_Update(&ctx, s_bytes, salt_len);
400024d8: 29 2d b6 db sethi %hi(0xb6db6c00), %l4
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0)
400024dc: 27 09 24 92 sethi %hi(0x24924800), %l3
memcpy(cp, temp_result, cnt);
400024e0: 40 00 5f 82 call 4001a2e8 <memcpy>
400024e4: ba 10 20 00 clr %i5
SHA512_Update(&ctx, alt_result, 64);
400024e8: ac 15 a2 ab or %l6, 0x2ab, %l6
if (cnt % 3 != 0)
400024ec: aa 15 61 55 or %l5, 0x155, %l5
SHA512_Update(&ctx, s_bytes, salt_len);
400024f0: a8 15 21 b7 or %l4, 0x1b7, %l4
if (cnt % 7 != 0)
400024f4: 10 80 00 1b b 40002560 <crypt_sha512_r+0x318>
400024f8: a6 14 e1 24 or %l3, 0x124, %l3
SHA512_Update(&ctx, p_bytes, key_len);
400024fc: 92 10 00 11 mov %l1, %o1
40002500: 40 00 38 c3 call 4001080c <SHA512_Update>
40002504: 90 07 be 60 add %fp, -416, %o0
SHA512_Update(&ctx, alt_result, 64);
40002508: 82 5f 40 16 smul %i5, %l6, %g1
if (cnt % 3 != 0)
4000250c: 80 a0 40 15 cmp %g1, %l5
40002510: 18 80 00 22 bgu 40002598 <crypt_sha512_r+0x350>
40002514: 94 10 00 1b mov %i3, %o2
SHA512_Update(&ctx, s_bytes, salt_len);
40002518: 82 5f 40 14 smul %i5, %l4, %g1
if (cnt % 7 != 0)
4000251c: 80 a0 40 13 cmp %g1, %l3
40002520: 18 80 00 26 bgu 400025b8 <crypt_sha512_r+0x370>
40002524: 94 10 00 1c mov %i4, %o2
SHA512_Update(&ctx, p_bytes, key_len);
/* Add key or last result. */
if ((cnt & 1) != 0)
40002528: 80 a4 20 00 cmp %l0, 0
4000252c: 02 80 00 2a be 400025d4 <crypt_sha512_r+0x38c>
40002530: 94 10 00 1c mov %i4, %o2
SHA512_Update(&ctx, alt_result, 64);
40002534: 94 10 20 40 mov 0x40, %o2
40002538: 92 07 bd e0 add %fp, -544, %o1
4000253c: 40 00 38 b4 call 4001080c <SHA512_Update>
40002540: 90 07 be 60 add %fp, -416, %o0
else
SHA512_Update(&ctx, p_bytes, key_len);
/* Create intermediate result. */
SHA512_Final(alt_result, &ctx);
40002544: 92 07 be 60 add %fp, -416, %o1
40002548: 40 00 38 ee call 40010900 <SHA512_Final>
4000254c: 90 07 bd e0 add %fp, -544, %o0
for (cnt = 0; cnt < rounds; ++cnt) {
40002550: ba 07 60 01 inc %i5
40002554: 80 a4 80 1d cmp %l2, %i5
40002558: 22 80 00 2a be,a 40002600 <crypt_sha512_r+0x3b8>
4000255c: fa 07 bd dc ld [ %fp + -548 ], %i5
SHA512_Init(&ctx);
40002560: 40 00 38 7e call 40010758 <SHA512_Init>
40002564: 90 07 be 60 add %fp, -416, %o0
if ((cnt & 1) != 0)
40002568: a0 8f 60 01 andcc %i5, 1, %l0
4000256c: 12 bf ff e4 bne 400024fc <crypt_sha512_r+0x2b4>
40002570: 94 10 00 1c mov %i4, %o2
SHA512_Update(&ctx, alt_result, 64);
40002574: 94 10 20 40 mov 0x40, %o2
40002578: 92 07 bd e0 add %fp, -544, %o1
4000257c: 40 00 38 a4 call 4001080c <SHA512_Update>
40002580: 90 07 be 60 add %fp, -416, %o0
40002584: 82 5f 40 16 smul %i5, %l6, %g1
if (cnt % 3 != 0)
40002588: 80 a0 40 15 cmp %g1, %l5
4000258c: 08 bf ff e4 bleu 4000251c <crypt_sha512_r+0x2d4>
40002590: 82 5f 40 14 smul %i5, %l4, %g1
SHA512_Update(&ctx, s_bytes, salt_len);
40002594: 94 10 00 1b mov %i3, %o2
40002598: 92 10 00 17 mov %l7, %o1
4000259c: 40 00 38 9c call 4001080c <SHA512_Update>
400025a0: 90 07 be 60 add %fp, -416, %o0
400025a4: 82 5f 40 14 smul %i5, %l4, %g1
if (cnt % 7 != 0)
400025a8: 80 a0 40 13 cmp %g1, %l3
400025ac: 08 bf ff e0 bleu 4000252c <crypt_sha512_r+0x2e4>
400025b0: 80 a4 20 00 cmp %l0, 0
SHA512_Update(&ctx, p_bytes, key_len);
400025b4: 94 10 00 1c mov %i4, %o2
400025b8: 92 10 00 11 mov %l1, %o1
400025bc: 40 00 38 94 call 4001080c <SHA512_Update>
400025c0: 90 07 be 60 add %fp, -416, %o0
if ((cnt & 1) != 0)
400025c4: 80 a4 20 00 cmp %l0, 0
400025c8: 12 bf ff dc bne 40002538 <crypt_sha512_r+0x2f0>
400025cc: 94 10 20 40 mov 0x40, %o2
SHA512_Update(&ctx, p_bytes, key_len);
400025d0: 94 10 00 1c mov %i4, %o2
400025d4: 92 10 00 11 mov %l1, %o1
400025d8: 40 00 38 8d call 4001080c <SHA512_Update>
400025dc: 90 07 be 60 add %fp, -416, %o0
SHA512_Final(alt_result, &ctx);
400025e0: 92 07 be 60 add %fp, -416, %o1
400025e4: 40 00 38 c7 call 40010900 <SHA512_Final>
400025e8: 90 07 bd e0 add %fp, -544, %o0
for (cnt = 0; cnt < rounds; ++cnt) {
400025ec: ba 07 60 01 inc %i5
400025f0: 80 a4 80 1d cmp %l2, %i5
400025f4: 12 bf ff db bne 40002560 <crypt_sha512_r+0x318>
400025f8: 01 00 00 00 nop
}
/* Now we can construct the result string. It consists of three
* parts. */
cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen));
400025fc: fa 07 bd dc ld [ %fp + -548 ], %i5
40002600: 94 38 00 1d xnor %g0, %i5, %o2
40002604: 13 10 00 86 sethi %hi(0x40021800), %o1
40002608: 95 3a a0 1f sra %o2, 0x1f, %o2
4000260c: 92 12 63 b8 or %o1, 0x3b8, %o1
40002610: 94 0f 40 0a and %i5, %o2, %o2
40002614: 90 10 00 1a mov %i2, %o0
40002618: 40 00 60 48 call 4001a738 <stpncpy>
4000261c: ba 07 7f fd add %i5, -3, %i5
buflen -= sizeof(sha512_salt_prefix) - 1;
40002620: fa 27 bd dc st %i5, [ %fp + -548 ]
if (rounds_custom) {
n = snprintf(cp, MAX(0, buflen), "%s%zu$",
40002624: 92 38 00 1d xnor %g0, %i5, %o1
cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen));
40002628: d0 27 bd d4 st %o0, [ %fp + -556 ]
n = snprintf(cp, MAX(0, buflen), "%s%zu$",
4000262c: 93 3a 60 1f sra %o1, 0x1f, %o1
if (rounds_custom) {
40002630: c4 0f bd cf ldub [ %fp + -561 ], %g2
cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen));
40002634: 82 10 00 08 mov %o0, %g1
if (rounds_custom) {
40002638: 80 88 a0 ff btst 0xff, %g2
4000263c: 12 80 00 e0 bne 400029bc <crypt_sha512_r+0x774>
40002640: 92 0f 40 09 and %i5, %o1, %o1
cp += n;
buflen -= n;
}
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
40002644: 80 a6 c0 09 cmp %i3, %o1
40002648: 08 80 00 03 bleu 40002654 <crypt_sha512_r+0x40c> <== ALWAYS TAKEN
4000264c: 94 10 00 1b mov %i3, %o2
40002650: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
40002654: 90 10 00 01 mov %g1, %o0
40002658: 40 00 60 38 call 4001a738 <stpncpy>
4000265c: 92 10 00 19 mov %i1, %o1
40002660: d0 27 bd d4 st %o0, [ %fp + -556 ]
buflen -= MIN((size_t)MAX(0, buflen), salt_len);
40002664: c4 07 bd dc ld [ %fp + -548 ], %g2
40002668: 82 38 00 02 xnor %g0, %g2, %g1
4000266c: 83 38 60 1f sra %g1, 0x1f, %g1
40002670: 82 08 80 01 and %g2, %g1, %g1
40002674: 80 a0 40 1b cmp %g1, %i3
40002678: 38 80 00 02 bgu,a 40002680 <crypt_sha512_r+0x438> <== ALWAYS TAKEN
4000267c: 82 10 00 1b mov %i3, %g1
40002680: 82 20 80 01 sub %g2, %g1, %g1
if (buflen > 0) {
40002684: 80 a0 60 00 cmp %g1, 0
40002688: 04 80 00 09 ble 400026ac <crypt_sha512_r+0x464> <== NEVER TAKEN
4000268c: c2 27 bd dc st %g1, [ %fp + -548 ]
*cp++ = '$';
40002690: 82 02 20 01 add %o0, 1, %g1
40002694: c2 27 bd d4 st %g1, [ %fp + -556 ]
40002698: 82 10 20 24 mov 0x24, %g1
4000269c: c2 2a 00 00 stb %g1, [ %o0 ]
--buflen;
400026a0: c2 07 bd dc ld [ %fp + -548 ], %g1
400026a4: 82 00 7f ff add %g1, -1, %g1
400026a8: c2 27 bd dc st %g1, [ %fp + -548 ]
}
b64_from_24bit(alt_result[0], alt_result[21], alt_result[42], 4, &buflen, &cp);
400026ac: 96 10 20 04 mov 4, %o3
400026b0: d4 0f be 0a ldub [ %fp + -502 ], %o2
400026b4: d2 0f bd f5 ldub [ %fp + -523 ], %o1
400026b8: d0 0f bd e0 ldub [ %fp + -544 ], %o0
400026bc: 9a 07 bd d4 add %fp, -556, %o5
400026c0: 40 00 01 04 call 40002ad0 <_crypt_b64_from_24bit>
400026c4: 98 07 bd dc add %fp, -548, %o4
b64_from_24bit(alt_result[22], alt_result[43], alt_result[1], 4, &buflen, &cp);
400026c8: d4 0f bd e1 ldub [ %fp + -543 ], %o2
400026cc: d2 0f be 0b ldub [ %fp + -501 ], %o1
400026d0: d0 0f bd f6 ldub [ %fp + -522 ], %o0
400026d4: 9a 07 bd d4 add %fp, -556, %o5
400026d8: 98 07 bd dc add %fp, -548, %o4
400026dc: 40 00 00 fd call 40002ad0 <_crypt_b64_from_24bit>
400026e0: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[44], alt_result[2], alt_result[23], 4, &buflen, &cp);
400026e4: d4 0f bd f7 ldub [ %fp + -521 ], %o2
400026e8: d2 0f bd e2 ldub [ %fp + -542 ], %o1
400026ec: d0 0f be 0c ldub [ %fp + -500 ], %o0
400026f0: 9a 07 bd d4 add %fp, -556, %o5
400026f4: 98 07 bd dc add %fp, -548, %o4
400026f8: 40 00 00 f6 call 40002ad0 <_crypt_b64_from_24bit>
400026fc: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[3], alt_result[24], alt_result[45], 4, &buflen, &cp);
40002700: d4 0f be 0d ldub [ %fp + -499 ], %o2
40002704: d2 0f bd f8 ldub [ %fp + -520 ], %o1
40002708: d0 0f bd e3 ldub [ %fp + -541 ], %o0
4000270c: 9a 07 bd d4 add %fp, -556, %o5
40002710: 98 07 bd dc add %fp, -548, %o4
40002714: 40 00 00 ef call 40002ad0 <_crypt_b64_from_24bit>
40002718: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[25], alt_result[46], alt_result[4], 4, &buflen, &cp);
4000271c: d4 0f bd e4 ldub [ %fp + -540 ], %o2
40002720: d2 0f be 0e ldub [ %fp + -498 ], %o1
40002724: d0 0f bd f9 ldub [ %fp + -519 ], %o0
40002728: 9a 07 bd d4 add %fp, -556, %o5
4000272c: 98 07 bd dc add %fp, -548, %o4
40002730: 40 00 00 e8 call 40002ad0 <_crypt_b64_from_24bit>
40002734: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[47], alt_result[5], alt_result[26], 4, &buflen, &cp);
40002738: d4 0f bd fa ldub [ %fp + -518 ], %o2
4000273c: d2 0f bd e5 ldub [ %fp + -539 ], %o1
40002740: d0 0f be 0f ldub [ %fp + -497 ], %o0
40002744: 9a 07 bd d4 add %fp, -556, %o5
40002748: 98 07 bd dc add %fp, -548, %o4
4000274c: 40 00 00 e1 call 40002ad0 <_crypt_b64_from_24bit>
40002750: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[6], alt_result[27], alt_result[48], 4, &buflen, &cp);
40002754: d4 0f be 10 ldub [ %fp + -496 ], %o2
40002758: d2 0f bd fb ldub [ %fp + -517 ], %o1
4000275c: d0 0f bd e6 ldub [ %fp + -538 ], %o0
40002760: 9a 07 bd d4 add %fp, -556, %o5
40002764: 98 07 bd dc add %fp, -548, %o4
40002768: 40 00 00 da call 40002ad0 <_crypt_b64_from_24bit>
4000276c: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[28], alt_result[49], alt_result[7], 4, &buflen, &cp);
40002770: d4 0f bd e7 ldub [ %fp + -537 ], %o2
40002774: d2 0f be 11 ldub [ %fp + -495 ], %o1
40002778: d0 0f bd fc ldub [ %fp + -516 ], %o0
4000277c: 9a 07 bd d4 add %fp, -556, %o5
40002780: 98 07 bd dc add %fp, -548, %o4
40002784: 40 00 00 d3 call 40002ad0 <_crypt_b64_from_24bit>
40002788: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[50], alt_result[8], alt_result[29], 4, &buflen, &cp);
4000278c: d4 0f bd fd ldub [ %fp + -515 ], %o2
40002790: d2 0f bd e8 ldub [ %fp + -536 ], %o1
40002794: d0 0f be 12 ldub [ %fp + -494 ], %o0
40002798: 9a 07 bd d4 add %fp, -556, %o5
4000279c: 98 07 bd dc add %fp, -548, %o4
400027a0: 40 00 00 cc call 40002ad0 <_crypt_b64_from_24bit>
400027a4: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[9], alt_result[30], alt_result[51], 4, &buflen, &cp);
400027a8: d4 0f be 13 ldub [ %fp + -493 ], %o2
400027ac: d2 0f bd fe ldub [ %fp + -514 ], %o1
400027b0: d0 0f bd e9 ldub [ %fp + -535 ], %o0
400027b4: 9a 07 bd d4 add %fp, -556, %o5
400027b8: 98 07 bd dc add %fp, -548, %o4
400027bc: 40 00 00 c5 call 40002ad0 <_crypt_b64_from_24bit>
400027c0: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[31], alt_result[52], alt_result[10], 4, &buflen, &cp);
400027c4: d4 0f bd ea ldub [ %fp + -534 ], %o2
400027c8: d2 0f be 14 ldub [ %fp + -492 ], %o1
400027cc: d0 0f bd ff ldub [ %fp + -513 ], %o0
400027d0: 9a 07 bd d4 add %fp, -556, %o5
400027d4: 98 07 bd dc add %fp, -548, %o4
400027d8: 40 00 00 be call 40002ad0 <_crypt_b64_from_24bit>
400027dc: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[53], alt_result[11], alt_result[32], 4, &buflen, &cp);
400027e0: d4 0f be 00 ldub [ %fp + -512 ], %o2
400027e4: d2 0f bd eb ldub [ %fp + -533 ], %o1
400027e8: d0 0f be 15 ldub [ %fp + -491 ], %o0
400027ec: 9a 07 bd d4 add %fp, -556, %o5
400027f0: 98 07 bd dc add %fp, -548, %o4
400027f4: 40 00 00 b7 call 40002ad0 <_crypt_b64_from_24bit>
400027f8: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[12], alt_result[33], alt_result[54], 4, &buflen, &cp);
400027fc: d4 0f be 16 ldub [ %fp + -490 ], %o2
40002800: d2 0f be 01 ldub [ %fp + -511 ], %o1
40002804: d0 0f bd ec ldub [ %fp + -532 ], %o0
40002808: 9a 07 bd d4 add %fp, -556, %o5
4000280c: 98 07 bd dc add %fp, -548, %o4
40002810: 40 00 00 b0 call 40002ad0 <_crypt_b64_from_24bit>
40002814: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[34], alt_result[55], alt_result[13], 4, &buflen, &cp);
40002818: d4 0f bd ed ldub [ %fp + -531 ], %o2
4000281c: d2 0f be 17 ldub [ %fp + -489 ], %o1
40002820: d0 0f be 02 ldub [ %fp + -510 ], %o0
40002824: 9a 07 bd d4 add %fp, -556, %o5
40002828: 98 07 bd dc add %fp, -548, %o4
4000282c: 40 00 00 a9 call 40002ad0 <_crypt_b64_from_24bit>
40002830: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[56], alt_result[14], alt_result[35], 4, &buflen, &cp);
40002834: d4 0f be 03 ldub [ %fp + -509 ], %o2
40002838: d2 0f bd ee ldub [ %fp + -530 ], %o1
4000283c: d0 0f be 18 ldub [ %fp + -488 ], %o0
40002840: 9a 07 bd d4 add %fp, -556, %o5
40002844: 98 07 bd dc add %fp, -548, %o4
40002848: 40 00 00 a2 call 40002ad0 <_crypt_b64_from_24bit>
4000284c: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[15], alt_result[36], alt_result[57], 4, &buflen, &cp);
40002850: d4 0f be 19 ldub [ %fp + -487 ], %o2
40002854: d2 0f be 04 ldub [ %fp + -508 ], %o1
40002858: d0 0f bd ef ldub [ %fp + -529 ], %o0
4000285c: 9a 07 bd d4 add %fp, -556, %o5
40002860: 98 07 bd dc add %fp, -548, %o4
40002864: 40 00 00 9b call 40002ad0 <_crypt_b64_from_24bit>
40002868: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[37], alt_result[58], alt_result[16], 4, &buflen, &cp);
4000286c: d4 0f bd f0 ldub [ %fp + -528 ], %o2
40002870: d2 0f be 1a ldub [ %fp + -486 ], %o1
40002874: d0 0f be 05 ldub [ %fp + -507 ], %o0
40002878: 9a 07 bd d4 add %fp, -556, %o5
4000287c: 98 07 bd dc add %fp, -548, %o4
40002880: 40 00 00 94 call 40002ad0 <_crypt_b64_from_24bit>
40002884: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[59], alt_result[17], alt_result[38], 4, &buflen, &cp);
40002888: d4 0f be 06 ldub [ %fp + -506 ], %o2
4000288c: d2 0f bd f1 ldub [ %fp + -527 ], %o1
40002890: d0 0f be 1b ldub [ %fp + -485 ], %o0
40002894: 9a 07 bd d4 add %fp, -556, %o5
40002898: 98 07 bd dc add %fp, -548, %o4
4000289c: 40 00 00 8d call 40002ad0 <_crypt_b64_from_24bit>
400028a0: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[18], alt_result[39], alt_result[60], 4, &buflen, &cp);
400028a4: d4 0f be 1c ldub [ %fp + -484 ], %o2
400028a8: d2 0f be 07 ldub [ %fp + -505 ], %o1
400028ac: d0 0f bd f2 ldub [ %fp + -526 ], %o0
400028b0: 9a 07 bd d4 add %fp, -556, %o5
400028b4: 98 07 bd dc add %fp, -548, %o4
400028b8: 40 00 00 86 call 40002ad0 <_crypt_b64_from_24bit>
400028bc: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[40], alt_result[61], alt_result[19], 4, &buflen, &cp);
400028c0: d4 0f bd f3 ldub [ %fp + -525 ], %o2
400028c4: d2 0f be 1d ldub [ %fp + -483 ], %o1
400028c8: d0 0f be 08 ldub [ %fp + -504 ], %o0
400028cc: 9a 07 bd d4 add %fp, -556, %o5
400028d0: 98 07 bd dc add %fp, -548, %o4
400028d4: 40 00 00 7f call 40002ad0 <_crypt_b64_from_24bit>
400028d8: 96 10 20 04 mov 4, %o3
b64_from_24bit(alt_result[62], alt_result[20], alt_result[41], 4, &buflen, &cp);
400028dc: d4 0f be 09 ldub [ %fp + -503 ], %o2
400028e0: d2 0f bd f4 ldub [ %fp + -524 ], %o1
400028e4: d0 0f be 1e ldub [ %fp + -482 ], %o0
400028e8: 9a 07 bd d4 add %fp, -556, %o5
400028ec: 98 07 bd dc add %fp, -548, %o4
400028f0: 40 00 00 78 call 40002ad0 <_crypt_b64_from_24bit>
400028f4: 96 10 20 04 mov 4, %o3
b64_from_24bit(0, 0, alt_result[63], 2, &buflen, &cp);
400028f8: d4 0f be 1f ldub [ %fp + -481 ], %o2
400028fc: 9a 07 bd d4 add %fp, -556, %o5
40002900: 98 07 bd dc add %fp, -548, %o4
40002904: 96 10 20 02 mov 2, %o3
40002908: 92 10 20 00 clr %o1
4000290c: 40 00 00 71 call 40002ad0 <_crypt_b64_from_24bit>
40002910: 90 10 20 00 clr %o0
if (buflen <= 0) {
40002914: c2 07 bd dc ld [ %fp + -548 ], %g1
40002918: 80 a0 60 00 cmp %g1, 0
4000291c: 04 80 00 38 ble 400029fc <crypt_sha512_r+0x7b4> <== NEVER TAKEN
40002920: c2 07 bd d4 ld [ %fp + -556 ], %g1
errno = ERANGE;
buffer = NULL;
}
else
*cp = '\0'; /* Terminate the string. */
40002924: c0 28 40 00 clrb [ %g1 ]
/* Clear the buffer for the intermediate result so that people
* attaching to processes or reading core dumps cannot get any
* information. We do it in this way to clear correct_words[] inside
* the SHA512 implementation as well. */
SHA512_Init(&ctx);
40002928: 40 00 37 8c call 40010758 <SHA512_Init>
4000292c: 90 07 be 60 add %fp, -416, %o0
SHA512_Final(alt_result, &ctx);
40002930: 92 07 be 60 add %fp, -416, %o1
40002934: 40 00 37 f3 call 40010900 <SHA512_Final>
40002938: 90 07 bd e0 add %fp, -544, %o0
memset(copied_key, '\0', key_len);
if (copied_salt != NULL)
memset(copied_salt, '\0', salt_len);
return buffer;
}
4000293c: 81 c7 e0 08 ret
40002940: 81 e8 00 00 restore
if (strncmp(sha512_salt_prefix, salt, sizeof(sha512_salt_prefix) - 1) == 0)
40002944: 80 a0 40 02 cmp %g1, %g2
40002948: 12 bf fe 4d bne 4000227c <crypt_sha512_r+0x34> <== NEVER TAKEN
4000294c: 03 10 00 86 sethi %hi(0x40021800), %g1
salt += sizeof(sha512_salt_prefix) - 1;
40002950: b2 06 60 03 add %i1, 3, %i1
if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1)
40002954: 94 10 20 07 mov 7, %o2
40002958: 90 10 00 19 mov %i1, %o0
4000295c: 40 00 60 7c call 4001ab4c <strncmp>
40002960: 92 10 63 b0 or %g1, 0x3b0, %o1
40002964: 80 a2 20 00 cmp %o0, 0
40002968: 32 bf fe 4e bne,a 400022a0 <crypt_sha512_r+0x58>
4000296c: c0 2f bd cf clrb [ %fp + -561 ]
srounds = strtoul(num, &endp, 10);
40002970: 94 10 20 0a mov 0xa, %o2
40002974: 92 07 bd d8 add %fp, -552, %o1
40002978: 40 00 63 14 call 4001b5c8 <strtoul>
4000297c: 90 06 60 07 add %i1, 7, %o0
if (*endp == '$') {
40002980: c2 07 bd d8 ld [ %fp + -552 ], %g1
40002984: c4 48 40 00 ldsb [ %g1 ], %g2
40002988: 80 a0 a0 24 cmp %g2, 0x24
4000298c: 32 bf fe 45 bne,a 400022a0 <crypt_sha512_r+0x58> <== NEVER TAKEN
40002990: c0 2f bd cf clrb [ %fp + -561 ] <== NOT EXECUTED
salt = endp + 1;
40002994: b2 00 60 01 add %g1, 1, %i1
rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX));
40002998: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1
4000299c: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff <RAM_SIZE+0x3b5ac9ff>
400029a0: 80 a2 00 01 cmp %o0, %g1
400029a4: 08 80 00 21 bleu 40002a28 <crypt_sha512_r+0x7e0> <== ALWAYS TAKEN
400029a8: a4 10 00 08 mov %o0, %l2
400029ac: a4 10 00 01 mov %g1, %l2 <== NOT EXECUTED
rounds_custom = true;
400029b0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
400029b4: 10 bf fe 3d b 400022a8 <crypt_sha512_r+0x60>
400029b8: c2 2f bd cf stb %g1, [ %fp + -561 ]
n = snprintf(cp, MAX(0, buflen), "%s%zu$",
400029bc: 03 10 00 86 sethi %hi(0x40021800), %g1
400029c0: 98 10 00 12 mov %l2, %o4
400029c4: 96 10 63 b0 or %g1, 0x3b0, %o3
400029c8: 15 10 00 86 sethi %hi(0x40021800), %o2
400029cc: 40 00 5f 27 call 4001a668 <snprintf>
400029d0: 94 12 a3 88 or %o2, 0x388, %o2 ! 40021b88 <magic.0+0x18>
cp += n;
400029d4: c2 07 bd d4 ld [ %fp + -556 ], %g1
buflen -= n;
400029d8: fa 07 bd dc ld [ %fp + -548 ], %i5
400029dc: ba 27 40 08 sub %i5, %o0, %i5
cp += n;
400029e0: 82 00 40 08 add %g1, %o0, %g1
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
400029e4: 92 38 00 1d xnor %g0, %i5, %o1
buflen -= n;
400029e8: fa 27 bd dc st %i5, [ %fp + -548 ]
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
400029ec: 93 3a 60 1f sra %o1, 0x1f, %o1
cp += n;
400029f0: c2 27 bd d4 st %g1, [ %fp + -556 ]
cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len));
400029f4: 10 bf ff 14 b 40002644 <crypt_sha512_r+0x3fc>
400029f8: 92 0f 40 09 and %i5, %o1, %o1
errno = ERANGE;
400029fc: 40 00 5e 14 call 4001a24c <__errno> <== NOT EXECUTED
40002a00: b0 10 20 00 clr %i0 <== NOT EXECUTED
40002a04: 82 10 20 22 mov 0x22, %g1 <== NOT EXECUTED
40002a08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
SHA512_Init(&ctx);
40002a0c: 40 00 37 53 call 40010758 <SHA512_Init> <== NOT EXECUTED
40002a10: 90 07 be 60 add %fp, -416, %o0 <== NOT EXECUTED
SHA512_Final(alt_result, &ctx);
40002a14: 92 07 be 60 add %fp, -416, %o1 <== NOT EXECUTED
40002a18: 40 00 37 ba call 40010900 <SHA512_Final> <== NOT EXECUTED
40002a1c: 90 07 bd e0 add %fp, -544, %o0 <== NOT EXECUTED
}
40002a20: 81 c7 e0 08 ret <== NOT EXECUTED
40002a24: 81 e8 00 00 restore <== NOT EXECUTED
40002a28: 80 a2 23 e8 cmp %o0, 0x3e8
rounds_custom = true;
40002a2c: 1a bf ff e2 bcc 400029b4 <crypt_sha512_r+0x76c>
40002a30: 82 10 20 01 mov 1, %g1
40002a34: a4 10 23 e8 mov 0x3e8, %l2
40002a38: 10 bf fe 1c b 400022a8 <crypt_sha512_r+0x60>
40002a3c: c2 2f bd cf stb %g1, [ %fp + -561 ]
SHA512_Update(&ctx, alt_result, cnt);
40002a40: 94 10 00 1c mov %i4, %o2
40002a44: 92 07 bd e0 add %fp, -544, %o1
40002a48: 40 00 37 71 call 4001080c <SHA512_Update>
40002a4c: 90 07 be 60 add %fp, -416, %o0
for (cnt = key_len; cnt > 0; cnt >>= 1)
40002a50: 80 a7 20 00 cmp %i4, 0
40002a54: 12 bf fe 4d bne 40002388 <crypt_sha512_r+0x140> <== ALWAYS TAKEN
40002a58: 92 07 be 60 add %fp, -416, %o1
SHA512_Final(alt_result, &ctx);
40002a5c: 40 00 37 a9 call 40010900 <SHA512_Final> <== NOT EXECUTED
40002a60: 90 07 bd e0 add %fp, -544, %o0 <== NOT EXECUTED
SHA512_Init(&alt_ctx);
40002a64: 40 00 37 3d call 40010758 <SHA512_Init> <== NOT EXECUTED
40002a68: 90 07 bf 30 add %fp, -208, %o0 <== NOT EXECUTED
SHA512_Final(temp_result, &alt_ctx);
40002a6c: ba 07 be 20 add %fp, -480, %i5 <== NOT EXECUTED
40002a70: 92 07 bf 30 add %fp, -208, %o1 <== NOT EXECUTED
40002a74: 40 00 37 a3 call 40010900 <SHA512_Final> <== NOT EXECUTED
40002a78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
cp = p_bytes = alloca(key_len);
40002a7c: a2 03 a0 5c add %sp, 0x5c, %l1 <== NOT EXECUTED
40002a80: 94 10 20 00 clr %o2 <== NOT EXECUTED
40002a84: e2 27 bd d4 st %l1, [ %fp + -556 ] <== NOT EXECUTED
40002a88: 10 bf fe 78 b 40002468 <crypt_sha512_r+0x220> <== NOT EXECUTED
40002a8c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
for (cnt = key_len; cnt >= 64; cnt -= 64) {
40002a90: 10 bf fe 76 b 40002468 <crypt_sha512_r+0x220>
40002a94: 94 10 00 1c mov %i4, %o2