---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: LetIn {
  bindings: [
   Binding {
    from: AttributePath {
     parts: [
      Raw {
       content: "zeroPad",
       position: (5, 3),
      },
     ],
    },
    to: Function {
     argument: Simple {
      identifier: "n",
     },
     definition: BinaryOperation {
      operator: Addition,
      operands: [
       FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "lib",
          position: (6, 5),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "optionalString",
            position: (6, 9),
           },
          ],
         },
         default: None,
        },
        arguments: [
         Parentheses {
          expression: BinaryOperation {
           operator: LessThan,
           operands: [
            Variable {
             identifier: "n",
             position: (6, 25),
            },
            Int {
             value: 16,
             position: (6, 29),
            },
           ],
           position: (6, 27),
          },
          position: (6, 24),
         },
         String {
          parts: [
           Raw {
            content: "0",
            position: (6, 34),
           },
          ],
          position: (6, 33),
         },
        ],
       },
       Parentheses {
        expression: IfThenElse {
         predicate: BinaryOperation {
          operator: GreaterThan,
          operands: [
           Variable {
            identifier: "n",
            position: (7, 11),
           },
           Int {
            value: 255,
            position: (7, 15),
           },
          ],
          position: (7, 13),
         },
         then: FunctionApplication {
          function: Variable {
           identifier: "throw",
           position: (8, 13),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "Can't have more than 255 nets or nodes!",
              position: (8, 20),
             },
            ],
            position: (8, 19),
           },
          ],
         },
         else_: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "lib",
            position: (9, 13),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "toHexString",
              position: (9, 17),
             },
            ],
           },
           default: None,
          },
          arguments: [
           Variable {
            identifier: "n",
            position: (9, 29),
           },
          ],
         },
         position: (7, 8),
        },
        position: (7, 7),
       },
      ],
      position: (6, 37),
     },
     position: (5, 13),
    },
   },
  ],
  target: Map {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "qemuNicMac",
        position: (13, 3),
       },
      ],
     },
     to: Function {
      argument: Simple {
       identifier: "net",
      },
      definition: Function {
       argument: Simple {
        identifier: "machine",
       },
       definition: String {
        parts: [
         Raw {
          content: "52:54:00:12:",
          position: (13, 31),
         },
         Expression {
          expression: FunctionApplication {
           function: Variable {
            identifier: "zeroPad",
            position: (13, 45),
           },
           arguments: [
            Variable {
             identifier: "net",
             position: (13, 53),
            },
           ],
          },
         },
         Raw {
          content: ":",
          position: (13, 57),
         },
         Expression {
          expression: FunctionApplication {
           function: Variable {
            identifier: "zeroPad",
            position: (13, 60),
           },
           arguments: [
            Variable {
             identifier: "machine",
             position: (13, 68),
            },
           ],
          },
         },
        ],
        position: (13, 30),
       },
       position: (13, 21),
      },
      position: (13, 16),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "qemuNICFlags",
        position: (15, 3),
       },
      ],
     },
     to: Function {
      argument: Simple {
       identifier: "nic",
      },
      definition: Function {
       argument: Simple {
        identifier: "net",
       },
       definition: Function {
        argument: Simple {
         identifier: "machine",
        },
        definition: List {
         elements: [
          String {
           parts: [
            Raw {
             content: "-device virtio-net-pci,netdev=vlan",
             position: (16, 8),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "toString",
               position: (16, 44),
              },
              arguments: [
               Variable {
                identifier: "nic",
                position: (16, 53),
               },
              ],
             },
            },
            Raw {
             content: ",mac=",
             position: (16, 57),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "qemuNicMac",
               position: (16, 64),
              },
              arguments: [
               Variable {
                identifier: "net",
                position: (16, 75),
               },
               Variable {
                identifier: "machine",
                position: (16, 79),
               },
              ],
             },
            },
           ],
           position: (16, 7),
          },
          String {
           parts: [
            Raw {
             content: "-netdev vde,id=vlan",
             position: (17, 9),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "toString",
               position: (17, 30),
              },
              arguments: [
               Variable {
                identifier: "nic",
                position: (17, 39),
               },
              ],
             },
            },
            Raw {
             content: ",sock=\"$QEMU_VDE_SOCKET_",
             position: (17, 43),
            },
            Expression {
             expression: FunctionApplication {
              function: Variable {
               identifier: "toString",
               position: (17, 69),
              },
              arguments: [
               Variable {
                identifier: "net",
                position: (17, 78),
               },
              ],
             },
            },
            Raw {
             content: "\"",
             position: (17, 82),
            },
           ],
           position: (17, 7),
          },
         ],
         position: (16, 5),
        },
        position: (15, 28),
       },
       position: (15, 23),
      },
      position: (15, 18),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "qemuSerialDevice",
        position: (20, 3),
       },
      ],
     },
     to: IfThenElse {
      predicate: BinaryOperation {
       operator: LogicalOr,
       operands: [
        PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (20, 25),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "stdenv",
            position: (20, 30),
           },
           Raw {
            content: "hostPlatform",
            position: (20, 37),
           },
           Raw {
            content: "isx86",
            position: (20, 50),
           },
          ],
         },
         default: None,
        },
        PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (20, 59),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "stdenv",
            position: (20, 64),
           },
           Raw {
            content: "hostPlatform",
            position: (20, 71),
           },
           Raw {
            content: "isRiscV",
            position: (20, 84),
           },
          ],
         },
         default: None,
        },
       ],
       position: (20, 56),
      },
      then: String {
       parts: [
        Raw {
         content: "ttyS0",
         position: (20, 98),
        },
       ],
       position: (20, 97),
      },
      else_: IfThenElse {
       predicate: Parentheses {
        expression: With {
         expression: PropertyAccess {
          expression: Variable {
           identifier: "pkgs",
           position: (21, 23),
          },
          attribute_path: AttributePath {
           parts: [
            Raw {
             content: "stdenv",
             position: (21, 28),
            },
            Raw {
             content: "hostPlatform",
             position: (21, 35),
            },
           ],
          },
          default: None,
         },
         target: BinaryOperation {
          operator: LogicalOr,
          operands: [
           BinaryOperation {
            operator: LogicalOr,
            operands: [
             Variable {
              identifier: "isAarch32",
              position: (21, 49),
             },
             Variable {
              identifier: "isAarch64",
              position: (21, 62),
             },
            ],
            position: (21, 59),
           },
           Variable {
            identifier: "isPower",
            position: (21, 75),
           },
          ],
          position: (21, 72),
         },
         position: (21, 18),
        },
        position: (21, 17),
       },
       then: String {
        parts: [
         Raw {
          content: "ttyAMA0",
          position: (21, 90),
         },
        ],
        position: (21, 89),
       },
       else_: FunctionApplication {
        function: Variable {
         identifier: "throw",
         position: (22, 14),
        },
        arguments: [
         String {
          parts: [
           Raw {
            content: "Unknown QEMU serial device for system '",
            position: (22, 21),
           },
           Expression {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "pkgs",
              position: (22, 62),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "stdenv",
                position: (22, 67),
               },
               Raw {
                content: "hostPlatform",
                position: (22, 74),
               },
               Raw {
                content: "system",
                position: (22, 87),
               },
              ],
             },
             default: None,
            },
           },
           Raw {
            content: "'",
            position: (22, 94),
           },
          ],
          position: (22, 20),
         },
        ],
       },
       position: (21, 14),
      },
      position: (20, 22),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "qemuBinary",
        position: (24, 3),
       },
      ],
     },
     to: Function {
      argument: Simple {
       identifier: "qemuPkg",
      },
      definition: PropertyAccess {
       expression: Map {
        bindings: [
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "x86_64-linux",
             position: (25, 5),
            },
           ],
          },
          to: String {
           parts: [
            Expression {
             expression: Variable {
              identifier: "qemuPkg",
              position: (25, 23),
             },
            },
            Raw {
             content: "/bin/qemu-kvm -cpu max",
             position: (25, 31),
            },
           ],
           position: (25, 20),
          },
         },
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "armv7l-linux",
             position: (26, 5),
            },
           ],
          },
          to: String {
           parts: [
            Expression {
             expression: Variable {
              identifier: "qemuPkg",
              position: (26, 23),
             },
            },
            Raw {
             content: "/bin/qemu-system-arm -enable-kvm -machine virt -cpu host",
             position: (26, 31),
            },
           ],
           position: (26, 20),
          },
         },
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "aarch64-linux",
             position: (27, 5),
            },
           ],
          },
          to: String {
           parts: [
            Expression {
             expression: Variable {
              identifier: "qemuPkg",
              position: (27, 24),
             },
            },
            Raw {
             content: "/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host",
             position: (27, 32),
            },
           ],
           position: (27, 21),
          },
         },
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "powerpc64le-linux",
             position: (28, 5),
            },
           ],
          },
          to: String {
           parts: [
            Expression {
             expression: Variable {
              identifier: "qemuPkg",
              position: (28, 28),
             },
            },
            Raw {
             content: "/bin/qemu-system-ppc64 -machine powernv",
             position: (28, 36),
            },
           ],
           position: (28, 25),
          },
         },
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "powerpc64-linux",
             position: (29, 5),
            },
           ],
          },
          to: String {
           parts: [
            Expression {
             expression: Variable {
              identifier: "qemuPkg",
              position: (29, 26),
             },
            },
            Raw {
             content: "/bin/qemu-system-ppc64 -machine powernv",
             position: (29, 34),
            },
           ],
           position: (29, 23),
          },
         },
         Binding {
          from: AttributePath {
           parts: [
            Raw {
             content: "x86_64-darwin",
             position: (30, 5),
            },
           ],
          },
          to: String {
           parts: [
            Expression {
             expression: Variable {
              identifier: "qemuPkg",
              position: (30, 24),
             },
            },
            Raw {
             content: "/bin/qemu-kvm -cpu max",
             position: (30, 32),
            },
           ],
           position: (30, 21),
          },
         },
        ],
        recursive: false,
        position: (24, 25),
       },
       attribute_path: AttributePath {
        parts: [
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (31, 7),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "stdenv",
              position: (31, 12),
             },
             Raw {
              content: "hostPlatform",
              position: (31, 19),
             },
             Raw {
              content: "system",
              position: (31, 32),
             },
            ],
           },
           default: None,
          },
         },
        ],
       },
       default: Some(
        String {
         parts: [
          Expression {
           expression: Variable {
            identifier: "qemuPkg",
            position: (31, 46),
           },
          },
          Raw {
           content: "/bin/qemu-kvm",
           position: (31, 54),
          },
         ],
         position: (31, 43),
        },
       ),
      },
      position: (24, 16),
     },
    },
   ],
   recursive: true,
   position: (12, 1),
  },
  position: (4, 1),
 },
 position: (2, 1),
}