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

/* Type definitions */
struct TYPE_7__ {
  int bandwidth;
  int code_rate_HP;
  int code_rate_LP;
  int constellation;
  int transmission_mode;
  int guard_interval;
  int hierarchy_information;
};
struct TYPE_6__ {
  int symbol_rate;
  int fec_inner;
};
struct TYPE_5__ {
  int symbol_rate;
  int fec_inner;
  int modulation;
};
struct TYPE_8__ {
  TYPE_3__ ofdm;
  TYPE_2__ qpsk;
  TYPE_1__ qam;
};
struct dvb_frontend_parameters {
  int frequency;
  int inversion;
  TYPE_4__ u;
};
struct dvb_frontend_info {
  scalar_t__ type;
};

/* Variables and functions */
int EINVAL;
int FEGetInfo(int, struct dvb_frontend_info *);
scalar_t__ FE_OFDM;
scalar_t__ FE_QAM;
scalar_t__ FE_QPSK;
int /*<<< orphan*/ printf(char *, ...);
int FEDumpParameters(int fd, struct dvb_frontend_parameters *parameters) {
  struct dvb_frontend_info info;
  int result;
  if (!parameters)
    return -EINVAL;
  if ((result = FEGetInfo(fd, &info)) < 0)
    return result;
  printf("   frequency: %d\n", parameters->frequency);
  printf("   inversion: %d\n", parameters->inversion);
  if (info.type == FE_QAM) {
    printf("   u.qam.symbol_rate: %d\n", parameters->u.qam.symbol_rate);
    printf("   u.qam.fec_inner: %d\n", parameters->u.qam.fec_inner);
    printf("   u.qam.modulation: %d\n", parameters->u.qam.modulation);
  } else if (info.type == FE_QPSK) {
    printf("   u.qpsk.symbol_rate: %d\n", parameters->u.qpsk.symbol_rate);
    printf("   u.qpsk.fec_inner: %d\n", parameters->u.qpsk.fec_inner);
  } else if (info.type == FE_OFDM) {
    printf("   u.ofdm.bandwidth: %d\n", parameters->u.ofdm.bandwidth);
    printf("   u.ofdm.code_rate_HP: %d\n", parameters->u.ofdm.code_rate_HP);
    printf("   u.ofdm.code_rate_HP: %d\n", parameters->u.ofdm.code_rate_LP);
    printf("   u.ofdm.constellation: %d\n", parameters->u.ofdm.constellation);
    printf("   u.ofdm.transmission_mode: %d\n",
           parameters->u.ofdm.transmission_mode);
    printf("   u.ofdm.guard_interval: %d\n", parameters->u.ofdm.guard_interval);
    printf("   u.ofdm.hierarchy_information: %d\n",
           parameters->u.ofdm.hierarchy_information);
  } else {
    printf("   invalid info.type\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<FEDumpParameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114d <FEDumpParameters+0x2d>
xor    %eax,%eax
mov    0x2e8d(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    130b <FEDumpParameters+0x1eb>
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <FEGetInfo@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    1170 <FEDumpParameters+0x50>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    130b <FEDumpParameters+0x1eb>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    0x2e24(%rip),%rcx
cmp    (%rcx),%rax
jne    11f1 <FEDumpParameters+0xd1>
mov    -0x10(%rbp),%rax
mov    0x2c(%rax),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%esi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x34(%rax),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1304 <FEDumpParameters+0x1e4>
mov    -0x18(%rbp),%rax
mov    0x2ddc(%rip),%rcx
cmp    (%rcx),%rax
jne    1234 <FEDumpParameters+0x114>
mov    -0x10(%rbp),%rax
mov    0x24(%rax),%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%esi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12ff <FEDumpParameters+0x1df>
mov    -0x18(%rbp),%rax
mov    0x2da9(%rip),%rcx
cmp    (%rcx),%rax
jne    12e0 <FEDumpParameters+0x1c0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%esi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x1c(%rax),%esi
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%esi
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12fa <FEDumpParameters+0x1da>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    130b <FEDumpParameters+0x1eb>
jmp    12ff <FEDumpParameters+0x1df>
jmp    1304 <FEDumpParameters+0x1e4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FEDumpParameters>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
test   %rsi,%rsi
je     11b3 <FEDumpParameters+0x83>
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <FEGetInfo@plt>
test   %eax,%eax
js     11c3 <FEDumpParameters+0x93>
mov    (%rbx),%esi
lea    0xea9(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rbx),%esi
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%rax
mov    0x2e4b(%rip),%rcx
cmp    (%rcx),%rax
jne    11ca <FEDumpParameters+0x9a>
mov    0x2c(%rbx),%esi
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%rbx),%esi
lea    0xea1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%rbx),%esi
lea    0xea8(%rip),%rdi
jmp    1279 <FEDumpParameters+0x149>
mov    0x2e16(%rip),%rax
xor    %ebp,%ebp
sub    (%rax),%ebp
jmp    1280 <FEDumpParameters+0x150>
mov    %eax,%ebp
jmp    1280 <FEDumpParameters+0x150>
mov    0x2e07(%rip),%rcx
cmp    (%rcx),%rax
jne    11f8 <FEDumpParameters+0xc8>
mov    0x24(%rbx),%esi
lea    0xe8f(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rbx),%esi
lea    0xe97(%rip),%rdi
jmp    1279 <FEDumpParameters+0x149>
mov    0x2de9(%rip),%rcx
cmp    (%rcx),%rax
jne    128b <FEDumpParameters+0x15b>
mov    0x8(%rbx),%esi
lea    0xe91(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rbx),%esi
lea    0xe97(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rbx),%esi
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rbx),%esi
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rbx),%esi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rbx),%esi
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebp
jmp    1280 <FEDumpParameters+0x150>

LLVM IR (-O0):
%struct.dvb_frontend_parameters = type { i32, i32, %struct.TYPE_8__ }
%struct.TYPE_8__ = type { %struct.TYPE_7__, %struct.TYPE_6__, %struct.TYPE_5__ }
%struct.TYPE_7__ = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.TYPE_6__ = type { i32, i32 }
%struct.TYPE_5__ = type { i32, i32, i32 }
%struct.dvb_frontend_info = type { i64 }
@EINVAL = global i32 0
@.str = [18 x i8] c" frequency: %d\0A\00"
@.str.1 = [18 x i8] c" inversion: %d\0A\00"
@FE_QAM = global i64 0
@.str.2 = [26 x i8] c" u.qam.symbol_rate: %d\0A\00"
@.str.3 = [24 x i8] c" u.qam.fec_inner: %d\0A\00"
@.str.4 = [25 x i8] c" u.qam.modulation: %d\0A\00"
@FE_QPSK = global i64 0
@.str.5 = [27 x i8] c" u.qpsk.symbol_rate: %d\0A\00"
@.str.6 = [25 x i8] c" u.qpsk.fec_inner: %d\0A\00"
@FE_OFDM = global i64 0
@.str.7 = [25 x i8] c" u.ofdm.bandwidth: %d\0A\00"
@.str.8 = [28 x i8] c" u.ofdm.code_rate_HP: %d\0A\00"
@.str.9 = [29 x i8] c" u.ofdm.constellation: %d\0A\00"
@.str.10 = [33 x i8] c" u.ofdm.transmission_mode: %d\0A\00"
@.str.11 = [30 x i8] c" u.ofdm.guard_interval: %d\0A\00"
@.str.12 = [37 x i8] c" u.ofdm.hierarchy_information: %d\0A\00"
@.str.13 = [22 x i8] c" invalid info.type\0A\00"
define i32 @FEDumpParameters(i32 %0, %struct.dvb_frontend_parameters* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.dvb_frontend_parameters*
%6 = alloca %struct.dvb_frontend_info
%7 = alloca i32
store i32 %0, i32* %4
store %struct.dvb_frontend_parameters* %1, %struct.dvb_frontend_parameters** %5
%8 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%9 = icmp ne %struct.dvb_frontend_parameters* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i32, i32* @EINVAL
%12 = sub nsw i32 0, %11
store i32 %12, i32* %3
br label %122
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 @FEGetInfo(i32 %14, %struct.dvb_frontend_info* %6)
store i32 %15, i32* %7
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i32, i32* %7
store i32 %18, i32* %3
br label %122
19: ; preds = %13
%20 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%21 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %20, i32 0, i32 0
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%25 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %24, i32 0, i32 1
%26 = load i32, i32* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds %struct.dvb_frontend_info, %struct.dvb_frontend_info* %6, i32 0, i32 0
%29 = load i64, i64* %28
%30 = load i64, i64* @FE_QAM
%31 = icmp eq i64 %29, %30
br i1 %31, label %32, label %51
32: ; preds = %19
%33 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%34 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %33, i32 0, i32 2
%35 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %34, i32 0, i32 2
%36 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %35, i32 0, i32 0
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %37)
%39 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%40 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %39, i32 0, i32 2
%41 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %40, i32 0, i32 2
%42 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %41, i32 0, i32 1
%43 = load i32, i32* %42
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %43)
%45 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%46 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %45, i32 0, i32 2
%47 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %46, i32 0, i32 2
%48 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %47, i32 0, i32 2
%49 = load i32, i32* %48
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %49)
br label %121
51: ; preds = %19
%52 = getelementptr inbounds %struct.dvb_frontend_info, %struct.dvb_frontend_info* %6, i32 0, i32 0
%53 = load i64, i64* %52
%54 = load i64, i64* @FE_QPSK
%55 = icmp eq i64 %53, %54
br i1 %55, label %56, label %69
56: ; preds = %51
%57 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%58 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %57, i32 0, i32 2
%59 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %58, i32 0, i32 1
%60 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %59, i32 0, i32 0
%61 = load i32, i32* %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 %61)
%63 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%64 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %63, i32 0, i32 2
%65 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %64, i32 0, i32 1
%66 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %65, i32 0, i32 1
%67 = load i32, i32* %66
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %67)
br label %120
69: ; preds = %51
%70 = getelementptr inbounds %struct.dvb_frontend_info, %struct.dvb_frontend_info* %6, i32 0, i32 0
%71 = load i64, i64* %70
%72 = load i64, i64* @FE_OFDM
%73 = icmp eq i64 %71, %72
br i1 %73, label %74, label %117
74: ; preds = %69
%75 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%76 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %75, i32 0, i32 2
%77 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %76, i32 0, i32 0
%78 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %77, i32 0, i32 0
%79 = load i32, i32* %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %79)
%81 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%82 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %81, i32 0, i32 2
%83 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %82, i32 0, i32 0
%84 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %83, i32 0, i32 1
%85 = load i32, i32* %84
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %85)
%87 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%88 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %87, i32 0, i32 2
%89 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %88, i32 0, i32 0
%90 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %89, i32 0, i32 2
%91 = load i32, i32* %90
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %91)
%93 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%94 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %93, i32 0, i32 2
%95 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %94, i32 0, i32 0
%96 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %95, i32 0, i32 3
%97 = load i32, i32* %96
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %97)
%99 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%100 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %99, i32 0, i32 2
%101 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %100, i32 0, i32 0
%102 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %101, i32 0, i32 4
%103 = load i32, i32* %102
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %103)
%105 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%106 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %105, i32 0, i32 2
%107 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %106, i32 0, i32 0
%108 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %107, i32 0, i32 5
%109 = load i32, i32* %108
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i32 %109)
%111 = load %struct.dvb_frontend_parameters*, %struct.dvb_frontend_parameters** %5
%112 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %111, i32 0, i32 2
%113 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %112, i32 0, i32 0
%114 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %113, i32 0, i32 6
%115 = load i32, i32* %114
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), i32 %115)
br label %119
117: ; preds = %69
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
store i32 -1, i32* %3
br label %122
119: ; preds = %74
br label %120
120: ; preds = %119, %56
br label %121
121: ; preds = %120, %32
store i32 0, i32* %3
br label %122
122: ; preds = %121, %117, %17, %10
%123 = load i32, i32* %3
ret i32 %123
}

LLVM IR (-O2):
%struct.dvb_frontend_parameters = type { i32, i32, %struct.TYPE_8__ }
%struct.TYPE_8__ = type { %struct.TYPE_7__, %struct.TYPE_6__, %struct.TYPE_5__ }
%struct.TYPE_7__ = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.TYPE_6__ = type { i32, i32 }
%struct.TYPE_5__ = type { i32, i32, i32 }
%struct.dvb_frontend_info = type { i64 }
@EINVAL = global i32 0
@.str = [18 x i8] c" frequency: %d\0A\00"
@.str.1 = [18 x i8] c" inversion: %d\0A\00"
@FE_QAM = global i64 0
@.str.2 = [26 x i8] c" u.qam.symbol_rate: %d\0A\00"
@.str.3 = [24 x i8] c" u.qam.fec_inner: %d\0A\00"
@.str.4 = [25 x i8] c" u.qam.modulation: %d\0A\00"
@FE_QPSK = global i64 0
@.str.5 = [27 x i8] c" u.qpsk.symbol_rate: %d\0A\00"
@.str.6 = [25 x i8] c" u.qpsk.fec_inner: %d\0A\00"
@FE_OFDM = global i64 0
@.str.7 = [25 x i8] c" u.ofdm.bandwidth: %d\0A\00"
@.str.8 = [28 x i8] c" u.ofdm.code_rate_HP: %d\0A\00"
@.str.9 = [29 x i8] c" u.ofdm.constellation: %d\0A\00"
@.str.10 = [33 x i8] c" u.ofdm.transmission_mode: %d\0A\00"
@.str.11 = [30 x i8] c" u.ofdm.guard_interval: %d\0A\00"
@.str.12 = [37 x i8] c" u.ofdm.hierarchy_information: %d\0A\00"
@str = [21 x i8] c" invalid info.type\00"
define i32 @FEDumpParameters(i32 %0, %struct.dvb_frontend_parameters* %1) {
%3 = alloca %struct.dvb_frontend_info
%4 = bitcast %struct.dvb_frontend_info* %3 to i8*
%5 = icmp eq %struct.dvb_frontend_parameters* %1, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
br label %70
9: ; preds = %2
%10 = call i32 @FEGetInfo(i32 %0, %struct.dvb_frontend_info* %3)
%11 = icmp slt i32 %10, 0
br i1 %11, label %70, label %12
12: ; preds = %9
%13 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 1
%17 = load i32, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds %struct.dvb_frontend_info, %struct.dvb_frontend_info* %3, i64 0, i32 0
%20 = load i64, i64* %19
%21 = load i64, i64* @FE_QAM
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %33
23: ; preds = %12
%24 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 2, i32 0
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 2, i32 1
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 2, i32 2
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %31)
br label %70
33: ; preds = %12
%34 = load i64, i64* @FE_QPSK
%35 = icmp eq i64 %20, %34
br i1 %35, label %36, label %43
36: ; preds = %33
%37 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 1, i32 0
%38 = load i32, i32* %37
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 1, i32 1
%41 = load i32, i32* %40
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %41)
br label %70
43: ; preds = %33
%44 = load i64, i64* @FE_OFDM
%45 = icmp eq i64 %20, %44
br i1 %45, label %46, label %68
46: ; preds = %43
%47 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 0
%48 = load i32, i32* %47
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 1
%51 = load i32, i32* %50
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %51)
%53 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 2
%54 = load i32, i32* %53
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %54)
%56 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 3
%57 = load i32, i32* %56
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %57)
%59 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 4
%60 = load i32, i32* %59
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %60)
%62 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 5
%63 = load i32, i32* %62
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i32 %63)
%65 = getelementptr inbounds %struct.dvb_frontend_parameters, %struct.dvb_frontend_parameters* %1, i64 0, i32 2, i32 0, i32 6
%66 = load i32, i32* %65
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), i32 %66)
br label %70
68: ; preds = %43
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %70
70: ; preds = %23, %46, %36, %9, %68, %6
%71 = phi i32 [ -1, %68 ], [ %8, %6 ], [ %10, %9 ], [ 0, %36 ], [ 0, %46 ], [ 0, %23 ]
ret i32 %71
}