#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isspace(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
char *skip_column_wanted(char *p, int cnt, char *argv) {
  if (*p == '\0') {
    fprintf(stdout, "ERROR: Not enough columns in line %d file %s\n", cnt,
            argv);
    fflush(stdout);
    exit(0);
  }
  while (!isspace(*p++)) {
    if (*p == '\0')
      return (p);
  }
  return (p);
}


x86 assembly (clang, -O0):
<skip_column_wanted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1194 <skip_column_wanted+0x54>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    0xe86(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1060 <exit@plt>
jmp    1199 <skip_column_wanted+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11c5 <skip_column_wanted+0x85>
jmp    11e7 <skip_column_wanted+0xa7>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11e2 <skip_column_wanted+0xa2>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11ef <skip_column_wanted+0xaf>
jmp    1199 <skip_column_wanted+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_column_wanted>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     116f <skip_column_wanted+0x2f>
add    $0x1,%rdi
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rbx
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    116a <skip_column_wanted+0x2a>
movzbl (%rbx),%eax
lea    0x1(%rbx),%rdi
test   %al,%al
jne    1150 <skip_column_wanted+0x10>
mov    %rbx,%rax
pop    %rbx
ret
mov    %rdx,%rcx
mov    %esi,%edx
mov    0x2e65(%rip),%rbx
mov    (%rbx),%edi
lea    0xe7c(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [46 x i8] c"ERROR: Not enough columns in line %d file %s\0A\00"
define i8* @skip_column_wanted(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %3
%13 = load i32, i32* @stdout
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %15)
%17 = load i32, i32* @stdout
%18 = call i32 @fflush(i32 %17)
%19 = call i32 @exit(i32 0)
unreachable
20: ; preds = %3
br label %21
21: ; preds = %36, %20
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %5
%24 = load i8, i8* %22
%25 = sext i8 %24 to i32
%26 = call i32 @isspace(i32 %25)
%27 = icmp ne i32 %26, 0
%28 = xor i1 %27, true
br i1 %28, label %29, label %37
29: ; preds = %21
%30 = load i8*, i8** %5
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %29
%35 = load i8*, i8** %5
store i8* %35, i8** %4
br label %39
36: ; preds = %29
br label %21
37: ; preds = %21
%38 = load i8*, i8** %5
store i8* %38, i8** %4
br label %39
39: ; preds = %37, %34
%40 = load i8*, i8** %4
ret i8* %40
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [46 x i8] c"ERROR: Not enough columns in line %d file %s\0A\00"
define i8* @skip_column_wanted(i8* %0, i32 %1, i8* %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fflush(i32 %9)
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %3, %19
%13 = phi i8 [ %20, %19 ], [ %4, %3 ]
%14 = phi i8* [ %15, %19 ], [ %0, %3 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = sext i8 %13 to i32
%17 = tail call i32 @isspace(i32 %16)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %12
%20 = load i8, i8* %15
%21 = icmp eq i8 %20, 0
br i1 %21, label %22, label %12
22: ; preds = %12, %19
ret i8* %15
}