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

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ strncmp(char *, char *, size_t);
void put_line_strip(char *line, FILE *id) {
  char *ptmp;
  ptmp = line;
  if (!strncmp(ptmp, "c:tex-begin", (size_t)11))
    return;
  if (!strncmp(ptmp, "c:tex-end", (size_t)9))
    return;
  if (!strncmp(ptmp, "*:tex-begin", (size_t)11))
    return;
  if (!strncmp(ptmp, "*:tex-end", (size_t)9))
    return;
  if (!strncmp(ptmp, "*:tex-cvsid", (size_t)11)) {
    (void)fprintf(id, "%%\n%% $");
    (void)fprintf(id, "Id$\n%%\n");
    return;
  }
  if (!strncmp(ptmp, "c:tex-cvsid", (size_t)11)) {
    (void)fprintf(id, "%%\n%% $");
    (void)fprintf(id, "Id$\n%%\n");
    return;
  }
  if (!strncmp(ptmp, "*:tex-", (size_t)6))
    ptmp += 6;
  if (!strncmp(ptmp, "c:tex-", (size_t)6))
    ptmp += 6;
  (void)fprintf(id, "%s\n", ptmp);
  (void)fflush(id);
}


x86 assembly (clang, -O0):
<put_line_strip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    116b <put_line_strip+0x3b>
jmp    12d5 <put_line_strip+0x1a5>
mov    -0x18(%rbp),%rdi
lea    0xe96(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    118e <put_line_strip+0x5e>
jmp    12d5 <put_line_strip+0x1a5>
mov    -0x18(%rbp),%rdi
lea    0xe7d(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11b1 <put_line_strip+0x81>
jmp    12d5 <put_line_strip+0x1a5>
mov    -0x18(%rbp),%rdi
lea    0xe66(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11d4 <put_line_strip+0xa4>
jmp    12d5 <put_line_strip+0x1a5>
mov    -0x18(%rbp),%rdi
lea    0xe4d(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    121b <put_line_strip+0xeb>
mov    -0x10(%rbp),%rdi
lea    0xe3b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe31(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12d5 <put_line_strip+0x1a5>
mov    -0x18(%rbp),%rdi
lea    0xe22(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1262 <put_line_strip+0x132>
mov    -0x10(%rbp),%rdi
lea    0xdf4(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xdea(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12d5 <put_line_strip+0x1a5>
mov    -0x18(%rbp),%rdi
lea    0xde7(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    128c <put_line_strip+0x15c>
mov    -0x18(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xdc4(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12b6 <put_line_strip+0x186>
mov    -0x18(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xd9d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_line_strip>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebe(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1232 <put_line_strip+0x102>
lea    0xeb1(%rip),%rsi
mov    $0x9,%edx
mov    %rbx,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1232 <put_line_strip+0x102>
lea    0xe9f(%rip),%rsi
mov    $0xb,%edx
mov    %rbx,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1232 <put_line_strip+0x102>
lea    0xe8f(%rip),%rsi
mov    $0x9,%edx
mov    %rbx,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1232 <put_line_strip+0x102>
lea    0xe7d(%rip),%rsi
mov    $0xb,%edx
mov    %rbx,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1238 <put_line_strip+0x108>
lea    0xe81(%rip),%rsi
mov    $0xb,%edx
mov    %rbx,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1238 <put_line_strip+0x108>
lea    0xe75(%rip),%rsi
mov    $0x6,%edx
mov    %rbx,%rdi
call   1030 <strncmp@plt>
lea    0x6(%rbx),%r15
test   %eax,%eax
cmovne %rbx,%r15
lea    0xe5e(%rip),%rsi
mov    $0x6,%edx
mov    %r15,%rdi
call   1030 <strncmp@plt>
lea    0x6(%r15),%rdx
test   %eax,%eax
cmovne %r15,%rdx
lea    0xe47(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <fflush@plt>
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xdf9(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xdf0(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"c:tex-begin\00"
@.str.1 = [10 x i8] c"c:tex-end\00"
@.str.2 = [12 x i8] c"*:tex-begin\00"
@.str.3 = [10 x i8] c"*:tex-end\00"
@.str.4 = [12 x i8] c"*:tex-cvsid\00"
@.str.5 = [8 x i8] c"%%\0A%% $\00"
@.str.6 = [8 x i8] c"Id$\0A%%\0A\00"
@.str.7 = [12 x i8] c"c:tex-cvsid\00"
@.str.8 = [7 x i8] c"*:tex-\00"
@.str.9 = [7 x i8] c"c:tex-\00"
@.str.10 = [4 x i8] c"%s\0A\00"
define void @put_line_strip(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 11)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
br label %64
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = call i32 @strncmp(i8* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 9)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %11
br label %64
16: ; preds = %11
%17 = load i8*, i8** %5
%18 = call i32 @strncmp(i8* %17, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i64 11)
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %16
br label %64
21: ; preds = %16
%22 = load i8*, i8** %5
%23 = call i32 @strncmp(i8* %22, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 9)
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %21
br label %64
26: ; preds = %21
%27 = load i8*, i8** %5
%28 = call i32 @strncmp(i8* %27, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i64 11)
%29 = icmp ne i32 %28, 0
br i1 %29, label %35, label %30
30: ; preds = %26
%31 = load i32*, i32** %4
%32 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%33 = load i32*, i32** %4
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %64
35: ; preds = %26
%36 = load i8*, i8** %5
%37 = call i32 @strncmp(i8* %36, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i64 11)
%38 = icmp ne i32 %37, 0
br i1 %38, label %44, label %39
39: ; preds = %35
%40 = load i32*, i32** %4
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%42 = load i32*, i32** %4
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %64
44: ; preds = %35
%45 = load i8*, i8** %5
%46 = call i32 @strncmp(i8* %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i64 6)
%47 = icmp ne i32 %46, 0
br i1 %47, label %51, label %48
48: ; preds = %44
%49 = load i8*, i8** %5
%50 = getelementptr inbounds i8, i8* %49, i64 6
store i8* %50, i8** %5
br label %51
51: ; preds = %48, %44
%52 = load i8*, i8** %5
%53 = call i32 @strncmp(i8* %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i64 6)
%54 = icmp ne i32 %53, 0
br i1 %54, label %58, label %55
55: ; preds = %51
%56 = load i8*, i8** %5
%57 = getelementptr inbounds i8, i8* %56, i64 6
store i8* %57, i8** %5
br label %58
58: ; preds = %55, %51
%59 = load i32*, i32** %4
%60 = load i8*, i8** %5
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %60)
%62 = load i32*, i32** %4
%63 = call i32 @fflush(i32* %62)
br label %64
64: ; preds = %58, %39, %30, %25, %20, %15, %10
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"c:tex-begin\00"
@.str.1 = [10 x i8] c"c:tex-end\00"
@.str.2 = [12 x i8] c"*:tex-begin\00"
@.str.3 = [10 x i8] c"*:tex-end\00"
@.str.4 = [12 x i8] c"*:tex-cvsid\00"
@.str.5 = [8 x i8] c"%%\0A%% $\00"
@.str.6 = [8 x i8] c"Id$\0A%%\0A\00"
@.str.7 = [12 x i8] c"c:tex-cvsid\00"
@.str.8 = [7 x i8] c"*:tex-\00"
@.str.9 = [7 x i8] c"c:tex-\00"
@.str.10 = [4 x i8] c"%s\0A\00"
define void @put_line_strip(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 11)
%4 = icmp eq i32 %3, 0
br i1 %4, label %37, label %5
5: ; preds = %2
%6 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 9)
%7 = icmp eq i32 %6, 0
br i1 %7, label %37, label %8
8: ; preds = %5
%9 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i64 11)
%10 = icmp eq i32 %9, 0
br i1 %10, label %37, label %11
11: ; preds = %8
%12 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 9)
%13 = icmp eq i32 %12, 0
br i1 %13, label %37, label %14
14: ; preds = %11
%15 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i64 11)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %37
20: ; preds = %14
%21 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i64 11)
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %37
26: ; preds = %20
%27 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i64 6)
%28 = icmp eq i32 %27, 0
%29 = select i1 %28, i64 6, i64 0
%30 = getelementptr i8, i8* %0, i64 %29
%31 = tail call i32 @strncmp(i8* dereferenceable(1) %30, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i64 6)
%32 = icmp eq i32 %31, 0
%33 = select i1 %32, i64 6, i64 0
%34 = getelementptr i8, i8* %30, i64 %33
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %34)
%36 = tail call i32 @fflush(i32* %1)
br label %37
37: ; preds = %11, %8, %5, %2, %26, %23, %17
ret void
}