#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 */
typedef int /*<<< orphan*/ words;

/* Variables and functions */
long long atoll(char *);
int chopString(char *, char *, char **, int);
int /*<<< orphan*/ errAbort(char *);
long long parseFtpSIZE(char *rs) {
  char *words[3];
  int wordCount;
  char *rsStart = rs;
  long long result = 0;
  wordCount =
      chopString(rsStart, " ", words, (sizeof(words) / sizeof((words)[0])));
  if (wordCount != 2)
    errAbort("SIZE reply does not parse correctly");
  result = atoll(words[1]);
  return result;
}


x86 assembly (clang, -O0):
<parseFtpSIZE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x20(%rbp),%rdx
lea    0xea5(%rip),%rsi
mov    $0x3,%ecx
call   1030 <chopString@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x2,-0x24(%rbp)
je     117e <parseFtpSIZE+0x4e>
lea    0xe89(%rip),%rdi
call   1040 <errAbort@plt>
mov    -0x18(%rbp),%rdi
call   1050 <atoll@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseFtpSIZE>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rsi
mov    %rsp,%rdx
mov    $0x3,%ecx
call   1030 <chopString@plt>
cmp    $0x2,%eax
je     1159 <parseFtpSIZE+0x29>
lea    0xeae(%rip),%rdi
call   1040 <errAbort@plt>
mov    0x8(%rsp),%rdi
call   1050 <atoll@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [36 x i8] c"SIZE reply does not parse correctly\00"
define i64 @parseFtpSIZE(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8*]
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %2
%7 = load i8*, i8** %2
store i8* %7, i8** %5
store i64 0, i64* %6
%8 = load i8*, i8** %5
%9 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%10 = call i32 @chopString(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %9, i32 3)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 2
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 @errAbort(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %1
%16 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 1
%17 = load i8*, i8** %16
%18 = call i64 @atoll(i8* %17)
store i64 %18, i64* %6
%19 = load i64, i64* %6
ret i64 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [36 x i8] c"SIZE reply does not parse correctly\00"
define i64 @parseFtpSIZE(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = call i32 @chopString(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4, i32 3)
%6 = icmp eq i32 %5, 2
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @errAbort(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @atoll(i8* %11)
ret i64 %12
}