#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*/ free(char *);
size_t getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stdin;
scalar_t__ strncmp(char *, char *, int);
char *strtok(char *, char *);
int main(int argc, char **argv) {
  int k = 0, t;
  char *entry;
  char *line = NULL;
  size_t size, n;
  while ((n = getline(&line, &size, stdin)) != -1) {
    if (line[0] == '#')
      continue;
    k++;
    t = 1;
    entry = strtok(line, "\t");
    while (entry != NULL) {
      if (strncmp("0|0", entry, 3) != 0)
        printf("%d\t%d\n", k, t);
      entry = strtok(NULL, "\t");
      t++;
    }
  }
  if (line)
    free(line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2e6c(%rip),%rax
mov    (%rax),%edx
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1070 <getline@plt>
mov    %rax,-0x38(%rbp)
cmp    $0xffffffffffffffff,%rax
je     1235 <main+0xe5>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    11ae <main+0x5e>
jmp    1175 <main+0x25>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xe37(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1230 <main+0xe0>
mov    -0x20(%rbp),%rsi
lea    0xe1a(%rip),%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     120e <main+0xbe>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xdfd(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xde7(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11d2 <main+0x82>
jmp    1175 <main+0x25>
cmpq   $0x0,-0x28(%rbp)
je     1249 <main+0xf9>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
xor    %r14d,%r14d
mov    0x2e77(%rip),%r13
lea    0x8(%rsp),%r15
lea    0x10(%rsp),%rbx
lea    0xe7e(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x0(%r13),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <getline@plt>
mov    0x8(%rsp),%rdi
cmp    $0xffffffffffffffff,%rax
je     120e <main+0xbe>
cmpb   $0x23,(%rdi)
je     1190 <main+0x40>
add    $0x1,%r14d
mov    %r12,%rsi
call   1060 <strtok@plt>
test   %rax,%rax
je     1190 <main+0x40>
mov    $0x1,%ebp
jmp    11e2 <main+0x92>
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r12,%rsi
call   1060 <strtok@plt>
add    $0x1,%ebp
test   %rax,%rax
je     1190 <main+0x40>
lea    0xe19(%rip),%rdi
mov    %rax,%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     11d0 <main+0x80>
lea    0xe04(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
call   1050 <printf@plt>
jmp    11d0 <main+0x80>
test   %rdi,%rdi
je     1218 <main+0xc8>
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [2 x i8] c"\09\00"
@.str.1 = [4 x i8] c"0|0\00"
@.str.2 = [7 x i8] c"%d\09%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i8* null, i8** %9
br label %12
12: ; preds = %43, %22, %2
%13 = load i32, i32* @stdin
%14 = call i64 @getline(i8** %9, i64* %10, i32 %13)
store i64 %14, i64* %11
%15 = icmp ne i64 %14, -1
br i1 %15, label %16, label %44
16: ; preds = %12
%17 = load i8*, i8** %9
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 35
br i1 %21, label %22, label %23
22: ; preds = %16
br label %12
23: ; preds = %16
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
store i32 1, i32* %7
%26 = load i8*, i8** %9
%27 = call i8* @strtok(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %27, i8** %8
br label %28
28: ; preds = %39, %23
%29 = load i8*, i8** %8
%30 = icmp ne i8* %29, null
br i1 %30, label %31, label %43
31: ; preds = %28
%32 = load i8*, i8** %8
%33 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %32, i32 3)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i32, i32* %6
%37 = load i32, i32* %7
%38 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %36, i32 %37)
br label %39
39: ; preds = %35, %31
%40 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %40, i8** %8
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 1
store i32 %42, i32* %7
br label %28
43: ; preds = %28
br label %12
44: ; preds = %12
%45 = load i8*, i8** %9
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i8*, i8** %9
%49 = call i32 @free(i8* %48)
br label %50
50: ; preds = %47, %44
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c"\09\00"
@.str.1 = [4 x i8] c"0|0\00"
@.str.2 = [7 x i8] c"%d\09%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%6 = bitcast i64* %4 to i8*
br label %7
7: ; preds = %21, %2
%8 = phi i32 [ 0, %2 ], [ %18, %21 ]
br label %9
9: ; preds = %7, %14
%10 = load i32, i32* @stdin
%11 = call i64 @getline(i8** %3, i64* %4, i32 %10)
%12 = icmp eq i64 %11, -1
%13 = load i8*, i8** %3
br i1 %12, label %33, label %14
14: ; preds = %9
%15 = load i8, i8* %13
%16 = icmp eq i8 %15, 35
br i1 %16, label %9, label %17
17: ; preds = %14
%18 = add nuw nsw i32 %8, 1
%19 = call i8* @strtok(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i8* %19, null
br i1 %20, label %21, label %22
21: ; preds = %29, %17
br label %7
22: ; preds = %17, %29
%23 = phi i8* [ %30, %29 ], [ %19, %17 ]
%24 = phi i32 [ %31, %29 ], [ 1, %17 ]
%25 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %23, i32 3)
%26 = icmp eq i64 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %22
%28 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %24)
br label %29
29: ; preds = %27, %22
%30 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = add nuw nsw i32 %24, 1
%32 = icmp eq i8* %30, null
br i1 %32, label %21, label %22
33: ; preds = %9
%34 = icmp eq i8* %13, null
br i1 %34, label %37, label %35
35: ; preds = %33
%36 = call i32 @free(i8* %13)
br label %37
37: ; preds = %35, %33
ret i32 0
}