Source/sources/com/google/appinventor/components/runtime/util/NanoHTTPD.java
public com.google.appinventor.components.runtime.util.NanoHTTPD.Response serveFile(java.lang.String r41, java.util.Properties r42, java.io.File r43, boolean r44) {
        /*
            r40 = this;
            r29 = 0
            boolean r35 = r43.isDirectory()
            if (r35 != 0) goto L_0x001d
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "500 Internal Server Error"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "INTERNAL ERRROR: serveFile(): given homeDir is not a directory."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x001d:
            if (r29 != 0) goto L_0x0086
            java.lang.String r35 = r41.trim()
            char r36 = java.io.File.separatorChar
            r37 = 47
            java.lang.String r41 = r35.replace(r36, r37)
            r35 = 63
            r0 = r41
            r1 = r35
            int r35 = r0.indexOf(r1)
            if (r35 < 0) goto L_0x004d
            r35 = 0
            r36 = 63
            r0 = r41
            r1 = r36
            int r36 = r0.indexOf(r1)
            r0 = r41
            r1 = r35
            r2 = r36
            java.lang.String r41 = r0.substring(r1, r2)
        L_0x004d:
            java.lang.String r35 = ".."
            r0 = r41
            r1 = r35
            boolean r35 = r0.startsWith(r1)
            if (r35 != 0) goto L_0x0071
            java.lang.String r35 = ".."
            r0 = r41
            r1 = r35
            boolean r35 = r0.endsWith(r1)
            if (r35 != 0) goto L_0x0071
            java.lang.String r35 = "../"
            r0 = r41
            r1 = r35
            int r35 = r0.indexOf(r1)
            if (r35 < 0) goto L_0x0086
        L_0x0071:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: Won't serve ../ for security reasons."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x0086:
            java.io.File r14 = new java.io.File
            r0 = r43
            r1 = r41
            r14.<init>(r0, r1)
            if (r29 != 0) goto L_0x00ac
            boolean r35 = r14.exists()
            if (r35 != 0) goto L_0x00ac
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "404 Not Found"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "Error 404, file not found."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x00ac:
            if (r29 != 0) goto L_0x0638
            boolean r35 = r14.isDirectory()
            if (r35 == 0) goto L_0x0638
            java.lang.String r35 = "/"
            r0 = r41
            r1 = r35
            boolean r35 = r0.endsWith(r1)
            if (r35 != 0) goto L_0x0120
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r41 = r35.toString()
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "301 Moved Permanently"
            java.lang.String r36 = "text/html"
            java.lang.StringBuilder r37 = new java.lang.StringBuilder
            r37.<init>()
            java.lang.String r38 = "<html><body>Redirected: <a href=\""
            java.lang.StringBuilder r37 = r37.append(r38)
            r0 = r37
            r1 = r41
            java.lang.StringBuilder r37 = r0.append(r1)
            java.lang.String r38 = "\">"
            java.lang.StringBuilder r37 = r37.append(r38)
            r0 = r37
            r1 = r41
            java.lang.StringBuilder r37 = r0.append(r1)
            java.lang.String r38 = "</a></body></html>"
            java.lang.StringBuilder r37 = r37.append(r38)
            java.lang.String r37 = r37.toString()
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            java.lang.String r35 = "Location"
            r0 = r29
            r1 = r35
            r2 = r41
            r0.addHeader(r1, r2)
        L_0x0120:
            if (r29 != 0) goto L_0x0638
            java.io.File r35 = new java.io.File
            java.lang.String r36 = "index.html"
            r0 = r35
            r1 = r36
            r0.<init>(r14, r1)
            boolean r35 = r35.exists()
            if (r35 == 0) goto L_0x0264
            java.io.File r14 = new java.io.File
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/index.html"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r0 = r43
            r1 = r35
            r14.<init>(r0, r1)
            r30 = r29
        L_0x0155:
            if (r30 != 0) goto L_0x0634
            r21 = 0
            java.lang.String r35 = r14.getCanonicalPath()     // Catch:{ IOException -> 0x062c }
            r36 = 46
            int r10 = r35.lastIndexOf(r36)     // Catch:{ IOException -> 0x062c }
            if (r10 < 0) goto L_0x017f
            java.util.Hashtable r35 = theMimeTypes     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r14.getCanonicalPath()     // Catch:{ IOException -> 0x062c }
            int r37 = r10 + 1
            java.lang.String r36 = r36.substring(r37)     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r36.toLowerCase()     // Catch:{ IOException -> 0x062c }
            java.lang.Object r35 = r35.get(r36)     // Catch:{ IOException -> 0x062c }
            r0 = r35
            java.lang.String r0 = (java.lang.String) r0     // Catch:{ IOException -> 0x062c }
            r21 = r0
        L_0x017f:
            if (r21 != 0) goto L_0x0183
            java.lang.String r21 = "application/octet-stream"
        L_0x0183:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x062c }
            r35.<init>()     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r14.getAbsolutePath()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            long r36 = r14.lastModified()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = ""
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            long r36 = r14.length()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = r35.toString()     // Catch:{ IOException -> 0x062c }
            int r35 = r35.hashCode()     // Catch:{ IOException -> 0x062c }
            java.lang.String r11 = java.lang.Integer.toHexString(r35)     // Catch:{ IOException -> 0x062c }
            r32 = 0
            r12 = -1
            java.lang.String r35 = "range"
            r0 = r42
            r1 = r35
            java.lang.String r28 = r0.getProperty(r1)     // Catch:{ IOException -> 0x062c }
            if (r28 == 0) goto L_0x0206
            java.lang.String r35 = "bytes="
            r0 = r28
            r1 = r35
            boolean r35 = r0.startsWith(r1)     // Catch:{ IOException -> 0x062c }
            if (r35 == 0) goto L_0x0206
            java.lang.String r35 = "bytes="
            int r35 = r35.length()     // Catch:{ IOException -> 0x062c }
            r0 = r28
            r1 = r35
            java.lang.String r28 = r0.substring(r1)     // Catch:{ IOException -> 0x062c }
            r35 = 45
            r0 = r28
            r1 = r35
            int r24 = r0.indexOf(r1)     // Catch:{ IOException -> 0x062c }
            if (r24 <= 0) goto L_0x0206
            r35 = 0
            r0 = r28
            r1 = r35
            r2 = r24
            java.lang.String r35 = r0.substring(r1, r2)     // Catch:{ NumberFormatException -> 0x0631 }
            long r32 = java.lang.Long.parseLong(r35)     // Catch:{ NumberFormatException -> 0x0631 }
            int r35 = r24 + 1
            r0 = r28
            r1 = r35
            java.lang.String r35 = r0.substring(r1)     // Catch:{ NumberFormatException -> 0x0631 }
            long r12 = java.lang.Long.parseLong(r35)     // Catch:{ NumberFormatException -> 0x0631 }
        L_0x0206:
            long r16 = r14.length()     // Catch:{ IOException -> 0x062c }
            if (r28 == 0) goto L_0x05c0
            r36 = 0
            int r35 = (r32 > r36 ? 1 : (r32 == r36 ? 0 : -1))
            if (r35 < 0) goto L_0x05c0
            int r35 = (r32 > r16 ? 1 : (r32 == r16 ? 0 : -1))
            if (r35 < 0) goto L_0x0506
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "416 Requested Range Not Satisfiable"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = ""
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Range"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "bytes 0-0/"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
        L_0x0256:
            java.lang.String r35 = "Accept-Ranges"
            java.lang.String r36 = "bytes"
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)
            return r29
        L_0x0264:
            java.io.File r35 = new java.io.File
            java.lang.String r36 = "index.htm"
            r0 = r35
            r1 = r36
            r0.<init>(r14, r1)
            boolean r35 = r35.exists()
            if (r35 == 0) goto L_0x0299
            java.io.File r14 = new java.io.File
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/index.htm"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r0 = r43
            r1 = r35
            r14.<init>(r0, r1)
            r30 = r29
            goto L_0x0155
        L_0x0299:
            if (r44 == 0) goto L_0x04ed
            boolean r35 = r14.canRead()
            if (r35 == 0) goto L_0x04ed
            java.lang.String[] r15 = r14.list()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            java.lang.String r36 = "<html><body><h1>Directory "
            java.lang.StringBuilder r35 = r35.append(r36)
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</h1><br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            int r35 = r41.length()
            r36 = 1
            r0 = r35
            r1 = r36
            if (r0 <= r1) goto L_0x0321
            r35 = 0
            int r36 = r41.length()
            int r36 = r36 + -1
            r0 = r41
            r1 = r35
            r2 = r36
            java.lang.String r34 = r0.substring(r1, r2)
            r35 = 47
            int r31 = r34.lastIndexOf(r35)
            if (r31 < 0) goto L_0x0321
            int r35 = r34.length()
            r0 = r31
            r1 = r35
            if (r0 >= r1) goto L_0x0321
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<b><a href=\""
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 0
            int r37 = r31 + 1
            r0 = r41
            r1 = r36
            r2 = r37
            java.lang.String r36 = r0.substring(r1, r2)
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "\">..</a></b><br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0321:
            if (r15 == 0) goto L_0x04bf
            r19 = 0
        L_0x0325:
            int r0 = r15.length
            r35 = r0
            r0 = r19
            r1 = r35
            if (r0 >= r1) goto L_0x04bf
            java.io.File r6 = new java.io.File
            r35 = r15[r19]
            r0 = r35
            r6.<init>(r14, r0)
            boolean r7 = r6.isDirectory()
            if (r7 == 0) goto L_0x036b
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<b>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r36 = r15[r19]
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "/"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r15[r19] = r35
        L_0x036b:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<a href=\""
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.StringBuilder r36 = new java.lang.StringBuilder
            r36.<init>()
            r0 = r36
            r1 = r41
            java.lang.StringBuilder r36 = r0.append(r1)
            r37 = r15[r19]
            java.lang.StringBuilder r36 = r36.append(r37)
            java.lang.String r36 = r36.toString()
            r0 = r40
            r1 = r36
            java.lang.String r36 = r0.encodeUri(r1)
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "\">"
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = r15[r19]
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "</a>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            boolean r35 = r6.isFile()
            if (r35 == 0) goto L_0x0414
            long r22 = r6.length()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = " &nbsp;<font size=2>("
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            r36 = 1024(0x400, double:5.06E-321)
            int r35 = (r22 > r36 ? 1 : (r22 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0448
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r0 = r35
            r1 = r22
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = " bytes"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x03fd:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = ")</font>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0414:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            if (r7 == 0) goto L_0x0444
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</b>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0444:
            int r19 = r19 + 1
            goto L_0x0325
        L_0x0448:
            r36 = 1048576(0x100000, double:5.180654E-318)
            int r35 = (r22 > r36 ? 1 : (r22 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0486
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r36 = 1024(0x400, double:5.06E-321)
            long r36 = r22 / r36
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "."
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 1024(0x400, double:5.06E-321)
            long r36 = r22 % r36
            r38 = 10
            long r36 = r36 / r38
            r38 = 100
            long r36 = r36 % r38
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = " KB"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            goto L_0x03fd
        L_0x0486:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r36 = 1048576(0x100000, double:5.180654E-318)
            long r36 = r22 / r36
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "."
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 1048576(0x100000, double:5.180654E-318)
            long r36 = r22 % r36
            r38 = 10
            long r36 = r36 / r38
            r38 = 100
            long r36 = r36 % r38
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = " MB"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            goto L_0x03fd
        L_0x04bf:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</body></html>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "200 OK"
            java.lang.String r36 = "text/html"
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r25
            r0.<init>(r2, r3, r4)
            r30 = r29
            goto L_0x0155
        L_0x04ed:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: No directory listing."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            r30 = r29
            goto L_0x0155
        L_0x0506:
            r36 = 0
            int r35 = (r12 > r36 ? 1 : (r12 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0510
            r36 = 1
            long r12 = r16 - r36
        L_0x0510:
            long r36 = r12 - r32
            r38 = 1
            long r26 = r36 + r38
            r36 = 0
            int r35 = (r26 > r36 ? 1 : (r26 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x051e
            r26 = 0
        L_0x051e:
            r8 = r26
            com.google.appinventor.components.runtime.util.NanoHTTPD$2 r18 = new com.google.appinventor.components.runtime.util.NanoHTTPD$2     // Catch:{ IOException -> 0x062c }
            r0 = r18
            r1 = r40
            r0.<init>(r14, r8)     // Catch:{ IOException -> 0x062c }
            r0 = r18
            r1 = r32
            r0.skip(r1)     // Catch:{ IOException -> 0x062c }
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "206 Partial Content"
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r18
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Length"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = ""
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            java.lang.StringBuilder r36 = r0.append(r8)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "Content-Range"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "bytes "
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r32
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "-"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            java.lang.StringBuilder r36 = r0.append(r12)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "/"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
            goto L_0x0256
        L_0x05a8:
            r20 = move-exception
        L_0x05a9:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: Reading file failed."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            goto L_0x0256
        L_0x05c0:
            java.lang.String r35 = "if-none-match"
            r0 = r42
            r1 = r35
            java.lang.String r35 = r0.getProperty(r1)     // Catch:{ IOException -> 0x062c }
            r0 = r35
            boolean r35 = r11.equals(r0)     // Catch:{ IOException -> 0x062c }
            if (r35 == 0) goto L_0x05e7
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "304 Not Modified"
            java.lang.String r36 = ""
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r36
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            goto L_0x0256
        L_0x05e7:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "200 OK"
            java.io.FileInputStream r36 = new java.io.FileInputStream     // Catch:{ IOException -> 0x062c }
            r0 = r36
            r0.<init>(r14)     // Catch:{ IOException -> 0x062c }
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r36
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Length"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = ""
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
            goto L_0x0256
        L_0x062c:
            r20 = move-exception
            r29 = r30
            goto L_0x05a9
        L_0x0631:
            r35 = move-exception
            goto L_0x0206
        L_0x0634:
            r29 = r30
            goto L_0x0256
        L_0x0638:
            r30 = r29
            goto L_0x0155
        */
        throw new UnsupportedOperationException("Method not decompiled: com.google.appinventor.components.runtime.util.NanoHTTPD.serveFile(java.lang.String, java.util.Properties, java.io.File, boolean):com.google.appinventor.components.runtime.util.NanoHTTPD$Response");
    }
/* Code decompiled incorrectly, please refer to instructions dump. */
Code decompiled incorrectly, please refer to instructions dump.
Code decompiled incorrectly please refer to instructions dump .
public com.google.appinventor.components.runtime.util.NanoHTTPD.Response serveFile(java.lang.String r41, java.util.Properties r42, java.io.File r43, boolean r44) {
        /*
            r40 = this;
            r29 = 0
            boolean r35 = r43.isDirectory()
            if (r35 != 0) goto L_0x001d
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "500 Internal Server Error"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "INTERNAL ERRROR: serveFile(): given homeDir is not a directory."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x001d:
            if (r29 != 0) goto L_0x0086
            java.lang.String r35 = r41.trim()
            char r36 = java.io.File.separatorChar
            r37 = 47
            java.lang.String r41 = r35.replace(r36, r37)
            r35 = 63
            r0 = r41
            r1 = r35
            int r35 = r0.indexOf(r1)
            if (r35 < 0) goto L_0x004d
            r35 = 0
            r36 = 63
            r0 = r41
            r1 = r36
            int r36 = r0.indexOf(r1)
            r0 = r41
            r1 = r35
            r2 = r36
            java.lang.String r41 = r0.substring(r1, r2)
        L_0x004d:
            java.lang.String r35 = ".."
            r0 = r41
            r1 = r35
            boolean r35 = r0.startsWith(r1)
            if (r35 != 0) goto L_0x0071
            java.lang.String r35 = ".."
            r0 = r41
            r1 = r35
            boolean r35 = r0.endsWith(r1)
            if (r35 != 0) goto L_0x0071
            java.lang.String r35 = "../"
            r0 = r41
            r1 = r35
            int r35 = r0.indexOf(r1)
            if (r35 < 0) goto L_0x0086
        L_0x0071:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: Won't serve ../ for security reasons."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x0086:
            java.io.File r14 = new java.io.File
            r0 = r43
            r1 = r41
            r14.<init>(r0, r1)
            if (r29 != 0) goto L_0x00ac
            boolean r35 = r14.exists()
            if (r35 != 0) goto L_0x00ac
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "404 Not Found"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "Error 404, file not found."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x00ac:
            if (r29 != 0) goto L_0x0638
            boolean r35 = r14.isDirectory()
            if (r35 == 0) goto L_0x0638
            java.lang.String r35 = "/"
            r0 = r41
            r1 = r35
            boolean r35 = r0.endsWith(r1)
            if (r35 != 0) goto L_0x0120
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r41 = r35.toString()
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "301 Moved Permanently"
            java.lang.String r36 = "text/html"
            java.lang.StringBuilder r37 = new java.lang.StringBuilder
            r37.<init>()
            java.lang.String r38 = "<html><body>Redirected: <a href=\""
            java.lang.StringBuilder r37 = r37.append(r38)
            r0 = r37
            r1 = r41
            java.lang.StringBuilder r37 = r0.append(r1)
            java.lang.String r38 = "\">"
            java.lang.StringBuilder r37 = r37.append(r38)
            r0 = r37
            r1 = r41
            java.lang.StringBuilder r37 = r0.append(r1)
            java.lang.String r38 = "</a></body></html>"
            java.lang.StringBuilder r37 = r37.append(r38)
            java.lang.String r37 = r37.toString()
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            java.lang.String r35 = "Location"
            r0 = r29
            r1 = r35
            r2 = r41
            r0.addHeader(r1, r2)
        L_0x0120:
            if (r29 != 0) goto L_0x0638
            java.io.File r35 = new java.io.File
            java.lang.String r36 = "index.html"
            r0 = r35
            r1 = r36
            r0.<init>(r14, r1)
            boolean r35 = r35.exists()
            if (r35 == 0) goto L_0x0264
            java.io.File r14 = new java.io.File
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/index.html"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r0 = r43
            r1 = r35
            r14.<init>(r0, r1)
            r30 = r29
        L_0x0155:
            if (r30 != 0) goto L_0x0634
            r21 = 0
            java.lang.String r35 = r14.getCanonicalPath()     // Catch:{ IOException -> 0x062c }
            r36 = 46
            int r10 = r35.lastIndexOf(r36)     // Catch:{ IOException -> 0x062c }
            if (r10 < 0) goto L_0x017f
            java.util.Hashtable r35 = theMimeTypes     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r14.getCanonicalPath()     // Catch:{ IOException -> 0x062c }
            int r37 = r10 + 1
            java.lang.String r36 = r36.substring(r37)     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r36.toLowerCase()     // Catch:{ IOException -> 0x062c }
            java.lang.Object r35 = r35.get(r36)     // Catch:{ IOException -> 0x062c }
            r0 = r35
            java.lang.String r0 = (java.lang.String) r0     // Catch:{ IOException -> 0x062c }
            r21 = r0
        L_0x017f:
            if (r21 != 0) goto L_0x0183
            java.lang.String r21 = "application/octet-stream"
        L_0x0183:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x062c }
            r35.<init>()     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r14.getAbsolutePath()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            long r36 = r14.lastModified()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = ""
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            long r36 = r14.length()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = r35.toString()     // Catch:{ IOException -> 0x062c }
            int r35 = r35.hashCode()     // Catch:{ IOException -> 0x062c }
            java.lang.String r11 = java.lang.Integer.toHexString(r35)     // Catch:{ IOException -> 0x062c }
            r32 = 0
            r12 = -1
            java.lang.String r35 = "range"
            r0 = r42
            r1 = r35
            java.lang.String r28 = r0.getProperty(r1)     // Catch:{ IOException -> 0x062c }
            if (r28 == 0) goto L_0x0206
            java.lang.String r35 = "bytes="
            r0 = r28
            r1 = r35
            boolean r35 = r0.startsWith(r1)     // Catch:{ IOException -> 0x062c }
            if (r35 == 0) goto L_0x0206
            java.lang.String r35 = "bytes="
            int r35 = r35.length()     // Catch:{ IOException -> 0x062c }
            r0 = r28
            r1 = r35
            java.lang.String r28 = r0.substring(r1)     // Catch:{ IOException -> 0x062c }
            r35 = 45
            r0 = r28
            r1 = r35
            int r24 = r0.indexOf(r1)     // Catch:{ IOException -> 0x062c }
            if (r24 <= 0) goto L_0x0206
            r35 = 0
            r0 = r28
            r1 = r35
            r2 = r24
            java.lang.String r35 = r0.substring(r1, r2)     // Catch:{ NumberFormatException -> 0x0631 }
            long r32 = java.lang.Long.parseLong(r35)     // Catch:{ NumberFormatException -> 0x0631 }
            int r35 = r24 + 1
            r0 = r28
            r1 = r35
            java.lang.String r35 = r0.substring(r1)     // Catch:{ NumberFormatException -> 0x0631 }
            long r12 = java.lang.Long.parseLong(r35)     // Catch:{ NumberFormatException -> 0x0631 }
        L_0x0206:
            long r16 = r14.length()     // Catch:{ IOException -> 0x062c }
            if (r28 == 0) goto L_0x05c0
            r36 = 0
            int r35 = (r32 > r36 ? 1 : (r32 == r36 ? 0 : -1))
            if (r35 < 0) goto L_0x05c0
            int r35 = (r32 > r16 ? 1 : (r32 == r16 ? 0 : -1))
            if (r35 < 0) goto L_0x0506
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "416 Requested Range Not Satisfiable"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = ""
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Range"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "bytes 0-0/"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
        L_0x0256:
            java.lang.String r35 = "Accept-Ranges"
            java.lang.String r36 = "bytes"
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)
            return r29
        L_0x0264:
            java.io.File r35 = new java.io.File
            java.lang.String r36 = "index.htm"
            r0 = r35
            r1 = r36
            r0.<init>(r14, r1)
            boolean r35 = r35.exists()
            if (r35 == 0) goto L_0x0299
            java.io.File r14 = new java.io.File
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/index.htm"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r0 = r43
            r1 = r35
            r14.<init>(r0, r1)
            r30 = r29
            goto L_0x0155
        L_0x0299:
            if (r44 == 0) goto L_0x04ed
            boolean r35 = r14.canRead()
            if (r35 == 0) goto L_0x04ed
            java.lang.String[] r15 = r14.list()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            java.lang.String r36 = "<html><body><h1>Directory "
            java.lang.StringBuilder r35 = r35.append(r36)
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</h1><br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            int r35 = r41.length()
            r36 = 1
            r0 = r35
            r1 = r36
            if (r0 <= r1) goto L_0x0321
            r35 = 0
            int r36 = r41.length()
            int r36 = r36 + -1
            r0 = r41
            r1 = r35
            r2 = r36
            java.lang.String r34 = r0.substring(r1, r2)
            r35 = 47
            int r31 = r34.lastIndexOf(r35)
            if (r31 < 0) goto L_0x0321
            int r35 = r34.length()
            r0 = r31
            r1 = r35
            if (r0 >= r1) goto L_0x0321
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<b><a href=\""
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 0
            int r37 = r31 + 1
            r0 = r41
            r1 = r36
            r2 = r37
            java.lang.String r36 = r0.substring(r1, r2)
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "\">..</a></b><br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0321:
            if (r15 == 0) goto L_0x04bf
            r19 = 0
        L_0x0325:
            int r0 = r15.length
            r35 = r0
            r0 = r19
            r1 = r35
            if (r0 >= r1) goto L_0x04bf
            java.io.File r6 = new java.io.File
            r35 = r15[r19]
            r0 = r35
            r6.<init>(r14, r0)
            boolean r7 = r6.isDirectory()
            if (r7 == 0) goto L_0x036b
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<b>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r36 = r15[r19]
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "/"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r15[r19] = r35
        L_0x036b:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<a href=\""
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.StringBuilder r36 = new java.lang.StringBuilder
            r36.<init>()
            r0 = r36
            r1 = r41
            java.lang.StringBuilder r36 = r0.append(r1)
            r37 = r15[r19]
            java.lang.StringBuilder r36 = r36.append(r37)
            java.lang.String r36 = r36.toString()
            r0 = r40
            r1 = r36
            java.lang.String r36 = r0.encodeUri(r1)
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "\">"
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = r15[r19]
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "</a>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            boolean r35 = r6.isFile()
            if (r35 == 0) goto L_0x0414
            long r22 = r6.length()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = " &nbsp;<font size=2>("
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            r36 = 1024(0x400, double:5.06E-321)
            int r35 = (r22 > r36 ? 1 : (r22 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0448
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r0 = r35
            r1 = r22
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = " bytes"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x03fd:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = ")</font>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0414:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            if (r7 == 0) goto L_0x0444
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</b>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0444:
            int r19 = r19 + 1
            goto L_0x0325
        L_0x0448:
            r36 = 1048576(0x100000, double:5.180654E-318)
            int r35 = (r22 > r36 ? 1 : (r22 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0486
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r36 = 1024(0x400, double:5.06E-321)
            long r36 = r22 / r36
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "."
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 1024(0x400, double:5.06E-321)
            long r36 = r22 % r36
            r38 = 10
            long r36 = r36 / r38
            r38 = 100
            long r36 = r36 % r38
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = " KB"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            goto L_0x03fd
        L_0x0486:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r36 = 1048576(0x100000, double:5.180654E-318)
            long r36 = r22 / r36
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "."
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 1048576(0x100000, double:5.180654E-318)
            long r36 = r22 % r36
            r38 = 10
            long r36 = r36 / r38
            r38 = 100
            long r36 = r36 % r38
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = " MB"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            goto L_0x03fd
        L_0x04bf:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</body></html>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "200 OK"
            java.lang.String r36 = "text/html"
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r25
            r0.<init>(r2, r3, r4)
            r30 = r29
            goto L_0x0155
        L_0x04ed:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: No directory listing."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            r30 = r29
            goto L_0x0155
        L_0x0506:
            r36 = 0
            int r35 = (r12 > r36 ? 1 : (r12 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0510
            r36 = 1
            long r12 = r16 - r36
        L_0x0510:
            long r36 = r12 - r32
            r38 = 1
            long r26 = r36 + r38
            r36 = 0
            int r35 = (r26 > r36 ? 1 : (r26 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x051e
            r26 = 0
        L_0x051e:
            r8 = r26
            com.google.appinventor.components.runtime.util.NanoHTTPD$2 r18 = new com.google.appinventor.components.runtime.util.NanoHTTPD$2     // Catch:{ IOException -> 0x062c }
            r0 = r18
            r1 = r40
            r0.<init>(r14, r8)     // Catch:{ IOException -> 0x062c }
            r0 = r18
            r1 = r32
            r0.skip(r1)     // Catch:{ IOException -> 0x062c }
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "206 Partial Content"
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r18
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Length"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = ""
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            java.lang.StringBuilder r36 = r0.append(r8)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "Content-Range"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "bytes "
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r32
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "-"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            java.lang.StringBuilder r36 = r0.append(r12)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "/"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
            goto L_0x0256
        L_0x05a8:
            r20 = move-exception
        L_0x05a9:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: Reading file failed."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            goto L_0x0256
        L_0x05c0:
            java.lang.String r35 = "if-none-match"
            r0 = r42
            r1 = r35
            java.lang.String r35 = r0.getProperty(r1)     // Catch:{ IOException -> 0x062c }
            r0 = r35
            boolean r35 = r11.equals(r0)     // Catch:{ IOException -> 0x062c }
            if (r35 == 0) goto L_0x05e7
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "304 Not Modified"
            java.lang.String r36 = ""
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r36
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            goto L_0x0256
        L_0x05e7:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "200 OK"
            java.io.FileInputStream r36 = new java.io.FileInputStream     // Catch:{ IOException -> 0x062c }
            r0 = r36
            r0.<init>(r14)     // Catch:{ IOException -> 0x062c }
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r36
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Length"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = ""
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
            goto L_0x0256
        L_0x062c:
            r20 = move-exception
            r29 = r30
            goto L_0x05a9
        L_0x0631:
            r35 = move-exception
            goto L_0x0206
        L_0x0634:
            r29 = r30
            goto L_0x0256
        L_0x0638:
            r30 = r29
            goto L_0x0155
        */
        throw new UnsupportedOperationException("Method not decompiled: com.google.appinventor.components.runtime.util.NanoHTTPD.serveFile(java.lang.String, java.util.Properties, java.io.File, boolean):com.google.appinventor.components.runtime.util.NanoHTTPD$Response");
    }
public com . google . appinventor . components . runtime . util . NanoHTTPD . Response serveFile ( java . lang . String r41 , java . util . Properties r42 , java . io . File r43 , boolean r44 ) { /*
            r40 = this;
            r29 = 0
            boolean r35 = r43.isDirectory()
            if (r35 != 0) goto L_0x001d
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "500 Internal Server Error"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "INTERNAL ERRROR: serveFile(): given homeDir is not a directory."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x001d:
            if (r29 != 0) goto L_0x0086
            java.lang.String r35 = r41.trim()
            char r36 = java.io.File.separatorChar
            r37 = 47
            java.lang.String r41 = r35.replace(r36, r37)
            r35 = 63
            r0 = r41
            r1 = r35
            int r35 = r0.indexOf(r1)
            if (r35 < 0) goto L_0x004d
            r35 = 0
            r36 = 63
            r0 = r41
            r1 = r36
            int r36 = r0.indexOf(r1)
            r0 = r41
            r1 = r35
            r2 = r36
            java.lang.String r41 = r0.substring(r1, r2)
        L_0x004d:
            java.lang.String r35 = ".."
            r0 = r41
            r1 = r35
            boolean r35 = r0.startsWith(r1)
            if (r35 != 0) goto L_0x0071
            java.lang.String r35 = ".."
            r0 = r41
            r1 = r35
            boolean r35 = r0.endsWith(r1)
            if (r35 != 0) goto L_0x0071
            java.lang.String r35 = "../"
            r0 = r41
            r1 = r35
            int r35 = r0.indexOf(r1)
            if (r35 < 0) goto L_0x0086
        L_0x0071:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: Won't serve ../ for security reasons."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x0086:
            java.io.File r14 = new java.io.File
            r0 = r43
            r1 = r41
            r14.<init>(r0, r1)
            if (r29 != 0) goto L_0x00ac
            boolean r35 = r14.exists()
            if (r35 != 0) goto L_0x00ac
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "404 Not Found"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "Error 404, file not found."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
        L_0x00ac:
            if (r29 != 0) goto L_0x0638
            boolean r35 = r14.isDirectory()
            if (r35 == 0) goto L_0x0638
            java.lang.String r35 = "/"
            r0 = r41
            r1 = r35
            boolean r35 = r0.endsWith(r1)
            if (r35 != 0) goto L_0x0120
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r41 = r35.toString()
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "301 Moved Permanently"
            java.lang.String r36 = "text/html"
            java.lang.StringBuilder r37 = new java.lang.StringBuilder
            r37.<init>()
            java.lang.String r38 = "<html><body>Redirected: <a href=\""
            java.lang.StringBuilder r37 = r37.append(r38)
            r0 = r37
            r1 = r41
            java.lang.StringBuilder r37 = r0.append(r1)
            java.lang.String r38 = "\">"
            java.lang.StringBuilder r37 = r37.append(r38)
            r0 = r37
            r1 = r41
            java.lang.StringBuilder r37 = r0.append(r1)
            java.lang.String r38 = "</a></body></html>"
            java.lang.StringBuilder r37 = r37.append(r38)
            java.lang.String r37 = r37.toString()
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            java.lang.String r35 = "Location"
            r0 = r29
            r1 = r35
            r2 = r41
            r0.addHeader(r1, r2)
        L_0x0120:
            if (r29 != 0) goto L_0x0638
            java.io.File r35 = new java.io.File
            java.lang.String r36 = "index.html"
            r0 = r35
            r1 = r36
            r0.<init>(r14, r1)
            boolean r35 = r35.exists()
            if (r35 == 0) goto L_0x0264
            java.io.File r14 = new java.io.File
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/index.html"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r0 = r43
            r1 = r35
            r14.<init>(r0, r1)
            r30 = r29
        L_0x0155:
            if (r30 != 0) goto L_0x0634
            r21 = 0
            java.lang.String r35 = r14.getCanonicalPath()     // Catch:{ IOException -> 0x062c }
            r36 = 46
            int r10 = r35.lastIndexOf(r36)     // Catch:{ IOException -> 0x062c }
            if (r10 < 0) goto L_0x017f
            java.util.Hashtable r35 = theMimeTypes     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r14.getCanonicalPath()     // Catch:{ IOException -> 0x062c }
            int r37 = r10 + 1
            java.lang.String r36 = r36.substring(r37)     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r36.toLowerCase()     // Catch:{ IOException -> 0x062c }
            java.lang.Object r35 = r35.get(r36)     // Catch:{ IOException -> 0x062c }
            r0 = r35
            java.lang.String r0 = (java.lang.String) r0     // Catch:{ IOException -> 0x062c }
            r21 = r0
        L_0x017f:
            if (r21 != 0) goto L_0x0183
            java.lang.String r21 = "application/octet-stream"
        L_0x0183:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x062c }
            r35.<init>()     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = r14.getAbsolutePath()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            long r36 = r14.lastModified()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            java.lang.String r36 = ""
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            long r36 = r14.length()     // Catch:{ IOException -> 0x062c }
            java.lang.StringBuilder r35 = r35.append(r36)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = r35.toString()     // Catch:{ IOException -> 0x062c }
            int r35 = r35.hashCode()     // Catch:{ IOException -> 0x062c }
            java.lang.String r11 = java.lang.Integer.toHexString(r35)     // Catch:{ IOException -> 0x062c }
            r32 = 0
            r12 = -1
            java.lang.String r35 = "range"
            r0 = r42
            r1 = r35
            java.lang.String r28 = r0.getProperty(r1)     // Catch:{ IOException -> 0x062c }
            if (r28 == 0) goto L_0x0206
            java.lang.String r35 = "bytes="
            r0 = r28
            r1 = r35
            boolean r35 = r0.startsWith(r1)     // Catch:{ IOException -> 0x062c }
            if (r35 == 0) goto L_0x0206
            java.lang.String r35 = "bytes="
            int r35 = r35.length()     // Catch:{ IOException -> 0x062c }
            r0 = r28
            r1 = r35
            java.lang.String r28 = r0.substring(r1)     // Catch:{ IOException -> 0x062c }
            r35 = 45
            r0 = r28
            r1 = r35
            int r24 = r0.indexOf(r1)     // Catch:{ IOException -> 0x062c }
            if (r24 <= 0) goto L_0x0206
            r35 = 0
            r0 = r28
            r1 = r35
            r2 = r24
            java.lang.String r35 = r0.substring(r1, r2)     // Catch:{ NumberFormatException -> 0x0631 }
            long r32 = java.lang.Long.parseLong(r35)     // Catch:{ NumberFormatException -> 0x0631 }
            int r35 = r24 + 1
            r0 = r28
            r1 = r35
            java.lang.String r35 = r0.substring(r1)     // Catch:{ NumberFormatException -> 0x0631 }
            long r12 = java.lang.Long.parseLong(r35)     // Catch:{ NumberFormatException -> 0x0631 }
        L_0x0206:
            long r16 = r14.length()     // Catch:{ IOException -> 0x062c }
            if (r28 == 0) goto L_0x05c0
            r36 = 0
            int r35 = (r32 > r36 ? 1 : (r32 == r36 ? 0 : -1))
            if (r35 < 0) goto L_0x05c0
            int r35 = (r32 > r16 ? 1 : (r32 == r16 ? 0 : -1))
            if (r35 < 0) goto L_0x0506
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "416 Requested Range Not Satisfiable"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = ""
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Range"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "bytes 0-0/"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
        L_0x0256:
            java.lang.String r35 = "Accept-Ranges"
            java.lang.String r36 = "bytes"
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)
            return r29
        L_0x0264:
            java.io.File r35 = new java.io.File
            java.lang.String r36 = "index.htm"
            r0 = r35
            r1 = r36
            r0.<init>(r14, r1)
            boolean r35 = r35.exists()
            if (r35 == 0) goto L_0x0299
            java.io.File r14 = new java.io.File
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "/index.htm"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r0 = r43
            r1 = r35
            r14.<init>(r0, r1)
            r30 = r29
            goto L_0x0155
        L_0x0299:
            if (r44 == 0) goto L_0x04ed
            boolean r35 = r14.canRead()
            if (r35 == 0) goto L_0x04ed
            java.lang.String[] r15 = r14.list()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            java.lang.String r36 = "<html><body><h1>Directory "
            java.lang.StringBuilder r35 = r35.append(r36)
            r0 = r35
            r1 = r41
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</h1><br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            int r35 = r41.length()
            r36 = 1
            r0 = r35
            r1 = r36
            if (r0 <= r1) goto L_0x0321
            r35 = 0
            int r36 = r41.length()
            int r36 = r36 + -1
            r0 = r41
            r1 = r35
            r2 = r36
            java.lang.String r34 = r0.substring(r1, r2)
            r35 = 47
            int r31 = r34.lastIndexOf(r35)
            if (r31 < 0) goto L_0x0321
            int r35 = r34.length()
            r0 = r31
            r1 = r35
            if (r0 >= r1) goto L_0x0321
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<b><a href=\""
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 0
            int r37 = r31 + 1
            r0 = r41
            r1 = r36
            r2 = r37
            java.lang.String r36 = r0.substring(r1, r2)
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "\">..</a></b><br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0321:
            if (r15 == 0) goto L_0x04bf
            r19 = 0
        L_0x0325:
            int r0 = r15.length
            r35 = r0
            r0 = r19
            r1 = r35
            if (r0 >= r1) goto L_0x04bf
            java.io.File r6 = new java.io.File
            r35 = r15[r19]
            r0 = r35
            r6.<init>(r14, r0)
            boolean r7 = r6.isDirectory()
            if (r7 == 0) goto L_0x036b
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<b>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r36 = r15[r19]
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "/"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r35 = r35.toString()
            r15[r19] = r35
        L_0x036b:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<a href=\""
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.StringBuilder r36 = new java.lang.StringBuilder
            r36.<init>()
            r0 = r36
            r1 = r41
            java.lang.StringBuilder r36 = r0.append(r1)
            r37 = r15[r19]
            java.lang.StringBuilder r36 = r36.append(r37)
            java.lang.String r36 = r36.toString()
            r0 = r40
            r1 = r36
            java.lang.String r36 = r0.encodeUri(r1)
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "\">"
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = r15[r19]
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "</a>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            boolean r35 = r6.isFile()
            if (r35 == 0) goto L_0x0414
            long r22 = r6.length()
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = " &nbsp;<font size=2>("
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            r36 = 1024(0x400, double:5.06E-321)
            int r35 = (r22 > r36 ? 1 : (r22 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0448
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r0 = r35
            r1 = r22
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = " bytes"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x03fd:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = ")</font>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0414:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "<br/>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            if (r7 == 0) goto L_0x0444
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</b>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
        L_0x0444:
            int r19 = r19 + 1
            goto L_0x0325
        L_0x0448:
            r36 = 1048576(0x100000, double:5.180654E-318)
            int r35 = (r22 > r36 ? 1 : (r22 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0486
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r36 = 1024(0x400, double:5.06E-321)
            long r36 = r22 / r36
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "."
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 1024(0x400, double:5.06E-321)
            long r36 = r22 % r36
            r38 = 10
            long r36 = r36 / r38
            r38 = 100
            long r36 = r36 % r38
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = " KB"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            goto L_0x03fd
        L_0x0486:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            r36 = 1048576(0x100000, double:5.180654E-318)
            long r36 = r22 / r36
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = "."
            java.lang.StringBuilder r35 = r35.append(r36)
            r36 = 1048576(0x100000, double:5.180654E-318)
            long r36 = r22 % r36
            r38 = 10
            long r36 = r36 / r38
            r38 = 100
            long r36 = r36 % r38
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r36 = " MB"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            goto L_0x03fd
        L_0x04bf:
            java.lang.StringBuilder r35 = new java.lang.StringBuilder
            r35.<init>()
            r0 = r35
            r1 = r25
            java.lang.StringBuilder r35 = r0.append(r1)
            java.lang.String r36 = "</body></html>"
            java.lang.StringBuilder r35 = r35.append(r36)
            java.lang.String r25 = r35.toString()
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "200 OK"
            java.lang.String r36 = "text/html"
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r25
            r0.<init>(r2, r3, r4)
            r30 = r29
            goto L_0x0155
        L_0x04ed:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: No directory listing."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            r30 = r29
            goto L_0x0155
        L_0x0506:
            r36 = 0
            int r35 = (r12 > r36 ? 1 : (r12 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x0510
            r36 = 1
            long r12 = r16 - r36
        L_0x0510:
            long r36 = r12 - r32
            r38 = 1
            long r26 = r36 + r38
            r36 = 0
            int r35 = (r26 > r36 ? 1 : (r26 == r36 ? 0 : -1))
            if (r35 >= 0) goto L_0x051e
            r26 = 0
        L_0x051e:
            r8 = r26
            com.google.appinventor.components.runtime.util.NanoHTTPD$2 r18 = new com.google.appinventor.components.runtime.util.NanoHTTPD$2     // Catch:{ IOException -> 0x062c }
            r0 = r18
            r1 = r40
            r0.<init>(r14, r8)     // Catch:{ IOException -> 0x062c }
            r0 = r18
            r1 = r32
            r0.skip(r1)     // Catch:{ IOException -> 0x062c }
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "206 Partial Content"
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r18
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Length"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = ""
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            java.lang.StringBuilder r36 = r0.append(r8)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "Content-Range"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "bytes "
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r32
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "-"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            java.lang.StringBuilder r36 = r0.append(r12)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = "/"
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
            goto L_0x0256
        L_0x05a8:
            r20 = move-exception
        L_0x05a9:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response
            java.lang.String r35 = "403 Forbidden"
            java.lang.String r36 = "text/plain"
            java.lang.String r37 = "FORBIDDEN: Reading file failed."
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r36
            r4 = r37
            r0.<init>(r2, r3, r4)
            goto L_0x0256
        L_0x05c0:
            java.lang.String r35 = "if-none-match"
            r0 = r42
            r1 = r35
            java.lang.String r35 = r0.getProperty(r1)     // Catch:{ IOException -> 0x062c }
            r0 = r35
            boolean r35 = r11.equals(r0)     // Catch:{ IOException -> 0x062c }
            if (r35 == 0) goto L_0x05e7
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "304 Not Modified"
            java.lang.String r36 = ""
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r36
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            goto L_0x0256
        L_0x05e7:
            com.google.appinventor.components.runtime.util.NanoHTTPD$Response r29 = new com.google.appinventor.components.runtime.util.NanoHTTPD$Response     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "200 OK"
            java.io.FileInputStream r36 = new java.io.FileInputStream     // Catch:{ IOException -> 0x062c }
            r0 = r36
            r0.<init>(r14)     // Catch:{ IOException -> 0x062c }
            r0 = r29
            r1 = r40
            r2 = r35
            r3 = r21
            r4 = r36
            r0.<init>(r2, r3, r4)     // Catch:{ IOException -> 0x062c }
            java.lang.String r35 = "Content-Length"
            java.lang.StringBuilder r36 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x05a8 }
            r36.<init>()     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r37 = ""
            java.lang.StringBuilder r36 = r36.append(r37)     // Catch:{ IOException -> 0x05a8 }
            r0 = r36
            r1 = r16
            java.lang.StringBuilder r36 = r0.append(r1)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r36 = r36.toString()     // Catch:{ IOException -> 0x05a8 }
            r0 = r29
            r1 = r35
            r2 = r36
            r0.addHeader(r1, r2)     // Catch:{ IOException -> 0x05a8 }
            java.lang.String r35 = "ETag"
            r0 = r29
            r1 = r35
            r0.addHeader(r1, r11)     // Catch:{ IOException -> 0x05a8 }
            goto L_0x0256
        L_0x062c:
            r20 = move-exception
            r29 = r30
            goto L_0x05a9
        L_0x0631:
            r35 = move-exception
            goto L_0x0206
        L_0x0634:
            r29 = r30
            goto L_0x0256
        L_0x0638:
            r30 = r29
            goto L_0x0155
        */ throw new UnsupportedOperationException ( "Method not decompiled: com.google.appinventor.components.runtime.util.NanoHTTPD.serveFile(java.lang.String, java.util.Properties, java.io.File, boolean):com.google.appinventor.components.runtime.util.NanoHTTPD$Response" ) ; }
Code decompiled incorrectly, please refer to instructions dump.
Code decompiled incorrectly please refer to instructions dump .