#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 /*<<< orphan*/ sort;
typedef int /*<<< orphan*/ name;
typedef int /*<<< orphan*/ ipfix_id;
typedef int /*<<< orphan*/ ipfix_eid;
typedef int /*<<< orphan*/ fields;
typedef int /*<<< orphan*/ descr;
typedef int /*<<< orphan*/ aggr;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
char getopt(int, char **, char *);
int lnf_fld_info(int, int, ...);
int /*<<< orphan*/ lnf_info(int /*<<< orphan*/ *, int, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int fields[0xFF];
  int aggr, sort, ipfix_id, ipfix_eid;
  int idx = 0;
  int ipfix_info = 0;
  char name[4096];
  char descr[4096];
  char buf[4096];
  char c;
  while ((c = getopt(argc, argv, "i")) != -1) {
    switch (c) {
    case 'i':
      ipfix_info = 1;
      break;
    case '?':
      printf(" -i - print additional IPFIX mapping info\n");
      exit(1);
      ;
    }
  }
  lnf_info(NULL, 0x02, buf, 4096);
  printf("libnf version: %s\n", buf);
  lnf_info(NULL, 0x04, buf, 4096);
  printf("libnf based on nfdump: %s\n", buf);
  lnf_fld_info(0x00, 0x01, &fields, sizeof(fields));
  printf("Supported items:\n");
  while (fields[idx] != 0xFF) {
    lnf_fld_info(fields[idx], 0x0B, &aggr, sizeof(aggr));
    lnf_fld_info(fields[idx], 0x0E, &sort, sizeof(sort));
    lnf_fld_info(fields[idx], 0x04, &name, sizeof(name));
    lnf_fld_info(fields[idx], 0x08, &descr, sizeof(descr));
    printf("  0x%08x 0x%02x 0x%02x  %-20s %s\n", fields[idx], aggr, sort, name,
           descr);
    if (ipfix_info) {
      if (lnf_fld_info(fields[idx], 0x11, &name, sizeof(name)) == 0x0001) {
        lnf_fld_info(fields[idx], 0x12, &ipfix_eid, sizeof(ipfix_eid));
        lnf_fld_info(fields[idx], 0x14, &ipfix_id, sizeof(ipfix_id));
        printf("                        %-30s  %04d %04d\n", name, ipfix_eid,
               ipfix_id);
      }
      if (lnf_fld_info(fields[idx], 0x18, &name, sizeof(name)) == 0x0001) {
        lnf_fld_info(fields[idx], 0x1B, &ipfix_eid, sizeof(ipfix_eid));
        lnf_fld_info(fields[idx], 0x1E, &ipfix_id, sizeof(ipfix_id));
        printf("                        %-30s  %04d %04d\n", name, ipfix_eid,
               ipfix_id);
      }
    }
    idx++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3440,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x424(%rbp)
movl   $0x0,-0x428(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe75(%rip),%rdx
call   1050 <getopt@plt>
mov    %al,-0x3431(%rbp)
movsbl %al,%eax
cmp    $0xffffffff,%eax
je     11fd <main+0xad>
movsbl -0x3431(%rbp),%eax
mov    %eax,-0x3438(%rbp)
sub    $0x3f,%eax
je     11e0 <main+0x90>
jmp    11bd <main+0x6d>
mov    -0x3438(%rbp),%eax
sub    $0x69,%eax
jne    11f8 <main+0xa8>
jmp    11d1 <main+0x81>
movl   $0x1,-0x428(%rbp)
jmp    11f8 <main+0xa8>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    117d <main+0x2d>
lea    -0x3430(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%edi
mov    $0x2,%esi
mov    $0x1000,%ecx
call   1040 <lnf_info@plt>
lea    -0x3430(%rbp),%rsi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3430(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%edi
mov    $0x4,%esi
mov    $0x1000,%ecx
call   1040 <lnf_info@plt>
lea    -0x3430(%rbp),%rsi
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
mov    $0x1,%esi
lea    -0x410(%rbp),%rdx
mov    $0x3fc,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x424(%rbp),%rax
cmpl   $0xff,-0x410(%rbp,%rax,4)
je     14c7 <main+0x377>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0xb,%esi
lea    -0x414(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0xe,%esi
lea    -0x418(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x4,%esi
lea    -0x1430(%rbp),%rdx
mov    $0x1000,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x8,%esi
lea    -0x2430(%rbp),%rdx
mov    $0x1000,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%esi
mov    -0x414(%rbp),%edx
mov    -0x418(%rbp),%ecx
lea    -0x1430(%rbp),%r8
lea    -0x2430(%rbp),%r9
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x428(%rbp)
je     14b3 <main+0x363>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x11,%esi
lea    -0x1430(%rbp),%rdx
mov    $0x1000,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
cmp    $0x1,%eax
jne    1412 <main+0x2c2>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x12,%esi
lea    -0x420(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x14,%esi
lea    -0x41c(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
lea    -0x1430(%rbp),%rsi
mov    -0x420(%rbp),%edx
mov    -0x41c(%rbp),%ecx
lea    0xc84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x18,%esi
lea    -0x1430(%rbp),%rdx
mov    $0x1000,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
cmp    $0x1,%eax
jne    14ae <main+0x35e>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x1b,%esi
lea    -0x420(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
movslq -0x424(%rbp),%rax
mov    -0x410(%rbp,%rax,4),%edi
mov    $0x1e,%esi
lea    -0x41c(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x0,%al
call   1070 <lnf_fld_info@plt>
lea    -0x1430(%rbp),%rsi
mov    -0x420(%rbp),%edx
mov    -0x41c(%rbp),%ecx
lea    0xbe8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14b3 <main+0x363>
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
jmp    1283 <main+0x133>
xor    %eax,%eax
add    $0x3440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3418,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe83(%rip),%rdx
call   1060 <getopt@plt>
xor    %r15d,%r15d
cmp    $0xff,%al
je     11da <main+0x7a>
lea    0xe70(%rip),%r14
jmp    11b7 <main+0x57>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%r15d
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1060 <getopt@plt>
cmp    $0xff,%al
je     11da <main+0x7a>
movsbl %al,%eax
cmp    $0x69,%eax
je     11a0 <main+0x40>
cmp    $0x3f,%eax
jne    11a6 <main+0x46>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
lea    0x410(%rsp),%rbx
xor    %edi,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
mov    $0x1000,%ecx
call   1050 <lnf_info@plt>
lea    0xe05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
mov    $0x1000,%ecx
call   1050 <lnf_info@plt>
lea    0xdf3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rbx
mov    $0x3fc,%ecx
xor    %edi,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
lea    0xe2e(%rip),%rdi
call   1030 <puts@plt>
mov    0x10(%rsp),%edi
cmp    $0xff,%edi
jne    1273 <main+0x113>
xor    %eax,%eax
add    $0x3418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8(%rsp),%r14
lea    0x2410(%rsp),%r12
lea    0x1410(%rsp),%r13
lea    0xda1(%rip),%rbp
jmp    12af <main+0x14f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x4(%rbx),%edi
add    $0x4,%rbx
cmp    $0xff,%edi
je     125f <main+0xff>
mov    $0x4,%ecx
mov    $0xb,%esi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rbx),%edi
mov    $0x4,%ecx
mov    $0xe,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rbx),%edi
mov    $0x1000,%ecx
mov    $0x4,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rbx),%edi
mov    $0x1000,%ecx
mov    $0x8,%esi
mov    %r13,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rbx),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    %rbp,%rdi
mov    %r12,%r8
mov    %r13,%r9
xor    %eax,%eax
call   1040 <printf@plt>
test   %r15d,%r15d
je     12a0 <main+0x140>
mov    (%rbx),%edi
mov    $0x1000,%ecx
mov    $0x11,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
cmp    $0x1,%eax
jne    138b <main+0x22b>
mov    (%rbx),%edi
mov    $0x4,%ecx
mov    $0x12,%esi
mov    %rsp,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rbx),%edi
mov    $0x4,%ecx
mov    $0x14,%esi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xcd1(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%edi
mov    $0x1000,%ecx
mov    $0x18,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
cmp    $0x1,%eax
jne    12a0 <main+0x140>
mov    (%rbx),%edi
mov    $0x4,%ecx
mov    $0x1b,%esi
mov    %rsp,%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rbx),%edi
mov    $0x4,%ecx
mov    $0x1e,%esi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1080 <lnf_fld_info@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xc6c(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12a0 <main+0x140>

LLVM IR (-O0):
@.str = [2 x i8] c"i\00"
@.str.1 = [43 x i8] c" -i - print additional IPFIX mapping info\0A\00"
@.str.2 = [19 x i8] c"libnf version: %s\0A\00"
@.str.3 = [27 x i8] c"libnf based on nfdump: %s\0A\00"
@.str.4 = [18 x i8] c"Supported items:\0A\00"
@.str.5 = [34 x i8] c" 0x%08x 0x%02x 0x%02x %-20s %s\0A\00"
@.str.6 = [42 x i8] c" %-30s %04d %04d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [255 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [4096 x i8]
%14 = alloca [4096 x i8]
%15 = alloca [4096 x i8]
%16 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %11
store i32 0, i32* %12
br label %17
17: ; preds = %30, %2
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call signext i8 @getopt(i32 %18, i8** %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8 %20, i8* %16
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, -1
br i1 %22, label %23, label %31
23: ; preds = %17
%24 = load i8, i8* %16
%25 = sext i8 %24 to i32
switch i32 %25, label %30 [
i32 105, label %26
i32 63, label %27
]
26: ; preds = %23
store i32 1, i32* %12
br label %30
27: ; preds = %23
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %23, %26
br label %17
31: ; preds = %17
%32 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i64 0, i64 0
%33 = call i32 @lnf_info(i32* null, i32 2, i8* %32, i32 4096)
%34 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i64 0, i64 0
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %34)
%36 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i64 0, i64 0
%37 = call i32 @lnf_info(i32* null, i32 4, i8* %36, i32 4096)
%38 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i64 0, i64 0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %38)
%40 = call i32 (i32, i32, ...) @lnf_fld_info(i32 0, i32 1, [255 x i32]* %6, i64 1020)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %42
42: ; preds = %125, %31
%43 = load i32, i32* %11
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = icmp ne i32 %46, 255
br i1 %47, label %48, label %128
48: ; preds = %42
%49 = load i32, i32* %11
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %52, i32 11, i32* %7, i64 4)
%54 = load i32, i32* %11
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %57, i32 14, i32* %8, i64 4)
%59 = load i32, i32* %11
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %62, i32 4, [4096 x i8]* %13, i64 4096)
%64 = load i32, i32* %11
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %67, i32 8, [4096 x i8]* %14, i64 4096)
%69 = load i32, i32* %11
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = load i32, i32* %7
%74 = load i32, i32* %8
%75 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %14, i64 0, i64 0
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %72, i32 %73, i32 %74, i8* %75, i8* %76)
%78 = load i32, i32* %12
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %125
80: ; preds = %48
%81 = load i32, i32* %11
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %84, i32 17, [4096 x i8]* %13, i64 4096)
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %102
87: ; preds = %80
%88 = load i32, i32* %11
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %89
%91 = load i32, i32* %90
%92 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %91, i32 18, i32* %10, i64 4)
%93 = load i32, i32* %11
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %94
%96 = load i32, i32* %95
%97 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %96, i32 20, i32* %9, i64 4)
%98 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%99 = load i32, i32* %10
%100 = load i32, i32* %9
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %98, i32 %99, i32 %100)
br label %102
102: ; preds = %87, %80
%103 = load i32, i32* %11
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %104
%106 = load i32, i32* %105
%107 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %106, i32 24, [4096 x i8]* %13, i64 4096)
%108 = icmp eq i32 %107, 1
br i1 %108, label %109, label %124
109: ; preds = %102
%110 = load i32, i32* %11
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %111
%113 = load i32, i32* %112
%114 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %113, i32 27, i32* %10, i64 4)
%115 = load i32, i32* %11
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [255 x i32], [255 x i32]* %6, i64 0, i64 %116
%118 = load i32, i32* %117
%119 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %118, i32 30, i32* %9, i64 4)
%120 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%121 = load i32, i32* %10
%122 = load i32, i32* %9
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %120, i32 %121, i32 %122)
br label %124
124: ; preds = %109, %102
br label %125
125: ; preds = %124, %48
%126 = load i32, i32* %11
%127 = add nsw i32 %126, 1
store i32 %127, i32* %11
br label %42
128: ; preds = %42
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"i\00"
@.str.2 = [19 x i8] c"libnf version: %s\0A\00"
@.str.3 = [27 x i8] c"libnf based on nfdump: %s\0A\00"
@.str.5 = [34 x i8] c" 0x%08x 0x%02x 0x%02x %-20s %s\0A\00"
@.str.6 = [42 x i8] c" %-30s %04d %04d\0A\00"
@str = [17 x i8] c"Supported items:\00"
@str.7 = [42 x i8] c" -i - print additional IPFIX mapping info\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [255 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [4096 x i8]
%9 = alloca [4096 x i8]
%10 = alloca [4096 x i8]
%11 = bitcast [255 x i32]* %3 to i8*
%12 = bitcast i32* %4 to i8*
%13 = bitcast i32* %5 to i8*
%14 = bitcast i32* %6 to i8*
%15 = bitcast i32* %7 to i8*
%16 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
%17 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%18 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%19 = tail call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i8 %19, -1
br i1 %20, label %33, label %21
21: ; preds = %2, %29
%22 = phi i8 [ %31, %29 ], [ %19, %2 ]
%23 = phi i32 [ %30, %29 ], [ 0, %2 ]
%24 = sext i8 %22 to i32
switch i32 %24, label %29 [
i32 105, label %25
i32 63, label %26
]
25: ; preds = %21
br label %29
26: ; preds = %21
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.7, i64 0, i64 0))
%28 = tail call i32 @exit(i32 1)
unreachable
29: ; preds = %21, %25
%30 = phi i32 [ %23, %21 ], [ 1, %25 ]
%31 = tail call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%32 = icmp eq i8 %31, -1
br i1 %32, label %33, label %21
33: ; preds = %29, %2
%34 = phi i32 [ 0, %2 ], [ %30, %29 ]
%35 = call i32 @lnf_info(i32* null, i32 2, i8* %18, i32 4096)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%37 = call i32 @lnf_info(i32* null, i32 4, i8* %18, i32 4096)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %18)
%39 = call i32 (i32, i32, ...) @lnf_fld_info(i32 0, i32 1, [255 x i32]* %3, i64 1020)
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%41 = getelementptr inbounds [255 x i32], [255 x i32]* %3, i64 0, i64 0
%42 = load i32, i32* %41
%43 = icmp eq i32 %42, 255
br i1 %43, label %90, label %44
44: ; preds = %33
%45 = icmp eq i32 %34, 0
br label %46
46: ; preds = %44, %85
%47 = phi i64 [ 0, %44 ], [ %86, %85 ]
%48 = phi i32 [ %42, %44 ], [ %88, %85 ]
%49 = phi i32* [ %41, %44 ], [ %87, %85 ]
%50 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %48, i32 11, i32* %4, i64 4)
%51 = load i32, i32* %49
%52 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %51, i32 14, i32* %5, i64 4)
%53 = load i32, i32* %49
%54 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %53, i32 4, [4096 x i8]* %8, i64 4096)
%55 = load i32, i32* %49
%56 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %55, i32 8, [4096 x i8]* %9, i64 4096)
%57 = load i32, i32* %49
%58 = load i32, i32* %4
%59 = load i32, i32* %5
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %57, i32 %58, i32 %59, i8* %16, i8* %17)
br i1 %45, label %85, label %61
61: ; preds = %46
%62 = load i32, i32* %49
%63 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %62, i32 17, [4096 x i8]* %8, i64 4096)
%64 = icmp eq i32 %63, 1
br i1 %64, label %65, label %73
65: ; preds = %61
%66 = load i32, i32* %49
%67 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %66, i32 18, i32* %7, i64 4)
%68 = load i32, i32* %49
%69 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %68, i32 20, i32* %6, i64 4)
%70 = load i32, i32* %7
%71 = load i32, i32* %6
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %16, i32 %70, i32 %71)
br label %73
73: ; preds = %65, %61
%74 = load i32, i32* %49
%75 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %74, i32 24, [4096 x i8]* %8, i64 4096)
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %85
77: ; preds = %73
%78 = load i32, i32* %49
%79 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %78, i32 27, i32* %7, i64 4)
%80 = load i32, i32* %49
%81 = call i32 (i32, i32, ...) @lnf_fld_info(i32 %80, i32 30, i32* %6, i64 4)
%82 = load i32, i32* %7
%83 = load i32, i32* %6
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %16, i32 %82, i32 %83)
br label %85
85: ; preds = %73, %77, %46
%86 = add nuw i64 %47, 1
%87 = getelementptr inbounds [255 x i32], [255 x i32]* %3, i64 0, i64 %86
%88 = load i32, i32* %87
%89 = icmp eq i32 %88, 255
br i1 %89, label %90, label %46
90: ; preds = %85, %33
ret i32 0
}