// File: attractivechaos[P]udb2/stb/./stb.h
// Function: stb__sha1
static void stb__sha1(stb_uchar *chunk, stb_uint h[5])
{
   int i;
   stb_uint a,b,c,d,e;
   stb_uint w[80];

   for (i=0; i < 16; ++i)
      w[i] = stb_big32(&chunk[i*4]);
   for (i=16; i < 80; ++i) {
      stb_uint t;
      t = w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16];
      w[i] = (t + t) | (t >> 31);
   }

   a = h[0];
   b = h[1];
   c = h[2];
   d = h[3];
   e = h[4];

   #define STB__SHA1(k,f)                                            \
   {                                                                 \
      stb_uint temp = (a << 5) + (a >> 27) + (f) + e + (k) + w[i];  \
      e = d;                                                       \
      d = c;                                                     \
      c = (b << 30) + (b >> 2);                               \
      b = a;                                              \
      a = temp;                                    \
   }

   i=0;
   for (; i < 20; ++i) STB__SHA1(0x5a827999, d ^ (b & (c ^ d))       );
   for (; i < 40; ++i) STB__SHA1(0x6ed9eba1, b ^ c ^ d               );
   for (; i < 60; ++i) STB__SHA1(0x8f1bbcdc, (b & c) + (d & (b ^ c)) );
   for (; i < 80; ++i) STB__SHA1(0xca62c1d6, b ^ c ^ d               );

   #undef STB__SHA1

   h[0] += a;
   h[1] += b;
   h[2] += c;
   h[3] += d;
   h[4] += e;
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movl $0x0, 0xf4(%rsp)
cmpl $0x10, 0xf4(%rsp)
jge 0x110b8
movq 0x100(%rsp), %rax
movl 0xf4(%rsp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %ecx
shll $0x18, %ecx
movq 0x100(%rsp), %rax
movl 0xf4(%rsp), %edx
shll $0x2, %edx
movslq %edx, %rdx
movzbl 0x1(%rax,%rdx), %eax
shll $0x10, %eax
addl %eax, %ecx
movq 0x100(%rsp), %rax
movl 0xf4(%rsp), %edx
shll $0x2, %edx
movslq %edx, %rdx
movzbl 0x2(%rax,%rdx), %eax
shll $0x8, %eax
addl %eax, %ecx
movq 0x100(%rsp), %rax
movl 0xf4(%rsp), %edx
shll $0x2, %edx
movslq %edx, %rdx
movzbl 0x3(%rax,%rdx), %eax
addl %eax, %ecx
movslq 0xf4(%rsp), %rax
movl %ecx, -0x60(%rsp,%rax,4)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x11012
movl $0x10, 0xf4(%rsp)
cmpl $0x50, 0xf4(%rsp)
jge 0x11147
movl 0xf4(%rsp), %eax
subl $0x3, %eax
cltq
movl -0x60(%rsp,%rax,4), %eax
movl 0xf4(%rsp), %ecx
subl $0x8, %ecx
movslq %ecx, %rcx
xorl -0x60(%rsp,%rcx,4), %eax
movl 0xf4(%rsp), %ecx
subl $0xe, %ecx
movslq %ecx, %rcx
xorl -0x60(%rsp,%rcx,4), %eax
movl 0xf4(%rsp), %ecx
subl $0x10, %ecx
movslq %ecx, %rcx
xorl -0x60(%rsp,%rcx,4), %eax
movl %eax, -0x64(%rsp)
movl -0x64(%rsp), %ecx
addl -0x64(%rsp), %ecx
movl -0x64(%rsp), %eax
shrl $0x1f, %eax
orl %eax, %ecx
movslq 0xf4(%rsp), %rax
movl %ecx, -0x60(%rsp,%rax,4)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x110c3
movq 0xf8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xf0(%rsp)
movq 0xf8(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0xec(%rsp)
movq 0xf8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0xe8(%rsp)
movq 0xf8(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0xe4(%rsp)
movq 0xf8(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0xe0(%rsp)
movl $0x0, 0xf4(%rsp)
cmpl $0x14, 0xf4(%rsp)
jge 0x11275
movl 0xf0(%rsp), %eax
shll $0x5, %eax
movl 0xf0(%rsp), %ecx
shrl $0x1b, %ecx
addl %ecx, %eax
movl 0xe4(%rsp), %ecx
movl 0xec(%rsp), %edx
movl 0xe8(%rsp), %esi
xorl 0xe4(%rsp), %esi
andl %esi, %edx
xorl %edx, %ecx
addl %ecx, %eax
addl 0xe0(%rsp), %eax
addl $0x5a827999, %eax       # imm = 0x5A827999
movslq 0xf4(%rsp), %rcx
addl -0x60(%rsp,%rcx,4), %eax
movl %eax, -0x68(%rsp)
movl 0xe4(%rsp), %eax
movl %eax, 0xe0(%rsp)
movl 0xe8(%rsp), %eax
movl %eax, 0xe4(%rsp)
movl 0xec(%rsp), %eax
shll $0x1e, %eax
movl 0xec(%rsp), %ecx
shrl $0x2, %ecx
addl %ecx, %eax
movl %eax, 0xe8(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, 0xec(%rsp)
movl -0x68(%rsp), %eax
movl %eax, 0xf0(%rsp)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x111ab
jmp 0x11277
cmpl $0x28, 0xf4(%rsp)
jge 0x11336
movl 0xf0(%rsp), %eax
shll $0x5, %eax
movl 0xf0(%rsp), %ecx
shrl $0x1b, %ecx
addl %ecx, %eax
movl 0xec(%rsp), %ecx
xorl 0xe8(%rsp), %ecx
xorl 0xe4(%rsp), %ecx
addl %ecx, %eax
addl 0xe0(%rsp), %eax
addl $0x6ed9eba1, %eax       # imm = 0x6ED9EBA1
movslq 0xf4(%rsp), %rcx
addl -0x60(%rsp,%rcx,4), %eax
movl %eax, -0x6c(%rsp)
movl 0xe4(%rsp), %eax
movl %eax, 0xe0(%rsp)
movl 0xe8(%rsp), %eax
movl %eax, 0xe4(%rsp)
movl 0xec(%rsp), %eax
shll $0x1e, %eax
movl 0xec(%rsp), %ecx
shrl $0x2, %ecx
addl %ecx, %eax
movl %eax, 0xe8(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, 0xec(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0xf0(%rsp)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x11277
jmp 0x11338
cmpl $0x3c, 0xf4(%rsp)
jge 0x11409
movl 0xf0(%rsp), %eax
shll $0x5, %eax
movl 0xf0(%rsp), %ecx
shrl $0x1b, %ecx
addl %ecx, %eax
movl 0xec(%rsp), %ecx
andl 0xe8(%rsp), %ecx
movl 0xe4(%rsp), %edx
movl 0xec(%rsp), %esi
xorl 0xe8(%rsp), %esi
andl %esi, %edx
addl %edx, %ecx
addl %ecx, %eax
addl 0xe0(%rsp), %eax
addl $0x8f1bbcdc, %eax       # imm = 0x8F1BBCDC
movslq 0xf4(%rsp), %rcx
addl -0x60(%rsp,%rcx,4), %eax
movl %eax, -0x70(%rsp)
movl 0xe4(%rsp), %eax
movl %eax, 0xe0(%rsp)
movl 0xe8(%rsp), %eax
movl %eax, 0xe4(%rsp)
movl 0xec(%rsp), %eax
shll $0x1e, %eax
movl 0xec(%rsp), %ecx
shrl $0x2, %ecx
addl %ecx, %eax
movl %eax, 0xe8(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, 0xec(%rsp)
movl -0x70(%rsp), %eax
movl %eax, 0xf0(%rsp)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x11338
jmp 0x1140b
cmpl $0x50, 0xf4(%rsp)
jge 0x114ca
movl 0xf0(%rsp), %eax
shll $0x5, %eax
movl 0xf0(%rsp), %ecx
shrl $0x1b, %ecx
addl %ecx, %eax
movl 0xec(%rsp), %ecx
xorl 0xe8(%rsp), %ecx
xorl 0xe4(%rsp), %ecx
addl %ecx, %eax
addl 0xe0(%rsp), %eax
addl $0xca62c1d6, %eax       # imm = 0xCA62C1D6
movslq 0xf4(%rsp), %rcx
addl -0x60(%rsp,%rcx,4), %eax
movl %eax, -0x74(%rsp)
movl 0xe4(%rsp), %eax
movl %eax, 0xe0(%rsp)
movl 0xe8(%rsp), %eax
movl %eax, 0xe4(%rsp)
movl 0xec(%rsp), %eax
shll $0x1e, %eax
movl 0xec(%rsp), %ecx
shrl $0x2, %ecx
addl %ecx, %eax
movl %eax, 0xe8(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, 0xec(%rsp)
movl -0x74(%rsp), %eax
movl %eax, 0xf0(%rsp)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x1140b
movl 0xf0(%rsp), %ecx
movq 0xf8(%rsp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl 0xec(%rsp), %ecx
movq 0xf8(%rsp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl 0xe8(%rsp), %ecx
movq 0xf8(%rsp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl 0xe4(%rsp), %ecx
movq 0xf8(%rsp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl 0xe0(%rsp), %ecx
movq 0xf8(%rsp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
addq $0x108, %rsp            # imm = 0x108
retq
nopl (%rax)