#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 */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int strcmp(char const *, char const *);
int verify_header(const char *line) {
  int rc;
  const char *header = "name\t\t"
                       "active_count\tevent_count\twakeup_count\t"
                       "expire_count\tactive_since\ttotal_time\t"
                       "max_time\tlast_change\tprevent_suspend_time\n";
  rc = strcmp(line, header);
  if (rc) {
    fprintf(stderr, "wakeup_sources header differs from expected\n");
    fprintf(stderr, "Expected:\n%s\nActual:\n\%s\n", header, line);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<verify_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1193 <verify_header+0x73>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xf1b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xf29(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    119a <verify_header+0x7a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_header>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1171 <verify_header+0x51>
mov    0x2ea2(%rip),%r14
mov    (%r14),%edi
lea    0xf34(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xf50(%rip),%rsi
lea    0xea0(%rip),%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    1173 <verify_header+0x53>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [124 x i8] c"name\09\09active_count\09event_count\09wakeup_count\09expire_count\09active_since\09total_time\09max_time\09last_change\09prevent_suspend_time\0A\00"
@stderr = global i32 0
@.str.1 = [45 x i8] c"wakeup_sources header differs from expected\0A\00"
@.str.2 = [25 x i8] c"Expected:\0A%s\0AActual:\0A%s\0A\00"
define i32 @verify_header(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %5
%8 = call i32 @strcmp(i8* %6, i8* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %5
%16 = load i8*, i8** %3
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %15, i8* %16)
store i32 -1, i32* %2
br label %19
18: ; preds = %1
store i32 0, i32* %2
br label %19
19: ; preds = %18, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [124 x i8] c"name\09\09active_count\09event_count\09wakeup_count\09expire_count\09active_since\09total_time\09max_time\09last_change\09prevent_suspend_time\0A\00"
@stderr = global i32 0
@.str.1 = [45 x i8] c"wakeup_sources header differs from expected\0A\00"
@.str.2 = [25 x i8] c"Expected:\0A%s\0AActual:\0A%s\0A\00"
define i32 @verify_header(i8* %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(124) getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %10
}