set nchoice 0
if {![string length $tag]} {
lappend l "\tif (!odr_sequence_begin (o, p, sizeof(**p), name))"
set nchoice 0
if {![string length $tag]} {
lappend l "\tif (!odr_sequence_begin (o, p, sizeof(**p), name))"
} elseif {$implicit} {
lappend l "\tif (!odr_implicit_settag (o, $tagtype, $tag) ||"
lappend l "\t\t!odr_sequence_begin (o, p, sizeof(**p), name))"
} elseif {$implicit} {
lappend l "\tif (!odr_implicit_settag (o, $tagtype, $tag) ||"
lappend l "\t\t!odr_sequence_begin (o, p, sizeof(**p), name))"
} else {
lappend l "\tif (!odr_constructed_begin (o, p, $tagtype, $tag, name))"
} else {
lappend l "\tif (!odr_constructed_begin (o, p, $tagtype, $tag, name))"
lappend l "\tif (o->direction == ODR_DECODE)"
lappend l "\t\t*p = ($inf(vprefix)$name *) odr_malloc (o, sizeof(**p));"
lappend l "\tif (o->direction == ODR_DECODE)"
lappend l "\t\t*p = ($inf(vprefix)$name *) odr_malloc (o, sizeof(**p));"
lappend j "\tint [lindex $numName 0];"
lappend l "\tif (!odr_initmember (o, p, sizeof(**p)))"
lappend j "\tint [lindex $numName 0];"
lappend l "\tif (!odr_initmember (o, p, sizeof(**p)))"
if {[string length $tag]} {
if {$implicit} {
lappend l "\todr_implicit_settag (o, $tagtype, $tag);"
if {[string length $tag]} {
if {$implicit} {
lappend l "\todr_implicit_settag (o, $tagtype, $tag);"
lappend l "\t\};"
if {![string length $tag]} {
lappend l "\tif (!odr_initmember(o, p, sizeof(**p)))"
lappend l "\t\};"
if {![string length $tag]} {
lappend l "\tif (!odr_initmember(o, p, sizeof(**p)))"
lappend l "\tif (odr_choice(o, arm, &(*p)->[lindex $uName 1], &(*p)->[lindex $uName 0], name))"
} elseif {$implicit} {
lappend l "\tif (!odr_initmember(o, p, sizeof(**p)))"
lappend l "\tif (odr_choice(o, arm, &(*p)->[lindex $uName 1], &(*p)->[lindex $uName 0], name))"
} elseif {$implicit} {
lappend l "\tif (!odr_initmember(o, p, sizeof(**p)))"
lappend l "\todr_implicit_settag(o, $tagtype, $tag);"
lappend l "\tif (odr_choice(o, arm, &(*p)->[lindex $uName 1], &(*p)->[lindex $uName 0], name))"
} else {
lappend l "\tif (!*p && o->direction != ODR_DECODE)"
lappend l "\t\treturn opt;"
lappend l "\tif (!odr_constructed_begin(o, p, $tagtype, $tag, 0))"
lappend l "\todr_implicit_settag(o, $tagtype, $tag);"
lappend l "\tif (odr_choice(o, arm, &(*p)->[lindex $uName 1], &(*p)->[lindex $uName 0], name))"
} else {
lappend l "\tif (!*p && o->direction != ODR_DECODE)"
lappend l "\t\treturn opt;"
lappend l "\tif (!odr_constructed_begin(o, p, $tagtype, $tag, 0))"
lappend l "\tif (odr_choice(o, arm, &(*p)->[lindex $uName 1], &(*p)->[lindex $uName 0], name) &&"
lappend l "\t\todr_constructed_end(o))"
}
lappend l "\t\treturn 1;"
lappend l "\t*p = 0;"
lappend l "\tif (odr_choice(o, arm, &(*p)->[lindex $uName 1], &(*p)->[lindex $uName 0], name) &&"
lappend l "\t\todr_constructed_end(o))"
}
lappend l "\t\treturn 1;"
lappend l "\t*p = 0;"