#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 *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *strtok(char *, char *);
void read_cnv_info(char *token, char **infos, char *szbuff, int j) {
  int ip;
  token = strtok(szbuff, " \t\n");
  if (!token) {
    printf("Error while reading SNPs informations at line %d.\n", j);
    exit(1);
  }
  strcpy(infos[0], token);
  for (ip = 1; ip < 9; ip++) {
    token = strtok(NULL, " \t\n");
    if (!token) {
      printf("Error while reading SNPs informations at line %d.\n", j);
      exit(1);
    }
    strcpy(infos[ip], token);
  }
}


x86 assembly (clang, -O0):
<read_cnv_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    118f <read_cnv_info+0x4f>
mov    -0x1c(%rbp),%esi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x1,-0x20(%rbp)
cmpl   $0x9,-0x20(%rbp)
jge    120b <read_cnv_info+0xcb>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe45(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    11e8 <read_cnv_info+0xa8>
mov    -0x1c(%rbp),%esi
lea    0xe2b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11a6 <read_cnv_info+0x66>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cnv_info>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rdi
mov    %rsi,%rbx
lea    0xeae(%rip),%rsi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    (%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xe8e(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x8(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xe6b(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x10(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xe48(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x18(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xe25(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x20(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xe02(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x28(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xde3(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x30(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xdc4(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x38(%rbx),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xda5(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1279 <read_cnv_info+0x139>
mov    0x40(%rbx),%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strcpy@plt>
lea    0xd84(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c" \09\0A\00"
@.str.1 = [51 x i8] c"Error while reading SNPs informations at line %d.\0A\00"
define void @read_cnv_info(i8* %0, i8** %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %7
%11 = call i8* @strtok(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %18, label %14
14: ; preds = %4
%15 = load i32, i32* %8
%16 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %4
%19 = load i8**, i8*** %6
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = load i8*, i8** %5
%23 = call i32 @strcpy(i8* %21, i8* %22)
store i32 1, i32* %9
br label %24
24: ; preds = %43, %18
%25 = load i32, i32* %9
%26 = icmp slt i32 %25, 9
br i1 %26, label %27, label %46
27: ; preds = %24
%28 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %28, i8** %5
%29 = load i8*, i8** %5
%30 = icmp ne i8* %29, null
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i32, i32* %8
%33 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %27
%36 = load i8**, i8*** %6
%37 = load i32, i32* %9
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %36, i64 %38
%40 = load i8*, i8** %39
%41 = load i8*, i8** %5
%42 = call i32 @strcpy(i8* %40, i8* %41)
br label %43
43: ; preds = %35
%44 = load i32, i32* %9
%45 = add nsw i32 %44, 1
store i32 %45, i32* %9
br label %24
46: ; preds = %24
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" \09\0A\00"
@.str.1 = [51 x i8] c"Error while reading SNPs informations at line %d.\0A\00"
define void @read_cnv_info(i8* nocapture readnone %0, i8** nocapture %1, i8* %2, i32 %3) {
%5 = tail call i8* @strtok(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %4
%11 = load i8*, i8** %1
%12 = tail call i32 @strcpy(i8* %11, i8* %5)
%13 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %18
15: ; preds = %54, %48, %42, %36, %30, %24, %18, %10
%16 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %10
%19 = getelementptr inbounds i8*, i8** %1, i64 1
%20 = load i8*, i8** %19
%21 = tail call i32 @strcpy(i8* %20, i8* %13)
%22 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i8* %22, null
br i1 %23, label %15, label %24
24: ; preds = %18
%25 = getelementptr inbounds i8*, i8** %1, i64 2
%26 = load i8*, i8** %25
%27 = tail call i32 @strcpy(i8* %26, i8* %22)
%28 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%29 = icmp eq i8* %28, null
br i1 %29, label %15, label %30
30: ; preds = %24
%31 = getelementptr inbounds i8*, i8** %1, i64 3
%32 = load i8*, i8** %31
%33 = tail call i32 @strcpy(i8* %32, i8* %28)
%34 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%35 = icmp eq i8* %34, null
br i1 %35, label %15, label %36
36: ; preds = %30
%37 = getelementptr inbounds i8*, i8** %1, i64 4
%38 = load i8*, i8** %37
%39 = tail call i32 @strcpy(i8* %38, i8* %34)
%40 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%41 = icmp eq i8* %40, null
br i1 %41, label %15, label %42
42: ; preds = %36
%43 = getelementptr inbounds i8*, i8** %1, i64 5
%44 = load i8*, i8** %43
%45 = tail call i32 @strcpy(i8* %44, i8* %40)
%46 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%47 = icmp eq i8* %46, null
br i1 %47, label %15, label %48
48: ; preds = %42
%49 = getelementptr inbounds i8*, i8** %1, i64 6
%50 = load i8*, i8** %49
%51 = tail call i32 @strcpy(i8* %50, i8* %46)
%52 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%53 = icmp eq i8* %52, null
br i1 %53, label %15, label %54
54: ; preds = %48
%55 = getelementptr inbounds i8*, i8** %1, i64 7
%56 = load i8*, i8** %55
%57 = tail call i32 @strcpy(i8* %56, i8* %52)
%58 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%59 = icmp eq i8* %58, null
br i1 %59, label %15, label %60
60: ; preds = %54
%61 = getelementptr inbounds i8*, i8** %1, i64 8
%62 = load i8*, i8** %61
%63 = tail call i32 @strcpy(i8* %62, i8* %58)
ret void
}