:- module getopt_io.
:- use_module bool, builtin, char, io, list, map, maybe, pair, private_builtin, profiling_builtin, require, set, solutions, string.
:- type getopt_io.option_ops_special(OptionType)
	--->	none 
	;	notrack(pred(OptionType, getopt_io.special_data, tree234.tree234(OptionType, getopt_io.option_data), getopt_io.maybe_option_table(OptionType)))
	;	track(pred(OptionType, getopt_io.special_data, tree234.tree234(OptionType, getopt_io.option_data), getopt_io.maybe_option_table(OptionType), set_ordlist.set_ordlist(OptionType))).
:- type getopt_io.option_ops_internal(OptionType)
	--->	option_ops_internal((getopt_io.short_option) :: pred(character, OptionType), (getopt_io.long_option) :: pred(string, OptionType), (getopt_io.special_handler) :: getopt_io.option_ops_special(OptionType)).
:- inst (getopt_io.option_ops_internal) == bound(option_ops_internal((pred((builtin.in), (builtin.out)) is semidet), (pred((builtin.in), (builtin.out)) is semidet), bound(none ; notrack((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out)) is semidet)) ; track((pred((builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.out)) is semidet))))).
getopt_io.process_options(OptionOps_7, Args0_8, NonOptionArgs_9, Result_10, STATE_VARIABLE_IO_0_13, STATE_VARIABLE_IO_14) :-
    getopt_io.process_options(OptionOps_7, Args0_8, _OptionArgs_12, NonOptionArgs_9, Result_10, STATE_VARIABLE_IO_0_13, STATE_VARIABLE_IO_14).
getopt_io.init_option_table(OptionDefaultsPred_3, OptionTable_4) :-
    V_9 = (pred(V_10::(builtin.out)) is nondet :-
      some [] (
        OptionDataPair_11 = pair.(Option_6 - OptionData_7) : pair.pair(OptionType_1, getopt_io.option_data),
        call(OptionDefaultsPred_3, Option_6, OptionData_7),
        V_10 = OptionDataPair_11
      )
    )
 : (pred pair.pair(OptionType_1, getopt_io.option_data)),
    solutions.solutions(V_9, OptionDefaultsList_8),
    map.from_assoc_list(OptionDefaultsList_8, OptionTable_4).
getopt_io.init_option_table_multi(OptionDefaultsPred_3, OptionTable_4) :-
    V_9 = (pred(V_10::(builtin.out)) is multi :-
      some [] (
        OptionDataPair_11 = pair.(Option_6 - OptionData_7) : pair.pair(OptionType_1, getopt_io.option_data),
        call(OptionDefaultsPred_3, Option_6, OptionData_7),
        V_10 = OptionDataPair_11
      )
    )
 : (pred pair.pair(OptionType_1, getopt_io.option_data)),
    solutions.solutions(V_9, OptionDefaultsList_8),
    map.from_assoc_list(OptionDefaultsList_8, OptionTable_4).
getopt_io.lookup_bool_option(OT_4, Opt_5) = B_6 :-
    getopt_io.lookup_bool_option(OT_4, Opt_5, B_6).
getopt_io.lookup_int_option(OT_4, Opt_5) = N_6 :-
    getopt_io.lookup_int_option(OT_4, Opt_5, N_6).
getopt_io.lookup_string_option(OT_4, Opt_5) = S_6 :-
    getopt_io.lookup_string_option(OT_4, Opt_5, S_6).
getopt_io.lookup_maybe_int_option(OT_4, Opt_5) = MN_6 :-
    getopt_io.lookup_maybe_int_option(OT_4, Opt_5, MN_6).
getopt_io.lookup_maybe_string_option(OT_4, Opt_5) = MS_6 :-
    getopt_io.lookup_maybe_string_option(OT_4, Opt_5, MS_6).
getopt_io.lookup_accumulating_option(OT_4, Opt_5) = Ss_6 :-
    getopt_io.lookup_accumulating_option(OT_4, Opt_5, Ss_6).
:- pragma exceptions(predicate, (getopt_io.process_options), 6, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.process_options), 7, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.process_options_track), 9, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.init_option_table), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.init_option_table_multi), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.lookup_bool_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (getopt_io.lookup_bool_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.lookup_int_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (getopt_io.lookup_int_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.lookup_string_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (getopt_io.lookup_string_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.lookup_maybe_int_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (getopt_io.lookup_maybe_int_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.lookup_maybe_string_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (getopt_io.lookup_maybe_string_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (getopt_io.lookup_accumulating_option), 3, 0, may_throw(user_exception)).
:- pragma exceptions(function, (getopt_io.lookup_accumulating_option), 3, 0, may_throw(user_exception)).
:- pragma termination_info(getopt_io.process_options(builtin.in((getopt_io.option_ops)), (builtin.in), (builtin.out), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(getopt_io.process_options(builtin.in((getopt_io.option_ops)), (builtin.in), (builtin.out), (builtin.out), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(getopt_io.process_options_track(builtin.in((getopt_io.option_ops_track)), (builtin.in), (builtin.out), (builtin.out), (builtin.in), (builtin.out), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(getopt_io.init_option_table(builtin.in((pred((builtin.out), (builtin.out)) is nondet)), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.init_option_table_multi(builtin.in((pred((builtin.out), (builtin.out)) is multi)), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_bool_option((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_bool_option((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_int_option((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_int_option((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_string_option((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_string_option((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_maybe_int_option((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_maybe_int_option((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_maybe_string_option((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_maybe_string_option((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_accumulating_option((builtin.in), (builtin.in), (builtin.out)), infinite, can_loop).
:- pragma termination_info(getopt_io.lookup_accumulating_option((builtin.in), (builtin.in)) = (builtin.out), infinite, can_loop).
