#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_or_exit(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ strcmp(char *, char *);
void skip_headers(FILE *client) {
  char client_line[200];
  while (1) {
    fgets_or_exit(client_line, 200, client);
    if (!strcmp(client_line, "\r\n") || !strcmp(client_line, "\n"))
      break;
  }
}


x86 assembly (clang, -O0):
<skip_headers>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xc8,%esi
call   1030 <fgets_or_exit@plt>
lea    -0xd0(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     117c <skip_headers+0x5c>
lea    -0xd0(%rbp),%rdi
lea    0xe93(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1181 <skip_headers+0x61>
jmp    1186 <skip_headers+0x66>
jmp    112f <skip_headers+0xf>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_headers>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xc8,%esi
mov    %rbx,%rdx
call   1030 <fgets_or_exit@plt>
mov    (%rsp),%eax
mov    %eax,%ecx
xor    $0xa0d,%ecx
movzbl 0x2(%rsp),%edx
or     %cx,%dx
je     114b <skip_headers+0x3b>
cmp    $0xa,%ax
jne    1120 <skip_headers+0x10>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

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

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