#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*/ fgets(char *, int, int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
void skip_headers(FILE *client) {
  char tmpBuffer[200];
  fgets(tmpBuffer, 200, client);
  while (strcmp(tmpBuffer, "\n") != 0 && strcmp(tmpBuffer, "\r\n") != 0) {
    fgets(tmpBuffer, 200, client);
  }
}


x86 assembly (clang, -O0):
<skip_headers>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xc8,%esi
call   1030 <fgets@plt>
lea    -0xd0(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xd1(%rbp)
je     118c <skip_headers+0x6c>
lea    -0xd0(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd1(%rbp)
mov    -0xd1(%rbp),%al
test   $0x1,%al
jne    119f <skip_headers+0x7f>
jmp    11b9 <skip_headers+0x99>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xc8,%esi
call   1030 <fgets@plt>
jmp    1144 <skip_headers+0x24>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_headers>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    %r15,%rdx
call   1030 <fgets@plt>
lea    0xeb6(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11a0 <skip_headers+0x80>
lea    0xea1(%rip),%r14
mov    %rsp,%rbx
lea    0xe98(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11a0 <skip_headers+0x80>
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    %r15,%rdx
call   1030 <fgets@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1170 <skip_headers+0x50>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define void @skip_headers(i32* %0) {
%2 = alloca i32*
%3 = alloca [200 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fgets(i8* %4, i32 200, i32* %5)
br label %7
7: ; preds = %17, %1
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ false, %7 ], [ %14, %11 ]
br i1 %16, label %17, label %21
17: ; preds = %15
%18 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%19 = load i32*, i32** %2
%20 = call i32 @fgets(i8* %18, i32 200, i32* %19)
br label %7
21: ; preds = %15
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define void @skip_headers(i32* nocapture %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @fgets(i8* %3, i32 200, i32* %0)
%5 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %1, %10
%8 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = call i32 @fgets(i8* %3, i32 200, i32* %0)
%12 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %10, %1
ret void
}