struct Foo {
    bool[2] a;
    field b;
}

def f(bool a, field b, Foo c, field[2] d) -> (Foo, field) {
    return (Foo { a: [a, a], b: d[0] }, c.a[0] ? b + c.b : d[1]);
}

def main(bool a, field b, Foo c, field[2] d) -> (Foo, field) {
    (Foo, field) r = f(a, b, c, d);
    return r;
}