// File: akitsu-sanae[P]adtpp/src/main.cpp
// Function: parse(std::istream&)
Adt parse(std::istream& input) {
    std::string buf;
    input >> buf;
    Adt result{buf};
    input >> buf;
    if (buf != "{")
        throw std::logic_error{"parse error: expected '{'"};
    while (true) {
        std::string label;
        std::string type;
        input >> label;
        if (label == "}")
            break;
        input >> buf;
        if (buf != "of")
            throw std::logic_error{"parse error: expected 'of'"};
        std::getline(input, type);
        trim(type);
        result.add(std::make_pair(label, type));
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x3300
movq -0xd0(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x32e0
jmp 0x8b76
movq -0xe0(%rbp), %rdi
movb $0x0, -0x3d(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x9460
jmp 0x8b8c
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x32e0
jmp 0x8b9b
leaq 0x2599(%rip), %rsi      # 0xb13b
leaq -0x30(%rbp), %rdi
callq 0x94a0
movb %al, -0xe1(%rbp)
jmp 0x8bb3
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x8bc2
jmp 0x8c45
movl $0x10, %edi
callq 0x3100
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xf0(%rbp)
leaq 0x2a68(%rip), %rsi      # 0xb648
callq 0x3310
jmp 0x8be7
movq -0xf0(%rbp), %rdi
movq 0x63db(%rip), %rsi      # 0xefd0
movq 0x63b4(%rip), %rdx      # 0xefb0
callq 0x3370
jmp 0x8e4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8e3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8e31
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x3190
jmp 0x8e31
jmp 0x8c47
jmp 0x8c49
leaq -0x60(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3300
leaq -0x80(%rbp), %rdi
callq 0x3300
movq -0xf8(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x32e0
jmp 0x8c74
leaq 0x2570(%rip), %rsi      # 0xb1eb
leaq -0x60(%rbp), %rdi
callq 0x94d0
movb %al, -0xf9(%rbp)
jmp 0x8c8c
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x8c98
jmp 0x8cb8
movl $0x3, -0x84(%rbp)
jmp 0x8da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8de4
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x32e0
jmp 0x8cc7
leaq 0x2994(%rip), %rsi      # 0xb662
leaq -0x30(%rbp), %rdi
callq 0x94a0
movb %al, -0xfa(%rbp)
jmp 0x8cdf
movb -0xfa(%rbp), %al
testb $0x1, %al
jne 0x8ceb
jmp 0x8d4c
movl $0x10, %edi
callq 0x3100
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x108(%rbp)
leaq 0x295c(%rip), %rsi      # 0xb665
callq 0x3310
jmp 0x8d10
movq -0x108(%rbp), %rdi
movq 0x62b2(%rip), %rsi      # 0xefd0
movq 0x628b(%rip), %rdx      # 0xefb0
callq 0x3370
jmp 0x8e4f
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x3190
jmp 0x8de4
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3060
jmp 0x8d5b
leaq -0x80(%rbp), %rdi
callq 0x8a20
jmp 0x8d66
leaq -0xc8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x9530
jmp 0x8d7c
movq -0xe0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x9500
jmp 0x8d91
leaq -0xc8(%rbp), %rdi
callq 0x9570
movl $0x0, -0x84(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x3140
leaq -0x60(%rbp), %rdi
callq 0x3140
movl -0x84(%rbp), %eax
testl %eax, %eax
je 0x8dc7
jmp 0x8dc5
jmp 0x8df8
jmp 0x8c47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x9570
leaq -0x80(%rbp), %rdi
callq 0x3140
leaq -0x60(%rbp), %rdi
callq 0x3140
jmp 0x8e31
movb $0x1, -0x3d(%rbp)
movl $0x1, -0x84(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x8e18
movq -0xe0(%rbp), %rdi
callq 0x95a0
leaq -0x30(%rbp), %rdi
callq 0x3140
movq -0xd8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xe0(%rbp), %rdi
callq 0x95a0
leaq -0x30(%rbp), %rdi
callq 0x3140
movq -0x38(%rbp), %rdi
callq 0x3380
nop