#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 atoi(char *);
int read(int, char *, int);
int snprintf(char *, int, char *, int);
int sscanf(char *, char *, int *);
int /*<<< orphan*/ *strchr(char *, char);
char *strdup(char *);
char *strsep(char **, char *);
int /*<<< orphan*/ warn(char *);
int /*<<< orphan*/ warnc(int /*<<< orphan*/, char *, ...);
int write(int, char *, int);
int get_slot_info(int so, int slot, char **manuf, char **version, char **device,
                  int *state) {
  int rc = -1;
  int rv;
  static char buf[1024];
  int slen;
  char *s;
  char *sl;
  char *_manuf;
  char *_version;
  char *_device;
  if ((slen = snprintf(buf, sizeof buf, "N%d", slot)) < 0) {
    warnc(0, "write");
    goto err;
  }
  if ((rv = write(so, buf, slen)) < 0) {
    warn("write");
    goto err;
  } else if (rv != slen) {
    warnc(0, "write");
    goto err;
  }
  if ((rv = read(so, buf, sizeof buf)) < 0) {
    warn("read");
    goto err;
  }
  s = buf;
  if ((sl = strsep(&s, "~")) == NULL)
    goto parse_err;
  if (atoi(sl) != slot)
    goto parse_err;
  if ((_manuf = strsep(&s, "~")) == NULL)
    goto parse_err;
  if ((_version = strsep(&s, "~")) == NULL)
    goto parse_err;
  if ((_device = strsep(&s, "~")) == NULL)
    goto parse_err;
  if (sscanf(s, "%1d", state) != 1)
    goto parse_err;
  if (s != NULL && strchr(s, '~') != NULL)
    goto parse_err;
  if ((*manuf = strdup(_manuf)) == NULL) {
    warn("strdup");
    goto err;
  }
  if ((*version = strdup(_version)) == NULL) {
    warn("strdup");
    goto err;
  }
  if ((*device = strdup(_device)) == NULL) {
    warn("strdup");
    goto err;
  }
  if (*manuf == NULL || *version == NULL || *device == NULL) {
    warn("strdup");
    goto err;
  }
  rc = 0;
err:
  return rc;
parse_err:
  warnc(0, "Invalid response: %*s", rv, buf);
  return rc;
}


x86 assembly (clang, -O0):
<get_slot_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0xffffffff,-0x34(%rbp)
mov    -0xc(%rbp),%ecx
lea    0x2eb1(%rip),%rdi
mov    $0x400,%esi
lea    0xe25(%rip),%rdx
call   1060 <snprintf@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0x0,%eax
jge    1201 <get_slot_info+0x61>
xor    %edi,%edi
lea    0xe0f(%rip),%rsi
mov    $0x0,%al
call   1080 <warnc@plt>
jmp    1442 <get_slot_info+0x2a2>
mov    -0x8(%rbp),%edi
mov    -0x3c(%rbp),%edx
lea    0x2e72(%rip),%rsi
call   1040 <write@plt>
mov    %eax,-0x38(%rbp)
cmp    $0x0,%eax
jge    1230 <get_slot_info+0x90>
lea    0xdde(%rip),%rdi
call   1030 <warn@plt>
jmp    1442 <get_slot_info+0x2a2>
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
je     1251 <get_slot_info+0xb1>
xor    %edi,%edi
lea    0xdbf(%rip),%rsi
mov    $0x0,%al
call   1080 <warnc@plt>
jmp    1442 <get_slot_info+0x2a2>
jmp    1256 <get_slot_info+0xb6>
mov    -0x8(%rbp),%edi
lea    0x2e20(%rip),%rsi
mov    $0x400,%edx
call   1070 <read@plt>
mov    %eax,-0x38(%rbp)
cmp    $0x0,%eax
jge    1287 <get_slot_info+0xe7>
lea    0xd8d(%rip),%rdi
call   1030 <warn@plt>
jmp    1442 <get_slot_info+0x2a2>
lea    0x2df2(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    -0x48(%rbp),%rdi
lea    0xd72(%rip),%rsi
call   1090 <strsep@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    12b5 <get_slot_info+0x115>
jmp    144d <get_slot_info+0x2ad>
mov    -0x50(%rbp),%rdi
call   10b0 <atoi@plt>
cmp    -0xc(%rbp),%eax
je     12cc <get_slot_info+0x12c>
jmp    144d <get_slot_info+0x2ad>
lea    -0x48(%rbp),%rdi
lea    0xd38(%rip),%rsi
call   1090 <strsep@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    12ef <get_slot_info+0x14f>
jmp    144d <get_slot_info+0x2ad>
lea    -0x48(%rbp),%rdi
lea    0xd15(%rip),%rsi
call   1090 <strsep@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    1312 <get_slot_info+0x172>
jmp    144d <get_slot_info+0x2ad>
lea    -0x48(%rbp),%rdi
lea    0xcf2(%rip),%rsi
call   1090 <strsep@plt>
mov    %rax,-0x68(%rbp)
cmp    $0x0,%rax
jne    1335 <get_slot_info+0x195>
jmp    144d <get_slot_info+0x2ad>
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xccd(%rip),%rsi
call   10a0 <sscanf@plt>
cmp    $0x1,%eax
je     1357 <get_slot_info+0x1b7>
jmp    144d <get_slot_info+0x2ad>
cmpq   $0x0,-0x48(%rbp)
je     137f <get_slot_info+0x1df>
mov    -0x48(%rbp),%rdi
mov    $0x7e,%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     137f <get_slot_info+0x1df>
jmp    144d <get_slot_info+0x2ad>
mov    -0x58(%rbp),%rdi
call   10c0 <strdup@plt>
mov    -0x18(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    13aa <get_slot_info+0x20a>
lea    0xc75(%rip),%rdi
call   1030 <warn@plt>
jmp    1442 <get_slot_info+0x2a2>
mov    -0x60(%rbp),%rdi
call   10c0 <strdup@plt>
mov    -0x20(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    13d5 <get_slot_info+0x235>
lea    0xc4a(%rip),%rdi
call   1030 <warn@plt>
jmp    1442 <get_slot_info+0x2a2>
mov    -0x68(%rbp),%rdi
call   10c0 <strdup@plt>
mov    -0x28(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    1400 <get_slot_info+0x260>
lea    0xc1f(%rip),%rdi
call   1030 <warn@plt>
jmp    1442 <get_slot_info+0x2a2>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     142a <get_slot_info+0x28a>
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     142a <get_slot_info+0x28a>
mov    -0x28(%rbp),%rax
cmpq   $0x0,(%rax)
jne    143b <get_slot_info+0x29b>
lea    0xbe4(%rip),%rdi
call   1030 <warn@plt>
jmp    1442 <get_slot_info+0x2a2>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    146d <get_slot_info+0x2cd>
mov    -0x38(%rbp),%edx
xor    %edi,%edi
lea    0xbc3(%rip),%rsi
lea    0x2c20(%rip),%rcx
mov    $0x0,%al
call   1080 <warnc@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_slot_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r13
mov    %r8,0x10(%rsp)
mov    %rcx,%r15
mov    %rdx,%r12
mov    %esi,%ebp
mov    %edi,%ebx
lea    0x2eb9(%rip),%rdi
lea    0xe32(%rip),%rdx
mov    $0x400,%esi
mov    %ebp,%ecx
call   1060 <snprintf@plt>
test   %eax,%eax
js     12e0 <get_slot_info+0x140>
mov    %eax,%r14d
lea    0x2e94(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1040 <write@plt>
test   %eax,%eax
js     12f2 <get_slot_info+0x152>
cmp    %r14d,%eax
jne    12e0 <get_slot_info+0x140>
lea    0x2e73(%rip),%r14
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x400,%edx
call   1070 <read@plt>
test   %eax,%eax
js     12fb <get_slot_info+0x15b>
mov    %eax,%ebx
mov    %r14,(%rsp)
lea    0xdde(%rip),%rsi
mov    %rsp,%rdi
call   1090 <strsep@plt>
test   %rax,%rax
je     12c5 <get_slot_info+0x125>
mov    %rax,%rdi
call   10b0 <atoi@plt>
cmp    %ebp,%eax
jne    12c5 <get_slot_info+0x125>
lea    0xdba(%rip),%rsi
mov    %rsp,%rdi
call   1090 <strsep@plt>
test   %rax,%rax
je     12c5 <get_slot_info+0x125>
mov    %rax,%rbp
lea    0xda3(%rip),%rsi
mov    %rsp,%rdi
call   1090 <strsep@plt>
test   %rax,%rax
je     12c5 <get_slot_info+0x125>
mov    %rax,%r14
lea    0xd8c(%rip),%rsi
mov    %rsp,%rdi
call   1090 <strsep@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     12c5 <get_slot_info+0x125>
mov    (%rsp),%rdi
lea    0xd71(%rip),%rsi
mov    %r13,%rdx
call   10a0 <sscanf@plt>
cmp    $0x1,%eax
jne    12c5 <get_slot_info+0x125>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     131b <get_slot_info+0x17b>
mov    $0x7e,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     131b <get_slot_info+0x17b>
lea    0xd50(%rip),%rsi
lea    0x2dad(%rip),%rcx
xor    %edi,%edi
mov    %ebx,%edx
xor    %eax,%eax
call   1080 <warnc@plt>
jmp    1307 <get_slot_info+0x167>
lea    0xd1d(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1080 <warnc@plt>
jmp    1307 <get_slot_info+0x167>
lea    0xd0b(%rip),%rdi
jmp    1302 <get_slot_info+0x162>
lea    0xd08(%rip),%rdi
call   1030 <warn@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbp,%rdi
call   10c0 <strdup@plt>
mov    %rax,(%r12)
test   %rax,%rax
je     1362 <get_slot_info+0x1c2>
mov    %r14,%rdi
call   10c0 <strdup@plt>
mov    %rax,(%r15)
test   %rax,%rax
je     1362 <get_slot_info+0x1c2>
mov    0x8(%rsp),%rdi
call   10c0 <strdup@plt>
mov    0x10(%rsp),%rcx
mov    %rax,(%rcx)
test   %rax,%rax
je     1362 <get_slot_info+0x1c2>
cmpq   $0x0,(%r12)
je     1362 <get_slot_info+0x1c2>
xor    %eax,%eax
cmpq   $0x0,(%r15)
jne    130c <get_slot_info+0x16c>
lea    0xcac(%rip),%rdi
jmp    1302 <get_slot_info+0x162>

LLVM IR (-O0):
@get_slot_info.buf = internal global [1024 x i8] zeroinitializer
@.str = [4 x i8] c"N%d\00"
@.str.1 = [6 x i8] c"write\00"
@.str.2 = [5 x i8] c"read\00"
@.str.3 = [2 x i8] c"~\00"
@.str.4 = [4 x i8] c"%1d\00"
@.str.5 = [7 x i8] c"strdup\00"
@.str.6 = [22 x i8] c"Invalid response: %*s\00"
define i32 @get_slot_info(i32 %0, i32 %1, i8** %2, i8** %3, i8** %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca i8**
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8*
%21 = alloca i8*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i8** %2, i8*** %10
store i8** %3, i8*** %11
store i8** %4, i8*** %12
store i32* %5, i32** %13
store i32 -1, i32* %14
%22 = load i32, i32* %9
%23 = call i32 @snprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
store i32 %23, i32* %16
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %6
%26 = call i32 (i32, i8*, ...) @warnc(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %119
27: ; preds = %6
%28 = load i32, i32* %8
%29 = load i32, i32* %16
%30 = call i32 @write(i32 %28, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i32 %29)
store i32 %30, i32* %15
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %27
%33 = call i32 @warn(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %119
34: ; preds = %27
%35 = load i32, i32* %15
%36 = load i32, i32* %16
%37 = icmp ne i32 %35, %36
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 (i32, i8*, ...) @warnc(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %119
40: ; preds = %34
br label %41
41: ; preds = %40
%42 = load i32, i32* %8
%43 = call i32 @read(i32 %42, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i32 1024)
store i32 %43, i32* %15
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 @warn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %119
47: ; preds = %41
store i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i8** %17
%48 = call i8* @strsep(i8** %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %48, i8** %18
%49 = icmp eq i8* %48, null
br i1 %49, label %50, label %51
50: ; preds = %47
br label %121
51: ; preds = %47
%52 = load i8*, i8** %18
%53 = call i32 @atoi(i8* %52)
%54 = load i32, i32* %9
%55 = icmp ne i32 %53, %54
br i1 %55, label %56, label %57
56: ; preds = %51
br label %121
57: ; preds = %51
%58 = call i8* @strsep(i8** %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %58, i8** %19
%59 = icmp eq i8* %58, null
br i1 %59, label %60, label %61
60: ; preds = %57
br label %121
61: ; preds = %57
%62 = call i8* @strsep(i8** %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %62, i8** %20
%63 = icmp eq i8* %62, null
br i1 %63, label %64, label %65
64: ; preds = %61
br label %121
65: ; preds = %61
%66 = call i8* @strsep(i8** %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %66, i8** %21
%67 = icmp eq i8* %66, null
br i1 %67, label %68, label %69
68: ; preds = %65
br label %121
69: ; preds = %65
%70 = load i8*, i8** %17
%71 = load i32*, i32** %13
%72 = call i32 @sscanf(i8* %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32* %71)
%73 = icmp ne i32 %72, 1
br i1 %73, label %74, label %75
74: ; preds = %69
br label %121
75: ; preds = %69
%76 = load i8*, i8** %17
%77 = icmp ne i8* %76, null
br i1 %77, label %78, label %83
78: ; preds = %75
%79 = load i8*, i8** %17
%80 = call i32* @strchr(i8* %79, i8 signext 126)
%81 = icmp ne i32* %80, null
br i1 %81, label %82, label %83
82: ; preds = %78
br label %121
83: ; preds = %78, %75
%84 = load i8*, i8** %19
%85 = call i8* @strdup(i8* %84)
%86 = load i8**, i8*** %10
store i8* %85, i8** %86
%87 = icmp eq i8* %85, null
br i1 %87, label %88, label %90
88: ; preds = %83
%89 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %119
90: ; preds = %83
%91 = load i8*, i8** %20
%92 = call i8* @strdup(i8* %91)
%93 = load i8**, i8*** %11
store i8* %92, i8** %93
%94 = icmp eq i8* %92, null
br i1 %94, label %95, label %97
95: ; preds = %90
%96 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %119
97: ; preds = %90
%98 = load i8*, i8** %21
%99 = call i8* @strdup(i8* %98)
%100 = load i8**, i8*** %12
store i8* %99, i8** %100
%101 = icmp eq i8* %99, null
br i1 %101, label %102, label %104
102: ; preds = %97
%103 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %119
104: ; preds = %97
%105 = load i8**, i8*** %10
%106 = load i8*, i8** %105
%107 = icmp eq i8* %106, null
br i1 %107, label %116, label %108
108: ; preds = %104
%109 = load i8**, i8*** %11
%110 = load i8*, i8** %109
%111 = icmp eq i8* %110, null
br i1 %111, label %116, label %112
112: ; preds = %108
%113 = load i8**, i8*** %12
%114 = load i8*, i8** %113
%115 = icmp eq i8* %114, null
br i1 %115, label %116, label %118
116: ; preds = %112, %108, %104
%117 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %119
118: ; preds = %112
store i32 0, i32* %14
br label %119
119: ; preds = %118, %116, %102, %95, %88, %45, %38, %32, %25
%120 = load i32, i32* %14
store i32 %120, i32* %7
br label %125
121: ; preds = %82, %74, %68, %64, %60, %56, %50
%122 = load i32, i32* %15
%123 = call i32 (i32, i8*, ...) @warnc(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %122, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0))
%124 = load i32, i32* %14
store i32 %124, i32* %7
br label %125
125: ; preds = %121, %119
%126 = load i32, i32* %7
ret i32 %126
}

LLVM IR (-O2):
@get_slot_info.buf = internal global [1024 x i8] zeroinitializer
@.str = [4 x i8] c"N%d\00"
@.str.1 = [6 x i8] c"write\00"
@.str.2 = [5 x i8] c"read\00"
@.str.3 = [2 x i8] c"~\00"
@.str.4 = [4 x i8] c"%1d\00"
@.str.5 = [7 x i8] c"strdup\00"
@.str.6 = [22 x i8] c"Invalid response: %*s\00"
define i32 @get_slot_info(i32 %0, i32 %1, i8** nocapture %2, i8** nocapture %3, i8** nocapture writeonly %4, i32* %5) {
%7 = alloca i8*
%8 = bitcast i8** %7 to i8*
%9 = tail call i32 @snprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 (i32, i8*, ...) @warnc(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %77
13: ; preds = %6
%14 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i32 %9)
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @warn(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %77
18: ; preds = %13
%19 = icmp eq i32 %14, %9
br i1 %19, label %22, label %20
20: ; preds = %18
%21 = tail call i32 (i32, i8*, ...) @warnc(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %77
22: ; preds = %18
%23 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i32 1024)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = tail call i32 @warn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %77
27: ; preds = %22
store i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0), i8** %7
%28 = call i8* @strsep(i8** %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp eq i8* %28, null
br i1 %29, label %75, label %30
30: ; preds = %27
%31 = call i32 @atoi(i8* %28)
%32 = icmp eq i32 %31, %1
br i1 %32, label %33, label %75
33: ; preds = %30
%34 = call i8* @strsep(i8** %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i8* %34, null
br i1 %35, label %75, label %36
36: ; preds = %33
%37 = call i8* @strsep(i8** %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%38 = icmp eq i8* %37, null
br i1 %38, label %75, label %39
39: ; preds = %36
%40 = call i8* @strsep(i8** %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%41 = icmp eq i8* %40, null
br i1 %41, label %75, label %42
42: ; preds = %39
%43 = load i8*, i8** %7
%44 = call i32 @sscanf(i8* %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32* %5)
%45 = icmp eq i32 %44, 1
br i1 %45, label %46, label %75
46: ; preds = %42
%47 = load i8*, i8** %7
%48 = icmp eq i8* %47, null
br i1 %48, label %52, label %49
49: ; preds = %46
%50 = call i32* @strchr(i8* %47, i8 signext 126)
%51 = icmp eq i32* %50, null
br i1 %51, label %52, label %75
52: ; preds = %49, %46
%53 = call i8* @strdup(i8* %34)
store i8* %53, i8** %2
%54 = icmp eq i8* %53, null
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %77
57: ; preds = %52
%58 = call i8* @strdup(i8* %37)
store i8* %58, i8** %3
%59 = icmp eq i8* %58, null
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %77
62: ; preds = %57
%63 = call i8* @strdup(i8* %40)
store i8* %63, i8** %4
%64 = icmp eq i8* %63, null
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %77
67: ; preds = %62
%68 = load i8*, i8** %2
%69 = icmp eq i8* %68, null
br i1 %69, label %73, label %70
70: ; preds = %67
%71 = load i8*, i8** %3
%72 = icmp eq i8* %71, null
br i1 %72, label %73, label %77
73: ; preds = %70, %67
%74 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %77
75: ; preds = %49, %42, %39, %36, %33, %30, %27
%76 = call i32 (i32, i8*, ...) @warnc(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %23, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_slot_info.buf, i64 0, i64 0))
br label %77
77: ; preds = %11, %16, %20, %25, %55, %60, %65, %73, %70, %75
%78 = phi i32 [ -1, %75 ], [ -1, %11 ], [ -1, %16 ], [ -1, %20 ], [ -1, %25 ], [ -1, %55 ], [ -1, %60 ], [ -1, %65 ], [ -1, %73 ], [ 0, %70 ]
ret i32 %78
}