#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*/ print(char *);
int /*<<< orphan*/ process_word(char *);
char *strtok(char *, char *);
void process_line(char line[]) {
  char *word;
  if ((word = strtok(line, " \t\r\n\f\v")) != NULL)
    do {
      process_word(word);
    } while ((word = strtok(NULL, " \t\r\n\f\v")) != NULL);
  print("stack");
}


x86 assembly (clang, -O0):
<process_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     118b <process_line+0x5b>
jmp    115f <process_line+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <process_word@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe8d(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    115f <process_line+0x2f>
jmp    118b <process_line+0x5b>
lea    0xe75(%rip),%rdi
call   1040 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_line>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1050 <strtok@plt>
test   %rax,%rax
je     1167 <process_line+0x37>
lea    0xeb7(%rip),%rbx
nopl   0x0(%rax)
mov    %rax,%rdi
call   1030 <process_word@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1050 <strtok@plt>
test   %rax,%rax
jne    1150 <process_line+0x20>
lea    0xe99(%rip),%rdi
pop    %rbx
jmp    1040 <print@plt>

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0D\0A\0C\0B\00"
@.str.1 = [6 x i8] c"stack\00"
define void @process_line(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strtok(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %15
7: ; preds = %1
br label %8
8: ; preds = %11, %7
%9 = load i8*, i8** %3
%10 = call i32 @process_word(i8* %9)
br label %11
11: ; preds = %8
%12 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %12, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %8, label %14
14: ; preds = %11
br label %15
15: ; preds = %14, %1
%16 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0D\0A\0C\0B\00"
@.str.1 = [6 x i8] c"stack\00"
define void @process_line(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %2, %1 ]
%6 = tail call i32 @process_word(i8* %5)
%7 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}