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

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int gi, cr, bandwidth;
  double bitrate;
  long long clock_num = 6 * 8000000;
  long long clock_den = 7;
  long long carriers_num = 6048;
  long long packet_num = 188;
  long long packet_den = 204;
  long long guard_den;
  long long bitrate_num, bitrate_den;
  if (argc != 2) {
    fprintf(stderr, "usage: dvbtrate <channel bandwidth>\n");
    exit(-1);
  }
  bandwidth = atoi(argv[1]);
  clock_num = (long long)(bandwidth * 8000000);
  printf("QPSK\n");
  for (cr = 1; cr <= 7; cr++) {
    if (cr != 4 && cr != 6) {
      printf("coderate = %d/%d", cr, cr + 1);
      for (gi = 4; gi <= 32; gi *= 2) {
        bitrate_num = clock_num * carriers_num * 2 * packet_num * cr;
        guard_den = 8192 + (8192 / gi);
        bitrate_den = packet_den * guard_den * (cr + 1) * clock_den;
        bitrate = (double)bitrate_num / (double)bitrate_den;
        printf(" %f", bitrate);
      }
      printf("\n");
    }
  }
  printf("QAM-16\n");
  for (cr = 1; cr <= 7; cr++) {
    if (cr != 4 && cr != 6) {
      printf("coderate = %d/%d", cr, cr + 1);
      for (gi = 4; gi <= 32; gi *= 2) {
        bitrate_num = clock_num * carriers_num * 4 * packet_num * cr;
        guard_den = 8192 + (8192 / gi);
        bitrate_den = packet_den * guard_den * (cr + 1) * clock_den;
        bitrate = (double)bitrate_num / (double)bitrate_den;
        printf(" %f", bitrate);
      }
      printf("\n");
    }
  }
  printf("QAM-64\n");
  for (cr = 1; cr <= 7; cr++) {
    if (cr != 4 && cr != 6) {
      printf("coderate = %d/%d", cr, cr + 1);
      for (gi = 4; gi <= 32; gi *= 2) {
        bitrate_num = clock_num * carriers_num * 6 * packet_num * cr;
        guard_den = 8192 + (8192 / gi);
        bitrate_den = packet_den * guard_den * (cr + 1) * clock_den;
        bitrate = (double)bitrate_num / (double)bitrate_den;
        printf(" %f", bitrate);
      }
      printf("\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x2dc6c00,-0x30(%rbp)
02
movq   $0x7,-0x38(%rbp)
movq   $0x17a0,-0x40(%rbp)
movq   $0xbc,-0x48(%rbp)
movq   $0xcc,-0x50(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11a7 <main+0x67>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
lea    0xe68(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
imul   $0x7a1200,-0x1c(%rbp),%eax
cltq
mov    %rax,-0x30(%rbp)
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jg     12c7 <main+0x187>
cmpl   $0x4,-0x18(%rbp)
je     12b4 <main+0x174>
cmpl   $0x6,-0x18(%rbp)
je     12b4 <main+0x174>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jg     12a6 <main+0x166>
mov    -0x30(%rbp),%rax
imul   -0x40(%rbp),%rax
shl    $0x1,%rax
imul   -0x48(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    $0x2000,%eax
cltd
idivl  -0x14(%rbp)
add    $0x2000,%eax
cltq
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
imul   -0x58(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
imul   -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
cvtsi2sdq -0x60(%rbp),%xmm0
cvtsi2sdq -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xdab(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1215 <main+0xd5>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b9 <main+0x179>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11d9 <main+0x99>
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jg     13ca <main+0x28a>
cmpl   $0x4,-0x18(%rbp)
je     13b7 <main+0x277>
cmpl   $0x6,-0x18(%rbp)
je     13b7 <main+0x277>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
lea    0xd21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jg     13a9 <main+0x269>
mov    -0x30(%rbp),%rax
imul   -0x40(%rbp),%rax
shl    $0x2,%rax
imul   -0x48(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    $0x2000,%eax
cltd
idivl  -0x14(%rbp)
add    $0x2000,%eax
cltq
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
imul   -0x58(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
imul   -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
cvtsi2sdq -0x60(%rbp),%xmm0
cvtsi2sdq -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xca8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1318 <main+0x1d8>
lea    0xc9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13bc <main+0x27c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12dc <main+0x19c>
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jg     14cd <main+0x38d>
cmpl   $0x4,-0x18(%rbp)
je     14ba <main+0x37a>
cmpl   $0x6,-0x18(%rbp)
je     14ba <main+0x37a>
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
lea    0xc1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jg     14ac <main+0x36c>
mov    -0x30(%rbp),%rax
imul   -0x40(%rbp),%rax
imul   $0x6,%rax,%rax
imul   -0x48(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    $0x2000,%eax
cltd
idivl  -0x14(%rbp)
add    $0x2000,%eax
cltq
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
imul   -0x58(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
imul   -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
cvtsi2sdq -0x60(%rbp),%xmm0
cvtsi2sdq -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xba5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    141b <main+0x2db>
lea    0xb9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14bf <main+0x37f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13df <main+0x29f>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x2,%edi
jne    1527 <main+0x3c7>
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
imul   $0x7a1200,%eax,%eax
movslq %eax,%rbx
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,0x10(%rsp)
imul   $0x22b300,%rbx,%rcx
mov    $0x1702800,%ebp
mov    $0x1be4000,%r12d
mov    $0x191a000,%r14d
mov    $0x17b5000,%r13d
mov    $0x1,%ebx
mov    %rcx,%r15
mov    %rcx,0x8(%rsp)
jmp    11ff <main+0x9f>
nopw   0x0(%rax,%rax,1)
add    $0xb81400,%rbp
add    $0xdf2000,%r12
add    $0xc8d000,%r14
add    $0xbda800,%r13
add    $0x1,%ebx
add    %rcx,%r15
cmp    $0x678b400,%rbp
je     12b6 <main+0x156>
mov    %ebx,%eax
and    $0x7ffffffd,%eax
cmp    $0x4,%eax
je     11d0 <main+0x70>
lea    0x1(%rbx),%edx
lea    0xe10(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r15,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r12,%xmm1
divsd  %xmm1,%xmm0
lea    0xdf8(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r14,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xdd9(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r13,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xdba(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rbp,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xd9b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rcx
jmp    11d0 <main+0x70>
lea    0xd82(%rip),%rdi
call   1040 <puts@plt>
imul   $0x456600,0x10(%rsp),%rcx
mov    $0x1702800,%ebp
mov    $0x1be4000,%r12d
mov    $0x191a000,%r14d
mov    $0x17b5000,%r13d
mov    $0x1,%ebx
mov    %rcx,%r15
mov    %rcx,0x8(%rsp)
jmp    132f <main+0x1cf>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xb81400,%rbp
add    $0xdf2000,%r12
add    $0xc8d000,%r14
add    $0xbda800,%r13
add    $0x1,%ebx
add    %rcx,%r15
cmp    $0x678b400,%rbp
je     13e6 <main+0x286>
mov    %ebx,%eax
and    $0x7ffffffd,%eax
cmp    $0x4,%eax
je     1300 <main+0x1a0>
lea    0x1(%rbx),%edx
lea    0xce0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r15,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r12,%xmm1
divsd  %xmm1,%xmm0
lea    0xcc8(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r14,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xca9(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r13,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xc8a(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rbp,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xc6b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rcx
jmp    1300 <main+0x1a0>
lea    0xc59(%rip),%rdi
call   1040 <puts@plt>
imul   $0x681900,0x10(%rsp),%rcx
mov    $0x1702800,%ebp
mov    $0x1be4000,%r13d
mov    $0x191a000,%r14d
mov    $0x17b5000,%r12d
mov    $0x1,%ebx
mov    %rcx,%r15
mov    %rcx,0x8(%rsp)
jmp    145f <main+0x2ff>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xb81400,%rbp
add    $0xdf2000,%r13
add    $0xc8d000,%r14
add    $0xbda800,%r12
add    $0x1,%ebx
add    %rcx,%r15
cmp    $0x678b400,%rbp
je     1516 <main+0x3b6>
mov    %ebx,%eax
and    $0x7ffffffd,%eax
cmp    $0x4,%eax
je     1430 <main+0x2d0>
lea    0x1(%rbx),%edx
lea    0xbb0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r15,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r13,%xmm1
divsd  %xmm1,%xmm0
lea    0xb98(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r14,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xb79(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r12,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xb5a(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rbp,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xb3b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rcx
jmp    1430 <main+0x2d0>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2ab2(%rip),%rax
mov    (%rax),%edi
lea    0xac9(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"usage: dvbtrate <channel bandwidth>\0A\00"
@.str.1 = [6 x i8] c"QPSK\0A\00"
@.str.2 = [17 x i8] c"coderate = %d/%d\00"
@.str.3 = [4 x i8] c" %f\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [8 x i8] c"QAM-16\0A\00"
@.str.6 = [8 x i8] c"QAM-64\0A\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 double
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 48000000, i64* %10
store i64 7, i64* %11
store i64 6048, i64* %12
store i64 188, i64* %13
store i64 204, i64* %14
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 2
br i1 %19, label %20, label %24
20: ; preds = %2
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%23 = call i32 @exit(i32 -1)
unreachable
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @atoi(i8* %27)
store i32 %28, i32* %8
%29 = load i32, i32* %8
%30 = mul nsw i32 %29, 8000000
%31 = sext i32 %30 to i64
store i64 %31, i64* %10
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %7
br label %33
33: ; preds = %86, %24
%34 = load i32, i32* %7
%35 = icmp sle i32 %34, 7
br i1 %35, label %36, label %89
36: ; preds = %33
%37 = load i32, i32* %7
%38 = icmp ne i32 %37, 4
br i1 %38, label %39, label %85
39: ; preds = %36
%40 = load i32, i32* %7
%41 = icmp ne i32 %40, 6
br i1 %41, label %42, label %85
42: ; preds = %39
%43 = load i32, i32* %7
%44 = load i32, i32* %7
%45 = add nsw i32 %44, 1
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %43, i32 %45)
store i32 4, i32* %6
br label %47
47: ; preds = %80, %42
%48 = load i32, i32* %6
%49 = icmp sle i32 %48, 32
br i1 %49, label %50, label %83
50: ; preds = %47
%51 = load i64, i64* %10
%52 = load i64, i64* %12
%53 = mul nsw i64 %51, %52
%54 = mul nsw i64 %53, 2
%55 = load i64, i64* %13
%56 = mul nsw i64 %54, %55
%57 = load i32, i32* %7
%58 = sext i32 %57 to i64
%59 = mul nsw i64 %56, %58
store i64 %59, i64* %16
%60 = load i32, i32* %6
%61 = sdiv i32 8192, %60
%62 = add nsw i32 8192, %61
%63 = sext i32 %62 to i64
store i64 %63, i64* %15
%64 = load i64, i64* %14
%65 = load i64, i64* %15
%66 = mul nsw i64 %64, %65
%67 = load i32, i32* %7
%68 = add nsw i32 %67, 1
%69 = sext i32 %68 to i64
%70 = mul nsw i64 %66, %69
%71 = load i64, i64* %11
%72 = mul nsw i64 %70, %71
store i64 %72, i64* %17
%73 = load i64, i64* %16
%74 = sitofp i64 %73 to double
%75 = load i64, i64* %17
%76 = sitofp i64 %75 to double
%77 = fdiv double %74, %76
store double %77, double* %9
%78 = load double, double* %9
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %78)
br label %80
80: ; preds = %50
%81 = load i32, i32* %6
%82 = mul nsw i32 %81, 2
store i32 %82, i32* %6
br label %47
83: ; preds = %47
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %85
85: ; preds = %83, %39, %36
br label %86
86: ; preds = %85
%87 = load i32, i32* %7
%88 = add nsw i32 %87, 1
store i32 %88, i32* %7
br label %33
89: ; preds = %33
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %7
br label %91
91: ; preds = %144, %89
%92 = load i32, i32* %7
%93 = icmp sle i32 %92, 7
br i1 %93, label %94, label %147
94: ; preds = %91
%95 = load i32, i32* %7
%96 = icmp ne i32 %95, 4
br i1 %96, label %97, label %143
97: ; preds = %94
%98 = load i32, i32* %7
%99 = icmp ne i32 %98, 6
br i1 %99, label %100, label %143
100: ; preds = %97
%101 = load i32, i32* %7
%102 = load i32, i32* %7
%103 = add nsw i32 %102, 1
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %101, i32 %103)
store i32 4, i32* %6
br label %105
105: ; preds = %138, %100
%106 = load i32, i32* %6
%107 = icmp sle i32 %106, 32
br i1 %107, label %108, label %141
108: ; preds = %105
%109 = load i64, i64* %10
%110 = load i64, i64* %12
%111 = mul nsw i64 %109, %110
%112 = mul nsw i64 %111, 4
%113 = load i64, i64* %13
%114 = mul nsw i64 %112, %113
%115 = load i32, i32* %7
%116 = sext i32 %115 to i64
%117 = mul nsw i64 %114, %116
store i64 %117, i64* %16
%118 = load i32, i32* %6
%119 = sdiv i32 8192, %118
%120 = add nsw i32 8192, %119
%121 = sext i32 %120 to i64
store i64 %121, i64* %15
%122 = load i64, i64* %14
%123 = load i64, i64* %15
%124 = mul nsw i64 %122, %123
%125 = load i32, i32* %7
%126 = add nsw i32 %125, 1
%127 = sext i32 %126 to i64
%128 = mul nsw i64 %124, %127
%129 = load i64, i64* %11
%130 = mul nsw i64 %128, %129
store i64 %130, i64* %17
%131 = load i64, i64* %16
%132 = sitofp i64 %131 to double
%133 = load i64, i64* %17
%134 = sitofp i64 %133 to double
%135 = fdiv double %132, %134
store double %135, double* %9
%136 = load double, double* %9
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %136)
br label %138
138: ; preds = %108
%139 = load i32, i32* %6
%140 = mul nsw i32 %139, 2
store i32 %140, i32* %6
br label %105
141: ; preds = %105
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %143
143: ; preds = %141, %97, %94
br label %144
144: ; preds = %143
%145 = load i32, i32* %7
%146 = add nsw i32 %145, 1
store i32 %146, i32* %7
br label %91
147: ; preds = %91
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %7
br label %149
149: ; preds = %202, %147
%150 = load i32, i32* %7
%151 = icmp sle i32 %150, 7
br i1 %151, label %152, label %205
152: ; preds = %149
%153 = load i32, i32* %7
%154 = icmp ne i32 %153, 4
br i1 %154, label %155, label %201
155: ; preds = %152
%156 = load i32, i32* %7
%157 = icmp ne i32 %156, 6
br i1 %157, label %158, label %201
158: ; preds = %155
%159 = load i32, i32* %7
%160 = load i32, i32* %7
%161 = add nsw i32 %160, 1
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %159, i32 %161)
store i32 4, i32* %6
br label %163
163: ; preds = %196, %158
%164 = load i32, i32* %6
%165 = icmp sle i32 %164, 32
br i1 %165, label %166, label %199
166: ; preds = %163
%167 = load i64, i64* %10
%168 = load i64, i64* %12
%169 = mul nsw i64 %167, %168
%170 = mul nsw i64 %169, 6
%171 = load i64, i64* %13
%172 = mul nsw i64 %170, %171
%173 = load i32, i32* %7
%174 = sext i32 %173 to i64
%175 = mul nsw i64 %172, %174
store i64 %175, i64* %16
%176 = load i32, i32* %6
%177 = sdiv i32 8192, %176
%178 = add nsw i32 8192, %177
%179 = sext i32 %178 to i64
store i64 %179, i64* %15
%180 = load i64, i64* %14
%181 = load i64, i64* %15
%182 = mul nsw i64 %180, %181
%183 = load i32, i32* %7
%184 = add nsw i32 %183, 1
%185 = sext i32 %184 to i64
%186 = mul nsw i64 %182, %185
%187 = load i64, i64* %11
%188 = mul nsw i64 %186, %187
store i64 %188, i64* %17
%189 = load i64, i64* %16
%190 = sitofp i64 %189 to double
%191 = load i64, i64* %17
%192 = sitofp i64 %191 to double
%193 = fdiv double %190, %192
store double %193, double* %9
%194 = load double, double* %9
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %194)
br label %196
196: ; preds = %166
%197 = load i32, i32* %6
%198 = mul nsw i32 %197, 2
store i32 %198, i32* %6
br label %163
199: ; preds = %163
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %201
201: ; preds = %199, %155, %152
br label %202
202: ; preds = %201
%203 = load i32, i32* %7
%204 = add nsw i32 %203, 1
store i32 %204, i32* %7
br label %149
205: ; preds = %149
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"usage: dvbtrate <channel bandwidth>\0A\00"
@.str.2 = [17 x i8] c"coderate = %d/%d\00"
@.str.3 = [4 x i8] c" %f\00"
@str = [5 x i8] c"QPSK\00"
@str.7 = [7 x i8] c"QAM-16\00"
@str.8 = [7 x i8] c"QAM-64\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @atoi(i8* %10)
%12 = mul nsw i32 %11, 8000000
%13 = sext i32 %12 to i64
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%15 = mul nsw i64 %13, 2274048
br label %16
16: ; preds = %8, %44
%17 = phi i64 [ 1, %8 ], [ %21, %44 ]
%18 = trunc i64 %17 to i32
%19 = and i32 %18, 2147483645
%20 = icmp eq i32 %19, 4
%21 = add nuw nsw i64 %17, 1
br i1 %20, label %44, label %22
22: ; preds = %16
%23 = add nuw nsw i32 %18, 1
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %23)
%25 = mul nsw i64 %15, %17
%26 = sitofp i64 %25 to double
%27 = mul nuw i64 %21, 14622720
%28 = sitofp i64 %27 to double
%29 = fdiv double %26, %28
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %29)
%31 = mul nuw i64 %21, 13160448
%32 = sitofp i64 %31 to double
%33 = fdiv double %26, %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %33)
%35 = mul nuw i64 %21, 12429312
%36 = sitofp i64 %35 to double
%37 = fdiv double %26, %36
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %37)
%39 = mul nuw i64 %21, 12063744
%40 = sitofp i64 %39 to double
%41 = fdiv double %26, %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %41)
%43 = tail call i32 @putchar(i32 10)
br label %44
44: ; preds = %16, %22
%45 = icmp eq i64 %21, 8
br i1 %45, label %46, label %16
46: ; preds = %44
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%48 = mul nsw i64 %13, 4548096
br label %49
49: ; preds = %46, %77
%50 = phi i64 [ 1, %46 ], [ %54, %77 ]
%51 = trunc i64 %50 to i32
%52 = and i32 %51, 2147483645
%53 = icmp eq i32 %52, 4
%54 = add nuw nsw i64 %50, 1
br i1 %53, label %77, label %55
55: ; preds = %49
%56 = add nuw nsw i32 %51, 1
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %51, i32 %56)
%58 = mul nsw i64 %48, %50
%59 = sitofp i64 %58 to double
%60 = mul nuw i64 %54, 14622720
%61 = sitofp i64 %60 to double
%62 = fdiv double %59, %61
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %62)
%64 = mul nuw i64 %54, 13160448
%65 = sitofp i64 %64 to double
%66 = fdiv double %59, %65
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %66)
%68 = mul nuw i64 %54, 12429312
%69 = sitofp i64 %68 to double
%70 = fdiv double %59, %69
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %70)
%72 = mul nuw i64 %54, 12063744
%73 = sitofp i64 %72 to double
%74 = fdiv double %59, %73
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %74)
%76 = tail call i32 @putchar(i32 10)
br label %77
77: ; preds = %49, %55
%78 = icmp eq i64 %54, 8
br i1 %78, label %79, label %49
79: ; preds = %77
%80 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
%81 = mul nsw i64 %13, 6822144
br label %82
82: ; preds = %79, %110
%83 = phi i64 [ 1, %79 ], [ %87, %110 ]
%84 = trunc i64 %83 to i32
%85 = and i32 %84, 2147483645
%86 = icmp eq i32 %85, 4
%87 = add nuw nsw i64 %83, 1
br i1 %86, label %110, label %88
88: ; preds = %82
%89 = add nuw nsw i32 %84, 1
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %84, i32 %89)
%91 = mul nsw i64 %81, %83
%92 = sitofp i64 %91 to double
%93 = mul nuw i64 %87, 14622720
%94 = sitofp i64 %93 to double
%95 = fdiv double %92, %94
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %95)
%97 = mul nuw i64 %87, 13160448
%98 = sitofp i64 %97 to double
%99 = fdiv double %92, %98
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %99)
%101 = mul nuw i64 %87, 12429312
%102 = sitofp i64 %101 to double
%103 = fdiv double %92, %102
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %103)
%105 = mul nuw i64 %87, 12063744
%106 = sitofp i64 %105 to double
%107 = fdiv double %92, %106
%108 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %107)
%109 = tail call i32 @putchar(i32 10)
br label %110
110: ; preds = %82, %88
%111 = icmp eq i64 %87, 8
br i1 %111, label %112, label %82
112: ; preds = %110
ret i32 0
}