#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 *);
void statmbx_splitConfigLine(char *line, char **mailbox_title,
                             char **mailbox_fname) {
  int i;
  for (i = 0; i < 256; i++)
    if (line[i] == ' ') {
      line[i] = '\0';
      *mailbox_title = line;
      *mailbox_fname = line + i + 1;
      for (; i < 256; i++)
        if (line[i] == '\n') {
          line[i] = '\0';
          break;
        }
      return;
    }
  printf("statmbx: error, config line \"%s\" invalid\n", line);
  exit(-1);
}


x86 assembly (clang, -O0):
<statmbx_splitConfigLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x100,-0x1c(%rbp)
jge    11e9 <statmbx_splitConfigLine+0xc9>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    11d6 <statmbx_splitConfigLine+0xb6>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rcx
movslq -0x1c(%rbp),%rax
add    %rax,%rcx
add    $0x1,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpl   $0x100,-0x1c(%rbp)
jge    11d0 <statmbx_splitConfigLine+0xb0>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    11bd <statmbx_splitConfigLine+0x9d>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    11d0 <statmbx_splitConfigLine+0xb0>
jmp    11c2 <statmbx_splitConfigLine+0xa2>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    118a <statmbx_splitConfigLine+0x6a>
add    $0x20,%rsp
pop    %rbp
ret
jmp    11db <statmbx_splitConfigLine+0xbb>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113b <statmbx_splitConfigLine+0x1b>
mov    -0x8(%rbp),%rsi
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<statmbx_splitConfigLine>:
push   %rax
mov    %rdi,%rax
mov    $0x3,%ecx
nopl   0x0(%rax)
cmpb   $0x20,-0x3(%rax,%rcx,1)
je     1171 <statmbx_splitConfigLine+0x51>
cmpb   $0x20,-0x2(%rax,%rcx,1)
je     1177 <statmbx_splitConfigLine+0x57>
cmpb   $0x20,-0x1(%rax,%rcx,1)
je     117d <statmbx_splitConfigLine+0x5d>
cmpb   $0x20,(%rax,%rcx,1)
je     1181 <statmbx_splitConfigLine+0x61>
add    $0x4,%rcx
cmp    $0x103,%rcx
jne    1130 <statmbx_splitConfigLine+0x10>
lea    0xea1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0xfffffffffffffffd,%rcx
jmp    1181 <statmbx_splitConfigLine+0x61>
add    $0xfffffffffffffffe,%rcx
jmp    1181 <statmbx_splitConfigLine+0x61>
add    $0xffffffffffffffff,%rcx
mov    %ecx,%edi
movb   $0x0,(%rax,%rdi,1)
mov    %rax,(%rsi)
lea    (%rax,%rdi,1),%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
test   $0xffffff00,%ecx
je     11ad <statmbx_splitConfigLine+0x8d>
pop    %rax
ret
nop
add    $0x1,%rcx
cmp    $0x100,%rcx
je     119d <statmbx_splitConfigLine+0x7d>
cmpb   $0xa,(%rax,%rcx,1)
jne    11a0 <statmbx_splitConfigLine+0x80>
movb   $0x0,(%rax,%rcx,1)
pop    %rax
ret

LLVM IR (-O0):
@.str = [42 x i8] c"statmbx: error, config line \22%s\22 invalid\0A\00"
define void @statmbx_splitConfigLine(i8* %0, i8** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
store i32 0, i32* %7
br label %8
8: ; preds = %54, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 256
br i1 %10, label %11, label %57
11: ; preds = %8
%12 = load i8*, i8** %4
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 32
br i1 %18, label %19, label %53
19: ; preds = %11
%20 = load i8*, i8** %4
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %4
%25 = load i8**, i8*** %5
store i8* %24, i8** %25
%26 = load i8*, i8** %4
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = getelementptr inbounds i8, i8* %29, i64 1
%31 = load i8**, i8*** %6
store i8* %30, i8** %31
br label %32
32: ; preds = %49, %19
%33 = load i32, i32* %7
%34 = icmp slt i32 %33, 256
br i1 %34, label %35, label %52
35: ; preds = %32
%36 = load i8*, i8** %4
%37 = load i32, i32* %7
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 10
br i1 %42, label %43, label %48
43: ; preds = %35
%44 = load i8*, i8** %4
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %44, i64 %46
store i8 0, i8* %47
br label %52
48: ; preds = %35
br label %49
49: ; preds = %48
%50 = load i32, i32* %7
%51 = add nsw i32 %50, 1
store i32 %51, i32* %7
br label %32
52: ; preds = %43, %32
ret void
53: ; preds = %11
br label %54
54: ; preds = %53
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %8
57: ; preds = %8
%58 = load i8*, i8** %4
%59 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %58)
%60 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"statmbx: error, config line \22%s\22 invalid\0A\00"
define void @statmbx_splitConfigLine(i8* %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2) {
br label %4
4: ; preds = %43, %3
%5 = phi i64 [ 0, %3 ], [ %44, %43 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 32
br i1 %8, label %9, label %28
9: ; preds = %38, %33, %28, %4
%10 = phi i64 [ %5, %4 ], [ %29, %28 ], [ %34, %33 ], [ %39, %38 ]
%11 = and i64 %10, 4294967295
%12 = getelementptr inbounds i8, i8* %0, i64 %11
store i8 0, i8* %12
store i8* %0, i8** %1
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8* %13, i8** %2
%14 = and i64 %10, 4294967040
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %27
16: ; preds = %9, %24
%17 = phi i64 [ %25, %24 ], [ %10, %9 ]
%18 = getelementptr inbounds i8, i8* %0, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 10
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = and i64 %17, 4294967295
%23 = getelementptr inbounds i8, i8* %0, i64 %22
store i8 0, i8* %23
br label %27
24: ; preds = %16
%25 = add nuw nsw i64 %17, 1
%26 = icmp eq i64 %25, 256
br i1 %26, label %27, label %16
27: ; preds = %24, %9, %21
ret void
28: ; preds = %4
%29 = or i64 %5, 1
%30 = getelementptr inbounds i8, i8* %0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 32
br i1 %32, label %9, label %33
33: ; preds = %28
%34 = or i64 %5, 2
%35 = getelementptr inbounds i8, i8* %0, i64 %34
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 32
br i1 %37, label %9, label %38
38: ; preds = %33
%39 = or i64 %5, 3
%40 = getelementptr inbounds i8, i8* %0, i64 %39
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 32
br i1 %42, label %9, label %43
43: ; preds = %38
%44 = add nuw nsw i64 %5, 4
%45 = icmp eq i64 %44, 256
br i1 %45, label %46, label %4
46: ; preds = %43
%47 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
%48 = tail call i32 @exit(i32 -1)
unreachable
}