#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 cfstate {
  int dummy;
};

/* Variables and functions */
char **getcfline(struct cfstate *);
int /*<<< orphan*/ strcmp(char *, char *);
void skipcfblock(struct cfstate *s) {
  char **w;
  while (1) {
    w = getcfline(s);
    if (!strcmp(w[0], "end") || !strcmp(w[0], "eof"))
      return;
  }
}


x86 assembly (clang, -O0):
<skipcfblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getcfline@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     1171 <skipcfblock+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xea1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1177 <skipcfblock+0x57>
add    $0x10,%rsp
pop    %rbp
ret
jmp    112c <skipcfblock+0xc>

x86 assembly (clang, -O2):
<skipcfblock>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
lea    0xece(%rip),%r14
lea    0xecb(%rip),%r15
nopl   0x0(%rax)
mov    %r12,%rdi
call   1040 <getcfline@plt>
mov    (%rax),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1169 <skipcfblock+0x49>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    1140 <skipcfblock+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.cfstate = type { i32 }
@.str = [4 x i8] c"end\00"
@.str.1 = [4 x i8] c"eof\00"
define void @skipcfblock(%struct.cfstate* %0) {
br label %2
2: ; preds = %7, %1
%3 = tail call i8** @getcfline(%struct.cfstate* %0)
%4 = load i8*, i8** %3
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %7, %2
ret void
}