#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 /*<<< orphan*/ DeTab(char *, char *, int);
int GetLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char input[1024];
  char line[1024 * 2];
  int len;
  while ((len = GetLine(input, 1024)) > 0) {
    DeTab(input, line, 8);
    printf("%s", line);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    $0x400,%esi
call   1030 <GetLine@plt>
mov    %eax,-0xc14(%rbp)
cmp    $0x0,%eax
jle    1192 <main+0x62>
lea    -0x410(%rbp),%rdi
lea    -0xc10(%rbp),%rsi
mov    $0x8,%edx
call   1050 <DeTab@plt>
lea    -0xc10(%rbp),%rsi
lea    0xe78(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0xc20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xc00,%rsp
mov    %rsp,%rdi
mov    $0x400,%esi
call   1030 <GetLine@plt>
test   %eax,%eax
jle    118c <main+0x5c>
mov    %rsp,%r14
lea    0x400(%rsp),%rbx
lea    0xea1(%rip),%r15
nop
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1050 <DeTab@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x400,%esi
call   1030 <GetLine@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0xc00,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%5 = call i32 @GetLine(i8* %3, i32 1024)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = call i32 @DeTab(i8* %3, i8* %4, i32 8)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i32 @GetLine(i8* %3, i32 1024)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %0
ret i32 0
}