Source/sources/gnu/xquery/lang/XQParser.java
public gnu.expr.Expression parseFunctionDefinition(int r14, int r15) throws java.io.IOException, gnu.text.SyntaxException {
        /*
            r13 = this;
            int r9 = r13.curToken
            r10 = 81
            if (r9 == r10) goto L_0x0013
            int r9 = r13.curToken
            r10 = 65
            if (r9 == r10) goto L_0x0013
            java.lang.String r9 = "missing function name"
            gnu.expr.Expression r6 = r13.syntaxError(r9)
        L_0x0012:
            return r6
        L_0x0013:
            java.lang.String r3 = new java.lang.String
            char[] r9 = r13.tokenBuffer
            r10 = 0
            int r11 = r13.tokenBufferLength
            r3.<init>(r9, r10, r11)
            gnu.text.SourceMessages r9 = r13.getMessages()
            gnu.text.LineBufferedReader r10 = r13.port
            java.lang.String r10 = r10.getName()
            int r11 = r13.curLine
            int r12 = r13.curColumn
            r9.setLine(r10, r11, r12)
            r9 = 1
            gnu.mapping.Symbol r7 = r13.namespaceResolve(r3, r9)
            java.lang.String r8 = r7.getNamespaceURI()
            java.lang.String r9 = "http://www.w3.org/XML/1998/namespace"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2001/XMLSchema"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2001/XMLSchema-instance"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2005/xpath-functions"
            if (r8 != r9) goto L_0x008a
        L_0x0047:
            r9 = 101(0x65, float:1.42E-43)
            java.lang.StringBuilder r10 = new java.lang.StringBuilder
            r10.<init>()
            java.lang.String r11 = "cannot declare function in standard namespace '"
            java.lang.StringBuilder r10 = r10.append(r11)
            java.lang.StringBuilder r10 = r10.append(r8)
            r11 = 39
            java.lang.StringBuilder r10 = r10.append(r11)
            java.lang.String r10 = r10.toString()
            java.lang.String r11 = "XQST0045"
            r13.error(r9, r10, r11)
        L_0x0067:
            r13.getRawToken()
            int r9 = r13.curToken
            r10 = 40
            if (r9 == r10) goto L_0x00c5
            java.lang.StringBuilder r9 = new java.lang.StringBuilder
            r9.<init>()
            java.lang.String r10 = "missing parameter list:"
            java.lang.StringBuilder r9 = r9.append(r10)
            int r10 = r13.curToken
            java.lang.StringBuilder r9 = r9.append(r10)
            java.lang.String r9 = r9.toString()
            gnu.expr.Expression r6 = r13.syntaxError(r9)
            goto L_0x0012
        L_0x008a:
            java.lang.String r9 = ""
            if (r8 != r9) goto L_0x00a3
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isPedantic()
            if (r9 == 0) goto L_0x00a0
            r9 = 101(0x65, float:1.42E-43)
        L_0x0098:
            java.lang.String r10 = "cannot declare function in empty namespace"
            java.lang.String r11 = "XQST0060"
            r13.error(r9, r10, r11)
            goto L_0x0067
        L_0x00a0:
            r9 = 119(0x77, float:1.67E-43)
            goto L_0x0098
        L_0x00a3:
            java.lang.String r9 = r13.libraryModuleNamespace
            if (r9 == 0) goto L_0x0067
            java.lang.String r9 = r13.libraryModuleNamespace
            if (r8 == r9) goto L_0x0067
            java.lang.String r9 = "http://www.w3.org/2005/xquery-local-functions"
            boolean r9 = r9.equals(r8)
            if (r9 == 0) goto L_0x00bb
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isPedantic()
            if (r9 == 0) goto L_0x0067
        L_0x00bb:
            r9 = 101(0x65, float:1.42E-43)
            java.lang.String r10 = "function not in namespace of library module"
            java.lang.String r11 = "XQST0048"
            r13.error(r9, r10, r11)
            goto L_0x0067
        L_0x00c5:
            r13.getRawToken()
            gnu.expr.LambdaExp r2 = new gnu.expr.LambdaExp
            r2.<init>()
            r13.maybeSetLine(r2, r14, r15)
            r2.setName(r3)
            gnu.expr.Compilation r9 = r13.comp
            gnu.expr.ScopeExp r9 = r9.currentScope()
            gnu.expr.Declaration r0 = r9.addDeclaration(r7)
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isStatic()
            if (r9 == 0) goto L_0x00ea
            r10 = 2048(0x800, double:1.0118E-320)
            r0.setFlag(r10)
        L_0x00ea:
            r9 = 2048(0x800, float:2.87E-42)
            r2.setFlag(r9)
            r9 = 1
            r0.setCanRead(r9)
            r9 = 1
            r0.setProcedureDecl(r9)
            r13.maybeSetLine(r0, r14, r15)
            gnu.expr.Compilation r9 = r13.comp
            r9.push(r2)
            int r9 = r13.curToken
            r10 = 41
            if (r9 == r10) goto L_0x0116
        L_0x0105:
            gnu.expr.Declaration r4 = r13.parseVariableDeclaration()
            if (r4 != 0) goto L_0x013d
            java.lang.String r9 = "missing parameter name"
            r13.error(r9)
        L_0x0110:
            int r9 = r13.curToken
            r10 = 41
            if (r9 != r10) goto L_0x0157
        L_0x0116:
            r13.getRawToken()
            gnu.expr.Expression r5 = r13.parseOptionalTypeDeclaration()
            gnu.expr.Expression r9 = r13.parseEnclosedExpr()
            r2.body = r9
            gnu.expr.Compilation r9 = r13.comp
            r9.pop(r2)
            if (r5 == 0) goto L_0x012f
            gnu.xquery.lang.XQuery r9 = r13.interpreter
            r2.setCoercedReturnValue(r5, r9)
        L_0x012f:
            gnu.expr.SetExp r6 = new gnu.expr.SetExp
            r6.<init>(r0, r2)
            r9 = 1
            r6.setDefining(r9)
            r0.noteValue(r2)
            goto L_0x0012
        L_0x013d:
            r2.addDeclaration(r4)
            r13.getRawToken()
            int r9 = r2.min_args
            int r9 = r9 + 1
            r2.min_args = r9
            int r9 = r2.max_args
            int r9 = r9 + 1
            r2.max_args = r9
            gnu.expr.Expression r9 = r13.parseOptionalTypeDeclaration()
            r4.setTypeExp(r9)
            goto L_0x0110
        L_0x0157:
            int r9 = r13.curToken
            r10 = 44
            if (r9 == r10) goto L_0x0186
            java.lang.String r9 = "missing ',' in parameter list"
            gnu.expr.Expression r1 = r13.syntaxError(r9)
        L_0x0163:
            r13.getRawToken()
            int r9 = r13.curToken
            if (r9 < 0) goto L_0x0176
            int r9 = r13.curToken
            r10 = 59
            if (r9 == r10) goto L_0x0176
            int r9 = r13.curToken
            r10 = 59
            if (r9 != r10) goto L_0x0179
        L_0x0176:
            r6 = r1
            goto L_0x0012
        L_0x0179:
            int r9 = r13.curToken
            r10 = 41
            if (r9 == r10) goto L_0x0116
            int r9 = r13.curToken
            r10 = 44
            if (r9 != r10) goto L_0x0163
            goto L_0x0105
        L_0x0186:
            r13.getRawToken()
            goto L_0x0105
        */
        throw new UnsupportedOperationException("Method not decompiled: gnu.xquery.lang.XQParser.parseFunctionDefinition(int, int):gnu.expr.Expression");
    }
/* 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 gnu.expr.Expression parseFunctionDefinition(int r14, int r15) throws java.io.IOException, gnu.text.SyntaxException {
        /*
            r13 = this;
            int r9 = r13.curToken
            r10 = 81
            if (r9 == r10) goto L_0x0013
            int r9 = r13.curToken
            r10 = 65
            if (r9 == r10) goto L_0x0013
            java.lang.String r9 = "missing function name"
            gnu.expr.Expression r6 = r13.syntaxError(r9)
        L_0x0012:
            return r6
        L_0x0013:
            java.lang.String r3 = new java.lang.String
            char[] r9 = r13.tokenBuffer
            r10 = 0
            int r11 = r13.tokenBufferLength
            r3.<init>(r9, r10, r11)
            gnu.text.SourceMessages r9 = r13.getMessages()
            gnu.text.LineBufferedReader r10 = r13.port
            java.lang.String r10 = r10.getName()
            int r11 = r13.curLine
            int r12 = r13.curColumn
            r9.setLine(r10, r11, r12)
            r9 = 1
            gnu.mapping.Symbol r7 = r13.namespaceResolve(r3, r9)
            java.lang.String r8 = r7.getNamespaceURI()
            java.lang.String r9 = "http://www.w3.org/XML/1998/namespace"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2001/XMLSchema"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2001/XMLSchema-instance"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2005/xpath-functions"
            if (r8 != r9) goto L_0x008a
        L_0x0047:
            r9 = 101(0x65, float:1.42E-43)
            java.lang.StringBuilder r10 = new java.lang.StringBuilder
            r10.<init>()
            java.lang.String r11 = "cannot declare function in standard namespace '"
            java.lang.StringBuilder r10 = r10.append(r11)
            java.lang.StringBuilder r10 = r10.append(r8)
            r11 = 39
            java.lang.StringBuilder r10 = r10.append(r11)
            java.lang.String r10 = r10.toString()
            java.lang.String r11 = "XQST0045"
            r13.error(r9, r10, r11)
        L_0x0067:
            r13.getRawToken()
            int r9 = r13.curToken
            r10 = 40
            if (r9 == r10) goto L_0x00c5
            java.lang.StringBuilder r9 = new java.lang.StringBuilder
            r9.<init>()
            java.lang.String r10 = "missing parameter list:"
            java.lang.StringBuilder r9 = r9.append(r10)
            int r10 = r13.curToken
            java.lang.StringBuilder r9 = r9.append(r10)
            java.lang.String r9 = r9.toString()
            gnu.expr.Expression r6 = r13.syntaxError(r9)
            goto L_0x0012
        L_0x008a:
            java.lang.String r9 = ""
            if (r8 != r9) goto L_0x00a3
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isPedantic()
            if (r9 == 0) goto L_0x00a0
            r9 = 101(0x65, float:1.42E-43)
        L_0x0098:
            java.lang.String r10 = "cannot declare function in empty namespace"
            java.lang.String r11 = "XQST0060"
            r13.error(r9, r10, r11)
            goto L_0x0067
        L_0x00a0:
            r9 = 119(0x77, float:1.67E-43)
            goto L_0x0098
        L_0x00a3:
            java.lang.String r9 = r13.libraryModuleNamespace
            if (r9 == 0) goto L_0x0067
            java.lang.String r9 = r13.libraryModuleNamespace
            if (r8 == r9) goto L_0x0067
            java.lang.String r9 = "http://www.w3.org/2005/xquery-local-functions"
            boolean r9 = r9.equals(r8)
            if (r9 == 0) goto L_0x00bb
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isPedantic()
            if (r9 == 0) goto L_0x0067
        L_0x00bb:
            r9 = 101(0x65, float:1.42E-43)
            java.lang.String r10 = "function not in namespace of library module"
            java.lang.String r11 = "XQST0048"
            r13.error(r9, r10, r11)
            goto L_0x0067
        L_0x00c5:
            r13.getRawToken()
            gnu.expr.LambdaExp r2 = new gnu.expr.LambdaExp
            r2.<init>()
            r13.maybeSetLine(r2, r14, r15)
            r2.setName(r3)
            gnu.expr.Compilation r9 = r13.comp
            gnu.expr.ScopeExp r9 = r9.currentScope()
            gnu.expr.Declaration r0 = r9.addDeclaration(r7)
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isStatic()
            if (r9 == 0) goto L_0x00ea
            r10 = 2048(0x800, double:1.0118E-320)
            r0.setFlag(r10)
        L_0x00ea:
            r9 = 2048(0x800, float:2.87E-42)
            r2.setFlag(r9)
            r9 = 1
            r0.setCanRead(r9)
            r9 = 1
            r0.setProcedureDecl(r9)
            r13.maybeSetLine(r0, r14, r15)
            gnu.expr.Compilation r9 = r13.comp
            r9.push(r2)
            int r9 = r13.curToken
            r10 = 41
            if (r9 == r10) goto L_0x0116
        L_0x0105:
            gnu.expr.Declaration r4 = r13.parseVariableDeclaration()
            if (r4 != 0) goto L_0x013d
            java.lang.String r9 = "missing parameter name"
            r13.error(r9)
        L_0x0110:
            int r9 = r13.curToken
            r10 = 41
            if (r9 != r10) goto L_0x0157
        L_0x0116:
            r13.getRawToken()
            gnu.expr.Expression r5 = r13.parseOptionalTypeDeclaration()
            gnu.expr.Expression r9 = r13.parseEnclosedExpr()
            r2.body = r9
            gnu.expr.Compilation r9 = r13.comp
            r9.pop(r2)
            if (r5 == 0) goto L_0x012f
            gnu.xquery.lang.XQuery r9 = r13.interpreter
            r2.setCoercedReturnValue(r5, r9)
        L_0x012f:
            gnu.expr.SetExp r6 = new gnu.expr.SetExp
            r6.<init>(r0, r2)
            r9 = 1
            r6.setDefining(r9)
            r0.noteValue(r2)
            goto L_0x0012
        L_0x013d:
            r2.addDeclaration(r4)
            r13.getRawToken()
            int r9 = r2.min_args
            int r9 = r9 + 1
            r2.min_args = r9
            int r9 = r2.max_args
            int r9 = r9 + 1
            r2.max_args = r9
            gnu.expr.Expression r9 = r13.parseOptionalTypeDeclaration()
            r4.setTypeExp(r9)
            goto L_0x0110
        L_0x0157:
            int r9 = r13.curToken
            r10 = 44
            if (r9 == r10) goto L_0x0186
            java.lang.String r9 = "missing ',' in parameter list"
            gnu.expr.Expression r1 = r13.syntaxError(r9)
        L_0x0163:
            r13.getRawToken()
            int r9 = r13.curToken
            if (r9 < 0) goto L_0x0176
            int r9 = r13.curToken
            r10 = 59
            if (r9 == r10) goto L_0x0176
            int r9 = r13.curToken
            r10 = 59
            if (r9 != r10) goto L_0x0179
        L_0x0176:
            r6 = r1
            goto L_0x0012
        L_0x0179:
            int r9 = r13.curToken
            r10 = 41
            if (r9 == r10) goto L_0x0116
            int r9 = r13.curToken
            r10 = 44
            if (r9 != r10) goto L_0x0163
            goto L_0x0105
        L_0x0186:
            r13.getRawToken()
            goto L_0x0105
        */
        throw new UnsupportedOperationException("Method not decompiled: gnu.xquery.lang.XQParser.parseFunctionDefinition(int, int):gnu.expr.Expression");
    }
public gnu . expr . Expression parseFunctionDefinition ( int r14 , int r15 ) throws java . io . IOException , gnu . text . SyntaxException { /*
            r13 = this;
            int r9 = r13.curToken
            r10 = 81
            if (r9 == r10) goto L_0x0013
            int r9 = r13.curToken
            r10 = 65
            if (r9 == r10) goto L_0x0013
            java.lang.String r9 = "missing function name"
            gnu.expr.Expression r6 = r13.syntaxError(r9)
        L_0x0012:
            return r6
        L_0x0013:
            java.lang.String r3 = new java.lang.String
            char[] r9 = r13.tokenBuffer
            r10 = 0
            int r11 = r13.tokenBufferLength
            r3.<init>(r9, r10, r11)
            gnu.text.SourceMessages r9 = r13.getMessages()
            gnu.text.LineBufferedReader r10 = r13.port
            java.lang.String r10 = r10.getName()
            int r11 = r13.curLine
            int r12 = r13.curColumn
            r9.setLine(r10, r11, r12)
            r9 = 1
            gnu.mapping.Symbol r7 = r13.namespaceResolve(r3, r9)
            java.lang.String r8 = r7.getNamespaceURI()
            java.lang.String r9 = "http://www.w3.org/XML/1998/namespace"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2001/XMLSchema"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2001/XMLSchema-instance"
            if (r8 == r9) goto L_0x0047
            java.lang.String r9 = "http://www.w3.org/2005/xpath-functions"
            if (r8 != r9) goto L_0x008a
        L_0x0047:
            r9 = 101(0x65, float:1.42E-43)
            java.lang.StringBuilder r10 = new java.lang.StringBuilder
            r10.<init>()
            java.lang.String r11 = "cannot declare function in standard namespace '"
            java.lang.StringBuilder r10 = r10.append(r11)
            java.lang.StringBuilder r10 = r10.append(r8)
            r11 = 39
            java.lang.StringBuilder r10 = r10.append(r11)
            java.lang.String r10 = r10.toString()
            java.lang.String r11 = "XQST0045"
            r13.error(r9, r10, r11)
        L_0x0067:
            r13.getRawToken()
            int r9 = r13.curToken
            r10 = 40
            if (r9 == r10) goto L_0x00c5
            java.lang.StringBuilder r9 = new java.lang.StringBuilder
            r9.<init>()
            java.lang.String r10 = "missing parameter list:"
            java.lang.StringBuilder r9 = r9.append(r10)
            int r10 = r13.curToken
            java.lang.StringBuilder r9 = r9.append(r10)
            java.lang.String r9 = r9.toString()
            gnu.expr.Expression r6 = r13.syntaxError(r9)
            goto L_0x0012
        L_0x008a:
            java.lang.String r9 = ""
            if (r8 != r9) goto L_0x00a3
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isPedantic()
            if (r9 == 0) goto L_0x00a0
            r9 = 101(0x65, float:1.42E-43)
        L_0x0098:
            java.lang.String r10 = "cannot declare function in empty namespace"
            java.lang.String r11 = "XQST0060"
            r13.error(r9, r10, r11)
            goto L_0x0067
        L_0x00a0:
            r9 = 119(0x77, float:1.67E-43)
            goto L_0x0098
        L_0x00a3:
            java.lang.String r9 = r13.libraryModuleNamespace
            if (r9 == 0) goto L_0x0067
            java.lang.String r9 = r13.libraryModuleNamespace
            if (r8 == r9) goto L_0x0067
            java.lang.String r9 = "http://www.w3.org/2005/xquery-local-functions"
            boolean r9 = r9.equals(r8)
            if (r9 == 0) goto L_0x00bb
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isPedantic()
            if (r9 == 0) goto L_0x0067
        L_0x00bb:
            r9 = 101(0x65, float:1.42E-43)
            java.lang.String r10 = "function not in namespace of library module"
            java.lang.String r11 = "XQST0048"
            r13.error(r9, r10, r11)
            goto L_0x0067
        L_0x00c5:
            r13.getRawToken()
            gnu.expr.LambdaExp r2 = new gnu.expr.LambdaExp
            r2.<init>()
            r13.maybeSetLine(r2, r14, r15)
            r2.setName(r3)
            gnu.expr.Compilation r9 = r13.comp
            gnu.expr.ScopeExp r9 = r9.currentScope()
            gnu.expr.Declaration r0 = r9.addDeclaration(r7)
            gnu.expr.Compilation r9 = r13.comp
            boolean r9 = r9.isStatic()
            if (r9 == 0) goto L_0x00ea
            r10 = 2048(0x800, double:1.0118E-320)
            r0.setFlag(r10)
        L_0x00ea:
            r9 = 2048(0x800, float:2.87E-42)
            r2.setFlag(r9)
            r9 = 1
            r0.setCanRead(r9)
            r9 = 1
            r0.setProcedureDecl(r9)
            r13.maybeSetLine(r0, r14, r15)
            gnu.expr.Compilation r9 = r13.comp
            r9.push(r2)
            int r9 = r13.curToken
            r10 = 41
            if (r9 == r10) goto L_0x0116
        L_0x0105:
            gnu.expr.Declaration r4 = r13.parseVariableDeclaration()
            if (r4 != 0) goto L_0x013d
            java.lang.String r9 = "missing parameter name"
            r13.error(r9)
        L_0x0110:
            int r9 = r13.curToken
            r10 = 41
            if (r9 != r10) goto L_0x0157
        L_0x0116:
            r13.getRawToken()
            gnu.expr.Expression r5 = r13.parseOptionalTypeDeclaration()
            gnu.expr.Expression r9 = r13.parseEnclosedExpr()
            r2.body = r9
            gnu.expr.Compilation r9 = r13.comp
            r9.pop(r2)
            if (r5 == 0) goto L_0x012f
            gnu.xquery.lang.XQuery r9 = r13.interpreter
            r2.setCoercedReturnValue(r5, r9)
        L_0x012f:
            gnu.expr.SetExp r6 = new gnu.expr.SetExp
            r6.<init>(r0, r2)
            r9 = 1
            r6.setDefining(r9)
            r0.noteValue(r2)
            goto L_0x0012
        L_0x013d:
            r2.addDeclaration(r4)
            r13.getRawToken()
            int r9 = r2.min_args
            int r9 = r9 + 1
            r2.min_args = r9
            int r9 = r2.max_args
            int r9 = r9 + 1
            r2.max_args = r9
            gnu.expr.Expression r9 = r13.parseOptionalTypeDeclaration()
            r4.setTypeExp(r9)
            goto L_0x0110
        L_0x0157:
            int r9 = r13.curToken
            r10 = 44
            if (r9 == r10) goto L_0x0186
            java.lang.String r9 = "missing ',' in parameter list"
            gnu.expr.Expression r1 = r13.syntaxError(r9)
        L_0x0163:
            r13.getRawToken()
            int r9 = r13.curToken
            if (r9 < 0) goto L_0x0176
            int r9 = r13.curToken
            r10 = 59
            if (r9 == r10) goto L_0x0176
            int r9 = r13.curToken
            r10 = 59
            if (r9 != r10) goto L_0x0179
        L_0x0176:
            r6 = r1
            goto L_0x0012
        L_0x0179:
            int r9 = r13.curToken
            r10 = 41
            if (r9 == r10) goto L_0x0116
            int r9 = r13.curToken
            r10 = 44
            if (r9 != r10) goto L_0x0163
            goto L_0x0105
        L_0x0186:
            r13.getRawToken()
            goto L_0x0105
        */ throw new UnsupportedOperationException ( "Method not decompiled: gnu.xquery.lang.XQParser.parseFunctionDefinition(int, int):gnu.expr.Expression" ) ; }
Code decompiled incorrectly, please refer to instructions dump.
Code decompiled incorrectly please refer to instructions dump .