#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_initialise(argc, argv);
// 2 %string (6) s
_imp_string6 S;
// 3 s = "hello"
/* clang-format off */
_imp_strncpy(/*?*/&S, ({__typeof__(_imp_string255) tmp;/*B*/ tmp = _imp_str_literal("hello"); (void *)&tmp;}), /*max:*/6);
/* clang-format on */
// 4 s = string(addr(s))
/* clang-format off */
_imp_strncpy(/*?*/&S, ({__typeof__(_imp_string255) tmp;/*B*/ tmp = *_imp_STRING(_imp_ADDR(/*?*/&S)); (void *)&tmp;}), /*max:*/6);
/* clang-format on */
// 5 s <- "longer string"
/* clang-format off */
_imp_strncpy(/*?*/&S, ({__typeof__(_imp_string255) tmp; /*C*/ tmp = _imp_str_literal("longer string"); (void *)&tmp;}), /*max:*/6);
/* clang-format on */
/* truncated copy of no more than 6 chars */
/* clang-format off */
if (*_imp_LENGTH((_imp_string *)/*?*/&S) > 6) *_imp_LENGTH((_imp_string *)/*?*/&S) = 6;
/* clang-format on */
// 6 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}