#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*/ print_mm_fdevopt(unsigned int, int);
int /*<<< orphan*/ print_mm_ficd(unsigned int, int);
int /*<<< orphan*/ print_mm_foscsel(unsigned int, int);
int /*<<< orphan*/ print_mm_fpor(unsigned int, int);
int /*<<< orphan*/ print_mm_fsec(unsigned int, int);
int /*<<< orphan*/ print_mm_fwdt(unsigned int, int);
int /*<<< orphan*/ printf(char *);
void print_mm(unsigned cfg0, unsigned cfg1, unsigned cfg2, unsigned cfg3,
              unsigned cfg4, unsigned cfg5, unsigned cfg6, unsigned cfg7,
              unsigned cfg8, unsigned cfg9, unsigned cfg10, unsigned cfg11,
              unsigned cfg12, unsigned cfg13, unsigned cfg14, unsigned cfg15,
              unsigned cfg16, unsigned cfg17) {
  printf("Primary configuration bits\n");
  print_mm_fdevopt(cfg0, 0);
  print_mm_ficd(cfg1, 0);
  print_mm_fpor(cfg2, 0);
  print_mm_fwdt(cfg3, 0);
  print_mm_foscsel(cfg4, 0);
  print_mm_fsec(cfg5, 0);
  printf("\n");
  printf("Alternative configuration bits\n");
  print_mm_fdevopt(cfg6, 1);
  print_mm_ficd(cfg7, 1);
  print_mm_fpor(cfg8, 1);
  print_mm_fwdt(cfg9, 1);
  print_mm_foscsel(cfg10, 1);
  print_mm_fsec(cfg11, 1);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_mm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x68(%rbp),%eax
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1080 <print_mm_fdevopt@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1070 <print_mm_ficd@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1050 <print_mm_fpor@plt>
mov    -0x10(%rbp),%edi
xor    %esi,%esi
call   1030 <print_mm_fwdt@plt>
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1060 <print_mm_foscsel@plt>
mov    -0x18(%rbp),%edi
xor    %esi,%esi
call   1090 <print_mm_fsec@plt>
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe11(%rip),%rdi
call   1040 <printf@plt>
mov    0x10(%rbp),%edi
mov    $0x1,%esi
call   1080 <print_mm_fdevopt@plt>
mov    0x18(%rbp),%edi
mov    $0x1,%esi
call   1070 <print_mm_ficd@plt>
mov    0x20(%rbp),%edi
mov    $0x1,%esi
call   1050 <print_mm_fpor@plt>
mov    0x28(%rbp),%edi
mov    $0x1,%esi
call   1030 <print_mm_fwdt@plt>
mov    0x30(%rbp),%edi
mov    $0x1,%esi
call   1060 <print_mm_foscsel@plt>
mov    0x38(%rbp),%edi
mov    $0x1,%esi
call   1090 <print_mm_fsec@plt>
lea    0xdd5(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x78(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    0x70(%rsp),%eax
mov    %eax,0x10(%rsp)
mov    0x68(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x60(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    0x58(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
lea    0xe2c(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1090 <print_mm_fdevopt@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1080 <print_mm_ficd@plt>
mov    %r13d,%edi
xor    %esi,%esi
call   1060 <print_mm_fpor@plt>
mov    %r12d,%edi
xor    %esi,%esi
call   1050 <print_mm_fwdt@plt>
mov    %r15d,%edi
xor    %esi,%esi
call   1070 <print_mm_foscsel@plt>
mov    %r14d,%edi
xor    %esi,%esi
call   10a0 <print_mm_fsec@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdf7(%rip),%rdi
call   1040 <puts@plt>
mov    (%rsp),%edi
mov    $0x1,%esi
call   1090 <print_mm_fdevopt@plt>
mov    0x4(%rsp),%edi
mov    $0x1,%esi
call   1080 <print_mm_ficd@plt>
mov    0x8(%rsp),%edi
mov    $0x1,%esi
call   1060 <print_mm_fpor@plt>
mov    0xc(%rsp),%edi
mov    $0x1,%esi
call   1050 <print_mm_fwdt@plt>
mov    0x10(%rsp),%edi
mov    $0x1,%esi
call   1070 <print_mm_foscsel@plt>
mov    0x14(%rsp),%edi
mov    $0x1,%esi
call   10a0 <print_mm_fsec@plt>
mov    $0xa,%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Primary configuration bits\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [32 x i8] c"Alternative configuration bits\0A\00"
define void @print_mm(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17) {
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
store i32 %0, i32* %19
store i32 %1, i32* %20
store i32 %2, i32* %21
store i32 %3, i32* %22
store i32 %4, i32* %23
store i32 %5, i32* %24
store i32 %6, i32* %25
store i32 %7, i32* %26
store i32 %8, i32* %27
store i32 %9, i32* %28
store i32 %10, i32* %29
store i32 %11, i32* %30
store i32 %12, i32* %31
store i32 %13, i32* %32
store i32 %14, i32* %33
store i32 %15, i32* %34
store i32 %16, i32* %35
store i32 %17, i32* %36
%37 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%38 = load i32, i32* %19
%39 = call i32 @print_mm_fdevopt(i32 %38, i32 0)
%40 = load i32, i32* %20
%41 = call i32 @print_mm_ficd(i32 %40, i32 0)
%42 = load i32, i32* %21
%43 = call i32 @print_mm_fpor(i32 %42, i32 0)
%44 = load i32, i32* %22
%45 = call i32 @print_mm_fwdt(i32 %44, i32 0)
%46 = load i32, i32* %23
%47 = call i32 @print_mm_foscsel(i32 %46, i32 0)
%48 = load i32, i32* %24
%49 = call i32 @print_mm_fsec(i32 %48, i32 0)
%50 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%51 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%52 = load i32, i32* %25
%53 = call i32 @print_mm_fdevopt(i32 %52, i32 1)
%54 = load i32, i32* %26
%55 = call i32 @print_mm_ficd(i32 %54, i32 1)
%56 = load i32, i32* %27
%57 = call i32 @print_mm_fpor(i32 %56, i32 1)
%58 = load i32, i32* %28
%59 = call i32 @print_mm_fwdt(i32 %58, i32 1)
%60 = load i32, i32* %29
%61 = call i32 @print_mm_foscsel(i32 %60, i32 1)
%62 = load i32, i32* %30
%63 = call i32 @print_mm_fsec(i32 %62, i32 1)
%64 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Primary configuration bits\00"
@str.3 = [31 x i8] c"Alternative configuration bits\00"
define void @print_mm(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17) {
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%20 = tail call i32 @print_mm_fdevopt(i32 %0, i32 0)
%21 = tail call i32 @print_mm_ficd(i32 %1, i32 0)
%22 = tail call i32 @print_mm_fpor(i32 %2, i32 0)
%23 = tail call i32 @print_mm_fwdt(i32 %3, i32 0)
%24 = tail call i32 @print_mm_foscsel(i32 %4, i32 0)
%25 = tail call i32 @print_mm_fsec(i32 %5, i32 0)
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.3, i64 0, i64 0))
%28 = tail call i32 @print_mm_fdevopt(i32 %6, i32 1)
%29 = tail call i32 @print_mm_ficd(i32 %7, i32 1)
%30 = tail call i32 @print_mm_fpor(i32 %8, i32 1)
%31 = tail call i32 @print_mm_fwdt(i32 %9, i32 1)
%32 = tail call i32 @print_mm_foscsel(i32 %10, i32 1)
%33 = tail call i32 @print_mm_fsec(i32 %11, i32 1)
%34 = tail call i32 @putchar(i32 10)
ret void
}