#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*/ mib_get(scalar_t__, void *);
int /*<<< orphan*/ printf(char *);
void showADSLSettings() {
  unsigned char vChar;
  unsigned short mode;
  mib_get(0 + 25, (void *)&mode);
  printf("ADSL modulation:\n");
  if (mode & 0x0008)
    printf("\tG.Lite:\t  Enable\n");
  else
    printf("\tG.Lite:\t  Disable\n");
  if (mode & 0x0002)
    printf("\tG.Dmt:\t  Enable\n");
  else
    printf("\tG.Dmt:\t  Disable\n");
  if (mode & 0x0001)
    printf("\tT1.413:\t  Enable\n");
  else
    printf("\tT1.413:\t  Disable\n");
  if (mode & 0x0010)
    printf("\tADSL2:\t  Enable\n");
  else
    printf("\tADSL2:\t  Disable\n");
  if (mode & 0x0040)
    printf("\tADSL2+:\t  Enable\n");
  else
    printf("\tADSL2+:\t  Disable\n");
  printf("AnnexL Option:\n");
  if (mode & 0x0020)
    printf("\tAnnexL:\t  Enable\n");
  else
    printf("\tAnnexL:\t  Disable\n");
  printf("AnnexM Option:\n");
  if (mode & 0x0080)
    printf("\tAnnexM:\t  Enable\n");
  else
    printf("\tAnnexM:\t  Disable\n");
  mib_get(0 + 26, (void *)&vChar);
  printf("ADSL Capability:\n");
  if (vChar & 1)
    printf("\tBitswap:  Enable\n");
  else
    printf("\tBitswap:  Disable\n");
  if (vChar & 2)
    printf("\tSRA:\t  Enable\n");
  else
    printf("\tSRA:\t  Disable\n");
}


x86 assembly (clang, -O0):
<showADSLSettings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rsi
mov    $0x19,%edi
call   1040 <mib_get@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1163 <showADSLSettings+0x43>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    116f <showADSLSettings+0x4f>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1190 <showADSLSettings+0x70>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    119c <showADSLSettings+0x7c>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     11bd <showADSLSettings+0x9d>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <showADSLSettings+0xa9>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     11ea <showADSLSettings+0xca>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <showADSLSettings+0xd6>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1217 <showADSLSettings+0xf7>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    1223 <showADSLSettings+0x103>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1250 <showADSLSettings+0x130>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    125c <showADSLSettings+0x13c>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     128b <showADSLSettings+0x16b>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    1297 <showADSLSettings+0x177>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1a,%edi
lea    -0x1(%rbp),%rsi
call   1040 <mib_get@plt>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     12d2 <showADSLSettings+0x1b2>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    12de <showADSLSettings+0x1be>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
movzbl -0x1(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     12ff <showADSLSettings+0x1df>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    130b <showADSLSettings+0x1eb>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showADSLSettings>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x19,%edi
call   1040 <mib_get@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x8,%al
lea    0xec7(%rip),%rax
lea    0x1020(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x2,%al
lea    0xebc(%rip),%rax
lea    0xff1(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x1,%al
lea    0xeb0(%rip),%rax
lea    0xfc1(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x10,%al
lea    0xea5(%rip),%rax
lea    0xf92(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x40,%al
lea    0xe99(%rip),%rax
lea    0xf62(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x20,%al
lea    0xe91(%rip),%rax
lea    0xf26(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
movzwl 0x4(%rsp),%eax
test   $0x80,%al
lea    0xe89(%rip),%rax
lea    0xeea(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
lea    0x7(%rsp),%rsi
mov    $0x1a,%edi
call   1040 <mib_get@plt>
lea    0xe76(%rip),%rdi
call   1030 <puts@plt>
testb  $0x1,0x7(%rsp)
lea    0xe76(%rip),%rax
lea    0xea1(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
testb  $0x2,0x7(%rsp)
lea    0xe6d(%rip),%rax
lea    0xe76(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"ADSL modulation:\0A\00"
@.str.1 = [19 x i8] c"\09G.Lite:\09 Enable\0A\00"
@.str.2 = [20 x i8] c"\09G.Lite:\09 Disable\0A\00"
@.str.3 = [18 x i8] c"\09G.Dmt:\09 Enable\0A\00"
@.str.4 = [19 x i8] c"\09G.Dmt:\09 Disable\0A\00"
@.str.5 = [19 x i8] c"\09T1.413:\09 Enable\0A\00"
@.str.6 = [20 x i8] c"\09T1.413:\09 Disable\0A\00"
@.str.7 = [18 x i8] c"\09ADSL2:\09 Enable\0A\00"
@.str.8 = [19 x i8] c"\09ADSL2:\09 Disable\0A\00"
@.str.9 = [19 x i8] c"\09ADSL2+:\09 Enable\0A\00"
@.str.10 = [20 x i8] c"\09ADSL2+:\09 Disable\0A\00"
@.str.11 = [16 x i8] c"AnnexL Option:\0A\00"
@.str.12 = [19 x i8] c"\09AnnexL:\09 Enable\0A\00"
@.str.13 = [20 x i8] c"\09AnnexL:\09 Disable\0A\00"
@.str.14 = [16 x i8] c"AnnexM Option:\0A\00"
@.str.15 = [19 x i8] c"\09AnnexM:\09 Enable\0A\00"
@.str.16 = [20 x i8] c"\09AnnexM:\09 Disable\0A\00"
@.str.17 = [18 x i8] c"ADSL Capability:\0A\00"
@.str.18 = [19 x i8] c"\09Bitswap: Enable\0A\00"
@.str.19 = [20 x i8] c"\09Bitswap: Disable\0A\00"
@.str.20 = [16 x i8] c"\09SRA:\09 Enable\0A\00"
@.str.21 = [17 x i8] c"\09SRA:\09 Disable\0A\00"
define void @showADSLSettings() {
%1 = alloca i8
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = call i32 @mib_get(i64 25, i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = and i32 %7, 8
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
%15 = load i16, i16* %2
%16 = zext i16 %15 to i32
%17 = and i32 %16, 2
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %23
21: ; preds = %14
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
%24 = load i16, i16* %2
%25 = zext i16 %24 to i32
%26 = and i32 %25, 1
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %32
30: ; preds = %23
%31 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
%33 = load i16, i16* %2
%34 = zext i16 %33 to i32
%35 = and i32 %34, 16
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
br label %41
39: ; preds = %32
%40 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %41
41: ; preds = %39, %37
%42 = load i16, i16* %2
%43 = zext i16 %42 to i32
%44 = and i32 %43, 64
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %41
%47 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
br label %50
48: ; preds = %41
%49 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
%51 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%52 = load i16, i16* %2
%53 = zext i16 %52 to i32
%54 = and i32 %53, 32
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %50
%57 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
br label %60
58: ; preds = %50
%59 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
br label %60
60: ; preds = %58, %56
%61 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%62 = load i16, i16* %2
%63 = zext i16 %62 to i32
%64 = and i32 %63, 128
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %60
%67 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0))
br label %70
68: ; preds = %60
%69 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
br label %70
70: ; preds = %68, %66
%71 = call i32 @mib_get(i64 26, i8* %1)
%72 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0))
%73 = load i8, i8* %1
%74 = zext i8 %73 to i32
%75 = and i32 %74, 1
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %70
%78 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0))
br label %81
79: ; preds = %70
%80 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
br label %81
81: ; preds = %79, %77
%82 = load i8, i8* %1
%83 = zext i8 %82 to i32
%84 = and i32 %83, 2
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %81
%87 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0))
br label %90
88: ; preds = %81
%89 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0))
br label %90
90: ; preds = %88, %86
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"ADSL modulation:\00"
@str.22 = [19 x i8] c"\09G.Lite:\09 Disable\00"
@str.23 = [18 x i8] c"\09G.Dmt:\09 Disable\00"
@str.24 = [19 x i8] c"\09T1.413:\09 Disable\00"
@str.25 = [18 x i8] c"\09ADSL2:\09 Disable\00"
@str.26 = [19 x i8] c"\09ADSL2+:\09 Disable\00"
@str.27 = [15 x i8] c"AnnexL Option:\00"
@str.28 = [19 x i8] c"\09AnnexL:\09 Disable\00"
@str.29 = [15 x i8] c"AnnexM Option:\00"
@str.30 = [19 x i8] c"\09AnnexM:\09 Disable\00"
@str.31 = [17 x i8] c"ADSL Capability:\00"
@str.32 = [19 x i8] c"\09Bitswap: Disable\00"
@str.33 = [16 x i8] c"\09SRA:\09 Disable\00"
@str.34 = [15 x i8] c"\09SRA:\09 Enable\00"
@str.35 = [18 x i8] c"\09Bitswap: Enable\00"
@str.36 = [18 x i8] c"\09AnnexM:\09 Enable\00"
@str.37 = [18 x i8] c"\09AnnexL:\09 Enable\00"
@str.38 = [18 x i8] c"\09ADSL2+:\09 Enable\00"
@str.39 = [17 x i8] c"\09ADSL2:\09 Enable\00"
@str.40 = [18 x i8] c"\09T1.413:\09 Enable\00"
@str.41 = [17 x i8] c"\09G.Dmt:\09 Enable\00"
@str.42 = [18 x i8] c"\09G.Lite:\09 Enable\00"
define void @showADSLSettings() {
%1 = alloca i8
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = call i32 @mib_get(i64 25, i8* %3)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%6 = load i16, i16* %2
%7 = and i16 %6, 8
%8 = icmp eq i16 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.22, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.42, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
%11 = load i16, i16* %2
%12 = and i16 %11, 2
%13 = icmp eq i16 %12, 0
%14 = select i1 %13, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.23, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.41, i64 0, i64 0)
%15 = call i32 @puts(i8* dereferenceable(1) %14)
%16 = load i16, i16* %2
%17 = and i16 %16, 1
%18 = icmp eq i16 %17, 0
%19 = select i1 %18, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.24, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.40, i64 0, i64 0)
%20 = call i32 @puts(i8* dereferenceable(1) %19)
%21 = load i16, i16* %2
%22 = and i16 %21, 16
%23 = icmp eq i16 %22, 0
%24 = select i1 %23, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.25, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.39, i64 0, i64 0)
%25 = call i32 @puts(i8* dereferenceable(1) %24)
%26 = load i16, i16* %2
%27 = and i16 %26, 64
%28 = icmp eq i16 %27, 0
%29 = select i1 %28, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.26, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.38, i64 0, i64 0)
%30 = call i32 @puts(i8* dereferenceable(1) %29)
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.27, i64 0, i64 0))
%32 = load i16, i16* %2
%33 = and i16 %32, 32
%34 = icmp eq i16 %33, 0
%35 = select i1 %34, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.28, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.37, i64 0, i64 0)
%36 = call i32 @puts(i8* dereferenceable(1) %35)
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
%38 = load i16, i16* %2
%39 = and i16 %38, 128
%40 = icmp eq i16 %39, 0
%41 = select i1 %40, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.30, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.36, i64 0, i64 0)
%42 = call i32 @puts(i8* dereferenceable(1) %41)
%43 = call i32 @mib_get(i64 26, i8* %1)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.31, i64 0, i64 0))
%45 = load i8, i8* %1
%46 = and i8 %45, 1
%47 = icmp eq i8 %46, 0
%48 = select i1 %47, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.32, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.35, i64 0, i64 0)
%49 = call i32 @puts(i8* dereferenceable(1) %48)
%50 = load i8, i8* %1
%51 = and i8 %50, 2
%52 = icmp eq i8 %51, 0
%53 = select i1 %52, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.33, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.34, i64 0, i64 0)
%54 = call i32 @puts(i8* dereferenceable(1) %53)
ret void
}