#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 */
double M_SQRT2;
scalar_t__ dcd11(double *, char *);
int /*<<< orphan*/ enc11(char *, double);
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main(int ac, char **av) {
  char buf[1024];
  double x;
  while (fgets(buf, 1023, stdin)) {
    int i, l = strlen(buf);
    if (buf[l - 1] == 10)
      buf[--l] = 0;
    if (buf[0] == '^' && buf[1] == '<')
      for (i = 2; dcd11(&x, buf + i); i += 11)
        enc11(buf + i, x * (.5 * M_SQRT2));
    puts(buf);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    0x2e71(%rip),%rax
mov    (%rax),%edx
mov    $0x3ff,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1284 <main+0x134>
lea    -0x410(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x420(%rbp)
mov    -0x420(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x410(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    11d4 <main+0x84>
mov    -0x420(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x420(%rbp)
cltq
movb   $0x0,-0x410(%rbp,%rax,1)
movsbl -0x410(%rbp),%eax
cmp    $0x5e,%eax
jne    1273 <main+0x123>
movsbl -0x40f(%rbp),%eax
cmp    $0x3c,%eax
jne    1273 <main+0x123>
movl   $0x2,-0x41c(%rbp)
lea    -0x410(%rbp),%rsi
movslq -0x41c(%rbp),%rax
add    %rax,%rsi
lea    -0x418(%rbp),%rdi
call   1070 <dcd11@plt>
cmp    $0x0,%rax
je     126e <main+0x11e>
lea    -0x410(%rbp),%rdi
movslq -0x41c(%rbp),%rax
add    %rax,%rdi
movsd  -0x418(%rbp),%xmm0
ff
movsd  0xdba(%rip),%xmm1
mov    0x2d8b(%rip),%rax
mulsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
call   1060 <enc11@plt>
mov    -0x41c(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x41c(%rbp)
jmp    11fe <main+0xae>
jmp    1273 <main+0x123>
lea    -0x410(%rbp),%rdi
call   1030 <puts@plt>
jmp    1169 <main+0x19>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    0x2e80(%rip),%r13
mov    0x0(%r13),%edx
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    $0x3ff,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     1239 <main+0xe9>
lea    0x12(%rsp),%r14
lea    0x8(%rsp),%r12
mov    0x2e40(%rip),%rbp
jmp    11be <main+0x6e>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    0x0(%r13),%edx
mov    %r15,%rdi
mov    $0x3ff,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     1239 <main+0xe9>
mov    %r15,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%r15,1)
jne    11d5 <main+0x85>
movb   $0x0,0xf(%rsp,%rax,1)
cmpb   $0x5e,0x10(%rsp)
jne    11a0 <main+0x50>
cmpb   $0x3c,0x11(%rsp)
jne    11a0 <main+0x50>
mov    %r12,%rdi
mov    %r14,%rsi
call   1070 <dcd11@plt>
movsd  0xe0a(%rip),%xmm1
test   %rax,%rax
je     11a0 <main+0x50>
lea    0x1d(%rsp),%rbx
lea    -0xb(%rbx),%rdi
movsd  0x0(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1060 <enc11@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1070 <dcd11@plt>
movsd  0xdd5(%rip),%xmm1
add    $0xb,%rbx
test   %rax,%rax
jne    1200 <main+0xb0>
jmp    11a0 <main+0x50>
xor    %eax,%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@M_SQRT2 = global double 0.000000e+00
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1024 x i8]
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %10
10: ; preds = %62, %2
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i64 @fgets(i8* %11, i32 1023, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %65
15: ; preds = %10
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %9
%18 = load i32, i32* %9
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 10
br i1 %24, label %25, label %30
25: ; preds = %15
%26 = load i32, i32* %9
%27 = add nsw i32 %26, -1
store i32 %27, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %28
store i8 0, i8* %29
br label %30
30: ; preds = %25, %15
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 94
br i1 %34, label %35, label %62
35: ; preds = %30
%36 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 1
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 60
br i1 %39, label %40, label %62
40: ; preds = %35
store i32 2, i32* %8
br label %41
41: ; preds = %58, %40
%42 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%43 = load i32, i32* %8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = call i64 @dcd11(double* %7, i8* %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %61
48: ; preds = %41
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%50 = load i32, i32* %8
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = load double, double* %7
%54 = load double, double* @M_SQRT2
%55 = fmul double 5.000000e-01, %54
%56 = fmul double %53, %55
%57 = call i32 @enc11(i8* %52, double %56)
br label %58
58: ; preds = %48
%59 = load i32, i32* %8
%60 = add nsw i32 %59, 11
store i32 %60, i32* %8
br label %41
61: ; preds = %41
br label %62
62: ; preds = %61, %35, %30
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%64 = call i32 @puts(i8* %63)
br label %10
65: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@M_SQRT2 = global double 0.000000e+00
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = alloca double
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = bitcast double* %4 to i8*
%7 = load i32, i32* @stdin
%8 = call i64 @fgets(i8* %5, i32 1023, i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %47, label %10
10: ; preds = %2
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 2
br label %13
13: ; preds = %10, %42
%14 = call i32 @strlen(i8* %5)
%15 = add nsw i32 %14, -1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 10
br i1 %19, label %20, label %21
20: ; preds = %13
store i8 0, i8* %17
br label %21
21: ; preds = %20, %13
%22 = load i8, i8* %5
%23 = icmp eq i8 %22, 94
%24 = load i8, i8* %11
%25 = icmp eq i8 %24, 60
%26 = select i1 %23, i1 %25, i1 false
br i1 %26, label %27, label %42
27: ; preds = %21
%28 = call i64 @dcd11(double* %4, i8* %12)
%29 = icmp eq i64 %28, 0
br i1 %29, label %42, label %30
30: ; preds = %27, %30
%31 = phi i64 [ %38, %30 ], [ 2, %27 ]
%32 = phi i8* [ %39, %30 ], [ %12, %27 ]
%33 = load double, double* %4
%34 = load double, double* @M_SQRT2
%35 = fmul double %34, 5.000000e-01
%36 = fmul double %33, %35
%37 = call i32 @enc11(i8* %32, double %36)
%38 = add nuw i64 %31, 11
%39 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %38
%40 = call i64 @dcd11(double* %4, i8* %39)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %30
42: ; preds = %30, %27, %21
%43 = call i32 @puts(i8* %5)
%44 = load i32, i32* @stdin
%45 = call i64 @fgets(i8* %5, i32 1023, i32 %44)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %13
47: ; preds = %42, %2
ret i32 0
}