#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 */
typedef struct TYPE_6__ TYPE_3__;
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  int len;
  TYPE_1__ *stat;
};
struct TYPE_6__ {
  TYPE_2__ st;
};
struct dtv_property {
  TYPE_3__ u;
  int /*<<< orphan*/ cmd;
};
struct dtv_properties {
  int num;
  struct dtv_property *props;
};
struct TYPE_4__ {
  int scale;
  scalar_t__ svalue;
  scalar_t__ uvalue;
};

/* Variables and functions */
int /*<<< orphan*/ DTV_STAT_CNR;
int /*<<< orphan*/ DTV_STAT_ERROR_BLOCK_COUNT;
int /*<<< orphan*/ DTV_STAT_SIGNAL_STRENGTH;
int /*<<< orphan*/ DTV_STAT_TOTAL_BLOCK_COUNT;
int /*<<< orphan*/ FE_GET_PROPERTY;
#define FE_SCALE_COUNTER 131
#define FE_SCALE_DECIBEL 130
#define FE_SCALE_NOT_AVAILABLE 129
#define FE_SCALE_RELATIVE 128
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ ioctl(int, int /*<<< orphan*/, struct dtv_properties *);
int /*<<< orphan*/ stderr;
void frontend_show_stats(int fefd) {
  struct dtv_property prop[4];
  struct dtv_properties props;
  prop[0].cmd = DTV_STAT_CNR;
  prop[1].cmd = DTV_STAT_ERROR_BLOCK_COUNT;
  prop[2].cmd = DTV_STAT_TOTAL_BLOCK_COUNT;
  prop[3].cmd = DTV_STAT_SIGNAL_STRENGTH;
  props.props = prop;
  props.num = 4;
  if (ioctl(fefd, FE_GET_PROPERTY, &props) == 0) {
    fprintf(stderr, "Info:");
    for (int i = 0; i < 4; ++i) {
      for (int j = 0; j == 0 || j < prop[i].u.st.len; ++j) {
        switch (i) {
        case 0:
          fprintf(stderr, " CNR[%d]=", j);
          break;
        case 1:
          fprintf(stderr, " ErrorBlock[%d]=", j);
          break;
        case 2:
          fprintf(stderr, " TotalBlock[%d]=", j);
          break;
        case 3:
          fprintf(stderr, " Signal[%d]=", j);
          break;
        }
        switch (prop[i].u.st.stat[j].scale) {
        case FE_SCALE_COUNTER:
          fprintf(stderr, "%llu", prop[i].u.st.stat[j].uvalue);
          break;
        case FE_SCALE_RELATIVE:
          fprintf(stderr, "%lf", (double)prop[i].u.st.stat[j].uvalue / 655.35);
          break;
        case FE_SCALE_DECIBEL:
          fprintf(stderr, "%lf", (double)prop[i].u.st.stat[j].svalue / 1000);
          break;
        case FE_SCALE_NOT_AVAILABLE:
          fprintf(stderr, "N/A");
          break;
        }
      }
    }
    fprintf(stderr, "\n");
  }
}


x86 assembly (clang, -O0):
<frontend_show_stats>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x60(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    0x2e5f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
movl   $0x4,-0x80(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e39(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jne    1452 <frontend_show_stats+0x332>
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0x4,-0x84(%rbp)
jge    143b <frontend_show_stats+0x31b>
movl   $0x0,-0x88(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x88(%rbp)
mov    %al,-0x89(%rbp)
je     11fc <frontend_show_stats+0xdc>
mov    -0x88(%rbp),%eax
movslq -0x84(%rbp),%rdx
lea    -0x70(%rbp),%rcx
imul   $0x18,%rdx,%rdx
add    %rdx,%rcx
cmp    (%rcx),%eax
setl   %al
mov    %al,-0x89(%rbp)
mov    -0x89(%rbp),%al
test   $0x1,%al
jne    120f <frontend_show_stats+0xef>
jmp    1422 <frontend_show_stats+0x302>
mov    -0x84(%rbp),%eax
mov    %rax,-0x98(%rbp)
sub    $0x3,%rax
ja     12c0 <frontend_show_stats+0x1a0>
mov    -0x98(%rbp),%rax
lea    0xddc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
mov    -0x88(%rbp),%edx
lea    0xde3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12c0 <frontend_show_stats+0x1a0>
mov    0x2d62(%rip),%rax
mov    (%rax),%edi
mov    -0x88(%rbp),%edx
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12c0 <frontend_show_stats+0x1a0>
mov    0x2d40(%rip),%rax
mov    (%rax),%edi
mov    -0x88(%rbp),%edx
lea    0xdba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12c0 <frontend_show_stats+0x1a0>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
mov    -0x88(%rbp),%edx
lea    0xda9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movslq -0x84(%rbp),%rax
lea    (%rax,%rax,2),%rax
mov    -0x68(%rbp,%rax,8),%rax
movslq -0x88(%rbp),%rcx
lea    (%rcx,%rcx,2),%rcx
mov    (%rax,%rcx,8),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0xa0(%rbp)
sub    $0x3,%eax
ja     1409 <frontend_show_stats+0x2e9>
mov    -0xa0(%rbp),%rax
lea    0xd1f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2cb7(%rip),%rax
mov    (%rax),%edi
movslq -0x84(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
movslq -0x88(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rdx
lea    0xd2d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1409 <frontend_show_stats+0x2e9>
mov    0x2c73(%rip),%rax
mov    (%rax),%edi
movslq -0x84(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
movslq -0x88(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
cvtsi2sdq 0x10(%rax),%xmm0
movsd  0xc7f(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xce0(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    1409 <frontend_show_stats+0x2e9>
mov    0x2c21(%rip),%rax
mov    (%rax),%edi
movslq -0x84(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
movslq -0x88(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
cvtsi2sdq 0x8(%rax),%xmm0
movsd  0xc25(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xc8e(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    1409 <frontend_show_stats+0x2e9>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
lea    0xc76(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    140e <frontend_show_stats+0x2ee>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    11c4 <frontend_show_stats+0xa4>
jmp    1427 <frontend_show_stats+0x307>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11ad <frontend_show_stats+0x8d>
mov    0x2b86(%rip),%rax
mov    (%rax),%edi
lea    0xc31(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frontend_show_stats>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x48(%rsp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x60(%rsp)
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x78(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,0x18(%rsp)
movl   $0x4,0x10(%rsp)
mov    0x2e32(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
call   1030 <ioctl@plt>
test   %rax,%rax
jne    12d6 <frontend_show_stats+0x1b6>
mov    0x2e2e(%rip),%r13
mov    0x0(%r13),%edi
lea    0xe8b(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xe5d(%rip),%r14
xor    %r15d,%r15d
jmp    11ce <frontend_show_stats+0xae>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    $0x4,%r15
je     12c4 <frontend_show_stats+0x1a4>
lea    (%r15,%r15,2),%rax
lea    (%rsp,%rax,8),%r12
add    $0x20,%r12
movslq %r15d,%rax
shl    $0x2,%rax
mov    %rax,0x8(%rsp)
mov    $0x10,%ebp
xor    %ebx,%ebx
jmp    1218 <frontend_show_stats+0xf8>
mov    0x0(%r13),%edi
lea    0xe7e(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
add    $0x18,%rbp
test   %rbx,%rbx
je     1226 <frontend_show_stats+0x106>
movslq (%r12),%rax
cmp    %rax,%rbx
jge    11c0 <frontend_show_stats+0xa0>
test   $0xfffffffc,%r15d
jne    124f <frontend_show_stats+0x12f>
lea    0xdea(%rip),%rax
mov    0x8(%rsp),%rcx
movslq (%rcx,%rax,1),%rsi
add    %rax,%rsi
mov    0x0(%r13),%edi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x8(%r12),%rax
mov    -0x10(%rax,%rbp,1),%ecx
add    $0xffffff80,%ecx
cmp    $0x3,%ecx
ja     1210 <frontend_show_stats+0xf0>
movslq (%r14,%rcx,4),%rcx
add    %r14,%rcx
jmp    *%rcx
mov    0x0(%r13),%edi
xorps  %xmm0,%xmm0
cvtsi2sdq (%rax,%rbp,1),%xmm0
divsd  0xd8a(%rip),%xmm0
jmp    1296 <frontend_show_stats+0x176>
mov    0x0(%r13),%edi
xorps  %xmm0,%xmm0
cvtsi2sdq -0x8(%rax,%rbp,1),%xmm0
divsd  0xd6a(%rip),%xmm0
lea    0xdd7(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    1210 <frontend_show_stats+0xf0>
mov    0x0(%r13),%edi
mov    (%rax,%rbp,1),%rdx
lea    0xdb7(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1210 <frontend_show_stats+0xf0>
mov    0x0(%r13),%edi
lea    0xdad(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.dtv_property = type { %struct.TYPE_6__, i32 }
%struct.TYPE_6__ = type { %struct.TYPE_5__ }
%struct.TYPE_5__ = type { i32, %struct.TYPE_4__* }
%struct.TYPE_4__ = type { i32, i64, i64 }
%struct.dtv_properties = type { i32, %struct.dtv_property* }
@DTV_STAT_CNR = global i32 0
@DTV_STAT_ERROR_BLOCK_COUNT = global i32 0
@DTV_STAT_TOTAL_BLOCK_COUNT = global i32 0
@DTV_STAT_SIGNAL_STRENGTH = global i32 0
@FE_GET_PROPERTY = global i32 0
@stderr = global i32 0
@.str = [6 x i8] c"Info:\00"
@.str.1 = [10 x i8] c" CNR[%d]=\00"
@.str.2 = [17 x i8] c" ErrorBlock[%d]=\00"
@.str.3 = [17 x i8] c" TotalBlock[%d]=\00"
@.str.4 = [13 x i8] c" Signal[%d]=\00"
@.str.5 = [5 x i8] c"%llu\00"
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [4 x i8] c"N/A\00"
@.str.8 = [2 x i8] c"\0A\00"
define void @frontend_show_stats(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x %struct.dtv_property]
%4 = alloca %struct.dtv_properties
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* @DTV_STAT_CNR
%8 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 0
%9 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %8, i32 0, i32 1
store i32 %7, i32* %9
%10 = load i32, i32* @DTV_STAT_ERROR_BLOCK_COUNT
%11 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 1
%12 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %11, i32 0, i32 1
store i32 %10, i32* %12
%13 = load i32, i32* @DTV_STAT_TOTAL_BLOCK_COUNT
%14 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 2
%15 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %14, i32 0, i32 1
store i32 %13, i32* %15
%16 = load i32, i32* @DTV_STAT_SIGNAL_STRENGTH
%17 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 3
%18 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %17, i32 0, i32 1
store i32 %16, i32* %18
%19 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 0
%20 = getelementptr inbounds %struct.dtv_properties, %struct.dtv_properties* %4, i32 0, i32 1
store %struct.dtv_property* %19, %struct.dtv_property** %20
%21 = getelementptr inbounds %struct.dtv_properties, %struct.dtv_properties* %4, i32 0, i32 0
store i32 4, i32* %21
%22 = load i32, i32* %2
%23 = load i32, i32* @FE_GET_PROPERTY
%24 = call i64 @ioctl(i32 %22, i32 %23, %struct.dtv_properties* %4)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %142
26: ; preds = %1
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %29
29: ; preds = %136, %26
%30 = load i32, i32* %5
%31 = icmp slt i32 %30, 4
br i1 %31, label %32, label %139
32: ; preds = %29
store i32 0, i32* %6
br label %33
33: ; preds = %132, %32
%34 = load i32, i32* %6
%35 = icmp eq i32 %34, 0
br i1 %35, label %46, label %36
36: ; preds = %33
%37 = load i32, i32* %6
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 %39
%41 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %40, i32 0, i32 0
%42 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %41, i32 0, i32 0
%43 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %42, i32 0, i32 0
%44 = load i32, i32* %43
%45 = icmp slt i32 %37, %44
br label %46
46: ; preds = %36, %33
%47 = phi i1 [ true, %33 ], [ %45, %36 ]
br i1 %47, label %48, label %135
48: ; preds = %46
%49 = load i32, i32* %5
switch i32 %49, label %66 [
i32 0, label %50
i32 1, label %54
i32 2, label %58
i32 3, label %62
]
50: ; preds = %48
%51 = load i32, i32* @stderr
%52 = load i32, i32* %6
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %52)
br label %66
54: ; preds = %48
%55 = load i32, i32* @stderr
%56 = load i32, i32* %6
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %56)
br label %66
58: ; preds = %48
%59 = load i32, i32* @stderr
%60 = load i32, i32* %6
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %60)
br label %66
62: ; preds = %48
%63 = load i32, i32* @stderr
%64 = load i32, i32* %6
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %48, %62, %58, %54, %50
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 %68
%70 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %69, i32 0, i32 0
%71 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %70, i32 0, i32 0
%72 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %71, i32 0, i32 1
%73 = load %struct.TYPE_4__*, %struct.TYPE_4__** %72
%74 = load i32, i32* %6
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %73, i64 %75
%77 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %76, i32 0, i32 0
%78 = load i32, i32* %77
switch i32 %78, label %131 [
i32 131, label %79
i32 128, label %94
i32 130, label %111
i32 129, label %128
]
79: ; preds = %66
%80 = load i32, i32* @stderr
%81 = load i32, i32* %5
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 %82
%84 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %83, i32 0, i32 0
%85 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %84, i32 0, i32 0
%86 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %85, i32 0, i32 1
%87 = load %struct.TYPE_4__*, %struct.TYPE_4__** %86
%88 = load i32, i32* %6
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %87, i64 %89
%91 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %90, i32 0, i32 2
%92 = load i64, i64* %91
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %92)
br label %131
94: ; preds = %66
%95 = load i32, i32* @stderr
%96 = load i32, i32* %5
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 %97
%99 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %98, i32 0, i32 0
%100 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %99, i32 0, i32 0
%101 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %100, i32 0, i32 1
%102 = load %struct.TYPE_4__*, %struct.TYPE_4__** %101
%103 = load i32, i32* %6
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %102, i64 %104
%106 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %105, i32 0, i32 2
%107 = load i64, i64* %106
%108 = sitofp i64 %107 to double
%109 = fdiv double %108, 6.553500e+02
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double %109)
br label %131
111: ; preds = %66
%112 = load i32, i32* @stderr
%113 = load i32, i32* %5
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %3, i64 0, i64 %114
%116 = getelementptr inbounds %struct.dtv_property, %struct.dtv_property* %115, i32 0, i32 0
%117 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %116, i32 0, i32 0
%118 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %117, i32 0, i32 1
%119 = load %struct.TYPE_4__*, %struct.TYPE_4__** %118
%120 = load i32, i32* %6
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %119, i64 %121
%123 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %122, i32 0, i32 1
%124 = load i64, i64* %123
%125 = sitofp i64 %124 to double
%126 = fdiv double %125, 1.000000e+03
%127 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double %126)
br label %131
128: ; preds = %66
%129 = load i32, i32* @stderr
%130 = call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %131
131: ; preds = %66, %128, %111, %94, %79
br label %132
132: ; preds = %131
%133 = load i32, i32* %6
%134 = add nsw i32 %133, 1
store i32 %134, i32* %6
br label %33
135: ; preds = %46
br label %136
136: ; preds = %135
%137 = load i32, i32* %5
%138 = add nsw i32 %137, 1
store i32 %138, i32* %5
br label %29
139: ; preds = %29
%140 = load i32, i32* @stderr
%141 = call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %142
142: ; preds = %139, %1
ret void
}

LLVM IR (-O2):
%struct.dtv_property = type { %struct.TYPE_6__, i32 }
%struct.TYPE_6__ = type { %struct.TYPE_5__ }
%struct.TYPE_5__ = type { i32, %struct.TYPE_4__* }
%struct.TYPE_4__ = type { i32, i64, i64 }
%struct.dtv_properties = type { i32, %struct.dtv_property* }
@DTV_STAT_CNR = global i32 0
@DTV_STAT_ERROR_BLOCK_COUNT = global i32 0
@DTV_STAT_TOTAL_BLOCK_COUNT = global i32 0
@DTV_STAT_SIGNAL_STRENGTH = global i32 0
@FE_GET_PROPERTY = global i32 0
@stderr = global i32 0
@.str = [6 x i8] c"Info:\00"
@.str.1 = [10 x i8] c" CNR[%d]=\00"
@.str.2 = [17 x i8] c" ErrorBlock[%d]=\00"
@.str.3 = [17 x i8] c" TotalBlock[%d]=\00"
@.str.4 = [13 x i8] c" Signal[%d]=\00"
@.str.5 = [5 x i8] c"%llu\00"
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [4 x i8] c"N/A\00"
@.str.8 = [2 x i8] c"\0A\00"
@reltable.frontend_show_stats = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.frontend_show_stats to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.frontend_show_stats to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.frontend_show_stats to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.4 to i64), i64 ptrtoint ([4 x i32]* @reltable.frontend_show_stats to i64)) to i32)]
define void @frontend_show_stats(i32 %0) {
%2 = alloca [4 x %struct.dtv_property]
%3 = alloca %struct.dtv_properties
%4 = bitcast [4 x %struct.dtv_property]* %2 to i8*
%5 = bitcast %struct.dtv_properties* %3 to i8*
%6 = load i32, i32* @DTV_STAT_CNR
%7 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 0
%8 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 0, i32 1
store i32 %6, i32* %8
%9 = load i32, i32* @DTV_STAT_ERROR_BLOCK_COUNT
%10 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 1, i32 1
store i32 %9, i32* %10
%11 = load i32, i32* @DTV_STAT_TOTAL_BLOCK_COUNT
%12 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 2, i32 1
store i32 %11, i32* %12
%13 = load i32, i32* @DTV_STAT_SIGNAL_STRENGTH
%14 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 3, i32 1
store i32 %13, i32* %14
%15 = getelementptr inbounds %struct.dtv_properties, %struct.dtv_properties* %3, i64 0, i32 1
store %struct.dtv_property* %7, %struct.dtv_property** %15
%16 = getelementptr inbounds %struct.dtv_properties, %struct.dtv_properties* %3, i64 0, i32 0
store i32 4, i32* %16
%17 = load i32, i32* @FE_GET_PROPERTY
%18 = call i64 @ioctl(i32 %0, i32 %17, %struct.dtv_properties* %3)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %79
20: ; preds = %1
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %20, %42
%24 = phi i64 [ 0, %20 ], [ %43, %42 ]
%25 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 %24, i32 0, i32 0, i32 0
%26 = getelementptr inbounds [4 x %struct.dtv_property], [4 x %struct.dtv_property]* %2, i64 0, i64 %24, i32 0, i32 0, i32 1
%27 = and i64 %24, 4294967292
%28 = icmp eq i64 %27, 0
%29 = shl i64 %24, 32
%30 = ashr exact i64 %29, 32
%31 = shl i64 %30, 2
br label %35
32: ; preds = %42
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %79
35: ; preds = %23, %77
%36 = phi i64 [ 0, %23 ], [ %78, %77 ]
%37 = icmp eq i64 %36, 0
br i1 %37, label %45, label %38
38: ; preds = %35
%39 = load i32, i32* %25
%40 = sext i32 %39 to i64
%41 = icmp slt i64 %36, %40
br i1 %41, label %45, label %42
42: ; preds = %38
%43 = add nuw nsw i64 %24, 1
%44 = icmp eq i64 %43, 4
br i1 %44, label %32, label %23
45: ; preds = %35, %38
br i1 %28, label %46, label %51
46: ; preds = %45
%47 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.frontend_show_stats to i8*), i64 %31)
%48 = load i32, i32* @stderr
%49 = trunc i64 %36 to i32
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* %47, i32 %49)
br label %51
51: ; preds = %45, %46
%52 = load %struct.TYPE_4__*, %struct.TYPE_4__** %26
%53 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %52, i64 %36, i32 0
%54 = load i32, i32* %53
switch i32 %54, label %77 [
i32 131, label %55
i32 128, label %60
i32 130, label %67
i32 129, label %74
]
55: ; preds = %51
%56 = load i32, i32* @stderr
%57 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %52, i64 %36, i32 2
%58 = load i64, i64* %57
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i64 %58)
br label %77
60: ; preds = %51
%61 = load i32, i32* @stderr
%62 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %52, i64 %36, i32 2
%63 = load i64, i64* %62
%64 = sitofp i64 %63 to double
%65 = fdiv double %64, 6.553500e+02
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double %65)
br label %77
67: ; preds = %51
%68 = load i32, i32* @stderr
%69 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %52, i64 %36, i32 1
%70 = load i64, i64* %69
%71 = sitofp i64 %70 to double
%72 = fdiv double %71, 1.000000e+03
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double %72)
br label %77
74: ; preds = %51
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %77
77: ; preds = %55, %60, %67, %74, %51
%78 = add nuw i64 %36, 1
br label %35
79: ; preds = %32, %1
ret void
}