#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 */
char *fgets_or_exit(char *, int, int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
void skip_header(FILE *client) {
  int lignevide = 0;
  char buffer[80];
  char *str;
  while (lignevide == 0) {
    str = fgets_or_exit(buffer, 80, client);
    if (str != NULL && (strcmp(str, "\r\n") == 0 || strcmp(str, "\n") == 0))
      lignevide = 1;
  }
}


x86 assembly (clang, -O0):
<skip_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    119e <skip_header+0x7e>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x50,%esi
call   1030 <fgets_or_exit@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
je     1199 <skip_header+0x79>
mov    -0x68(%rbp),%rdi
lea    0xe97(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1192 <skip_header+0x72>
mov    -0x68(%rbp),%rdi
lea    0xe7e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1199 <skip_header+0x79>
movl   $0x1,-0xc(%rbp)
jmp    1133 <skip_header+0x13>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_header>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x50,%rsp
mov    %rdi,%r13
mov    %rsp,%r14
lea    0xec6(%rip),%r15
lea    0xec0(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x50,%esi
mov    %r13,%rdx
call   1030 <fgets_or_exit@plt>
test   %rax,%rax
je     1150 <skip_header+0x30>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1188 <skip_header+0x68>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1150 <skip_header+0x30>
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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