#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 */
struct outlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ addspec(struct outlist *, int /*<<< orphan*/);
int /*<<< orphan*/ makespec(char *);
char *strpbrk(char *, char *);
void makeolist(struct outlist *olp, char *s) {
  char *item, *sp;
  sp = s;
  while (sp) {
    item = sp;
    sp = strpbrk(sp, ", \t");
    if (sp)
      *sp++ = '\0';
    addspec(olp, makespec(item));
  }
}


x86 assembly (clang, -O0):
<makeolist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11ad <makeolist+0x7d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     118c <makeolist+0x5c>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <makespec@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1050 <addspec@plt>
jmp    1148 <makeolist+0x18>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeolist>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1188 <makeolist+0x58>
mov    %rsi,%r12
mov    %rdi,%r15
lea    0xeb6(%rip),%r14
jmp    1174 <makeolist+0x44>
nopl   0x0(%rax)
mov    %rax,%rbx
add    $0x1,%rbx
movb   $0x0,(%rax)
mov    %r12,%rdi
call   1040 <makespec@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1050 <addspec@plt>
mov    %rbx,%r12
test   %rbx,%rbx
je     1188 <makeolist+0x58>
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <strpbrk@plt>
test   %rax,%rax
jne    1150 <makeolist+0x20>
xor    %ebx,%ebx
jmp    115a <makeolist+0x2a>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.outlist = type { i32 }
@.str = [4 x i8] c", \09\00"
define void @makeolist(%struct.outlist* %0, i8* %1) {
%3 = alloca %struct.outlist*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store %struct.outlist* %0, %struct.outlist** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
store i8* %7, i8** %6
br label %8
8: ; preds = %20, %2
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load i8*, i8** %6
store i8* %12, i8** %5
%13 = load i8*, i8** %6
%14 = call i8* @strpbrk(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %14, i8** %6
%15 = load i8*, i8** %6
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %6
store i8 0, i8* %18
br label %20
20: ; preds = %17, %11
%21 = load %struct.outlist*, %struct.outlist** %3
%22 = load i8*, i8** %5
%23 = call i32 @makespec(i8* %22)
%24 = call i32 @addspec(%struct.outlist* %21, i32 %23)
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.outlist = type { i32 }
@.str = [4 x i8] c", \09\00"
define void @makeolist(%struct.outlist* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %15, label %4
4: ; preds = %2, %10
%5 = phi i8* [ %11, %10 ], [ %1, %2 ]
%6 = tail call i8* @strpbrk(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 0, i8* %6
br label %10
10: ; preds = %8, %4
%11 = phi i8* [ %9, %8 ], [ null, %4 ]
%12 = tail call i32 @makespec(i8* %5)
%13 = tail call i32 @addspec(%struct.outlist* %0, i32 %12)
%14 = icmp eq i8* %11, null
br i1 %14, label %15, label %4
15: ; preds = %10, %2
ret void
}