#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 /*<<< orphan*/ snprintf(char *, int, char *, char const *, char const *,
                            char const *, char const *, char const *,
                            char const *, char const *, char const *);
void hsw_debug_pipe_ddi_func_ctl(char *result, int len, int reg, uint32_t val,
                                 uint32_t devid) {
  const char *enable, *port, *mode, *bpc, *vsync, *hsync, *edp_input;
  const char *width;
  enable = (val & (1 << 31)) ? "enabled" : "disabled";
  switch ((val >> 28) & 7) {
  case 0:
    port = "no port";
    break;
  case 1:
    port = "DDIB";
    break;
  case 2:
    port = "DDIC";
    break;
  case 3:
    port = "DDID";
    break;
  case 4:
    port = "DDIE";
    break;
  default:
    port = "port reserved";
    break;
  }
  switch ((val >> 24) & 7) {
  case 0:
    mode = "HDMI";
    break;
  case 1:
    mode = "DVI";
    break;
  case 2:
    mode = "DP SST";
    break;
  case 3:
    mode = "DP MST";
    break;
  case 4:
    mode = "FDI";
    break;
  case 5:
  default:
    mode = "mode reserved";
    break;
  }
  switch ((val >> 20) & 7) {
  case 0:
    bpc = "8 bpc";
    break;
  case 1:
    bpc = "10 bpc";
    break;
  case 2:
    bpc = "6 bpc";
    break;
  case 3:
    bpc = "12 bpc";
    break;
  default:
    bpc = "bpc reserved";
    break;
  }
  hsync = (val & (1 << 16)) ? "+HSync" : "-HSync";
  vsync = (val & (1 << 17)) ? "+VSync" : "-VSync";
  switch ((val >> 12) & 7) {
  case 0:
    edp_input = "EDP A ON";
    break;
  case 4:
    edp_input = "EDP A ONOFF";
    break;
  case 5:
    edp_input = "EDP B ONOFF";
    break;
  case 6:
    edp_input = "EDP C ONOFF";
    break;
  default:
    edp_input = "EDP input reserved";
    break;
  }
  switch ((val >> 1) & 7) {
  case 0:
    width = "x1";
    break;
  case 1:
    width = "x2";
    break;
  case 3:
    width = "x4";
    break;
  default:
    width = "reserved width";
    break;
  }
  snprintf(result, len, "%s, %s, %s, %s, %s, %s, %s, %s", enable, port, mode,
           bpc, vsync, hsync, edp_input, width);
}


x86 assembly (clang, -O0):
<hsw_debug_pipe_ddi_func_ctl>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xb0,%rsp
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %edx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    -0x24(%rbp),%edx
lea    0xf1f(%rip),%rcx
lea    0xf20(%rip),%rax
test   $0x80000000,%edx
cmovne %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
shr    $0x1c,%eax
and    $0x7,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x4,%eax
ja     11ca <hsw_debug_pipe_ddi_func_ctl+0xba>
mov    -0x70(%rbp),%rax
lea    0xe8f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xee8(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11d5 <hsw_debug_pipe_ddi_func_ctl+0xc5>
lea    0xee0(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11d5 <hsw_debug_pipe_ddi_func_ctl+0xc5>
lea    0xed5(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11d5 <hsw_debug_pipe_ddi_func_ctl+0xc5>
lea    0xeca(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11d5 <hsw_debug_pipe_ddi_func_ctl+0xc5>
lea    0xebf(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11d5 <hsw_debug_pipe_ddi_func_ctl+0xc5>
lea    0xeb4(%rip),%rax
mov    %rax,-0x38(%rbp)
movzbl -0x21(%rbp),%eax
and    $0x7,%eax
mov    %eax,%ecx
mov    %rcx,-0x78(%rbp)
sub    $0x5,%eax
ja     1254 <hsw_debug_pipe_ddi_func_ctl+0x144>
mov    -0x78(%rbp),%rax
lea    0xe1e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe8d(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    125f <hsw_debug_pipe_ddi_func_ctl+0x14f>
lea    0xe82(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    125f <hsw_debug_pipe_ddi_func_ctl+0x14f>
lea    0xe76(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    125f <hsw_debug_pipe_ddi_func_ctl+0x14f>
lea    0xe6d(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    125f <hsw_debug_pipe_ddi_func_ctl+0x14f>
lea    0xe64(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    125f <hsw_debug_pipe_ddi_func_ctl+0x14f>
jmp    1254 <hsw_debug_pipe_ddi_func_ctl+0x144>
lea    0xe53(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    -0x24(%rbp),%eax
shr    $0x14,%eax
and    $0x7,%eax
mov    %eax,%ecx
mov    %rcx,-0x80(%rbp)
sub    $0x3,%eax
ja     12cb <hsw_debug_pipe_ddi_func_ctl+0x1bb>
mov    -0x80(%rbp),%rax
lea    0xdaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe2a(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    12d6 <hsw_debug_pipe_ddi_func_ctl+0x1c6>
lea    0xe20(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    12d6 <hsw_debug_pipe_ddi_func_ctl+0x1c6>
lea    0xe17(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    12d6 <hsw_debug_pipe_ddi_func_ctl+0x1c6>
lea    0xe0d(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    12d6 <hsw_debug_pipe_ddi_func_ctl+0x1c6>
lea    0xe04(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x24(%rbp),%edx
lea    0xe03(%rip),%rcx
lea    0xe03(%rip),%rax
test   $0x10000,%edx
cmovne %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x24(%rbp),%edx
lea    0xdf2(%rip),%rcx
lea    0xdf2(%rip),%rax
test   $0x20000,%edx
cmovne %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x24(%rbp),%eax
shr    $0xc,%eax
and    $0x7,%eax
mov    %eax,%ecx
mov    %rcx,-0x88(%rbp)
sub    $0x6,%eax
ja     1386 <hsw_debug_pipe_ddi_func_ctl+0x276>
mov    -0x88(%rbp),%rax
lea    0xcff(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdb2(%rip),%rax
mov    %rax,-0x60(%rbp)
jmp    1391 <hsw_debug_pipe_ddi_func_ctl+0x281>
lea    0xdab(%rip),%rax
mov    %rax,-0x60(%rbp)
jmp    1391 <hsw_debug_pipe_ddi_func_ctl+0x281>
lea    0xda7(%rip),%rax
mov    %rax,-0x60(%rbp)
jmp    1391 <hsw_debug_pipe_ddi_func_ctl+0x281>
lea    0xda3(%rip),%rax
mov    %rax,-0x60(%rbp)
jmp    1391 <hsw_debug_pipe_ddi_func_ctl+0x281>
lea    0xd9f(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    -0x24(%rbp),%eax
shr    %eax
and    $0x7,%eax
mov    %eax,-0x8c(%rbp)
je     13d2 <hsw_debug_pipe_ddi_func_ctl+0x2c2>
jmp    13aa <hsw_debug_pipe_ddi_func_ctl+0x29a>
mov    -0x8c(%rbp),%eax
sub    $0x1,%eax
je     13e2 <hsw_debug_pipe_ddi_func_ctl+0x2d2>
jmp    13be <hsw_debug_pipe_ddi_func_ctl+0x2ae>
mov    -0x8c(%rbp),%eax
sub    $0x3,%eax
je     13f2 <hsw_debug_pipe_ddi_func_ctl+0x2e2>
jmp    1402 <hsw_debug_pipe_ddi_func_ctl+0x2f2>
lea    0xd66(%rip),%rax
mov    %rax,-0x68(%rbp)
jmp    140d <hsw_debug_pipe_ddi_func_ctl+0x2fd>
lea    0xd59(%rip),%rax
mov    %rax,-0x68(%rbp)
jmp    140d <hsw_debug_pipe_ddi_func_ctl+0x2fd>
lea    0xd4c(%rip),%rax
mov    %rax,-0x68(%rbp)
jmp    140d <hsw_debug_pipe_ddi_func_ctl+0x2fd>
lea    0xd3f(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
mov    -0x48(%rbp),%r14
mov    -0x50(%rbp),%rbx
mov    -0x58(%rbp),%r11
mov    -0x60(%rbp),%r10
mov    -0x68(%rbp),%rax
lea    0xd1c(%rip),%rdx
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1030 <snprintf@plt>
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<hsw_debug_pipe_ddi_func_ctl>:
push   %r14
push   %rbx
push   %rax
mov    %ecx,%eax
shr    $0x1c,%eax
and    $0x7,%eax
cmp    $0x4,%eax
ja     1133 <hsw_debug_pipe_ddi_func_ctl+0x23>
mov    %eax,%eax
lea    0xff6(%rip),%rdx
movslq (%rdx,%rax,4),%r8
add    %rdx,%r8
jmp    113a <hsw_debug_pipe_ddi_func_ctl+0x2a>
lea    0xef3(%rip),%r8
mov    %ecx,%eax
shr    $0x18,%eax
and    $0x7,%eax
cmp    $0x4,%eax
ja     1159 <hsw_debug_pipe_ddi_func_ctl+0x49>
mov    %eax,%eax
lea    0xfe4(%rip),%rdx
movslq (%rdx,%rax,4),%r9
add    %rdx,%r9
jmp    1160 <hsw_debug_pipe_ddi_func_ctl+0x50>
lea    0xef6(%rip),%r9
mov    %ecx,%eax
shr    $0x14,%eax
and    $0x7,%eax
cmp    $0x3,%eax
ja     117f <hsw_debug_pipe_ddi_func_ctl+0x6f>
mov    %eax,%eax
lea    0xfd2(%rip),%rdx
movslq (%rdx,%rax,4),%r10
add    %rdx,%r10
jmp    1186 <hsw_debug_pipe_ddi_func_ctl+0x76>
lea    0xef8(%rip),%r10
mov    %ecx,%eax
shr    $0xc,%eax
and    $0x7,%eax
cmp    $0x7,%eax
jne    119c <hsw_debug_pipe_ddi_func_ctl+0x8c>
lea    0xf3a(%rip),%r11
jmp    11ac <hsw_debug_pipe_ddi_func_ctl+0x9c>
mov    %eax,%eax
lea    0xfb3(%rip),%rdx
movslq (%rdx,%rax,4),%r11
add    %rdx,%r11
mov    %ecx,%eax
shr    %eax
and    $0x7,%eax
cmp    $0x3,%eax
ja     11ca <hsw_debug_pipe_ddi_func_ctl+0xba>
mov    %eax,%eax
lea    0xfb3(%rip),%rdx
movslq (%rdx,%rax,4),%r14
add    %rdx,%r14
jmp    11d1 <hsw_debug_pipe_ddi_func_ctl+0xc1>
lea    0xf1f(%rip),%r14
test   $0x20000,%ecx
lea    0xec2(%rip),%rdx
lea    0xeb4(%rip),%rbx
cmove  %rdx,%rbx
test   $0x10000,%ecx
lea    0xe9c(%rip),%rdx
lea    0xe8e(%rip),%rax
cmove  %rdx,%rax
test   %ecx,%ecx
lea    0xdfe(%rip),%rdx
lea    0xdef(%rip),%rcx
cmovns %rdx,%rcx
sub    $0x8,%rsp
lea    0xedf(%rip),%rdx
push   %r14
push   %r11
push   %rax
push   %rbx
push   %r10
call   1030 <snprintf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"enabled\00"
@.str.1 = [9 x i8] c"disabled\00"
@.str.2 = [8 x i8] c"no port\00"
@.str.3 = [5 x i8] c"DDIB\00"
@.str.4 = [5 x i8] c"DDIC\00"
@.str.5 = [5 x i8] c"DDID\00"
@.str.6 = [5 x i8] c"DDIE\00"
@.str.7 = [14 x i8] c"port reserved\00"
@.str.8 = [5 x i8] c"HDMI\00"
@.str.9 = [4 x i8] c"DVI\00"
@.str.10 = [7 x i8] c"DP SST\00"
@.str.11 = [7 x i8] c"DP MST\00"
@.str.12 = [4 x i8] c"FDI\00"
@.str.13 = [14 x i8] c"mode reserved\00"
@.str.14 = [6 x i8] c"8 bpc\00"
@.str.15 = [7 x i8] c"10 bpc\00"
@.str.16 = [6 x i8] c"6 bpc\00"
@.str.17 = [7 x i8] c"12 bpc\00"
@.str.18 = [13 x i8] c"bpc reserved\00"
@.str.19 = [7 x i8] c"+HSync\00"
@.str.20 = [7 x i8] c"-HSync\00"
@.str.21 = [7 x i8] c"+VSync\00"
@.str.22 = [7 x i8] c"-VSync\00"
@.str.23 = [9 x i8] c"EDP A ON\00"
@.str.24 = [12 x i8] c"EDP A ONOFF\00"
@.str.25 = [12 x i8] c"EDP B ONOFF\00"
@.str.26 = [12 x i8] c"EDP C ONOFF\00"
@.str.27 = [19 x i8] c"EDP input reserved\00"
@.str.28 = [3 x i8] c"x1\00"
@.str.29 = [3 x i8] c"x2\00"
@.str.30 = [3 x i8] c"x4\00"
@.str.31 = [15 x i8] c"reserved width\00"
@.str.32 = [31 x i8] c"%s, %s, %s, %s, %s, %s, %s, %s\00"
define void @hsw_debug_pipe_ddi_func_ctl(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%19 = load i32, i32* %9
%20 = and i32 %19, -2147483648
%21 = icmp ne i32 %20, 0
%22 = zext i1 %21 to i64
%23 = select i1 %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
store i8* %23, i8** %11
%24 = load i32, i32* %9
%25 = ashr i32 %24, 28
%26 = and i32 %25, 7
switch i32 %26, label %32 [
i32 0, label %27
i32 1, label %28
i32 2, label %29
i32 3, label %30
i32 4, label %31
]
27: ; preds = %5
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %12
br label %33
28: ; preds = %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %12
br label %33
29: ; preds = %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %12
br label %33
30: ; preds = %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %12
br label %33
31: ; preds = %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %12
br label %33
32: ; preds = %5
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8** %12
br label %33
33: ; preds = %32, %31, %30, %29, %28, %27
%34 = load i32, i32* %9
%35 = ashr i32 %34, 24
%36 = and i32 %35, 7
switch i32 %36, label %43 [
i32 0, label %37
i32 1, label %38
i32 2, label %39
i32 3, label %40
i32 4, label %41
i32 5, label %42
]
37: ; preds = %33
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %13
br label %44
38: ; preds = %33
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8** %13
br label %44
39: ; preds = %33
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8** %13
br label %44
40: ; preds = %33
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8** %13
br label %44
41: ; preds = %33
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8** %13
br label %44
42: ; preds = %33
br label %43
43: ; preds = %33, %42
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8** %13
br label %44
44: ; preds = %43, %41, %40, %39, %38, %37
%45 = load i32, i32* %9
%46 = ashr i32 %45, 20
%47 = and i32 %46, 7
switch i32 %47, label %52 [
i32 0, label %48
i32 1, label %49
i32 2, label %50
i32 3, label %51
]
48: ; preds = %44
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8** %14
br label %53
49: ; preds = %44
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8** %14
br label %53
50: ; preds = %44
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8** %14
br label %53
51: ; preds = %44
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8** %14
br label %53
52: ; preds = %44
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), i8** %14
br label %53
53: ; preds = %52, %51, %50, %49, %48
%54 = load i32, i32* %9
%55 = and i32 %54, 65536
%56 = icmp ne i32 %55, 0
%57 = zext i1 %56 to i64
%58 = select i1 %56, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0)
store i8* %58, i8** %16
%59 = load i32, i32* %9
%60 = and i32 %59, 131072
%61 = icmp ne i32 %60, 0
%62 = zext i1 %61 to i64
%63 = select i1 %61, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0)
store i8* %63, i8** %15
%64 = load i32, i32* %9
%65 = ashr i32 %64, 12
%66 = and i32 %65, 7
switch i32 %66, label %71 [
i32 0, label %67
i32 4, label %68
i32 5, label %69
i32 6, label %70
]
67: ; preds = %53
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i8** %17
br label %72
68: ; preds = %53
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.24, i64 0, i64 0), i8** %17
br label %72
69: ; preds = %53
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.25, i64 0, i64 0), i8** %17
br label %72
70: ; preds = %53
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0), i8** %17
br label %72
71: ; preds = %53
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0), i8** %17
br label %72
72: ; preds = %71, %70, %69, %68, %67
%73 = load i32, i32* %9
%74 = ashr i32 %73, 1
%75 = and i32 %74, 7
switch i32 %75, label %79 [
i32 0, label %76
i32 1, label %77
i32 3, label %78
]
76: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), i8** %18
br label %80
77: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i8** %18
br label %80
78: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0), i8** %18
br label %80
79: ; preds = %72
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.31, i64 0, i64 0), i8** %18
br label %80
80: ; preds = %79, %78, %77, %76
%81 = load i8*, i8** %6
%82 = load i32, i32* %7
%83 = load i8*, i8** %11
%84 = load i8*, i8** %12
%85 = load i8*, i8** %13
%86 = load i8*, i8** %14
%87 = load i8*, i8** %15
%88 = load i8*, i8** %16
%89 = load i8*, i8** %17
%90 = load i8*, i8** %18
%91 = call i32 @snprintf(i8* %81, i32 %82, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.32, i64 0, i64 0), i8* %83, i8* %84, i8* %85, i8* %86, i8* %87, i8* %88, i8* %89, i8* %90)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"enabled\00"
@.str.1 = [9 x i8] c"disabled\00"
@.str.2 = [8 x i8] c"no port\00"
@.str.3 = [5 x i8] c"DDIB\00"
@.str.4 = [5 x i8] c"DDIC\00"
@.str.5 = [5 x i8] c"DDID\00"
@.str.6 = [5 x i8] c"DDIE\00"
@.str.7 = [14 x i8] c"port reserved\00"
@.str.8 = [5 x i8] c"HDMI\00"
@.str.9 = [4 x i8] c"DVI\00"
@.str.10 = [7 x i8] c"DP SST\00"
@.str.11 = [7 x i8] c"DP MST\00"
@.str.12 = [4 x i8] c"FDI\00"
@.str.13 = [14 x i8] c"mode reserved\00"
@.str.14 = [6 x i8] c"8 bpc\00"
@.str.15 = [7 x i8] c"10 bpc\00"
@.str.16 = [6 x i8] c"6 bpc\00"
@.str.17 = [7 x i8] c"12 bpc\00"
@.str.18 = [13 x i8] c"bpc reserved\00"
@.str.19 = [7 x i8] c"+HSync\00"
@.str.20 = [7 x i8] c"-HSync\00"
@.str.21 = [7 x i8] c"+VSync\00"
@.str.22 = [7 x i8] c"-VSync\00"
@.str.23 = [9 x i8] c"EDP A ON\00"
@.str.24 = [12 x i8] c"EDP A ONOFF\00"
@.str.25 = [12 x i8] c"EDP B ONOFF\00"
@.str.26 = [12 x i8] c"EDP C ONOFF\00"
@.str.27 = [19 x i8] c"EDP input reserved\00"
@.str.28 = [3 x i8] c"x1\00"
@.str.29 = [3 x i8] c"x2\00"
@.str.30 = [3 x i8] c"x4\00"
@.str.31 = [15 x i8] c"reserved width\00"
@.str.32 = [31 x i8] c"%s, %s, %s, %s, %s, %s, %s, %s\00"
@reltable.hsw_debug_pipe_ddi_func_ctl = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.3 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.4 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.6 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl to i64)) to i32)]
@reltable.hsw_debug_pipe_ddi_func_ctl.37 = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.8 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.37 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.9 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.37 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.10 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.37 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.11 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.37 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.12 to i64), i64 ptrtoint ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.37 to i64)) to i32)]
@reltable.hsw_debug_pipe_ddi_func_ctl.38 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.14 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.38 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.15 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.38 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.16 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.38 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.17 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.38 to i64)) to i32)]
@reltable.hsw_debug_pipe_ddi_func_ctl.39 = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.27 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.27 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.27 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.24 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.25 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.26 to i64), i64 ptrtoint ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i64)) to i32)]
@reltable.hsw_debug_pipe_ddi_func_ctl.40 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.28 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.29 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.31 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.30 to i64), i64 ptrtoint ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.40 to i64)) to i32)]
define void @hsw_debug_pipe_ddi_func_ctl(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = lshr i32 %3, 28
%7 = and i32 %6, 7
%8 = icmp ult i32 %7, 5
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = zext i32 %7 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl to i8*), i64 %11)
br label %13
13: ; preds = %5, %9
%14 = phi i8* [ %12, %9 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), %5 ]
%15 = lshr i32 %3, 24
%16 = and i32 %15, 7
%17 = icmp ult i32 %16, 5
br i1 %17, label %18, label %22
18: ; preds = %13
%19 = zext i32 %16 to i64
%20 = shl i64 %19, 2
%21 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.37 to i8*), i64 %20)
br label %22
22: ; preds = %13, %18
%23 = phi i8* [ %21, %18 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), %13 ]
%24 = lshr i32 %3, 20
%25 = and i32 %24, 7
%26 = icmp ult i32 %25, 4
br i1 %26, label %27, label %31
27: ; preds = %22
%28 = zext i32 %25 to i64
%29 = shl i64 %28, 2
%30 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.38 to i8*), i64 %29)
br label %31
31: ; preds = %22, %27
%32 = phi i8* [ %30, %27 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), %22 ]
%33 = lshr i32 %3, 12
%34 = and i32 %33, 7
%35 = icmp eq i32 %34, 7
br i1 %35, label %40, label %36
36: ; preds = %31
%37 = zext i32 %34 to i64
%38 = shl i64 %37, 2
%39 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.39 to i8*), i64 %38)
br label %40
40: ; preds = %31, %36
%41 = phi i8* [ %39, %36 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0), %31 ]
%42 = lshr i32 %3, 1
%43 = and i32 %42, 7
%44 = icmp ult i32 %43, 4
br i1 %44, label %45, label %49
45: ; preds = %40
%46 = zext i32 %43 to i64
%47 = shl i64 %46, 2
%48 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.hsw_debug_pipe_ddi_func_ctl.40 to i8*), i64 %47)
br label %49
49: ; preds = %40, %45
%50 = phi i8* [ %48, %45 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.31, i64 0, i64 0), %40 ]
%51 = and i32 %3, 131072
%52 = icmp eq i32 %51, 0
%53 = select i1 %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0)
%54 = and i32 %3, 65536
%55 = icmp eq i32 %54, 0
%56 = select i1 %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0)
%57 = icmp sgt i32 %3, -1
%58 = select i1 %57, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
%59 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.32, i64 0, i64 0), i8* %58, i8* %14, i8* %23, i8* %32, i8* %53, i8* %56, i8* %41, i8* %50)
ret void
}