#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 */
char *decode_html_post(char *, char *);
scalar_t__ get_line(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char input[65536];
  char output[65536];
  while (get_line(input, stdin))
    printf("%s\n", decode_html_post(output, input));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20010,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10010(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
call   1040 <get_line@plt>
cmp    $0x0,%rax
je     1188 <main+0x58>
lea    -0x20010(%rbp),%rdi
lea    -0x10010(%rbp),%rsi
call   1030 <decode_html_post@plt>
mov    %rax,%rsi
lea    0xe82(%rip),%rdi
call   1050 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x20010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20008,%rsp
mov    0x2ea3(%rip),%r12
mov    (%r12),%esi
mov    %rsp,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
je     1197 <main+0x67>
lea    0x10000(%rsp),%r14
mov    %rsp,%rbx
lea    0xe98(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <decode_html_post@plt>
mov    %r15,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    (%r12),%esi
mov    %rbx,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x20008,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [65536 x i8]
%3 = alloca [65536 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %9, %0
%5 = getelementptr inbounds [65536 x i8], [65536 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i64 @get_line(i8* %5, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = getelementptr inbounds [65536 x i8], [65536 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [65536 x i8], [65536 x i8]* %2, i64 0, i64 0
%12 = call i8* @decode_html_post(i8* %10, i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [65536 x i8]
%2 = alloca [65536 x i8]
%3 = getelementptr inbounds [65536 x i8], [65536 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [65536 x i8], [65536 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @get_line(i8* %3, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %0, %8
%9 = call i8* @decode_html_post(i8* %4, i8* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @stdin
%12 = call i64 @get_line(i8* %3, i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %8
14: ; preds = %8, %0
ret i32 0
}