From ad73e79cab85ab553a5b26fa258ec5bdb8a63ab6 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Wed, 14 Mar 2007 19:47:58 +0000
Subject: [PATCH] 160 bytes smaller object file, ask gcc devels why

Originally committed as revision 8407 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavutil/md5.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libavutil/md5.c b/libavutil/md5.c
index cacae65f458..f7170312472 100644
--- a/libavutil/md5.c
+++ b/libavutil/md5.c
@@ -75,11 +75,12 @@ static const uint32_t T[64] = { // T[i]= fabs(sin(i+1)<<32)
         t = S[i>>4][i&3];\
         a += T[i];\
 \
-        switch(i>>4){\
-        case 0: a += (d ^ (b&(c^d))) + X[      i &15 ]; break;\
-        case 1: a += (c ^ (d&(c^b))) + X[ (1+5*i)&15 ]; break;\
-        case 2: a += (b^c^d)         + X[ (5+3*i)&15 ]; break;\
-        case 3: a += (c^(b|~d))      + X[ (  7*i)&15 ]; break;\
+        if(i<32){\
+            if(i<16) a += (d ^ (b&(c^d))) + X[      i &15 ];\
+            else     a += (c ^ (d&(c^b))) + X[ (1+5*i)&15 ];\
+        }else{\
+            if(i<48) a += (b^c^d)         + X[ (5+3*i)&15 ];\
+            else     a += (c^(b|~d))      + X[ (  7*i)&15 ];\
         }\
         a = b + (( a << t ) | ( a >> (32 - t) ));
 
-- 
GitLab