// File: ivan-tkatchev[P]makerpm/makerpm.cc
// Function: Store::str[abi:cxx11](unsigned int)
std::string str(uint32_t tag) {
        // Add a pointless 'magic' field, which goes into the end of the store but as the first index entry.

        std::string magic;
        std::string magic_payload;

        int32_t magic_offset = -((nentries + 1) * rpm::index_t::entry_t::SIZE);

        add_uint32(tag, magic_payload);
        add_uint32(rpm::index_t::entry_t::TYPE_BIN, magic_payload);
        add_uint32((uint32_t)magic_offset, magic_payload);
        add_uint32(rpm::index_t::entry_t::SIZE, magic_payload);

        add_magic(tag, magic_payload, magic, store, nentries);

        // Add header with the number of fields.

        std::string iheader;
        iheader += '\x8e';
        iheader += '\xad';
        iheader += '\xe8';
        iheader += '\x01';
        add_uint32(0, iheader);
        add_uint32(nentries, iheader);
        add_uint32(store.size(), iheader);

        return iheader + magic + index + store;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xf0(%rbp)
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x42a0
leaq -0x58(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x42a0
movq -0xe0(%rbp), %rax
movq -0xd8(%rbp), %rsi
movl 0x40(%rax), %eax
notl %eax
shll $0x4, %eax
movl %eax, -0x5c(%rbp)
movl -0x14(%rbp), %edi
callq 0x1d910
jmp 0x229de
movl $0x7, %edi
leaq -0x58(%rbp), %rsi
callq 0x1d910
jmp 0x229ee
movl -0x5c(%rbp), %edi
leaq -0x58(%rbp), %rsi
callq 0x1d910
jmp 0x229fc
movl $0x10, %edi
leaq -0x58(%rbp), %rsi
callq 0x1d910
jmp 0x22a0c
movq -0xe0(%rbp), %r8
movl -0x14(%rbp), %edi
movq %r8, %rcx
addq $0x20, %rcx
addq $0x40, %r8
leaq -0x58(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x1db00
jmp 0x22a30
leaq -0x90(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x42a0
movq -0xf8(%rbp), %rdi
movl $0xffffff8e, %esi       # imm = 0xFFFFFF8E
callq 0x4490
jmp 0x22a56
leaq -0x90(%rbp), %rdi
movl $0xffffffad, %esi       # imm = 0xFFFFFFAD
callq 0x4490
jmp 0x22a69
leaq -0x90(%rbp), %rdi
movl $0xffffffe8, %esi       # imm = 0xFFFFFFE8
callq 0x4490
jmp 0x22a7c
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x4490
jmp 0x22a8f
xorl %edi, %edi
leaq -0x90(%rbp), %rsi
callq 0x1d910
jmp 0x22a9f
movq -0xe0(%rbp), %rax
movl 0x40(%rax), %edi
leaq -0x90(%rbp), %rsi
callq 0x1d910
jmp 0x22ab7
movq -0xe0(%rbp), %rdi
addq $0x20, %rdi
callq 0x4270
movl %eax, %edi
leaq -0x90(%rbp), %rsi
callq 0x1d910
jmp 0x22ad7
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x23410
jmp 0x22af0
movq -0xe0(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x233c0
jmp 0x22b0c
movq -0xf0(%rbp), %rdi
movq -0xe0(%rbp), %rdx
addq $0x20, %rdx
leaq -0xb0(%rbp), %rsi
callq 0x233c0
jmp 0x22b2c
leaq -0xb0(%rbp), %rdi
callq 0x4540
leaq -0xd0(%rbp), %rdi
callq 0x4540
leaq -0x90(%rbp), %rdi
callq 0x4540
leaq -0x58(%rbp), %rdi
callq 0x4540
leaq -0x38(%rbp), %rdi
callq 0x4540
movq -0xe8(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x22bcc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x22bc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x22bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4540
leaq -0xd0(%rbp), %rdi
callq 0x4540
leaq -0x90(%rbp), %rdi
callq 0x4540
leaq -0x58(%rbp), %rdi
callq 0x4540
leaq -0x38(%rbp), %rdi
callq 0x4540
movq -0x68(%rbp), %rdi
callq 0x4440
nopw (%rax,%rax)