#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int snprintf(char *, size_t, char *, char *, char *, char *, char *, char *,
             char *, char *, char *, char *, char *, char *, char *, char *,
             char *, char *, char *, char *, char *, char *, char *, char *,
             char *, char *, char *, char *, char *, char *, char *, char *,
             char *, char *);
int get_x86_cpu_structured_extended_flags(int intel, uint32_t ebx, uint32_t ecx,
                                          char *flags, size_t len) {
  return snprintf(flags, len,
                  "%s%s%s%s"
                  "%s%s%s%s"
                  "%s%s%s%s"
                  "%s%s%s%s"
                  "%s%s%s%s"
                  "%s%s"
                  "%s%s"
                  "%s"
                  "%s%s%s"
                  "%s"
                  "%s"
                  "%s",
                  ebx & 0x00000001 ? "fsgsbase " : "",
                  intel ? (ebx & 0x00000002 ? "tsc_adjust " : "") : "",
                  intel ? (ebx & 0x00000004 ? "sgx " : "") : "",
                  ebx & 0x00000008 ? "bmi1 " : "",
                  intel ? (ebx & 0x00000010 ? "hle " : "") : "",
                  ebx & 0x00000020 ? "avx2 " : "",
                  intel ? (ebx & 0x00000040 ? "fp_dp " : "") : "",
                  ebx & 0x00000080 ? "smep " : "",
                  ebx & 0x00000100 ? "bmi2 " : "",
                  intel ? (ebx & 0x00000200 ? "erms " : "") : "",
                  intel ? (ebx & 0x00000400 ? "invpcid " : "") : "",
                  intel ? (ebx & 0x00000800 ? "rtm " : "") : "",
                  intel ? (ebx & 0x00001000 ? "pqm " : "") : "",
                  intel ? (ebx & 0x00002000 ? "fpcsds " : "") : "",
                  intel ? (ebx & 0x00004000 ? "mpx " : "") : "",
                  intel ? (ebx & 0x00008000 ? "pqe " : "") : "",
                  intel ? (ebx & 0x00010000 ? "pat " : "") : "",
                  intel ? (ebx & 0x00020000 ? "pse36 " : "") : "",
                  intel ? (ebx & 0x00040000 ? "rdseed " : "") : "",
                  intel ? (ebx & 0x00080000 ? "adx " : "") : "",
                  intel ? (ebx & 0x00100000 ? "smap " : "") : "",
                  intel ? (ebx & 0x00800000 ? "clflushopt " : "") : "",
                  intel ? (ebx & 0x01000000 ? "clwb " : "") : "",
                  intel ? (ebx & 0x02000000 ? "intel_pt " : "") : "",
                  intel ? (ebx & 0x10000000 ? "sha " : "") : "",
                  intel ? (ecx & 0x00000001 ? "prefetchwt1 " : "") : "",
                  intel ? (ecx & 0x00000004 ? "umip " : "") : "",
                  intel ? (ecx & 0x00000008 ? "pku " : "") : "",
                  intel ? (ecx & 0x00000010 ? "ospke " : "") : "",
                  intel ? (ecx & 0x00040000 ? "rdpid " : "") : "",
                  intel ? (ecx & 0x40000000 ? "sgx_lc " : "") : "");
}


x86 assembly (clang, -O0):
<get_x86_cpu_structured_extended_flags>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2d8,%rsp
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %r8,-0x48(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x30(%rbp),%edx
and    $0x1,%edx
lea    0xf0d(%rip),%rax
lea    0xee6(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x50(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1192 <get_x86_cpu_structured_extended_flags+0x82>
mov    -0x30(%rbp),%edx
and    $0x2,%edx
lea    0xee4(%rip),%rax
lea    0xec7(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x68(%rbp)
jmp    11a2 <get_x86_cpu_structured_extended_flags+0x92>
lea    0xec6(%rip),%rax
mov    %rax,-0x68(%rbp)
jmp    11a2 <get_x86_cpu_structured_extended_flags+0x92>
mov    -0x68(%rbp),%rax
mov    %rax,-0x70(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     11d8 <get_x86_cpu_structured_extended_flags+0xc8>
mov    -0x30(%rbp),%edx
and    $0x4,%edx
lea    0xe9e(%rip),%rax
lea    0xe8d(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x78(%rbp)
jmp    11e8 <get_x86_cpu_structured_extended_flags+0xd8>
lea    0xe80(%rip),%rax
mov    %rax,-0x78(%rbp)
jmp    11e8 <get_x86_cpu_structured_extended_flags+0xd8>
mov    -0x78(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x30(%rbp),%edx
and    $0x8,%edx
lea    0xe5f(%rip),%rax
lea    0xe53(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x80(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1243 <get_x86_cpu_structured_extended_flags+0x133>
mov    -0x30(%rbp),%edx
and    $0x10,%edx
lea    0xe36(%rip),%rax
lea    0xe30(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x90(%rbp)
jmp    1256 <get_x86_cpu_structured_extended_flags+0x146>
lea    0xe15(%rip),%rax
mov    %rax,-0x90(%rbp)
jmp    1256 <get_x86_cpu_structured_extended_flags+0x146>
mov    -0x90(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x30(%rbp),%edx
and    $0x20,%edx
lea    0xdee(%rip),%rax
lea    0xded(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x98(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     12b7 <get_x86_cpu_structured_extended_flags+0x1a7>
mov    -0x30(%rbp),%edx
and    $0x40,%edx
lea    0xdc2(%rip),%rax
lea    0xdc7(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xa8(%rbp)
jmp    12ca <get_x86_cpu_structured_extended_flags+0x1ba>
lea    0xda1(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    12ca <get_x86_cpu_structured_extended_flags+0x1ba>
mov    -0xa8(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x30(%rbp),%edx
and    $0x80,%edx
lea    0xd77(%rip),%rax
lea    0xd83(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xb8(%rbp)
mov    -0x30(%rbp),%edx
and    $0x100,%edx
lea    0xd52(%rip),%rax
lea    0xd64(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xb0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1356 <get_x86_cpu_structured_extended_flags+0x246>
mov    -0x30(%rbp),%edx
and    $0x200,%edx
lea    0xd23(%rip),%rax
lea    0xd3b(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xc8(%rbp)
jmp    1369 <get_x86_cpu_structured_extended_flags+0x259>
lea    0xd02(%rip),%rax
mov    %rax,-0xc8(%rbp)
jmp    1369 <get_x86_cpu_structured_extended_flags+0x259>
mov    -0xc8(%rbp),%rax
mov    %rax,-0xd0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     13ab <get_x86_cpu_structured_extended_flags+0x29b>
mov    -0x30(%rbp),%edx
and    $0x400,%edx
lea    0xcce(%rip),%rax
lea    0xcec(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xd8(%rbp)
jmp    13be <get_x86_cpu_structured_extended_flags+0x2ae>
lea    0xcad(%rip),%rax
mov    %rax,-0xd8(%rbp)
jmp    13be <get_x86_cpu_structured_extended_flags+0x2ae>
mov    -0xd8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1400 <get_x86_cpu_structured_extended_flags+0x2f0>
mov    -0x30(%rbp),%edx
and    $0x800,%edx
lea    0xc79(%rip),%rax
lea    0xca0(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xe8(%rbp)
jmp    1413 <get_x86_cpu_structured_extended_flags+0x303>
lea    0xc58(%rip),%rax
mov    %rax,-0xe8(%rbp)
jmp    1413 <get_x86_cpu_structured_extended_flags+0x303>
mov    -0xe8(%rbp),%rax
mov    %rax,-0xf0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1455 <get_x86_cpu_structured_extended_flags+0x345>
mov    -0x30(%rbp),%edx
and    $0x1000,%edx
lea    0xc24(%rip),%rax
lea    0xc50(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0xf8(%rbp)
jmp    1468 <get_x86_cpu_structured_extended_flags+0x358>
lea    0xc03(%rip),%rax
mov    %rax,-0xf8(%rbp)
jmp    1468 <get_x86_cpu_structured_extended_flags+0x358>
mov    -0xf8(%rbp),%rax
mov    %rax,-0x100(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     14aa <get_x86_cpu_structured_extended_flags+0x39a>
mov    -0x30(%rbp),%edx
and    $0x2000,%edx
lea    0xbcf(%rip),%rax
lea    0xc00(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x108(%rbp)
jmp    14bd <get_x86_cpu_structured_extended_flags+0x3ad>
lea    0xbae(%rip),%rax
mov    %rax,-0x108(%rbp)
jmp    14bd <get_x86_cpu_structured_extended_flags+0x3ad>
mov    -0x108(%rbp),%rax
mov    %rax,-0x110(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     14ff <get_x86_cpu_structured_extended_flags+0x3ef>
mov    -0x30(%rbp),%edx
and    $0x4000,%edx
lea    0xb7a(%rip),%rax
lea    0xbb3(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x118(%rbp)
jmp    1512 <get_x86_cpu_structured_extended_flags+0x402>
lea    0xb59(%rip),%rax
mov    %rax,-0x118(%rbp)
jmp    1512 <get_x86_cpu_structured_extended_flags+0x402>
mov    -0x118(%rbp),%rax
mov    %rax,-0x120(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1554 <get_x86_cpu_structured_extended_flags+0x444>
mov    -0x30(%rbp),%edx
and    $0x8000,%edx
lea    0xb25(%rip),%rax
lea    0xb63(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x128(%rbp)
jmp    1567 <get_x86_cpu_structured_extended_flags+0x457>
lea    0xb04(%rip),%rax
mov    %rax,-0x128(%rbp)
jmp    1567 <get_x86_cpu_structured_extended_flags+0x457>
mov    -0x128(%rbp),%rax
mov    %rax,-0x130(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     15a9 <get_x86_cpu_structured_extended_flags+0x499>
mov    -0x30(%rbp),%edx
and    $0x10000,%edx
lea    0xad0(%rip),%rax
lea    0xb13(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x138(%rbp)
jmp    15bc <get_x86_cpu_structured_extended_flags+0x4ac>
lea    0xaaf(%rip),%rax
mov    %rax,-0x138(%rbp)
jmp    15bc <get_x86_cpu_structured_extended_flags+0x4ac>
mov    -0x138(%rbp),%rax
mov    %rax,-0x140(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     15fe <get_x86_cpu_structured_extended_flags+0x4ee>
mov    -0x30(%rbp),%edx
and    $0x20000,%edx
lea    0xa7b(%rip),%rax
lea    0xac3(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x148(%rbp)
jmp    1611 <get_x86_cpu_structured_extended_flags+0x501>
lea    0xa5a(%rip),%rax
mov    %rax,-0x148(%rbp)
jmp    1611 <get_x86_cpu_structured_extended_flags+0x501>
mov    -0x148(%rbp),%rax
mov    %rax,-0x150(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1653 <get_x86_cpu_structured_extended_flags+0x543>
mov    -0x30(%rbp),%edx
and    $0x40000,%edx
lea    0xa26(%rip),%rax
lea    0xa75(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x158(%rbp)
jmp    1666 <get_x86_cpu_structured_extended_flags+0x556>
lea    0xa05(%rip),%rax
mov    %rax,-0x158(%rbp)
jmp    1666 <get_x86_cpu_structured_extended_flags+0x556>
mov    -0x158(%rbp),%rax
mov    %rax,-0x160(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     16a8 <get_x86_cpu_structured_extended_flags+0x598>
mov    -0x30(%rbp),%edx
and    $0x80000,%edx
lea    0x9d1(%rip),%rax
lea    0xa28(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x168(%rbp)
jmp    16bb <get_x86_cpu_structured_extended_flags+0x5ab>
lea    0x9b0(%rip),%rax
mov    %rax,-0x168(%rbp)
jmp    16bb <get_x86_cpu_structured_extended_flags+0x5ab>
mov    -0x168(%rbp),%rax
mov    %rax,-0x170(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     16fd <get_x86_cpu_structured_extended_flags+0x5ed>
mov    -0x30(%rbp),%edx
and    $0x100000,%edx
lea    0x97c(%rip),%rax
lea    0x9d8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x178(%rbp)
jmp    1710 <get_x86_cpu_structured_extended_flags+0x600>
lea    0x95b(%rip),%rax
mov    %rax,-0x178(%rbp)
jmp    1710 <get_x86_cpu_structured_extended_flags+0x600>
mov    -0x178(%rbp),%rax
mov    %rax,-0x180(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1752 <get_x86_cpu_structured_extended_flags+0x642>
mov    -0x30(%rbp),%edx
and    $0x800000,%edx
lea    0x927(%rip),%rax
lea    0x989(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x188(%rbp)
jmp    1765 <get_x86_cpu_structured_extended_flags+0x655>
lea    0x906(%rip),%rax
mov    %rax,-0x188(%rbp)
jmp    1765 <get_x86_cpu_structured_extended_flags+0x655>
mov    -0x188(%rbp),%rax
mov    %rax,-0x190(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     17a7 <get_x86_cpu_structured_extended_flags+0x697>
mov    -0x30(%rbp),%edx
and    $0x1000000,%edx
lea    0x8d2(%rip),%rax
lea    0x940(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x198(%rbp)
jmp    17ba <get_x86_cpu_structured_extended_flags+0x6aa>
lea    0x8b1(%rip),%rax
mov    %rax,-0x198(%rbp)
jmp    17ba <get_x86_cpu_structured_extended_flags+0x6aa>
mov    -0x198(%rbp),%rax
mov    %rax,-0x1a0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     17fc <get_x86_cpu_structured_extended_flags+0x6ec>
mov    -0x30(%rbp),%edx
and    $0x2000000,%edx
lea    0x87d(%rip),%rax
lea    0x8f1(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x1a8(%rbp)
jmp    180f <get_x86_cpu_structured_extended_flags+0x6ff>
lea    0x85c(%rip),%rax
mov    %rax,-0x1a8(%rbp)
jmp    180f <get_x86_cpu_structured_extended_flags+0x6ff>
mov    -0x1a8(%rbp),%rax
mov    %rax,-0x1b0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1851 <get_x86_cpu_structured_extended_flags+0x741>
mov    -0x30(%rbp),%edx
and    $0x10000000,%edx
lea    0x828(%rip),%rax
lea    0x8a6(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x1b8(%rbp)
jmp    1864 <get_x86_cpu_structured_extended_flags+0x754>
lea    0x807(%rip),%rax
mov    %rax,-0x1b8(%rbp)
jmp    1864 <get_x86_cpu_structured_extended_flags+0x754>
mov    -0x1b8(%rbp),%rax
mov    %rax,-0x1c0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     18a3 <get_x86_cpu_structured_extended_flags+0x793>
mov    -0x34(%rbp),%edx
and    $0x1,%edx
lea    0x7d6(%rip),%rax
lea    0x859(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x1c8(%rbp)
jmp    18b6 <get_x86_cpu_structured_extended_flags+0x7a6>
lea    0x7b5(%rip),%rax
mov    %rax,-0x1c8(%rbp)
jmp    18b6 <get_x86_cpu_structured_extended_flags+0x7a6>
mov    -0x1c8(%rbp),%rax
mov    %rax,-0x1d0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     18f5 <get_x86_cpu_structured_extended_flags+0x7e5>
mov    -0x34(%rbp),%edx
and    $0x4,%edx
lea    0x784(%rip),%rax
lea    0x814(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x1d8(%rbp)
jmp    1908 <get_x86_cpu_structured_extended_flags+0x7f8>
lea    0x763(%rip),%rax
mov    %rax,-0x1d8(%rbp)
jmp    1908 <get_x86_cpu_structured_extended_flags+0x7f8>
mov    -0x1d8(%rbp),%rax
mov    %rax,-0x1e0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1947 <get_x86_cpu_structured_extended_flags+0x837>
mov    -0x34(%rbp),%edx
and    $0x8,%edx
lea    0x732(%rip),%rax
lea    0x7c8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x1e8(%rbp)
jmp    195a <get_x86_cpu_structured_extended_flags+0x84a>
lea    0x711(%rip),%rax
mov    %rax,-0x1e8(%rbp)
jmp    195a <get_x86_cpu_structured_extended_flags+0x84a>
mov    -0x1e8(%rbp),%rax
mov    %rax,-0x1f0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1999 <get_x86_cpu_structured_extended_flags+0x889>
mov    -0x34(%rbp),%edx
and    $0x10,%edx
lea    0x6e0(%rip),%rax
lea    0x77b(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x1f8(%rbp)
jmp    19ac <get_x86_cpu_structured_extended_flags+0x89c>
lea    0x6bf(%rip),%rax
mov    %rax,-0x1f8(%rbp)
jmp    19ac <get_x86_cpu_structured_extended_flags+0x89c>
mov    -0x1f8(%rbp),%rax
mov    %rax,-0x200(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     19ee <get_x86_cpu_structured_extended_flags+0x8de>
mov    -0x34(%rbp),%edx
and    $0x40000,%edx
lea    0x68b(%rip),%rax
lea    0x72d(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x208(%rbp)
jmp    1a01 <get_x86_cpu_structured_extended_flags+0x8f1>
lea    0x66a(%rip),%rax
mov    %rax,-0x208(%rbp)
jmp    1a01 <get_x86_cpu_structured_extended_flags+0x8f1>
mov    -0x208(%rbp),%rax
mov    %rax,-0x210(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1a43 <get_x86_cpu_structured_extended_flags+0x933>
mov    -0x34(%rbp),%edx
and    $0x40000000,%edx
lea    0x636(%rip),%rax
lea    0x6df(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x218(%rbp)
jmp    1a56 <get_x86_cpu_structured_extended_flags+0x946>
lea    0x615(%rip),%rax
mov    %rax,-0x218(%rbp)
jmp    1a56 <get_x86_cpu_structured_extended_flags+0x946>
mov    -0x200(%rbp),%r11
mov    -0x1f0(%rbp),%rbx
mov    -0x1e0(%rbp),%r14
mov    -0x1d0(%rbp),%r15
mov    -0x1c0(%rbp),%r12
mov    -0x1b0(%rbp),%r13
mov    -0x80(%rbp),%r10
mov    -0x88(%rbp),%r9
mov    -0x70(%rbp),%r8
mov    -0x50(%rbp),%rcx
mov    -0x58(%rbp),%rsi
mov    -0x60(%rbp),%rdi
mov    -0x218(%rbp),%rax
lea    0x557(%rip),%rdx
mov    %r10,(%rsp)
mov    -0xa0(%rbp),%r10
mov    %r10,0x8(%rsp)
mov    -0x98(%rbp),%r10
mov    %r10,0x10(%rsp)
mov    -0xc0(%rbp),%r10
mov    %r10,0x18(%rsp)
mov    -0xb8(%rbp),%r10
mov    %r10,0x20(%rsp)
mov    -0xb0(%rbp),%r10
mov    %r10,0x28(%rsp)
mov    -0xd0(%rbp),%r10
mov    %r10,0x30(%rsp)
mov    -0xe0(%rbp),%r10
mov    %r10,0x38(%rsp)
mov    -0xf0(%rbp),%r10
mov    %r10,0x40(%rsp)
mov    -0x100(%rbp),%r10
mov    %r10,0x48(%rsp)
mov    -0x110(%rbp),%r10
mov    %r10,0x50(%rsp)
mov    -0x120(%rbp),%r10
mov    %r10,0x58(%rsp)
mov    -0x130(%rbp),%r10
mov    %r10,0x60(%rsp)
mov    -0x140(%rbp),%r10
mov    %r10,0x68(%rsp)
mov    -0x150(%rbp),%r10
mov    %r10,0x70(%rsp)
mov    -0x160(%rbp),%r10
mov    %r10,0x78(%rsp)
mov    -0x170(%rbp),%r10
mov    %r10,0x80(%rsp)
mov    -0x180(%rbp),%r10
mov    %r10,0x88(%rsp)
mov    -0x190(%rbp),%r10
mov    %r10,0x90(%rsp)
mov    -0x1a0(%rbp),%r10
mov    %r10,0x98(%rsp)
mov    -0x210(%rbp),%r10
mov    %r13,0xa0(%rsp)
mov    %r12,0xa8(%rsp)
mov    %r15,0xb0(%rsp)
mov    %r14,0xb8(%rsp)
mov    %rbx,0xc0(%rsp)
mov    %r11,0xc8(%rsp)
mov    %r10,0xd0(%rsp)
mov    %rax,0xd8(%rsp)
call   1030 <snprintf@plt>
add    $0x2d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_x86_cpu_structured_extended_flags>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r8,0xc0(%rsp)
mov    %rcx,0xb8(%rsp)
mov    %edi,0x8(%rsp)
test   $0x2,%sil
lea    0xf1f(%rip),%rax
lea    0xf02(%rip),%rcx
cmove  %rax,%rcx
mov    %rcx,0x30(%rsp)
test   $0x4,%sil
lea    0xefa(%rip),%rcx
cmove  %rax,%rcx
mov    %rcx,0x28(%rsp)
test   $0x10,%sil
lea    0xef1(%rip),%r9
cmove  %rax,%r9
test   $0x40,%sil
lea    0xeed(%rip),%rbp
cmove  %rax,%rbp
test   $0x200,%esi
lea    0xeef(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,%r13
test   $0x400,%esi
lea    0xee1(%rip),%rcx
cmove  %rax,%rcx
test   $0x800,%esi
lea    0xed9(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x78(%rsp)
test   $0x1000,%esi
lea    0xec8(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x70(%rsp)
test   $0x2000,%esi
lea    0xeb7(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x68(%rsp)
test   $0x4000,%esi
lea    0xea9(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x60(%rsp)
test   $0x8000,%esi
lea    0xe98(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x58(%rsp)
test   $0x10000,%esi
lea    0xe87(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x50(%rsp)
test   $0x20000,%esi
lea    0xe76(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x48(%rsp)
test   $0x40000,%esi
lea    0xe67(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x40(%rsp)
test   $0x80000,%esi
lea    0xe59(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x38(%rsp)
test   $0x100000,%esi
lea    0xe48(%rip),%r8
cmove  %rax,%r8
test   $0x800000,%esi
lea    0xe3d(%rip),%rdi
cmove  %rax,%rdi
test   $0x1000000,%esi
lea    0xe38(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x20(%rsp)
test   $0x2000000,%esi
lea    0xe28(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x18(%rsp)
test   $0x10000000,%esi
lea    0xe1c(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,0x10(%rsp)
test   $0x1,%dl
lea    0xe0e(%rip),%r12
cmove  %rax,%r12
test   $0x4,%dl
lea    0xe0d(%rip),%r15
cmove  %rax,%r15
test   $0x8,%dl
lea    0xe05(%rip),%r14
cmove  %rax,%r14
test   $0x10,%dl
lea    0xdfc(%rip),%rbx
cmove  %rax,%rbx
test   $0x40000,%edx
lea    0xdf2(%rip),%r11
cmove  %rax,%r11
test   $0x40000000,%edx
lea    0xde8(%rip),%r10
cmove  %rax,%r10
cmpl   $0x0,0x8(%rsp)
mov    0x30(%rsp),%rdx
cmove  %rax,%rdx
mov    %rdx,0x30(%rsp)
mov    0x28(%rsp),%rdx
cmove  %rax,%rdx
mov    %rdx,0x28(%rsp)
cmove  %rax,%r9
mov    %r9,0x8(%rsp)
cmove  %rax,%rbp
mov    %rbp,0xb0(%rsp)
cmove  %rax,%r13
mov    %r13,0xa8(%rsp)
cmove  %rax,%rcx
mov    %rcx,0xa0(%rsp)
mov    0x78(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x78(%rsp)
mov    0x70(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x70(%rsp)
mov    0x68(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x68(%rsp)
mov    0x60(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x60(%rsp)
mov    0x58(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x58(%rsp)
mov    0x50(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x50(%rsp)
mov    0x48(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x48(%rsp)
mov    0x40(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x40(%rsp)
mov    0x38(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x38(%rsp)
cmove  %rax,%r8
mov    %r8,0x98(%rsp)
cmove  %rax,%rdi
mov    %rdi,0x80(%rsp)
mov    0x20(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x20(%rsp)
mov    0x18(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x18(%rsp)
mov    0x10(%rsp),%rcx
cmove  %rax,%rcx
mov    %rcx,0x10(%rsp)
cmove  %rax,%r12
cmove  %rax,%r15
cmove  %rax,%r14
cmove  %rax,%rbx
cmove  %rax,%r11
cmove  %rax,%r10
test   $0x100,%esi
lea    0xc1a(%rip),%rcx
cmove  %rax,%rcx
mov    %rcx,0x90(%rsp)
test   $0x80,%sil
lea    0xbfd(%rip),%r13
cmove  %rax,%r13
test   $0x20,%sil
lea    0xbe1(%rip),%rbp
cmove  %rax,%rbp
test   $0x8,%sil
lea    0xbc7(%rip),%rcx
cmove  %rax,%rcx
mov    %rcx,0x88(%rsp)
test   $0x1,%sil
lea    0xb95(%rip),%rcx
cmove  %rax,%rcx
lea    0xb4b(%rip),%rdx
mov    0xb8(%rsp),%rdi
mov    0xc0(%rsp),%rsi
mov    0x30(%rsp),%r8
mov    0x28(%rsp),%r9
push   %r10
push   %r11
push   %rbx
push   %r14
push   %r15
push   %r12
push   0x40(%rsp)
push   0x50(%rsp)
push   0x60(%rsp)
push   0xc8(%rsp)
push   0xe8(%rsp)
push   0x90(%rsp)
push   0xa0(%rsp)
push   0xb0(%rsp)
push   0xc0(%rsp)
push   0xd0(%rsp)
push   0xe0(%rsp)
push   0xf0(%rsp)
push   0x100(%rsp)
push   0x110(%rsp)
push   0x140(%rsp)
push   0x150(%rsp)
push   0x140(%rsp)
push   %r13
push   0x170(%rsp)
push   %rbp
push   0xd8(%rsp)
push   0x160(%rsp)
call   1030 <snprintf@plt>
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\00"
@.str.1 = [10 x i8] c"fsgsbase \00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [12 x i8] c"tsc_adjust \00"
@.str.4 = [5 x i8] c"sgx \00"
@.str.5 = [6 x i8] c"bmi1 \00"
@.str.6 = [5 x i8] c"hle \00"
@.str.7 = [6 x i8] c"avx2 \00"
@.str.8 = [7 x i8] c"fp_dp \00"
@.str.9 = [6 x i8] c"smep \00"
@.str.10 = [6 x i8] c"bmi2 \00"
@.str.11 = [6 x i8] c"erms \00"
@.str.12 = [9 x i8] c"invpcid \00"
@.str.13 = [5 x i8] c"rtm \00"
@.str.14 = [5 x i8] c"pqm \00"
@.str.15 = [8 x i8] c"fpcsds \00"
@.str.16 = [5 x i8] c"mpx \00"
@.str.17 = [5 x i8] c"pqe \00"
@.str.18 = [5 x i8] c"pat \00"
@.str.19 = [7 x i8] c"pse36 \00"
@.str.20 = [8 x i8] c"rdseed \00"
@.str.21 = [5 x i8] c"adx \00"
@.str.22 = [6 x i8] c"smap \00"
@.str.23 = [12 x i8] c"clflushopt \00"
@.str.24 = [6 x i8] c"clwb \00"
@.str.25 = [10 x i8] c"intel_pt \00"
@.str.26 = [5 x i8] c"sha \00"
@.str.27 = [13 x i8] c"prefetchwt1 \00"
@.str.28 = [6 x i8] c"umip \00"
@.str.29 = [5 x i8] c"pku \00"
@.str.30 = [7 x i8] c"ospke \00"
@.str.31 = [7 x i8] c"rdpid \00"
@.str.32 = [8 x i8] c"sgx_lc \00"
define i32 @get_x86_cpu_structured_extended_flags(i32 %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %9
%12 = load i64, i64* %10
%13 = load i32, i32* %7
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %26
20: ; preds = %5
%21 = load i32, i32* %7
%22 = and i32 %21, 2
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %27
26: ; preds = %5
br label %27
27: ; preds = %26, %20
%28 = phi i8* [ %25, %20 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %26 ]
%29 = load i32, i32* %6
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %27
%32 = load i32, i32* %7
%33 = and i32 %32, 4
%34 = icmp ne i32 %33, 0
%35 = zext i1 %34 to i64
%36 = select i1 %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %38
37: ; preds = %27
br label %38
38: ; preds = %37, %31
%39 = phi i8* [ %36, %31 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %37 ]
%40 = load i32, i32* %7
%41 = and i32 %40, 8
%42 = icmp ne i32 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%45 = load i32, i32* %6
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %53
47: ; preds = %38
%48 = load i32, i32* %7
%49 = and i32 %48, 16
%50 = icmp ne i32 %49, 0
%51 = zext i1 %50 to i64
%52 = select i1 %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %54
53: ; preds = %38
br label %54
54: ; preds = %53, %47
%55 = phi i8* [ %52, %47 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %53 ]
%56 = load i32, i32* %7
%57 = and i32 %56, 32
%58 = icmp ne i32 %57, 0
%59 = zext i1 %58 to i64
%60 = select i1 %58, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%61 = load i32, i32* %6
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %69
63: ; preds = %54
%64 = load i32, i32* %7
%65 = and i32 %64, 64
%66 = icmp ne i32 %65, 0
%67 = zext i1 %66 to i64
%68 = select i1 %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %70
69: ; preds = %54
br label %70
70: ; preds = %69, %63
%71 = phi i8* [ %68, %63 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %69 ]
%72 = load i32, i32* %7
%73 = and i32 %72, 128
%74 = icmp ne i32 %73, 0
%75 = zext i1 %74 to i64
%76 = select i1 %74, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%77 = load i32, i32* %7
%78 = and i32 %77, 256
%79 = icmp ne i32 %78, 0
%80 = zext i1 %79 to i64
%81 = select i1 %79, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%82 = load i32, i32* %6
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %90
84: ; preds = %70
%85 = load i32, i32* %7
%86 = and i32 %85, 512
%87 = icmp ne i32 %86, 0
%88 = zext i1 %87 to i64
%89 = select i1 %87, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %91
90: ; preds = %70
br label %91
91: ; preds = %90, %84
%92 = phi i8* [ %89, %84 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %90 ]
%93 = load i32, i32* %6
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %101
95: ; preds = %91
%96 = load i32, i32* %7
%97 = and i32 %96, 1024
%98 = icmp ne i32 %97, 0
%99 = zext i1 %98 to i64
%100 = select i1 %98, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %102
101: ; preds = %91
br label %102
102: ; preds = %101, %95
%103 = phi i8* [ %100, %95 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %101 ]
%104 = load i32, i32* %6
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %112
106: ; preds = %102
%107 = load i32, i32* %7
%108 = and i32 %107, 2048
%109 = icmp ne i32 %108, 0
%110 = zext i1 %109 to i64
%111 = select i1 %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %113
112: ; preds = %102
br label %113
113: ; preds = %112, %106
%114 = phi i8* [ %111, %106 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %112 ]
%115 = load i32, i32* %6
%116 = icmp ne i32 %115, 0
br i1 %116, label %117, label %123
117: ; preds = %113
%118 = load i32, i32* %7
%119 = and i32 %118, 4096
%120 = icmp ne i32 %119, 0
%121 = zext i1 %120 to i64
%122 = select i1 %120, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %124
123: ; preds = %113
br label %124
124: ; preds = %123, %117
%125 = phi i8* [ %122, %117 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %123 ]
%126 = load i32, i32* %6
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %134
128: ; preds = %124
%129 = load i32, i32* %7
%130 = and i32 %129, 8192
%131 = icmp ne i32 %130, 0
%132 = zext i1 %131 to i64
%133 = select i1 %131, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %135
134: ; preds = %124
br label %135
135: ; preds = %134, %128
%136 = phi i8* [ %133, %128 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %134 ]
%137 = load i32, i32* %6
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %145
139: ; preds = %135
%140 = load i32, i32* %7
%141 = and i32 %140, 16384
%142 = icmp ne i32 %141, 0
%143 = zext i1 %142 to i64
%144 = select i1 %142, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %146
145: ; preds = %135
br label %146
146: ; preds = %145, %139
%147 = phi i8* [ %144, %139 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %145 ]
%148 = load i32, i32* %6
%149 = icmp ne i32 %148, 0
br i1 %149, label %150, label %156
150: ; preds = %146
%151 = load i32, i32* %7
%152 = and i32 %151, 32768
%153 = icmp ne i32 %152, 0
%154 = zext i1 %153 to i64
%155 = select i1 %153, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %157
156: ; preds = %146
br label %157
157: ; preds = %156, %150
%158 = phi i8* [ %155, %150 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %156 ]
%159 = load i32, i32* %6
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %167
161: ; preds = %157
%162 = load i32, i32* %7
%163 = and i32 %162, 65536
%164 = icmp ne i32 %163, 0
%165 = zext i1 %164 to i64
%166 = select i1 %164, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %168
167: ; preds = %157
br label %168
168: ; preds = %167, %161
%169 = phi i8* [ %166, %161 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %167 ]
%170 = load i32, i32* %6
%171 = icmp ne i32 %170, 0
br i1 %171, label %172, label %178
172: ; preds = %168
%173 = load i32, i32* %7
%174 = and i32 %173, 131072
%175 = icmp ne i32 %174, 0
%176 = zext i1 %175 to i64
%177 = select i1 %175, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %179
178: ; preds = %168
br label %179
179: ; preds = %178, %172
%180 = phi i8* [ %177, %172 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %178 ]
%181 = load i32, i32* %6
%182 = icmp ne i32 %181, 0
br i1 %182, label %183, label %189
183: ; preds = %179
%184 = load i32, i32* %7
%185 = and i32 %184, 262144
%186 = icmp ne i32 %185, 0
%187 = zext i1 %186 to i64
%188 = select i1 %186, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %190
189: ; preds = %179
br label %190
190: ; preds = %189, %183
%191 = phi i8* [ %188, %183 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %189 ]
%192 = load i32, i32* %6
%193 = icmp ne i32 %192, 0
br i1 %193, label %194, label %200
194: ; preds = %190
%195 = load i32, i32* %7
%196 = and i32 %195, 524288
%197 = icmp ne i32 %196, 0
%198 = zext i1 %197 to i64
%199 = select i1 %197, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %201
200: ; preds = %190
br label %201
201: ; preds = %200, %194
%202 = phi i8* [ %199, %194 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %200 ]
%203 = load i32, i32* %6
%204 = icmp ne i32 %203, 0
br i1 %204, label %205, label %211
205: ; preds = %201
%206 = load i32, i32* %7
%207 = and i32 %206, 1048576
%208 = icmp ne i32 %207, 0
%209 = zext i1 %208 to i64
%210 = select i1 %208, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %212
211: ; preds = %201
br label %212
212: ; preds = %211, %205
%213 = phi i8* [ %210, %205 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %211 ]
%214 = load i32, i32* %6
%215 = icmp ne i32 %214, 0
br i1 %215, label %216, label %222
216: ; preds = %212
%217 = load i32, i32* %7
%218 = and i32 %217, 8388608
%219 = icmp ne i32 %218, 0
%220 = zext i1 %219 to i64
%221 = select i1 %219, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %223
222: ; preds = %212
br label %223
223: ; preds = %222, %216
%224 = phi i8* [ %221, %216 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %222 ]
%225 = load i32, i32* %6
%226 = icmp ne i32 %225, 0
br i1 %226, label %227, label %233
227: ; preds = %223
%228 = load i32, i32* %7
%229 = and i32 %228, 16777216
%230 = icmp ne i32 %229, 0
%231 = zext i1 %230 to i64
%232 = select i1 %230, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %234
233: ; preds = %223
br label %234
234: ; preds = %233, %227
%235 = phi i8* [ %232, %227 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %233 ]
%236 = load i32, i32* %6
%237 = icmp ne i32 %236, 0
br i1 %237, label %238, label %244
238: ; preds = %234
%239 = load i32, i32* %7
%240 = and i32 %239, 33554432
%241 = icmp ne i32 %240, 0
%242 = zext i1 %241 to i64
%243 = select i1 %241, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %245
244: ; preds = %234
br label %245
245: ; preds = %244, %238
%246 = phi i8* [ %243, %238 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %244 ]
%247 = load i32, i32* %6
%248 = icmp ne i32 %247, 0
br i1 %248, label %249, label %255
249: ; preds = %245
%250 = load i32, i32* %7
%251 = and i32 %250, 268435456
%252 = icmp ne i32 %251, 0
%253 = zext i1 %252 to i64
%254 = select i1 %252, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %256
255: ; preds = %245
br label %256
256: ; preds = %255, %249
%257 = phi i8* [ %254, %249 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %255 ]
%258 = load i32, i32* %6
%259 = icmp ne i32 %258, 0
br i1 %259, label %260, label %266
260: ; preds = %256
%261 = load i32, i32* %8
%262 = and i32 %261, 1
%263 = icmp ne i32 %262, 0
%264 = zext i1 %263 to i64
%265 = select i1 %263, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %267
266: ; preds = %256
br label %267
267: ; preds = %266, %260
%268 = phi i8* [ %265, %260 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %266 ]
%269 = load i32, i32* %6
%270 = icmp ne i32 %269, 0
br i1 %270, label %271, label %277
271: ; preds = %267
%272 = load i32, i32* %8
%273 = and i32 %272, 4
%274 = icmp ne i32 %273, 0
%275 = zext i1 %274 to i64
%276 = select i1 %274, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %278
277: ; preds = %267
br label %278
278: ; preds = %277, %271
%279 = phi i8* [ %276, %271 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %277 ]
%280 = load i32, i32* %6
%281 = icmp ne i32 %280, 0
br i1 %281, label %282, label %288
282: ; preds = %278
%283 = load i32, i32* %8
%284 = and i32 %283, 8
%285 = icmp ne i32 %284, 0
%286 = zext i1 %285 to i64
%287 = select i1 %285, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %289
288: ; preds = %278
br label %289
289: ; preds = %288, %282
%290 = phi i8* [ %287, %282 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %288 ]
%291 = load i32, i32* %6
%292 = icmp ne i32 %291, 0
br i1 %292, label %293, label %299
293: ; preds = %289
%294 = load i32, i32* %8
%295 = and i32 %294, 16
%296 = icmp ne i32 %295, 0
%297 = zext i1 %296 to i64
%298 = select i1 %296, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %300
299: ; preds = %289
br label %300
300: ; preds = %299, %293
%301 = phi i8* [ %298, %293 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %299 ]
%302 = load i32, i32* %6
%303 = icmp ne i32 %302, 0
br i1 %303, label %304, label %310
304: ; preds = %300
%305 = load i32, i32* %8
%306 = and i32 %305, 262144
%307 = icmp ne i32 %306, 0
%308 = zext i1 %307 to i64
%309 = select i1 %307, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %311
310: ; preds = %300
br label %311
311: ; preds = %310, %304
%312 = phi i8* [ %309, %304 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %310 ]
%313 = load i32, i32* %6
%314 = icmp ne i32 %313, 0
br i1 %314, label %315, label %321
315: ; preds = %311
%316 = load i32, i32* %8
%317 = and i32 %316, 1073741824
%318 = icmp ne i32 %317, 0
%319 = zext i1 %318 to i64
%320 = select i1 %318, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
br label %322
321: ; preds = %311
br label %322
322: ; preds = %321, %315
%323 = phi i8* [ %320, %315 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %321 ]
%324 = call i32 @snprintf(i8* %11, i64 %12, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %28, i8* %39, i8* %44, i8* %55, i8* %60, i8* %71, i8* %76, i8* %81, i8* %92, i8* %103, i8* %114, i8* %125, i8* %136, i8* %147, i8* %158, i8* %169, i8* %180, i8* %191, i8* %202, i8* %213, i8* %224, i8* %235, i8* %246, i8* %257, i8* %268, i8* %279, i8* %290, i8* %301, i8* %312, i8* %323)
ret i32 %324
}

LLVM IR (-O2):
@.str = [63 x i8] c"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\00"
@.str.1 = [10 x i8] c"fsgsbase \00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [12 x i8] c"tsc_adjust \00"
@.str.4 = [5 x i8] c"sgx \00"
@.str.5 = [6 x i8] c"bmi1 \00"
@.str.6 = [5 x i8] c"hle \00"
@.str.7 = [6 x i8] c"avx2 \00"
@.str.8 = [7 x i8] c"fp_dp \00"
@.str.9 = [6 x i8] c"smep \00"
@.str.10 = [6 x i8] c"bmi2 \00"
@.str.11 = [6 x i8] c"erms \00"
@.str.12 = [9 x i8] c"invpcid \00"
@.str.13 = [5 x i8] c"rtm \00"
@.str.14 = [5 x i8] c"pqm \00"
@.str.15 = [8 x i8] c"fpcsds \00"
@.str.16 = [5 x i8] c"mpx \00"
@.str.17 = [5 x i8] c"pqe \00"
@.str.18 = [5 x i8] c"pat \00"
@.str.19 = [7 x i8] c"pse36 \00"
@.str.20 = [8 x i8] c"rdseed \00"
@.str.21 = [5 x i8] c"adx \00"
@.str.22 = [6 x i8] c"smap \00"
@.str.23 = [12 x i8] c"clflushopt \00"
@.str.24 = [6 x i8] c"clwb \00"
@.str.25 = [10 x i8] c"intel_pt \00"
@.str.26 = [5 x i8] c"sha \00"
@.str.27 = [13 x i8] c"prefetchwt1 \00"
@.str.28 = [6 x i8] c"umip \00"
@.str.29 = [5 x i8] c"pku \00"
@.str.30 = [7 x i8] c"ospke \00"
@.str.31 = [7 x i8] c"rdpid \00"
@.str.32 = [8 x i8] c"sgx_lc \00"
define i32 @get_x86_cpu_structured_extended_flags(i32 %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = icmp eq i32 %0, 0
%7 = and i32 %1, 2
%8 = icmp eq i32 %7, 0
%9 = or i1 %6, %8
%10 = select i1 %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0)
%11 = and i32 %1, 4
%12 = icmp eq i32 %11, 0
%13 = or i1 %6, %12
%14 = select i1 %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%15 = and i32 %1, 16
%16 = icmp eq i32 %15, 0
%17 = or i1 %6, %16
%18 = select i1 %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
%19 = and i32 %1, 64
%20 = icmp eq i32 %19, 0
%21 = or i1 %6, %20
%22 = select i1 %21, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0)
%23 = and i32 %1, 512
%24 = icmp eq i32 %23, 0
%25 = or i1 %6, %24
%26 = select i1 %25, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0)
%27 = and i32 %1, 1024
%28 = icmp eq i32 %27, 0
%29 = or i1 %6, %28
%30 = select i1 %29, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0)
%31 = and i32 %1, 2048
%32 = icmp eq i32 %31, 0
%33 = or i1 %6, %32
%34 = select i1 %33, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0)
%35 = and i32 %1, 4096
%36 = icmp eq i32 %35, 0
%37 = or i1 %6, %36
%38 = select i1 %37, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0)
%39 = and i32 %1, 8192
%40 = icmp eq i32 %39, 0
%41 = or i1 %6, %40
%42 = select i1 %41, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0)
%43 = and i32 %1, 16384
%44 = icmp eq i32 %43, 0
%45 = or i1 %6, %44
%46 = select i1 %45, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0)
%47 = and i32 %1, 32768
%48 = icmp eq i32 %47, 0
%49 = or i1 %6, %48
%50 = select i1 %49, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0)
%51 = and i32 %1, 65536
%52 = icmp eq i32 %51, 0
%53 = or i1 %6, %52
%54 = select i1 %53, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0)
%55 = and i32 %1, 131072
%56 = icmp eq i32 %55, 0
%57 = or i1 %6, %56
%58 = select i1 %57, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0)
%59 = and i32 %1, 262144
%60 = icmp eq i32 %59, 0
%61 = or i1 %6, %60
%62 = select i1 %61, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0)
%63 = and i32 %1, 524288
%64 = icmp eq i32 %63, 0
%65 = or i1 %6, %64
%66 = select i1 %65, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0)
%67 = and i32 %1, 1048576
%68 = icmp eq i32 %67, 0
%69 = or i1 %6, %68
%70 = select i1 %69, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0)
%71 = and i32 %1, 8388608
%72 = icmp eq i32 %71, 0
%73 = or i1 %6, %72
%74 = select i1 %73, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.23, i64 0, i64 0)
%75 = and i32 %1, 16777216
%76 = icmp eq i32 %75, 0
%77 = or i1 %6, %76
%78 = select i1 %77, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0)
%79 = and i32 %1, 33554432
%80 = icmp eq i32 %79, 0
%81 = or i1 %6, %80
%82 = select i1 %81, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0)
%83 = and i32 %1, 268435456
%84 = icmp eq i32 %83, 0
%85 = or i1 %6, %84
%86 = select i1 %85, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0)
%87 = and i32 %2, 1
%88 = icmp eq i32 %87, 0
%89 = or i1 %6, %88
%90 = select i1 %89, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.27, i64 0, i64 0)
%91 = and i32 %2, 4
%92 = icmp eq i32 %91, 0
%93 = or i1 %6, %92
%94 = select i1 %93, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i64 0, i64 0)
%95 = and i32 %2, 8
%96 = icmp eq i32 %95, 0
%97 = or i1 %6, %96
%98 = select i1 %97, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0)
%99 = and i32 %2, 16
%100 = icmp eq i32 %99, 0
%101 = or i1 %6, %100
%102 = select i1 %101, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.30, i64 0, i64 0)
%103 = and i32 %2, 262144
%104 = icmp eq i32 %103, 0
%105 = or i1 %6, %104
%106 = select i1 %105, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0)
%107 = and i32 %2, 1073741824
%108 = icmp eq i32 %107, 0
%109 = or i1 %6, %108
%110 = select i1 %109, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0)
%111 = and i32 %1, 256
%112 = icmp eq i32 %111, 0
%113 = select i1 %112, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0)
%114 = and i32 %1, 128
%115 = icmp eq i32 %114, 0
%116 = select i1 %115, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0)
%117 = and i32 %1, 32
%118 = icmp eq i32 %117, 0
%119 = select i1 %118, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0)
%120 = and i32 %1, 8
%121 = icmp eq i32 %120, 0
%122 = select i1 %121, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0)
%123 = and i32 %1, 1
%124 = icmp eq i32 %123, 0
%125 = select i1 %124, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%126 = tail call i32 @snprintf(i8* %3, i64 %4, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %125, i8* %10, i8* %14, i8* %122, i8* %18, i8* %119, i8* %22, i8* %116, i8* %113, i8* %26, i8* %30, i8* %34, i8* %38, i8* %42, i8* %46, i8* %50, i8* %54, i8* %58, i8* %62, i8* %66, i8* %70, i8* %74, i8* %78, i8* %82, i8* %86, i8* %90, i8* %94, i8* %98, i8* %102, i8* %106, i8* %110)
ret i32 %126
}