#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 */
struct bloom {
  int dummy;
};
typedef int /*<<< orphan*/ line;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ bloom_insert(struct bloom *, char *);
int /*<<< orphan*/ email_normalize(char *);
int /*<<< orphan*/ feof(int /*<<< orphan*/);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdin;
void filter_fill(struct bloom *filter, FILE *in) {
  char line[128];
  while (!feof(stdin)) {
    if (fgets(line, sizeof(line), in)) {
      email_normalize(line);
      if (*line)
        bloom_insert(filter, line);
    }
  }
}


x86 assembly (clang, -O0):
<filter_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1176 <filter_fill+0x36>
jmp    11c8 <filter_fill+0x88>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x80,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     11c3 <filter_fill+0x83>
lea    -0x90(%rbp),%rdi
call   1030 <email_normalize@plt>
cmpb   $0x0,-0x90(%rbp)
je     11be <filter_fill+0x7e>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1060 <bloom_insert@plt>
jmp    11c3 <filter_fill+0x83>
jmp    1153 <filter_fill+0x13>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_fill>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%r15
mov    %rdi,%r14
mov    0x2e8d(%rip),%r12
mov    (%r12),%edi
call   1050 <feof@plt>
test   %eax,%eax
je     1177 <filter_fill+0x37>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    %rsp,%rbx
jmp    118d <filter_fill+0x4d>
nopl   0x0(%rax)
mov    (%r12),%edi
call   1050 <feof@plt>
test   %eax,%eax
jne    1168 <filter_fill+0x28>
mov    %rbx,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
je     1180 <filter_fill+0x40>
mov    %rbx,%rdi
call   1030 <email_normalize@plt>
cmpb   $0x0,(%rsp)
je     1180 <filter_fill+0x40>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <bloom_insert@plt>
jmp    1180 <filter_fill+0x40>

LLVM IR (-O0):
%struct.bloom = type { i32 }
@stdin = global i32 0
define void @filter_fill(%struct.bloom* %0, i32* %1) {
%3 = alloca %struct.bloom*
%4 = alloca i32*
%5 = alloca [128 x i8]
store %struct.bloom* %0, %struct.bloom** %3
store i32* %1, i32** %4
br label %6
6: ; preds = %27, %2
%7 = load i32, i32* @stdin
%8 = call i32 @feof(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %28
11: ; preds = %6
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%13 = load i32*, i32** %4
%14 = call i64 @fgets(i8* %12, i32 128, i32* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %27
16: ; preds = %11
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%18 = call i32 @email_normalize(i8* %17)
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%20 = load i8, i8* %19
%21 = icmp ne i8 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %16
%23 = load %struct.bloom*, %struct.bloom** %3
%24 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%25 = call i32 @bloom_insert(%struct.bloom* %23, i8* %24)
br label %26
26: ; preds = %22, %16
br label %27
27: ; preds = %26, %11
br label %6
28: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.bloom = type { i32 }
@stdin = global i32 0
define void @filter_fill(%struct.bloom* %0, i32* nocapture %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @feof(i32 %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %2, %17
%9 = call i64 @fgets(i8* %4, i32 128, i32* %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = call i32 @email_normalize(i8* %4)
%13 = load i8, i8* %4
%14 = icmp eq i8 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %11
%16 = call i32 @bloom_insert(%struct.bloom* %0, i8* %4)
br label %17
17: ; preds = %11, %15, %8
%18 = load i32, i32* @stdin
%19 = call i32 @feof(i32 %18)
%20 = icmp eq i32 %19, 0
br i1 %20, label %8, label %21
21: ; preds = %17, %2
ret void
}