#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fft_file(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int,
                            int);
int /*<<< orphan*/ fft_file_real(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int, int);
int /*<<< orphan*/ fft_filend(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int *,
                              int, int);
int /*<<< orphan*/ fft_filend_real(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                   int *, int, int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int get_dims(int /*<<< orphan*/, int *);
int getopt(int, char **, char *);
int /*<<< orphan*/ optarg;
int optind;
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int isinverse = 0;
  int isreal = 0;
  FILE *fin = stdin;
  FILE *fout = stdout;
  int ndims = 1;
  int dims[32];
  dims[0] = 1024;
  while (1) {
    int c = getopt(argc, argv, "n:iR");
    if (c == -1)
      break;
    switch (c) {
    case 'n':
      ndims = get_dims(optarg, dims);
      break;
    case 'i':
      isinverse = 1;
      break;
    case 'R':
      isreal = 1;
      break;
    case '?':
      fprintf(stderr, "usage options:\n"
                      "\t-n d1[,d2,d3...]: fft dimension(s)\n"
                      "\t-i : inverse\n"
                      "\t-R : real input samples, not complex\n");
      exit(1);
    default:
      fprintf(stderr, "bad %c\n", c);
      break;
    }
  }
  if (optind < argc) {
    if (strcmp("-", argv[optind]) != 0)
      fin = fopen(argv[optind], "rb");
    ++optind;
  }
  if (optind < argc) {
    if (strcmp("-", argv[optind]) != 0)
      fout = fopen(argv[optind], "wb");
    ++optind;
  }
  if (ndims == 1) {
    if (isreal)
      fft_file_real(fin, fout, dims[0], isinverse);
    else
      fft_file(fin, fout, dims[0], isinverse);
  } else {
    if (isreal)
      fft_filend_real(fin, fout, dims, ndims, isinverse);
    else
      fft_filend(fin, fout, dims, ndims, isinverse);
  }
  if (fout != stdout)
    fclose(fout);
  if (fin != stdin)
    fclose(fin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    0x2e02(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2dd4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x400,-0xb0(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdee(%rip),%rdx
call   1090 <getopt@plt>
mov    %eax,-0xb4(%rbp)
cmpl   $0xffffffff,-0xb4(%rbp)
jne    122f <main+0x7f>
jmp    12fd <main+0x14d>
mov    -0xb4(%rbp),%eax
mov    %eax,-0xb8(%rbp)
sub    $0x3f,%eax
je     12ba <main+0x10a>
jmp    1249 <main+0x99>
mov    -0xb8(%rbp),%eax
sub    $0x52,%eax
je     12ae <main+0xfe>
jmp    125d <main+0xad>
mov    -0xb8(%rbp),%eax
sub    $0x69,%eax
je     12a2 <main+0xf2>
jmp    1271 <main+0xc1>
mov    -0xb8(%rbp),%eax
sub    $0x6e,%eax
jne    12db <main+0x12b>
jmp    1285 <main+0xd5>
mov    0x2d6c(%rip),%rax
mov    (%rax),%edi
lea    -0xb0(%rbp),%rsi
call   10a0 <get_dims@plt>
mov    %eax,-0x2c(%rbp)
jmp    12f8 <main+0x148>
movl   $0x1,-0x14(%rbp)
jmp    12f8 <main+0x148>
movl   $0x1,-0x18(%rbp)
jmp    12f8 <main+0x148>
mov    0x2d07(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    0x2ce6(%rip),%rax
mov    (%rax),%edi
mov    -0xb4(%rbp),%edx
lea    0xd7c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1204 <main+0x54>
mov    0x2cd4(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    136e <main+0x1be>
mov    -0x10(%rbp),%rax
mov    0x2cbe(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd4d(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1359 <main+0x1a9>
mov    -0x10(%rbp),%rax
mov    0x2c96(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd27(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    0x2c78(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2c6c(%rip),%rax
mov    %ecx,(%rax)
mov    0x2c63(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    13df <main+0x22f>
mov    -0x10(%rbp),%rax
mov    0x2c4d(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcdc(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     13ca <main+0x21a>
mov    -0x10(%rbp),%rax
mov    0x2c25(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xcb9(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    0x2c07(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2bfb(%rip),%rax
mov    %ecx,(%rax)
cmpl   $0x1,-0x2c(%rbp)
jne    1429 <main+0x279>
cmpl   $0x0,-0x18(%rbp)
je     140e <main+0x25e>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0xb0(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   10d0 <fft_file_real@plt>
jmp    1424 <main+0x274>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0xb0(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <fft_file@plt>
jmp    1473 <main+0x2c3>
cmpl   $0x0,-0x18(%rbp)
je     1453 <main+0x2a3>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1070 <fft_filend_real@plt>
jmp    146e <main+0x2be>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   10c0 <fft_filend@plt>
jmp    1473 <main+0x2c3>
mov    -0x28(%rbp),%rax
mov    0x2b42(%rip),%rcx
cmp    (%rcx),%rax
je     1490 <main+0x2e0>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rax
mov    0x2b45(%rip),%rcx
cmp    (%rcx),%rax
je     14ad <main+0x2fd>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e13(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x18(%rsp)
mov    0x2de4(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
movl   $0x400,0x20(%rsp)
mov    $0x1,%r13d
lea    0xe07(%rip),%r15
mov    0x2dc8(%rip),%r12
lea    0xe66(%rip),%r14
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
jmp    1239 <main+0x89>
nopl   0x0(%rax)
cmp    $0x3f,%eax
je     13d9 <main+0x229>
mov    (%r12),%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1090 <getopt@plt>
cmp    $0x68,%eax
jg     1260 <main+0xb0>
cmp    $0xffffffff,%eax
je     128c <main+0xdc>
cmp    $0x52,%eax
jne    1220 <main+0x70>
movl   $0x1,0xc(%rsp)
jmp    1239 <main+0x89>
nop
cmp    $0x69,%eax
je     1282 <main+0xd2>
cmp    $0x6e,%eax
jne    1229 <main+0x79>
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
lea    0x20(%rsp),%rsi
call   10a0 <get_dims@plt>
mov    %eax,%r13d
jmp    1239 <main+0x89>
movl   $0x1,0x8(%rsp)
jmp    1239 <main+0x89>
mov    0x2d45(%rip),%r14
mov    (%r14),%eax
cmp    %ebp,%eax
jge    1313 <main+0x163>
cltq
mov    (%rbx,%rax,8),%rsi
lea    0xdce(%rip),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
mov    0x2d2a(%rip),%r15
mov    0x18(%rsp),%r12
je     12d3 <main+0x123>
movslq (%r14),%rax
mov    (%rbx,%rax,8),%rdi
lea    0xdac(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r12
mov    (%r14),%eax
add    $0x1,%eax
mov    %eax,(%r14)
cmp    %ebp,%eax
jl     1323 <main+0x173>
mov    0x10(%rsp),%rbp
cmp    $0x1,%r13d
je     135f <main+0x1af>
cmpl   $0x0,0xc(%rsp)
je     137b <main+0x1cb>
lea    0x20(%rsp),%rdx
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r13d,%ecx
mov    0x8(%rsp),%r8d
call   1070 <fft_filend_real@plt>
jmp    13a4 <main+0x1f4>
mov    0x2cc6(%rip),%r15
mov    0x18(%rsp),%r12
cmp    %ebp,%eax
jge    12e0 <main+0x130>
cltq
mov    (%rbx,%rax,8),%rsi
lea    0xd45(%rip),%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
mov    0x10(%rsp),%rbp
je     1355 <main+0x1a5>
movslq (%r14),%rax
mov    (%rbx,%rax,8),%rdi
lea    0xd2d(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%rbp
addl   $0x1,(%r14)
cmp    $0x1,%r13d
jne    12eb <main+0x13b>
mov    0x20(%rsp),%edx
cmpl   $0x0,0xc(%rsp)
je     1395 <main+0x1e5>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    0x8(%rsp),%ecx
call   10d0 <fft_file_real@plt>
jmp    13a4 <main+0x1f4>
lea    0x20(%rsp),%rdx
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r13d,%ecx
mov    0x8(%rsp),%r8d
call   10c0 <fft_filend@plt>
jmp    13a4 <main+0x1f4>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    0x8(%rsp),%ecx
call   1040 <fft_file@plt>
mov    0x2c15(%rip),%rax
cmp    (%rax),%rbp
je     13b8 <main+0x208>
mov    %rbp,%rdi
call   1030 <fclose@plt>
cmp    (%r15),%r12
je     13c5 <main+0x215>
mov    %r12,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r12),%edi
lea    0xc21(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@stdin = global i32* null
@stdout = global i32* null
@.str = [5 x i8] c"n:iR\00"
@optarg = global i32 0
@stderr = global i32 0
@.str.1 = [104 x i8] c"usage options:\0A\09-n d1[,d2,d3...]: fft dimension(s)\0A\09-i : inverse\0A\09-R : real input samples, not complex\0A\00"
@.str.2 = [8 x i8] c"bad %c\0A\00"
@optind = global i32 0
@.str.3 = [2 x i8] c"-\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca [32 x i32]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%13 = load i32*, i32** @stdin
store i32* %13, i32** %8
%14 = load i32*, i32** @stdout
store i32* %14, i32** %9
store i32 1, i32* %10
%15 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
store i32 1024, i32* %15
br label %16
16: ; preds = %2, %39
%17 = load i32, i32* %4
%18 = load i8**, i8*** %5
%19 = call i32 @getopt(i32 %17, i8** %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %19, i32* %12
%20 = load i32, i32* %12
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %23
22: ; preds = %16
br label %40
23: ; preds = %16
%24 = load i32, i32* %12
switch i32 %24, label %35 [
i32 110, label %25
i32 105, label %29
i32 82, label %30
i32 63, label %31
]
25: ; preds = %23
%26 = load i32, i32* @optarg
%27 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%28 = call i32 @get_dims(i32 %26, i32* %27)
store i32 %28, i32* %10
br label %39
29: ; preds = %23
store i32 1, i32* %6
br label %39
30: ; preds = %23
store i32 1, i32* %7
br label %39
31: ; preds = %23
%32 = load i32, i32* @stderr
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.1, i64 0, i64 0))
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %23
%36 = load i32, i32* @stderr
%37 = load i32, i32* %12
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %35, %30, %29, %25
br label %16
40: ; preds = %22
%41 = load i32, i32* @optind
%42 = load i32, i32* %4
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %62
44: ; preds = %40
%45 = load i8**, i8*** %5
%46 = load i32, i32* @optind
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8*, i8** %45, i64 %47
%49 = load i8*, i8** %48
%50 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %44
%53 = load i8**, i8*** %5
%54 = load i32, i32* @optind
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %58, i32** %8
br label %59
59: ; preds = %52, %44
%60 = load i32, i32* @optind
%61 = add nsw i32 %60, 1
store i32 %61, i32* @optind
br label %62
62: ; preds = %59, %40
%63 = load i32, i32* @optind
%64 = load i32, i32* %4
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %84
66: ; preds = %62
%67 = load i8**, i8*** %5
%68 = load i32, i32* @optind
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8*, i8** %67, i64 %69
%71 = load i8*, i8** %70
%72 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %71)
%73 = icmp ne i64 %72, 0
br i1 %73, label %74, label %81
74: ; preds = %66
%75 = load i8**, i8*** %5
%76 = load i32, i32* @optind
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8*, i8** %75, i64 %77
%79 = load i8*, i8** %78
%80 = call i32* @fopen(i8* %79, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %80, i32** %9
br label %81
81: ; preds = %74, %66
%82 = load i32, i32* @optind
%83 = add nsw i32 %82, 1
store i32 %83, i32* @optind
br label %84
84: ; preds = %81, %62
%85 = load i32, i32* %10
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %105
87: ; preds = %84
%88 = load i32, i32* %7
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %97
90: ; preds = %87
%91 = load i32*, i32** %8
%92 = load i32*, i32** %9
%93 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%94 = load i32, i32* %93
%95 = load i32, i32* %6
%96 = call i32 @fft_file_real(i32* %91, i32* %92, i32 %94, i32 %95)
br label %104
97: ; preds = %87
%98 = load i32*, i32** %8
%99 = load i32*, i32** %9
%100 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%101 = load i32, i32* %100
%102 = load i32, i32* %6
%103 = call i32 @fft_file(i32* %98, i32* %99, i32 %101, i32 %102)
br label %104
104: ; preds = %97, %90
br label %123
105: ; preds = %84
%106 = load i32, i32* %7
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %115
108: ; preds = %105
%109 = load i32*, i32** %8
%110 = load i32*, i32** %9
%111 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%112 = load i32, i32* %10
%113 = load i32, i32* %6
%114 = call i32 @fft_filend_real(i32* %109, i32* %110, i32* %111, i32 %112, i32 %113)
br label %122
115: ; preds = %105
%116 = load i32*, i32** %8
%117 = load i32*, i32** %9
%118 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%119 = load i32, i32* %10
%120 = load i32, i32* %6
%121 = call i32 @fft_filend(i32* %116, i32* %117, i32* %118, i32 %119, i32 %120)
br label %122
122: ; preds = %115, %108
br label %123
123: ; preds = %122, %104
%124 = load i32*, i32** %9
%125 = load i32*, i32** @stdout
%126 = icmp ne i32* %124, %125
br i1 %126, label %127, label %130
127: ; preds = %123
%128 = load i32*, i32** %9
%129 = call i32 @fclose(i32* %128)
br label %130
130: ; preds = %127, %123
%131 = load i32*, i32** %8
%132 = load i32*, i32** @stdin
%133 = icmp ne i32* %131, %132
br i1 %133, label %134, label %137
134: ; preds = %130
%135 = load i32*, i32** %8
%136 = call i32 @fclose(i32* %135)
br label %137
137: ; preds = %134, %130
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32* null
@stdout = global i32* null
@.str = [5 x i8] c"n:iR\00"
@optarg = global i32 0
@stderr = global i32 0
@.str.1 = [104 x i8] c"usage options:\0A\09-n d1[,d2,d3...]: fft dimension(s)\0A\09-i : inverse\0A\09-R : real input samples, not complex\0A\00"
@.str.2 = [8 x i8] c"bad %c\0A\00"
@optind = global i32 0
@.str.3 = [2 x i8] c"-\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [32 x i32]
%4 = load i32*, i32** @stdin
%5 = load i32*, i32** @stdout
%6 = bitcast [32 x i32]* %3 to i8*
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 0
store i32 1024, i32* %7
br label %8
8: ; preds = %17, %2
%9 = phi i32 [ 0, %2 ], [ 1, %17 ]
%10 = phi i32 [ 0, %2 ], [ %13, %17 ]
%11 = phi i32 [ 1, %2 ], [ %16, %17 ]
br label %12
12: ; preds = %17, %8
%13 = phi i32 [ %10, %8 ], [ 1, %17 ]
%14 = phi i32 [ %11, %8 ], [ %16, %17 ]
br label %15
15: ; preds = %12, %19
%16 = phi i32 [ %14, %12 ], [ %21, %19 ]
br label %17
17: ; preds = %15, %26
%18 = call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
switch i32 %18, label %26 [
i32 -1, label %29
i32 110, label %19
i32 105, label %8
i32 82, label %12
i32 63, label %22
]
19: ; preds = %17
%20 = load i32, i32* @optarg
%21 = call i32 @get_dims(i32 %20, i32* %7)
br label %15
22: ; preds = %17
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %17
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %17
29: ; preds = %17
%30 = load i32, i32* @optind
%31 = icmp slt i32 %30, %0
br i1 %31, label %32, label %48
32: ; preds = %29
%33 = sext i32 %30 to i64
%34 = getelementptr inbounds i8*, i8** %1, i64 %33
%35 = load i8*, i8** %34
%36 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %35)
%37 = icmp eq i64 %36, 0
br i1 %37, label %44, label %38
38: ; preds = %32
%39 = load i32, i32* @optind
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %1, i64 %40
%42 = load i8*, i8** %41
%43 = call i32* @fopen(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %44
44: ; preds = %38, %32
%45 = phi i32* [ %43, %38 ], [ %4, %32 ]
%46 = load i32, i32* @optind
%47 = add nsw i32 %46, 1
store i32 %47, i32* @optind
br label %48
48: ; preds = %44, %29
%49 = phi i32 [ %47, %44 ], [ %30, %29 ]
%50 = phi i32* [ %45, %44 ], [ %4, %29 ]
%51 = icmp slt i32 %49, %0
br i1 %51, label %52, label %68
52: ; preds = %48
%53 = sext i32 %49 to i64
%54 = getelementptr inbounds i8*, i8** %1, i64 %53
%55 = load i8*, i8** %54
%56 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %55)
%57 = icmp eq i64 %56, 0
br i1 %57, label %64, label %58
58: ; preds = %52
%59 = load i32, i32* @optind
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %1, i64 %60
%62 = load i8*, i8** %61
%63 = call i32* @fopen(i8* %62, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %64
64: ; preds = %58, %52
%65 = phi i32* [ %63, %58 ], [ %5, %52 ]
%66 = load i32, i32* @optind
%67 = add nsw i32 %66, 1
store i32 %67, i32* @optind
br label %68
68: ; preds = %64, %48
%69 = phi i32* [ %65, %64 ], [ %5, %48 ]
%70 = icmp eq i32 %16, 1
%71 = icmp eq i32 %13, 0
br i1 %70, label %72, label %78
72: ; preds = %68
%73 = load i32, i32* %7
br i1 %71, label %76, label %74
74: ; preds = %72
%75 = call i32 @fft_file_real(i32* %50, i32* %69, i32 %73, i32 %9)
br label %83
76: ; preds = %72
%77 = call i32 @fft_file(i32* %50, i32* %69, i32 %73, i32 %9)
br label %83
78: ; preds = %68
br i1 %71, label %81, label %79
79: ; preds = %78
%80 = call i32 @fft_filend_real(i32* %50, i32* %69, i32* %7, i32 %16, i32 %9)
br label %83
81: ; preds = %78
%82 = call i32 @fft_filend(i32* %50, i32* %69, i32* %7, i32 %16, i32 %9)
br label %83
83: ; preds = %79, %81, %74, %76
%84 = load i32*, i32** @stdout
%85 = icmp eq i32* %69, %84
br i1 %85, label %88, label %86
86: ; preds = %83
%87 = call i32 @fclose(i32* %69)
br label %88
88: ; preds = %86, %83
%89 = load i32*, i32** @stdin
%90 = icmp eq i32* %50, %89
br i1 %90, label %93, label %91
91: ; preds = %88
%92 = call i32 @fclose(i32* %50)
br label %93
93: ; preds = %91, %88
ret i32 0
}