static int Player_actor_request_main_takeout_item(GAME* game, int priority) {
    if (Player_actor_check_request_main_able(game, mPlayer_INDEX_TAKEOUT_ITEM, priority)) {
        PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(game);
        mPlayer_request_takeout_item_c* req_takeout_item_p = &player->requested_main_index_data.takeout_item;

        req_takeout_item_p->request_main_index = player->requested_main_index;
        Player_actor_request_main_index(game, mPlayer_INDEX_TAKEOUT_ITEM, priority);
        return TRUE;
    }

    return FALSE;
}

static void Player_actor_setup_main_Takeout_item(ACTOR* actorx, GAME* game) {
    PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
    mPlayer_request_takeout_item_c* req_takeout_item_p = &player->requested_main_index_data.takeout_item;
    mPlayer_main_takeout_item_c* main_takeout_item_p = &player->main_data.takeout_item;
    int item_kind;
    int anim1_idx;

    item_kind = Player_actor_Get_ItemKind(actorx, player->requested_main_index);

    main_takeout_item_p->back_request_data = *req_takeout_item_p;
    main_takeout_item_p->timer = 0.0f;

    Player_actor_LoadOrDestruct_Item(actorx, item_kind, mPlib_Get_BasicItemAnimeIndex_fromItemKind(item_kind),
                                     cKF_FRAMECONTROL_REPEAT, 0.5f, 5.0f, -1.0f);
    Player_actor_Set_now_item_main_index(actorx, Player_actor_Get_BasicItemMainIndex_fromItemKind(item_kind));
    player->item_kind = item_kind;

    if (mPlayer_ITEM_IS_UMBRELLA(item_kind) != FALSE) {
        ACTOR* umbrella_p;

        player->umbrella_state = 1;
        umbrella_p = Player_actor_Get_umbrella_p(actorx, game);
        Player_actor_InitAnimation_Base2(actorx, game, mPlayer_ANIM_UMB_OPEN1, mPlayer_ANIM_UMB_OPEN1, 1.0f, 1.0f, 0.5f,
                                         -5.0f, cKF_FRAMECONTROL_STOP, mPlayer_PART_TABLE_NORMAL);
        player->item_scale = 1.0f;
    } else {
        Player_actor_InitAnimation_Base3(actorx, game, mPlayer_ANIM_PUTAWAY1, mPlayer_ANIM_PUTAWAY1, 0.5f, 9.0f,
                                         cKF_FRAMECONTROL_STOP, mPlayer_PART_TABLE_NORMAL);
        player->item_scale = 0.0f;
    }

    Player_actor_setup_main_Base(actorx, game);
    Player_actor_sound_GASAGOSO(actorx);
}

static void Player_actor_settle_main_Takeout_item(ACTOR* actorx, GAME* game) {
    Player_actor_SetEffect_forTakeout_item(actorx, game);
}

static void Player_actor_Movement_Takeout_item(ACTOR* actorx) {
    Player_actor_Movement_Base_Braking_common(actorx, 0.32625f);
}

static int Player_actor_CulcAnimation_Takeout_item(ACTOR* actorx, f32* last_anim0_cur_frame_p) {
    return Player_actor_CulcAnimation_Base2(actorx, last_anim0_cur_frame_p);
}

static void Player_actor_ObjCheck_Takeout_item(ACTOR* actorx, GAME* game) {
    Player_actor_Excute_Corect_forStand(actorx, game);
}

static void Player_actor_SearchAnimation_Takeout_item(ACTOR* actorx, GAME* game, f32 frame) {
    if (Player_actor_Check_AnimationFrame_PerfectEquel(actorx, frame) == FALSE) {
        Player_actor_Set_FootMark_Base1(actorx, game, FALSE, FALSE);
    }
}

static void Player_actor_BGcheck_Takeout_item(ACTOR* actorx) {
    Player_actor_BGcheck_common_type1(actorx);
}

static void Player_actor_SearchTimer_Takeout_item(ACTOR* actorx, GAME* game) {
    int item_kind = Player_actor_Get_ItemKind_from_submenu();
    PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
    mPlayer_main_takeout_item_c* main_takeout_item_p = &player->main_data.takeout_item;
    f32* timer_p = &main_takeout_item_p->timer;

    if (mPlayer_ITEM_IS_UMBRELLA(item_kind) == FALSE) {
        f32 timer = *timer_p;

        if (*timer_p < 54.0f) {
            (*timer_p) += 1.0f;

            if (*timer_p >= 36.0f) {
                int next_anim0_idx;
                int now_anim0_idx;

                player->item_scale = get_percent_forAccelBrake(*timer_p, 36.0f, 54.0f, 0.0f, 0.0f);
                next_anim0_idx = mPlib_Get_BasicPlayerAnimeIndex_fromItemKind(item_kind);
                now_anim0_idx = player->animation0_idx;

                if (now_anim0_idx != next_anim0_idx) {
                    Player_actor_InitAnimation_Base1(actorx, game, next_anim0_idx, next_anim0_idx, 1.0f, 1.0f, 0.5f,
                                                     9.0f, mPlayer_PART_TABLE_NORMAL);
                }
            }
        }
    }
}

static void Player_actor_request_proc_index_fromTakeout_item(ACTOR* actorx, GAME* game, int end_flag) {
    PLAYER_ACTOR* player = (PLAYER_ACTOR*)actorx;
    mPlayer_main_takeout_item_c* main_takeout_item_p = &player->main_data.takeout_item;
    int item_kind = Player_actor_Get_ItemKind_from_submenu();

    if (mPlayer_ITEM_IS_UMBRELLA(item_kind) != FALSE) {
        if (end_flag == FALSE) {
            return;
        }
    } else {
        f32 timer = main_takeout_item_p->timer;

        if (timer < 54.0f) {
            return;
        }
    }

    Player_actor_SettleRequestMainIndexPriority(actorx);
    bcopy(&main_takeout_item_p->back_request_data.request_data, &player->requested_main_index_data,
          sizeof(mPlayer_request_backup_u));
    Player_actor_request_main_index(game, main_takeout_item_p->back_request_data.request_main_index,
                                    mPlayer_REQUEST_PRIORITY_37);
}

static void Player_actor_main_Takeout_item(ACTOR* actorx, GAME* game) {
    f32 last_anim0_cur_frame;
    int end_flag;

    Player_actor_Movement_Takeout_item(actorx);
    end_flag = Player_actor_CulcAnimation_Takeout_item(actorx, &last_anim0_cur_frame);
    Player_actor_Reinput_force_position_angle(actorx, game);
    Player_actor_SearchTimer_Takeout_item(actorx, game);
    Player_actor_SearchAnimation_Takeout_item(actorx, game, last_anim0_cur_frame);
    Player_actor_recover_lean_angle(actorx);
    Player_actor_set_eye_pattern_normal(actorx);
    Player_actor_ObjCheck_Takeout_item(actorx, game);
    Player_actor_BGcheck_Takeout_item(actorx);
    Player_actor_Item_main(actorx, game);
    Player_actor_request_proc_index_fromTakeout_item(actorx, game, end_flag);
}
