#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);
int /*<<< orphan*/ printf(char *, char *, int, ...);
char *strtok(int /*<<< orphan*/ *, char *);
char *next_token(char *input_file, int i, int j) {
  char *token = strtok(NULL, " \t\n");
  if (!token) {
    if (j == 0)
      printf("Error while reading individual informations of %s"
             " file at line %d.\n\n",
             input_file, i);
    else
      printf("Error while reading %s file at line %d, "
             "SNP %d.\n\n",
             input_file, i, j);
    exit(1);
  }
  return token;
}


x86 assembly (clang, -O0):
<next_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xeb3(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11a7 <next_token+0x77>
cmpl   $0x0,-0x10(%rbp)
jne    1185 <next_token+0x55>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119d <next_token+0x6d>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_token>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xebd(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
test   %rax,%rax
je     1154 <next_token+0x24>
pop    %rbx
pop    %r14
pop    %rbp
ret
test   %ebp,%ebp
jne    1176 <next_token+0x46>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c" \09\0A\00"
@.str.1 = [69 x i8] c"Error while reading individual informations of %s file at line %d.\0A\0A\00"
@.str.2 = [50 x i8] c"Error while reading %s file at line %d, SNP %d.\0A\0A\00"
define i8* @next_token(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = icmp ne i8* %9, null
br i1 %10, label %25, label %11
11: ; preds = %3
%12 = load i32, i32* %6
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0), i8* %15, i32 %16)
br label %23
18: ; preds = %11
%19 = load i8*, i8** %4
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i8* %19, i32 %20, i32 %21)
br label %23
23: ; preds = %18, %14
%24 = call i32 @exit(i32 1)
unreachable
25: ; preds = %3
%26 = load i8*, i8** %7
ret i8* %26
}

LLVM IR (-O2):
@.str = [4 x i8] c" \09\0A\00"
@.str.1 = [69 x i8] c"Error while reading individual informations of %s file at line %d.\0A\0A\00"
@.str.2 = [50 x i8] c"Error while reading %s file at line %d, SNP %d.\0A\0A\00"
define i8* @next_token(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = icmp eq i32 %2, 0
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %1)
br label %12
10: ; preds = %6
%11 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 %1, i32 %2)
br label %12
12: ; preds = %10, %8
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %3
ret i8* %4
}