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

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printConfig();
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strncmp(char *, char *, int);
int main() {
  char line[1000];
  while (fgets(line, sizeof(line), stdin) != NULL) {
    if (strncmp(line, "@@insert_config_here", 20) == 0) {
      printConfig();
    } else {
      fputs(line, stdout);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    0x2e88(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     11be <main+0x7e>
lea    -0x3f0(%rbp),%rdi
lea    0xe7c(%rip),%rsi
mov    $0x14,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11a4 <main+0x64>
mov    $0x0,%al
call   1060 <printConfig@plt>
jmp    11b9 <main+0x79>
lea    -0x3f0(%rbp),%rdi
mov    0x2e26(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
jmp    1152 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x3e8,%rsp
mov    0x2e93(%rip),%r15
mov    (%r15),%edx
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     11bf <main+0x7f>
lea    0xe8f(%rip),%r14
mov    %rsp,%rbx
mov    0x2e5d(%rip),%r12
jmp    11a1 <main+0x61>
nopl   (%rax)
mov    (%r12),%esi
mov    %rbx,%rdi
call   1040 <fputs@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     11bf <main+0x7f>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x14,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    1180 <main+0x40>
xor    %eax,%eax
call   1060 <printConfig@plt>
jmp    118c <main+0x4c>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [21 x i8] c"@@insert_config_here\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %18, %0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32* @fgets(i8* %4, i32 1000, i32 %5)
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %19
8: ; preds = %3
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%10 = call i64 @strncmp(i8* %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 20)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @printConfig()
br label %18
14: ; preds = %8
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%16 = load i32, i32* @stdout
%17 = call i32 @fputs(i8* %15, i32 %16)
br label %18
18: ; preds = %14, %12
br label %3
19: ; preds = %3
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [21 x i8] c"@@insert_config_here\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32* @fgets(i8* %2, i32 1000, i32 %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %18, label %6
6: ; preds = %0, %14
%7 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 20)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @printConfig()
br label %14
11: ; preds = %6
%12 = load i32, i32* @stdout
%13 = call i32 @fputs(i8* %2, i32 %12)
br label %14
14: ; preds = %11, %9
%15 = load i32, i32* @stdin
%16 = call i32* @fgets(i8* %2, i32 1000, i32 %15)
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %6
18: ; preds = %14, %0
ret i32 0
}