#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 */

/* Variables and functions */
int /*<<< orphan*/ cpuid(int *, int);
int /*<<< orphan*/ printf(char *, ...);
void cpuid_print_exts() {
  int x64 = 0;
  int MMX = 0;
  int SSE = 0;
  int SSE2 = 0;
  int SSE3 = 0;
  int SSSE3 = 0;
  int SSE41 = 0;
  int SSE42 = 0;
  int SSE4a = 0;
  int AVX = 0;
  int XOP = 0;
  int FMA3 = 0;
  int FMA4 = 0;
  int info[4];
  cpuid(info, 0);
  int nIds = info[0];
  cpuid(info, 0x80000000);
  int nExIds = info[0];
  if (nIds >= 1) {
    cpuid(info, 0x00000001);
    MMX = (info[3] & ((int)1 << 23)) != 0;
    SSE = (info[3] & ((int)1 << 25)) != 0;
    SSE2 = (info[3] & ((int)1 << 26)) != 0;
    SSE3 = (info[2] & ((int)1 << 0)) != 0;
    SSSE3 = (info[2] & ((int)1 << 9)) != 0;
    SSE41 = (info[2] & ((int)1 << 19)) != 0;
    SSE42 = (info[2] & ((int)1 << 20)) != 0;
    AVX = (info[2] & ((int)1 << 28)) != 0;
    FMA3 = (info[2] & ((int)1 << 12)) != 0;
  }
  if (nExIds >= 0x80000001) {
    cpuid(info, 0x80000001);
    x64 = (info[3] & ((int)1 << 29)) != 0;
    SSE4a = (info[2] & ((int)1 << 6)) != 0;
    FMA4 = (info[2] & ((int)1 << 16)) != 0;
    XOP = (info[2] & ((int)1 << 11)) != 0;
  }
  printf("Hardware Features:\n");
  printf("x64   = %d\n", x64);
  printf("MMX   = %d\n", MMX);
  printf("SSE   = %d\n", SSE);
  printf("SSE2  = %d\n", SSE2);
  printf("SSE3  = %d\n", SSE3);
  printf("SSSE3 = %d\n", SSSE3);
  printf("SSE4a = %d\n", SSE4a);
  printf("SSE41 = %d\n", SSE41);
  printf("SSE42 = %d\n", SSE42);
  printf("AVX   = %d\n", AVX);
  printf("FMA3  = %d\n", FMA3);
  printf("FMA4  = %d\n", FMA4);
  printf("XOP   = %d\n", XOP);
  printf("\n");
}


x86 assembly (clang, -O0):
<cpuid_print_exts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
call   1040 <cpuid@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    $0x80000000,%esi
call   1040 <cpuid@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x1,-0x54(%rbp)
jl     1284 <cpuid_print_exts+0x164>
lea    -0x50(%rbp),%rdi
mov    $0x1,%esi
call   1040 <cpuid@plt>
mov    -0x44(%rbp),%eax
and    $0x800000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x44(%rbp),%eax
and    $0x2000000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x44(%rbp),%eax
and    $0x4000000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x48(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x48(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x48(%rbp),%eax
and    $0x80000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x48(%rbp),%eax
and    $0x100000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
mov    -0x48(%rbp),%eax
and    $0x10000000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x48(%rbp),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x80000001,-0x58(%rbp)
jb     12f5 <cpuid_print_exts+0x1d5>
lea    -0x50(%rbp),%rdi
mov    $0x80000001,%esi
call   1040 <cpuid@plt>
mov    -0x44(%rbp),%eax
and    $0x20000000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x48(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x48(%rbp),%eax
and    $0x10000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%eax
and    $0x800,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xd07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xcfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xcda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xcd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xccb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_print_exts>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <cpuid@plt>
mov    (%rsp),%ebp
mov    %rbx,%rdi
mov    $0x80000000,%esi
call   1060 <cpuid@plt>
mov    (%rsp),%r8d
mov    $0x0,%ebx
mov    $0x0,%r15d
mov    $0x0,%edi
mov    $0x0,%esi
mov    $0x0,%edx
mov    $0x0,%ecx
mov    $0x0,%eax
mov    $0x0,%r12d
mov    $0x0,%r13d
test   %ebp,%ebp
jle    120e <cpuid_print_exts+0xce>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    %r8d,%ebx
call   1060 <cpuid@plt>
mov    %ebx,%r8d
mov    0x8(%rsp),%r12d
mov    0xc(%rsp),%r15d
mov    %r15d,%r13d
shr    $0x17,%r13d
and    $0x1,%r13d
mov    %r15d,%ebx
shr    $0x19,%ebx
and    $0x1,%ebx
shr    $0x1a,%r15d
and    $0x1,%r15d
mov    %r12d,%edi
and    $0x1,%edi
mov    %r12d,%esi
shr    $0x9,%esi
and    $0x1,%esi
mov    %r12d,%edx
shr    $0x13,%edx
and    $0x1,%edx
mov    %r12d,%ecx
shr    $0x14,%ecx
and    $0x1,%ecx
mov    %r12d,%eax
shr    $0x1c,%eax
and    $0x1,%eax
shr    $0xc,%r12d
and    $0x1,%r12d
mov    %ebx,0x20(%rsp)
mov    %edi,0x24(%rsp)
mov    %esi,0x28(%rsp)
mov    %edx,0x2c(%rsp)
mov    %ecx,0x30(%rsp)
mov    %eax,0x34(%rsp)
mov    $0x0,%ebx
mov    $0x0,%eax
mov    $0x0,%r14d
cmp    $0x80000001,%r8d
mov    $0x0,%ebp
jb     1278 <cpuid_print_exts+0x138>
mov    %rsp,%rdi
mov    $0x80000001,%esi
call   1060 <cpuid@plt>
mov    0x8(%rsp),%ebx
mov    0xc(%rsp),%r14d
shr    $0x1d,%r14d
and    $0x1,%r14d
mov    %ebx,%ebp
shr    $0x6,%ebp
and    $0x1,%ebp
mov    %ebx,%eax
shr    $0x10,%eax
and    $0x1,%eax
shr    $0xb,%ebx
and    $0x1,%ebx
mov    %eax,0x1c(%rsp)
lea    0xe19(%rip),%rdi
call   1040 <puts@plt>
lea    0xd71(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd6c(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd67(%rip),%rdi
mov    0x20(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd61(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd5c(%rip),%rdi
mov    0x24(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd56(%rip),%rdi
mov    0x28(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd50(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd4c(%rip),%rdi
mov    0x2c(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd46(%rip),%rdi
mov    0x30(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd40(%rip),%rdi
mov    0x34(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd3a(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd35(%rip),%rdi
mov    0x1c(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd2f(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Hardware Features:\0A\00"
@.str.1 = [12 x i8] c"x64 = %d\0A\00"
@.str.2 = [12 x i8] c"MMX = %d\0A\00"
@.str.3 = [12 x i8] c"SSE = %d\0A\00"
@.str.4 = [12 x i8] c"SSE2 = %d\0A\00"
@.str.5 = [12 x i8] c"SSE3 = %d\0A\00"
@.str.6 = [12 x i8] c"SSSE3 = %d\0A\00"
@.str.7 = [12 x i8] c"SSE4a = %d\0A\00"
@.str.8 = [12 x i8] c"SSE41 = %d\0A\00"
@.str.9 = [12 x i8] c"SSE42 = %d\0A\00"
@.str.10 = [12 x i8] c"AVX = %d\0A\00"
@.str.11 = [12 x i8] c"FMA3 = %d\0A\00"
@.str.12 = [12 x i8] c"FMA4 = %d\0A\00"
@.str.13 = [12 x i8] c"XOP = %d\0A\00"
@.str.14 = [2 x i8] c"\0A\00"
define void @cpuid_print_exts() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [4 x i32]
%15 = alloca i32
%16 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%18 = call i32 @cpuid(i32* %17, i32 0)
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%20 = load i32, i32* %19
store i32 %20, i32* %15
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%22 = call i32 @cpuid(i32* %21, i32 -2147483648)
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%24 = load i32, i32* %23
store i32 %24, i32* %16
%25 = load i32, i32* %15
%26 = icmp sge i32 %25, 1
br i1 %26, label %27, label %75
27: ; preds = %0
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%29 = call i32 @cpuid(i32* %28, i32 1)
%30 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 3
%31 = load i32, i32* %30
%32 = and i32 %31, 8388608
%33 = icmp ne i32 %32, 0
%34 = zext i1 %33 to i32
store i32 %34, i32* %2
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 3
%36 = load i32, i32* %35
%37 = and i32 %36, 33554432
%38 = icmp ne i32 %37, 0
%39 = zext i1 %38 to i32
store i32 %39, i32* %3
%40 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 3
%41 = load i32, i32* %40
%42 = and i32 %41, 67108864
%43 = icmp ne i32 %42, 0
%44 = zext i1 %43 to i32
store i32 %44, i32* %4
%45 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%46 = load i32, i32* %45
%47 = and i32 %46, 1
%48 = icmp ne i32 %47, 0
%49 = zext i1 %48 to i32
store i32 %49, i32* %5
%50 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%51 = load i32, i32* %50
%52 = and i32 %51, 512
%53 = icmp ne i32 %52, 0
%54 = zext i1 %53 to i32
store i32 %54, i32* %6
%55 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%56 = load i32, i32* %55
%57 = and i32 %56, 524288
%58 = icmp ne i32 %57, 0
%59 = zext i1 %58 to i32
store i32 %59, i32* %7
%60 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%61 = load i32, i32* %60
%62 = and i32 %61, 1048576
%63 = icmp ne i32 %62, 0
%64 = zext i1 %63 to i32
store i32 %64, i32* %8
%65 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%66 = load i32, i32* %65
%67 = and i32 %66, 268435456
%68 = icmp ne i32 %67, 0
%69 = zext i1 %68 to i32
store i32 %69, i32* %10
%70 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%71 = load i32, i32* %70
%72 = and i32 %71, 4096
%73 = icmp ne i32 %72, 0
%74 = zext i1 %73 to i32
store i32 %74, i32* %12
br label %75
75: ; preds = %27, %0
%76 = load i32, i32* %16
%77 = icmp uge i32 %76, -2147483647
br i1 %77, label %78, label %101
78: ; preds = %75
%79 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 0
%80 = call i32 @cpuid(i32* %79, i32 -2147483647)
%81 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 3
%82 = load i32, i32* %81
%83 = and i32 %82, 536870912
%84 = icmp ne i32 %83, 0
%85 = zext i1 %84 to i32
store i32 %85, i32* %1
%86 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%87 = load i32, i32* %86
%88 = and i32 %87, 64
%89 = icmp ne i32 %88, 0
%90 = zext i1 %89 to i32
store i32 %90, i32* %9
%91 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%92 = load i32, i32* %91
%93 = and i32 %92, 65536
%94 = icmp ne i32 %93, 0
%95 = zext i1 %94 to i32
store i32 %95, i32* %13
%96 = getelementptr inbounds [4 x i32], [4 x i32]* %14, i64 0, i64 2
%97 = load i32, i32* %96
%98 = and i32 %97, 2048
%99 = icmp ne i32 %98, 0
%100 = zext i1 %99 to i32
store i32 %100, i32* %11
br label %101
101: ; preds = %78, %75
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%103 = load i32, i32* %1
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %103)
%105 = load i32, i32* %2
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %105)
%107 = load i32, i32* %3
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %107)
%109 = load i32, i32* %4
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %109)
%111 = load i32, i32* %5
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %111)
%113 = load i32, i32* %6
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %113)
%115 = load i32, i32* %9
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %115)
%117 = load i32, i32* %7
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %117)
%119 = load i32, i32* %8
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %119)
%121 = load i32, i32* %10
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %121)
%123 = load i32, i32* %12
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 %123)
%125 = load i32, i32* %13
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %125)
%127 = load i32, i32* %11
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 %127)
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"x64 = %d\0A\00"
@.str.2 = [12 x i8] c"MMX = %d\0A\00"
@.str.3 = [12 x i8] c"SSE = %d\0A\00"
@.str.4 = [12 x i8] c"SSE2 = %d\0A\00"
@.str.5 = [12 x i8] c"SSE3 = %d\0A\00"
@.str.6 = [12 x i8] c"SSSE3 = %d\0A\00"
@.str.7 = [12 x i8] c"SSE4a = %d\0A\00"
@.str.8 = [12 x i8] c"SSE41 = %d\0A\00"
@.str.9 = [12 x i8] c"SSE42 = %d\0A\00"
@.str.10 = [12 x i8] c"AVX = %d\0A\00"
@.str.11 = [12 x i8] c"FMA3 = %d\0A\00"
@.str.12 = [12 x i8] c"FMA4 = %d\0A\00"
@.str.13 = [12 x i8] c"XOP = %d\0A\00"
@str = [19 x i8] c"Hardware Features:\00"
define void @cpuid_print_exts() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @cpuid(i32* %3, i32 0)
%5 = load i32, i32* %3
%6 = call i32 @cpuid(i32* %3, i32 -2147483648)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %5, 0
br i1 %8, label %9, label %32
9: ; preds = %0
%10 = call i32 @cpuid(i32* %3, i32 1)
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%12 = load i32, i32* %11
%13 = lshr i32 %12, 23
%14 = and i32 %13, 1
%15 = lshr i32 %12, 25
%16 = and i32 %15, 1
%17 = lshr i32 %12, 26
%18 = and i32 %17, 1
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%20 = load i32, i32* %19
%21 = and i32 %20, 1
%22 = lshr i32 %20, 9
%23 = and i32 %22, 1
%24 = lshr i32 %20, 19
%25 = and i32 %24, 1
%26 = lshr i32 %20, 20
%27 = and i32 %26, 1
%28 = lshr i32 %20, 28
%29 = and i32 %28, 1
%30 = lshr i32 %20, 12
%31 = and i32 %30, 1
br label %32
32: ; preds = %9, %0
%33 = phi i32 [ %16, %9 ], [ 0, %0 ]
%34 = phi i32 [ %18, %9 ], [ 0, %0 ]
%35 = phi i32 [ %21, %9 ], [ 0, %0 ]
%36 = phi i32 [ %23, %9 ], [ 0, %0 ]
%37 = phi i32 [ %25, %9 ], [ 0, %0 ]
%38 = phi i32 [ %27, %9 ], [ 0, %0 ]
%39 = phi i32 [ %29, %9 ], [ 0, %0 ]
%40 = phi i32 [ %31, %9 ], [ 0, %0 ]
%41 = phi i32 [ %14, %9 ], [ 0, %0 ]
%42 = icmp ugt i32 %7, -2147483648
br i1 %42, label %43, label %57
43: ; preds = %32
%44 = call i32 @cpuid(i32* %3, i32 -2147483647)
%45 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%46 = load i32, i32* %45
%47 = lshr i32 %46, 29
%48 = and i32 %47, 1
%49 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%50 = load i32, i32* %49
%51 = lshr i32 %50, 6
%52 = and i32 %51, 1
%53 = lshr i32 %50, 16
%54 = and i32 %53, 1
%55 = lshr i32 %50, 11
%56 = and i32 %55, 1
br label %57
57: ; preds = %43, %32
%58 = phi i32 [ %52, %43 ], [ 0, %32 ]
%59 = phi i32 [ %56, %43 ], [ 0, %32 ]
%60 = phi i32 [ %54, %43 ], [ 0, %32 ]
%61 = phi i32 [ %48, %43 ], [ 0, %32 ]
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %61)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %41)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %34)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %35)
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %36)
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %58)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 %37)
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %38)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %39)
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 %40)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %60)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 %59)
%76 = call i32 @putchar(i32 10)
ret void
}