/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */


#include <config.h>
#include <limits.h>
#include "kraaij_pohlmann.h"

static const symbol s_pool[] = {
#define s_0_0 0
'n', 'd', 'e',
#define s_0_1 3
'e', 'n',
#define s_0_2 (s_0_3 + 1)
#define s_0_3 5
'\'', 's',
#define s_0_4 (s_0_5 + 1)
#define s_0_5 7
'i', 'e', 's',
#define s_0_6 10
'a', 'u', 's',
#define s_1_0 13
'd', 'e',
#define s_1_1 15
'g', 'e',
#define s_1_2 17
'i', 's', 'c', 'h', 'e',
#define s_1_3 22
'j', 'e',
#define s_1_4 24
'l', 'i', 'j', 'k', 'e',
#define s_1_5 29
'l', 'e',
#define s_1_6 31
'e', 'n', 'e',
#define s_1_7 34
'r', 'e',
#define s_1_8 36
's', 'e',
#define s_1_9 38
't', 'e',
#define s_1_10 40
'i', 'e', 'v', 'e',
#define s_2_0 44
'h', 'e', 'i', 'd',
#define s_2_1 48
'f', 'i', 'e',
#define s_2_2 51
'g', 'i', 'e',
#define s_2_3 54
'a', 't', 'i', 'e',
#define s_2_4 58
'i', 's', 'm', 'e',
#define s_2_5 62
'i', 'n', 'g',
#define s_2_6 65
'a', 'r', 'i', 'j',
#define s_2_7 69
'e', 'r', 'i', 'j',
#define s_2_8 73
's', 'e', 'l',
#define s_2_9 76
'r', 'd', 'e', 'r',
#define s_2_10 80
's', 't', 'e', 'r',
#define s_2_11 84
'i', 't', 'e', 'i', 't',
#define s_2_12 89
'd', 's', 't',
#define s_2_13 92
't', 's', 't',
#define s_3_0 95
'e', 'n', 'd',
#define s_3_1 98
'a', 't', 'i', 'e', 'f',
#define s_3_2 s_3_9
#define s_3_3 s_3_10
#define s_3_4 103
'i', 'o', 'n', 'e', 'e', 'l',
#define s_3_5 109
'b', 'a', 'a', 'r',
#define s_3_6 113
'l', 'a', 'a', 'r',
#define s_3_7 117
'n', 'a', 'a', 'r',
#define s_3_8 121
'r', 'a', 'a', 'r',
#define s_3_9 125
'e', 'r', 'i', 'g', 'e', 'r',
#define s_3_10 131
'a', 'c', 'h', 't', 'i', 'g', 'e', 'r',
#define s_3_11 139
'l', 'i', 'j', 'k', 'e', 'r',
#define s_3_12 145
't', 'a', 'n', 't',
#define s_3_13 149
'e', 'r', 'i', 'g', 's', 't',
#define s_3_14 155
'a', 'c', 'h', 't', 'i', 'g', 's', 't',
#define s_3_15 163
'l', 'i', 'j', 'k', 's', 't',
#define s_4_0 s_4_1
#define s_4_1 169
'i', 'g', 'e', 'r',
#define s_4_2 173
'i', 'g', 's', 't',
#define s_5_0 177
'f', 't',
#define s_5_1 179
'k', 't',
#define s_5_2 181
'p', 't',
#define s_6_0 183
'b', 'b',
#define s_6_1 185
'c', 'c',
#define s_6_2 187
'd', 'd',
#define s_6_3 189
'f', 'f',
#define s_6_4 191
'g', 'g',
#define s_6_5 193
'h', 'h',
#define s_6_6 195
'j', 'j',
#define s_6_7 197
'k', 'k',
#define s_6_8 199
'l', 'l',
#define s_6_9 201
'm', 'm',
#define s_6_10 203
'n', 'n',
#define s_6_11 205
'p', 'p',
#define s_6_12 207
'q', 'q',
#define s_6_13 209
'r', 'r',
#define s_6_14 211
's', 's',
#define s_6_15 213
't', 't',
#define s_6_16 (s_6_17 + 1)
#define s_6_17 215
'v', 'v',
#define s_6_18 217
'w', 'w',
#define s_6_19 219
'x', 'x',
#define s_6_20 (s_6_21 + 1)
#define s_6_21 221
'z', 'z',
#define s_7_0 223
'd',
#define s_7_1 224
't',
};


static const struct among a_0[7] =
{
/*  0 */ { 3, s_0_0, -1, 7},
/*  1 */ { 2, s_0_1, -1, 6},
/*  2 */ { 1, s_0_2, -1, 2},
/*  3 */ { 2, s_0_3, 2, 1},
/*  4 */ { 2, s_0_4, 2, 4},
/*  5 */ { 3, s_0_5, 4, 3},
/*  6 */ { 3, s_0_6, 2, 5}
};


static const struct among a_1[11] =
{
/*  0 */ { 2, s_1_0, -1, 5},
/*  1 */ { 2, s_1_1, -1, 2},
/*  2 */ { 5, s_1_2, -1, 4},
/*  3 */ { 2, s_1_3, -1, 1},
/*  4 */ { 5, s_1_4, -1, 3},
/*  5 */ { 2, s_1_5, -1, 9},
/*  6 */ { 3, s_1_6, -1, 10},
/*  7 */ { 2, s_1_7, -1, 8},
/*  8 */ { 2, s_1_8, -1, 7},
/*  9 */ { 2, s_1_9, -1, 6},
/* 10 */ { 4, s_1_10, -1, 11}
};


static const struct among a_2[14] =
{
/*  0 */ { 4, s_2_0, -1, 3},
/*  1 */ { 3, s_2_1, -1, 6},
/*  2 */ { 3, s_2_2, -1, 7},
/*  3 */ { 4, s_2_3, -1, 1},
/*  4 */ { 4, s_2_4, -1, 2},
/*  5 */ { 3, s_2_5, -1, 2},
/*  6 */ { 4, s_2_6, -1, 5},
/*  7 */ { 4, s_2_7, -1, 2},
/*  8 */ { 3, s_2_8, -1, 3},
/*  9 */ { 4, s_2_9, -1, 4},
/* 10 */ { 4, s_2_10, -1, 3},
/* 11 */ { 5, s_2_11, -1, 2},
/* 12 */ { 3, s_2_12, -1, 9},
/* 13 */ { 3, s_2_13, -1, 8}
};


static const struct among a_3[16] =
{
/*  0 */ { 3, s_3_0, -1, 9},
/*  1 */ { 5, s_3_1, -1, 2},
/*  2 */ { 4, s_3_2, -1, 9},
/*  3 */ { 6, s_3_3, -1, 3},
/*  4 */ { 6, s_3_4, -1, 1},
/*  5 */ { 4, s_3_5, -1, 3},
/*  6 */ { 4, s_3_6, -1, 5},
/*  7 */ { 4, s_3_7, -1, 4},
/*  8 */ { 4, s_3_8, -1, 6},
/*  9 */ { 6, s_3_9, -1, 9},
/* 10 */ { 8, s_3_10, -1, 3},
/* 11 */ { 6, s_3_11, -1, 8},
/* 12 */ { 4, s_3_12, -1, 7},
/* 13 */ { 6, s_3_13, -1, 9},
/* 14 */ { 8, s_3_14, -1, 3},
/* 15 */ { 6, s_3_15, -1, 8}
};


static const struct among a_4[3] =
{
/*  0 */ { 2, s_4_0, -1, 1},
/*  1 */ { 4, s_4_1, -1, 1},
/*  2 */ { 4, s_4_2, -1, 1}
};


static const struct among a_5[3] =
{
/*  0 */ { 2, s_5_0, -1, 2},
/*  1 */ { 2, s_5_1, -1, 1},
/*  2 */ { 2, s_5_2, -1, 3}
};


static const struct among a_6[22] =
{
/*  0 */ { 2, s_6_0, -1, 1},
/*  1 */ { 2, s_6_1, -1, 2},
/*  2 */ { 2, s_6_2, -1, 3},
/*  3 */ { 2, s_6_3, -1, 4},
/*  4 */ { 2, s_6_4, -1, 5},
/*  5 */ { 2, s_6_5, -1, 6},
/*  6 */ { 2, s_6_6, -1, 7},
/*  7 */ { 2, s_6_7, -1, 8},
/*  8 */ { 2, s_6_8, -1, 9},
/*  9 */ { 2, s_6_9, -1, 10},
/* 10 */ { 2, s_6_10, -1, 11},
/* 11 */ { 2, s_6_11, -1, 12},
/* 12 */ { 2, s_6_12, -1, 13},
/* 13 */ { 2, s_6_13, -1, 14},
/* 14 */ { 2, s_6_14, -1, 15},
/* 15 */ { 2, s_6_15, -1, 16},
/* 16 */ { 1, s_6_16, -1, 4},
/* 17 */ { 2, s_6_17, 16, 17},
/* 18 */ { 2, s_6_18, -1, 18},
/* 19 */ { 2, s_6_19, -1, 19},
/* 20 */ { 1, s_6_20, -1, 15},
/* 21 */ { 2, s_6_21, 20, 20}
};


static const struct among a_7[2] =
{
/*  0 */ { 1, s_7_0, -1, 1},
/*  1 */ { 1, s_7_1, -1, 2}
};

static const unsigned char g_v[] = { 17, 65, 16, 1 };

static const unsigned char g_v_WX[] = { 17, 65, 208, 1 };

static const unsigned char g_AOU[] = { 1, 64, 16 };

static const unsigned char g_AIOU[] = { 1, 65, 16 };

static const symbol s_0[] = { 'i', 'j' };
static const symbol s_1[] = { 'i', 'j' };
static const symbol s_2[] = { 'i', 'j' };
static const symbol s_3[] = { 'i', 'e' };
static const symbol s_4[] = { 'a', 'r' };
static const symbol s_5[] = { 'e', 'r' };
static const symbol s_6[] = { 'e' };
static const symbol s_7[] = { 'a', 'u' };
static const symbol s_8[] = { 'h', 'e', 'd' };
static const symbol s_9[] = { 'h', 'e', 'i', 'd' };
static const symbol s_10[] = { 'n', 'd' };
static const symbol s_11[] = { 'n', 'd' };
static const symbol s_12[] = { '\'', 't' };
static const symbol s_13[] = { 'e', 't' };
static const symbol s_14[] = { 'r', 'n', 't' };
static const symbol s_15[] = { 'r', 'n' };
static const symbol s_16[] = { 'i', 'n', 'k' };
static const symbol s_17[] = { 'i', 'n', 'g' };
static const symbol s_18[] = { 'm', 'p' };
static const symbol s_19[] = { 'm' };
static const symbol s_20[] = { 'g' };
static const symbol s_21[] = { 'l', 'i', 'j', 'k' };
static const symbol s_22[] = { 'i', 's', 'c', 'h' };
static const symbol s_23[] = { 't' };
static const symbol s_24[] = { 's' };
static const symbol s_25[] = { 'r' };
static const symbol s_26[] = { 'l' };
static const symbol s_27[] = { 'e', 'n' };
static const symbol s_28[] = { 'i', 'e', 'f' };
static const symbol s_29[] = { 'e', 'e', 'r' };
static const symbol s_30[] = { 'r' };
static const symbol s_31[] = { 'a', 'a', 'r' };
static const symbol s_32[] = { 'f' };
static const symbol s_33[] = { 'g' };
static const symbol s_34[] = { 't' };
static const symbol s_35[] = { 'd' };
static const symbol s_36[] = { 'i', 'e' };
static const symbol s_37[] = { 'e', 'e', 'r' };
static const symbol s_38[] = { 'n' };
static const symbol s_39[] = { 'l' };
static const symbol s_40[] = { 'r' };
static const symbol s_41[] = { 't', 'e', 'e', 'r' };
static const symbol s_42[] = { 'l', 'i', 'j', 'k' };
static const symbol s_43[] = { 'k' };
static const symbol s_44[] = { 'f' };
static const symbol s_45[] = { 'p' };
static const symbol s_46[] = { 'b' };
static const symbol s_47[] = { 'c' };
static const symbol s_48[] = { 'd' };
static const symbol s_49[] = { 'f' };
static const symbol s_50[] = { 'g' };
static const symbol s_51[] = { 'h' };
static const symbol s_52[] = { 'j' };
static const symbol s_53[] = { 'k' };
static const symbol s_54[] = { 'l' };
static const symbol s_55[] = { 'm' };
static const symbol s_56[] = { 'n' };
static const symbol s_57[] = { 'p' };
static const symbol s_58[] = { 'q' };
static const symbol s_59[] = { 'r' };
static const symbol s_60[] = { 's' };
static const symbol s_61[] = { 't' };
static const symbol s_62[] = { 'v' };
static const symbol s_63[] = { 'w' };
static const symbol s_64[] = { 'x' };
static const symbol s_65[] = { 'z' };
static const symbol s_66[] = { 'g', 'e' };
static const symbol s_67[] = { 'g', 'e' };
static const symbol s_68[] = { 'i', 'j' };
static const symbol s_69[] = { 'i', 'j' };
static const symbol s_70[] = { 'Y' };
static const symbol s_71[] = { 'Y' };
static const symbol s_72[] = { 'y' };

int Xapian::InternalStemKraaij_pohlmann::r_R1() {
    if (!(I_p1 <= c)) return 0;
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_R2() {
    if (!(I_p2 <= c)) return 0;
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_V() {
    {   int m_test1 = l - c;
        {   int m2 = l - c; (void)m2;
            if (in_grouping_b_U(g_v, 97, 121, 0)) goto lab1;
            goto lab0;
        lab1:
            c = l - m2;
            if (!(eq_s_b(2, s_0))) return 0;
        }
    lab0:
        c = l - m_test1;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_VX() {
    {   int m_test1 = l - c;
        {   int ret = skip_utf8(p, c, lb, 0, -1);
            if (ret < 0) return 0;
            c = ret;
        }
        {   int m2 = l - c; (void)m2;
            if (in_grouping_b_U(g_v, 97, 121, 0)) goto lab1;
            goto lab0;
        lab1:
            c = l - m2;
            if (!(eq_s_b(2, s_1))) return 0;
        }
    lab0:
        c = l - m_test1;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_C() {
    {   int m_test1 = l - c;
        {   int m2 = l - c; (void)m2;
            if (!(eq_s_b(2, s_2))) goto lab0;
            return 0;
        lab0:
            c = l - m2;
        }
        if (out_grouping_b_U(g_v, 97, 121, 0)) return 0;
        c = l - m_test1;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_lengthen_V() {
    {   int m1 = l - c; (void)m1;
        if (out_grouping_b_U(g_v_WX, 97, 121, 0)) goto lab0;
        ket = c;
        {   int m2 = l - c; (void)m2;
            if (in_grouping_b_U(g_AOU, 97, 117, 0)) goto lab2;
            bra = c;
            {   int m_test3 = l - c;
                {   int m4 = l - c; (void)m4;
                    if (out_grouping_b_U(g_v, 97, 121, 0)) goto lab4;
                    goto lab3;
                lab4:
                    c = l - m4;
                    if (c > lb) goto lab2;
                }
            lab3:
                c = l - m_test3;
            }
            goto lab1;
        lab2:
            c = l - m2;
            if (c <= lb || p[c - 1] != 'e') goto lab0;
            c--;
            bra = c;
            {   int m_test5 = l - c;
                {   int m6 = l - c; (void)m6;
                    if (out_grouping_b_U(g_v, 97, 121, 0)) goto lab6;
                    goto lab5;
                lab6:
                    c = l - m6;
                    if (c > lb) goto lab0;
                }
            lab5:
                {   int m7 = l - c; (void)m7;
                    if (in_grouping_b_U(g_AIOU, 97, 117, 0)) goto lab7;
                    goto lab0;
                lab7:
                    c = l - m7;
                }
                {   int m8 = l - c; (void)m8;
                    {   int ret = skip_utf8(p, c, lb, 0, -1);
                        if (ret < 0) goto lab8;
                        c = ret;
                    }
                    if (in_grouping_b_U(g_AIOU, 97, 117, 0)) goto lab8;
                    if (out_grouping_b_U(g_v, 97, 121, 0)) goto lab8;
                    goto lab0;
                lab8:
                    c = l - m8;
                }
                c = l - m_test5;
            }
        }
    lab1:
        {   symbol * ret = slice_to(S_ch);
            if (ret == 0) return -1;
            S_ch = ret;
        }
        {   int saved_c = c;
            insert_v(c, c, S_ch);
            c = saved_c;
        }
    lab0:
        c = l - m1;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_1() {
    int among_var;
    ket = c;
    if (c <= lb || p[c - 1] >> 5 != 3 || !((540704 >> (p[c - 1] & 0x1f)) & 1)) return 0;
    among_var = find_among_b(s_pool, a_0, 7, 0, 0);
    if (!(among_var)) return 0;
    bra = c;
    switch (among_var) {
        case 1:
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            break;
        case 2:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int m1 = l - c; (void)m1;
                if (c <= lb || p[c - 1] != 't') goto lab0;
                c--;
                {   int ret = r_R1();
                    if (ret == 0) goto lab0;
                    if (ret < 0) return ret;
                }
                return 0;
            lab0:
                c = l - m1;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            break;
        case 3:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(2, s_3);
                if (ret < 0) return ret;
            }
            break;
        case 4:
            {   int m2 = l - c; (void)m2;
                if (!(eq_s_b(2, s_4))) goto lab2;
                {   int ret = r_R1();
                    if (ret == 0) goto lab2;
                    if (ret < 0) return ret;
                }
                {   int ret = r_C();
                    if (ret == 0) goto lab2;
                    if (ret < 0) return ret;
                }
                bra = c;
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                {   int ret = r_lengthen_V();
                    if (ret == 0) goto lab2;
                    if (ret < 0) return ret;
                }
                goto lab1;
            lab2:
                c = l - m2;
                if (!(eq_s_b(2, s_5))) goto lab3;
                {   int ret = r_R1();
                    if (ret == 0) goto lab3;
                    if (ret < 0) return ret;
                }
                {   int ret = r_C();
                    if (ret == 0) goto lab3;
                    if (ret < 0) return ret;
                }
                bra = c;
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab1;
            lab3:
                c = l - m2;
                {   int ret = r_R1();
                    if (ret <= 0) return ret;
                }
                {   int ret = r_C();
                    if (ret <= 0) return ret;
                }
                {   int ret = slice_from_s(1, s_6);
                    if (ret < 0) return ret;
                }
            }
        lab1:
            break;
        case 5:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_V();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(2, s_7);
                if (ret < 0) return ret;
            }
            break;
        case 6:
            {   int m3 = l - c; (void)m3;
                if (!(eq_s_b(3, s_8))) goto lab5;
                {   int ret = r_R1();
                    if (ret == 0) goto lab5;
                    if (ret < 0) return ret;
                }
                bra = c;
                {   int ret = slice_from_s(4, s_9);
                    if (ret < 0) return ret;
                }
                goto lab4;
            lab5:
                c = l - m3;
                if (!(eq_s_b(2, s_10))) goto lab6;
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab4;
            lab6:
                c = l - m3;
                if (c <= lb || p[c - 1] != 'd') goto lab7;
                c--;
                {   int ret = r_R1();
                    if (ret == 0) goto lab7;
                    if (ret < 0) return ret;
                }
                {   int ret = r_C();
                    if (ret == 0) goto lab7;
                    if (ret < 0) return ret;
                }
                bra = c;
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab4;
            lab7:
                c = l - m3;
                {   int m4 = l - c; (void)m4;
                    if (c <= lb || p[c - 1] != 'i') goto lab10;
                    c--;
                    goto lab9;
                lab10:
                    c = l - m4;
                    if (c <= lb || p[c - 1] != 'j') goto lab8;
                    c--;
                }
            lab9:
                {   int ret = r_V();
                    if (ret == 0) goto lab8;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab4;
            lab8:
                c = l - m3;
                {   int ret = r_R1();
                    if (ret <= 0) return ret;
                }
                {   int ret = r_C();
                    if (ret <= 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                {   int ret = r_lengthen_V();
                    if (ret <= 0) return ret;
                }
            }
        lab4:
            break;
        case 7:
            {   int ret = slice_from_s(2, s_11);
                if (ret < 0) return ret;
            }
            break;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_2() {
    int among_var;
    ket = c;
    if (c - 1 <= lb || p[c - 1] != 101) return 0;
    among_var = find_among_b(s_pool, a_1, 11, 0, 0);
    if (!(among_var)) return 0;
    bra = c;
    switch (among_var) {
        case 1:
            {   int m1 = l - c; (void)m1;
                if (!(eq_s_b(2, s_12))) goto lab1;
                bra = c;
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab1:
                c = l - m1;
                if (!(eq_s_b(2, s_13))) goto lab2;
                bra = c;
                {   int ret = r_R1();
                    if (ret == 0) goto lab2;
                    if (ret < 0) return ret;
                }
                {   int ret = r_C();
                    if (ret == 0) goto lab2;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab2:
                c = l - m1;
                if (!(eq_s_b(3, s_14))) goto lab3;
                bra = c;
                {   int ret = slice_from_s(2, s_15);
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab3:
                c = l - m1;
                if (c <= lb || p[c - 1] != 't') goto lab4;
                c--;
                bra = c;
                {   int ret = r_R1();
                    if (ret == 0) goto lab4;
                    if (ret < 0) return ret;
                }
                {   int ret = r_VX();
                    if (ret == 0) goto lab4;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab4:
                c = l - m1;
                if (!(eq_s_b(3, s_16))) goto lab5;
                bra = c;
                {   int ret = slice_from_s(3, s_17);
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab5:
                c = l - m1;
                if (!(eq_s_b(2, s_18))) goto lab6;
                bra = c;
                {   int ret = slice_from_s(1, s_19);
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab6:
                c = l - m1;
                if (c <= lb || p[c - 1] != '\'') goto lab7;
                c--;
                bra = c;
                {   int ret = r_R1();
                    if (ret == 0) goto lab7;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                goto lab0;
            lab7:
                c = l - m1;
                bra = c;
                {   int ret = r_R1();
                    if (ret <= 0) return ret;
                }
                {   int ret = r_C();
                    if (ret <= 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
            }
        lab0:
            break;
        case 2:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(1, s_20);
                if (ret < 0) return ret;
            }
            break;
        case 3:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(4, s_21);
                if (ret < 0) return ret;
            }
            break;
        case 4:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(4, s_22);
                if (ret < 0) return ret;
            }
            break;
        case 5:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            break;
        case 6:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(1, s_23);
                if (ret < 0) return ret;
            }
            break;
        case 7:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(1, s_24);
                if (ret < 0) return ret;
            }
            break;
        case 8:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(1, s_25);
                if (ret < 0) return ret;
            }
            break;
        case 9:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            insert_s(c, c, 1, s_26);
            {   int ret = r_lengthen_V();
                if (ret <= 0) return ret;
            }
            break;
        case 10:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            insert_s(c, c, 2, s_27);
            {   int ret = r_lengthen_V();
                if (ret <= 0) return ret;
            }
            break;
        case 11:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(3, s_28);
                if (ret < 0) return ret;
            }
            break;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_3() {
    int among_var;
    ket = c;
    if (c - 2 <= lb || p[c - 1] >> 5 != 3 || !((1316016 >> (p[c - 1] & 0x1f)) & 1)) return 0;
    among_var = find_among_b(s_pool, a_2, 14, 0, 0);
    if (!(among_var)) return 0;
    bra = c;
    switch (among_var) {
        case 1:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(3, s_29);
                if (ret < 0) return ret;
            }
            break;
        case 2:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            {   int ret = r_lengthen_V();
                if (ret <= 0) return ret;
            }
            break;
        case 3:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            break;
        case 4:
            {   int ret = slice_from_s(1, s_30);
                if (ret < 0) return ret;
            }
            break;
        case 5:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(3, s_31);
                if (ret < 0) return ret;
            }
            break;
        case 6:
            {   int ret = r_R2();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            insert_s(c, c, 1, s_32);
            {   int ret = r_lengthen_V();
                if (ret <= 0) return ret;
            }
            break;
        case 7:
            {   int ret = r_R2();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            insert_s(c, c, 1, s_33);
            {   int ret = r_lengthen_V();
                if (ret <= 0) return ret;
            }
            break;
        case 8:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(1, s_34);
                if (ret < 0) return ret;
            }
            break;
        case 9:
            {   int ret = r_R1();
                if (ret <= 0) return ret;
            }
            {   int ret = r_C();
                if (ret <= 0) return ret;
            }
            {   int ret = slice_from_s(1, s_35);
                if (ret < 0) return ret;
            }
            break;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_4() {
    int among_var;
    {   int m1 = l - c; (void)m1;
        ket = c;
        if (c - 2 <= lb || p[c - 1] >> 5 != 3 || !((1315024 >> (p[c - 1] & 0x1f)) & 1)) goto lab1;
        among_var = find_among_b(s_pool, a_3, 16, 0, 0);
        if (!(among_var)) goto lab1;
        bra = c;
        switch (among_var) {
            case 1:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(2, s_36);
                    if (ret < 0) return ret;
                }
                break;
            case 2:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(3, s_37);
                    if (ret < 0) return ret;
                }
                break;
            case 3:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                break;
            case 4:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = r_V();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(1, s_38);
                    if (ret < 0) return ret;
                }
                break;
            case 5:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = r_V();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(1, s_39);
                    if (ret < 0) return ret;
                }
                break;
            case 6:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = r_V();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(1, s_40);
                    if (ret < 0) return ret;
                }
                break;
            case 7:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(4, s_41);
                    if (ret < 0) return ret;
                }
                break;
            case 8:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_from_s(4, s_42);
                    if (ret < 0) return ret;
                }
                break;
            case 9:
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = r_C();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                {   int ret = slice_del();
                    if (ret < 0) return ret;
                }
                {   int ret = r_lengthen_V();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                break;
        }
        goto lab0;
    lab1:
        c = l - m1;
        ket = c;
        if (c - 1 <= lb || p[c - 1] >> 5 != 3 || !((1310848 >> (p[c - 1] & 0x1f)) & 1)) return 0;
        among_var = find_among_b(s_pool, a_4, 3, 0, 0);
        if (!(among_var)) return 0;
        bra = c;
        {   int ret = r_R1();
            if (ret <= 0) return ret;
        }
        {   int ret = r_C();
            if (ret <= 0) return ret;
        }
        {   int ret = slice_del();
            if (ret < 0) return ret;
        }
        {   int ret = r_lengthen_V();
            if (ret <= 0) return ret;
        }
    }
lab0:
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_7() {
    int among_var;
    ket = c;
    if (c - 1 <= lb || p[c - 1] != 116) return 0;
    among_var = find_among_b(s_pool, a_5, 3, 0, 0);
    if (!(among_var)) return 0;
    bra = c;
    switch (among_var) {
        case 1:
            {   int ret = slice_from_s(1, s_43);
                if (ret < 0) return ret;
            }
            break;
        case 2:
            {   int ret = slice_from_s(1, s_44);
                if (ret < 0) return ret;
            }
            break;
        case 3:
            {   int ret = slice_from_s(1, s_45);
                if (ret < 0) return ret;
            }
            break;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_6() {
    int among_var;
    ket = c;
    if (c <= lb || p[c - 1] >> 5 != 3 || !((98532828 >> (p[c - 1] & 0x1f)) & 1)) return 0;
    among_var = find_among_b(s_pool, a_6, 22, 0, 0);
    if (!(among_var)) return 0;
    bra = c;
    switch (among_var) {
        case 1:
            {   int ret = slice_from_s(1, s_46);
                if (ret < 0) return ret;
            }
            break;
        case 2:
            {   int ret = slice_from_s(1, s_47);
                if (ret < 0) return ret;
            }
            break;
        case 3:
            {   int ret = slice_from_s(1, s_48);
                if (ret < 0) return ret;
            }
            break;
        case 4:
            {   int ret = slice_from_s(1, s_49);
                if (ret < 0) return ret;
            }
            break;
        case 5:
            {   int ret = slice_from_s(1, s_50);
                if (ret < 0) return ret;
            }
            break;
        case 6:
            {   int ret = slice_from_s(1, s_51);
                if (ret < 0) return ret;
            }
            break;
        case 7:
            {   int ret = slice_from_s(1, s_52);
                if (ret < 0) return ret;
            }
            break;
        case 8:
            {   int ret = slice_from_s(1, s_53);
                if (ret < 0) return ret;
            }
            break;
        case 9:
            {   int ret = slice_from_s(1, s_54);
                if (ret < 0) return ret;
            }
            break;
        case 10:
            {   int ret = slice_from_s(1, s_55);
                if (ret < 0) return ret;
            }
            break;
        case 11:
            {   int ret = slice_from_s(1, s_56);
                if (ret < 0) return ret;
            }
            break;
        case 12:
            {   int ret = slice_from_s(1, s_57);
                if (ret < 0) return ret;
            }
            break;
        case 13:
            {   int ret = slice_from_s(1, s_58);
                if (ret < 0) return ret;
            }
            break;
        case 14:
            {   int ret = slice_from_s(1, s_59);
                if (ret < 0) return ret;
            }
            break;
        case 15:
            {   int ret = slice_from_s(1, s_60);
                if (ret < 0) return ret;
            }
            break;
        case 16:
            {   int ret = slice_from_s(1, s_61);
                if (ret < 0) return ret;
            }
            break;
        case 17:
            {   int ret = slice_from_s(1, s_62);
                if (ret < 0) return ret;
            }
            break;
        case 18:
            {   int ret = slice_from_s(1, s_63);
                if (ret < 0) return ret;
            }
            break;
        case 19:
            {   int ret = slice_from_s(1, s_64);
                if (ret < 0) return ret;
            }
            break;
        case 20:
            {   int ret = slice_from_s(1, s_65);
                if (ret < 0) return ret;
            }
            break;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Step_1c() {
    int among_var;
    ket = c;
    if (c <= lb || (p[c - 1] != 100 && p[c - 1] != 116)) return 0;
    among_var = find_among_b(s_pool, a_7, 2, 0, 0);
    if (!(among_var)) return 0;
    bra = c;
    {   int ret = r_R1();
        if (ret <= 0) return ret;
    }
    {   int ret = r_C();
        if (ret <= 0) return ret;
    }
    switch (among_var) {
        case 1:
            {   int m1 = l - c; (void)m1;
                if (c <= lb || p[c - 1] != 'n') goto lab0;
                c--;
                {   int ret = r_R1();
                    if (ret == 0) goto lab0;
                    if (ret < 0) return ret;
                }
                return 0;
            lab0:
                c = l - m1;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            break;
        case 2:
            {   int m2 = l - c; (void)m2;
                if (c <= lb || p[c - 1] != 'h') goto lab1;
                c--;
                {   int ret = r_R1();
                    if (ret == 0) goto lab1;
                    if (ret < 0) return ret;
                }
                return 0;
            lab1:
                c = l - m2;
            }
            {   int ret = slice_del();
                if (ret < 0) return ret;
            }
            break;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Lose_prefix() {
    bra = c;
    if (!(eq_s(2, s_66))) return 0;
    ket = c;
    {   int c_test1 = c;
        {   int ret = skip_utf8(p, c, 0, l, + 3);
            if (ret < 0) return 0;
            c = ret;
        }
        c = c_test1;
    }
    if (out_grouping_U(g_v, 97, 121, 1) < 0) return 0;
    if (in_grouping_U(g_v, 97, 121, 1) < 0) return 0;
    I_GE_removed = 1;
    {   int ret = slice_del();
        if (ret < 0) return ret;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_Lose_infix() {
    {   int ret = skip_utf8(p, c, 0, l, 1);
        if (ret < 0) return 0;
        c = ret;
    }
    while(1) {
        bra = c;
        if (!(eq_s(2, s_67))) goto lab0;
        ket = c;
        break;
    lab0:
        {   int ret = skip_utf8(p, c, 0, l, 1);
            if (ret < 0) return 0;
            c = ret;
        }
    }
    {   int c_test1 = c;
        {   int ret = skip_utf8(p, c, 0, l, + 3);
            if (ret < 0) return 0;
            c = ret;
        }
        c = c_test1;
    }
    if (out_grouping_U(g_v, 97, 121, 1) < 0) return 0;
    if (in_grouping_U(g_v, 97, 121, 1) < 0) return 0;
    I_GE_removed = 1;
    {   int ret = slice_del();
        if (ret < 0) return ret;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::r_measure() {
    {   int c1 = c;
        c = l;
        I_p1 = c;
        I_p2 = c;
        c = c1;
    }
    {   int c2 = c;
        while(1) {
            if (out_grouping_U(g_v, 97, 121, 0)) goto lab2;
            continue;
        lab2:
            break;
        }
        {   int i = 1;
            while(1) {
                int c3 = c;
                {   int c4 = c;
                    if (!(eq_s(2, s_68))) goto lab5;
                    goto lab4;
                lab5:
                    c = c4;
                    if (in_grouping_U(g_v, 97, 121, 0)) goto lab3;
                }
            lab4:
                i--;
                continue;
            lab3:
                c = c3;
                break;
            }
            if (i > 0) goto lab1;
        }
        if (out_grouping_U(g_v, 97, 121, 0)) goto lab1;
        I_p1 = c;
        while(1) {
            if (out_grouping_U(g_v, 97, 121, 0)) goto lab6;
            continue;
        lab6:
            break;
        }
        {   int i = 1;
            while(1) {
                int c5 = c;
                {   int c6 = c;
                    if (!(eq_s(2, s_69))) goto lab9;
                    goto lab8;
                lab9:
                    c = c6;
                    if (in_grouping_U(g_v, 97, 121, 0)) goto lab7;
                }
            lab8:
                i--;
                continue;
            lab7:
                c = c5;
                break;
            }
            if (i > 0) goto lab1;
        }
        if (out_grouping_U(g_v, 97, 121, 0)) goto lab1;
        I_p2 = c;
    lab1:
        c = c2;
    }
    return 1;
}

int Xapian::InternalStemKraaij_pohlmann::stem() {
    I_Y_found = 0;
    I_stemmed = 0;
    {   int c1 = c;
        bra = c;
        if (c == l || p[c] != 'y') goto lab0;
        c++;
        ket = c;
        {   int ret = slice_from_s(1, s_70);
            if (ret < 0) return ret;
        }
        I_Y_found = 1;
    lab0:
        c = c1;
    }
    {   int c2 = c;
        while(1) {
            int c3 = c;
            while(1) {
                int c4 = c;
                if (in_grouping_U(g_v, 97, 121, 0)) goto lab3;
                bra = c;
                if (c == l || p[c] != 'y') goto lab3;
                c++;
                ket = c;
                c = c4;
                break;
            lab3:
                c = c4;
                {   int ret = skip_utf8(p, c, 0, l, 1);
                    if (ret < 0) goto lab2;
                    c = ret;
                }
            }
            {   int ret = slice_from_s(1, s_71);
                if (ret < 0) return ret;
            }
            I_Y_found = 1;
            continue;
        lab2:
            c = c3;
            break;
        }
        c = c2;
    }
    {   int ret = r_measure();
        if (ret <= 0) return ret;
    }
    lb = c; c = l;

    {   int m5 = l - c; (void)m5;
        {   int ret = r_Step_1();
            if (ret == 0) goto lab4;
            if (ret < 0) return ret;
        }
        I_stemmed = 1;
    lab4:
        c = l - m5;
    }
    {   int m6 = l - c; (void)m6;
        {   int ret = r_Step_2();
            if (ret == 0) goto lab5;
            if (ret < 0) return ret;
        }
        I_stemmed = 1;
    lab5:
        c = l - m6;
    }
    {   int m7 = l - c; (void)m7;
        {   int ret = r_Step_3();
            if (ret == 0) goto lab6;
            if (ret < 0) return ret;
        }
        I_stemmed = 1;
    lab6:
        c = l - m7;
    }
    {   int m8 = l - c; (void)m8;
        {   int ret = r_Step_4();
            if (ret == 0) goto lab7;
            if (ret < 0) return ret;
        }
        I_stemmed = 1;
    lab7:
        c = l - m8;
    }
    c = lb;
    I_GE_removed = 0;
    {   int c9 = c;
        {   int c10 = c;
            {   int ret = r_Lose_prefix();
                if (ret == 0) goto lab8;
                if (ret < 0) return ret;
            }
            c = c10;
            {   int ret = r_measure();
                if (ret == 0) goto lab8;
                if (ret < 0) return ret;
            }
        }
    lab8:
        c = c9;
    }
    lb = c; c = l;

    {   int m11 = l - c; (void)m11;
        if (!(I_GE_removed)) goto lab9;
        {   int ret = r_Step_1c();
            if (ret == 0) goto lab9;
            if (ret < 0) return ret;
        }
    lab9:
        c = l - m11;
    }
    c = lb;
    I_GE_removed = 0;
    {   int c12 = c;
        {   int c13 = c;
            {   int ret = r_Lose_infix();
                if (ret == 0) goto lab10;
                if (ret < 0) return ret;
            }
            c = c13;
            {   int ret = r_measure();
                if (ret == 0) goto lab10;
                if (ret < 0) return ret;
            }
        }
    lab10:
        c = c12;
    }
    lb = c; c = l;

    {   int m14 = l - c; (void)m14;
        if (!(I_GE_removed)) goto lab11;
        {   int ret = r_Step_1c();
            if (ret == 0) goto lab11;
            if (ret < 0) return ret;
        }
    lab11:
        c = l - m14;
    }
    c = lb;
    lb = c; c = l;

    {   int m15 = l - c; (void)m15;
        {   int ret = r_Step_7();
            if (ret == 0) goto lab12;
            if (ret < 0) return ret;
        }
        I_stemmed = 1;
    lab12:
        c = l - m15;
    }
    {   int m16 = l - c; (void)m16;
        
        if (!(I_stemmed)) goto lab15;
        goto lab14;
    lab15:
        if (!(I_GE_removed)) goto lab13;
    lab14:
        {   int ret = r_Step_6();
            if (ret == 0) goto lab13;
            if (ret < 0) return ret;
        }
    lab13:
        c = l - m16;
    }
    c = lb;
    {   int c17 = c;
        if (!(I_Y_found)) goto lab16;
        while(1) {
            int c18 = c;
            while(1) {
                int c19 = c;
                bra = c;
                if (c == l || p[c] != 'Y') goto lab18;
                c++;
                ket = c;
                c = c19;
                break;
            lab18:
                c = c19;
                {   int ret = skip_utf8(p, c, 0, l, 1);
                    if (ret < 0) goto lab17;
                    c = ret;
                }
            }
            {   int ret = slice_from_s(1, s_72);
                if (ret < 0) return ret;
            }
            continue;
        lab17:
            c = c18;
            break;
        }
    lab16:
        c = c17;
    }
    return 1;
}

Xapian::InternalStemKraaij_pohlmann::InternalStemKraaij_pohlmann()
    : I_GE_removed(0), I_stemmed(0), I_Y_found(0), I_p2(0), I_p1(0), S_ch(0)
{
    S_ch = create_s();
}

Xapian::InternalStemKraaij_pohlmann::~InternalStemKraaij_pohlmann()
{
    lose_s(S_ch);
}

std::string
Xapian::InternalStemKraaij_pohlmann::get_description() const
{
    return "kraaij_pohlmann";
}
