// File: /workspace/github_cpp_makefile_star2_O1/travisdowns[P]avx-turbo/cpuid.cpp
// Function: get_brand_string[abi:cxx11]()
std::string get_brand_string() {
    auto check = cpuid(0x80000000);
    if (check.eax < 0x80000004) {
        return std::string("unkown (eax =") + std::to_string(check.eax) +")";
    }
    std::string ret;
    for (uint32_t eax : {0x80000002, 0x80000003, 0x80000004}) {
        char buf[17];
        auto fourchars = cpuid(eax);
        memcpy(buf +  0, &fourchars.eax, 4);
        memcpy(buf +  4, &fourchars.ebx, 4);
        memcpy(buf +  8, &fourchars.ecx, 4);
        memcpy(buf + 12, &fourchars.edx, 4);
        buf[16] = '\0';
        ret += buf;
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
movl $0x80000000, %eax       # imm = 0x80000000
xorl %ecx, %ecx
cpuid
cmpl $0x80000003, %eax       # imm = 0x80000003
ja 0x16024
movl %eax, %ebx
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9ebe(%rip), %rsi      # 0x1fe7a
leaq 0x9ec4(%rip), %rdx      # 0x1fe87
leaq 0x40(%rsp), %rdi
callq 0xe0a8
movl $0x1, %eax
cmpl $0xa, %ebx
jb 0x16093
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebx, %edx
cmpl $0x63, %edx
jbe 0x1608c
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x16091
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x16093
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x15fe7
addl $-0x3, %eax
jmp 0x16093
leaq 0x10(%r14), %r12
movq %r12, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movabsq $-0x7ffffffc7ffffffe, %rax # imm = 0x8000000380000002
movq %rax, 0x40(%rsp)
movl $0x80000004, 0x48(%rsp) # imm = 0x80000004
xorl %r13d, %r13d
movq %rsp, %r15
movl 0x40(%rsp,%r13), %eax
xorl %ecx, %ecx
cpuid
movl %eax, (%rsp)
movl %ebx, 0x4(%rsp)
movl %ecx, 0x8(%rsp)
movl %edx, 0xc(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6630
addq $0x4, %r13
cmpq $0xc, %r13
jne 0x16055
jmp 0x161dc
addl $-0x2, %eax
jmp 0x16093
decl %eax
movl %eax, %esi
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x63b0
movq 0x20(%rsp), %rdi
movl 0x28(%rsp), %esi
movl %ebx, %edx
callq 0x1437c
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x160dd
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x160f8
movl $0xf, %esi
cmpq %r12, 0x20(%rsp)
je 0x160f3
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x16109
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x60c0
jmp 0x16117
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6380
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1613a
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x16140
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x92a5(%rip), %rsi      # 0x1f409
movq %rsp, %rdi
callq 0x6630
leaq 0x10(%r14), %rdx
movq %rdx, (%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1618e
movq %rsi, (%r14)
movq (%rcx), %rdx
movq %rdx, 0x10(%r14)
jmp 0x16194
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x161be
callq 0x6320
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x161cd
callq 0x6320
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x161dc
callq 0x6320
movq %r14, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16208
callq 0x6320
jmp 0x16208
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1621c
callq 0x6320
jmp 0x1621c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
jne 0x16238
jmp 0x1623d
movq %rax, %rbx
jmp 0x1623d
movq %rax, %rbx
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x1623d
callq 0x6320
movq %rbx, %rdi
callq 0x65f0