#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
char *strip_white_space(char *);
char *strtok(int /*<<< orphan*/, char *);
void print_rest(FILE *dst, int newline) {
  char *p = strtok(0, "");
  if (p) {
    p = strip_white_space(p);
    if (*p)
      fprintf(dst, "%s", p);
  }
  if (newline)
    fputc('\n', dst);
}


x86 assembly (clang, -O0):
<print_rest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
lea    0xeaa(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     119f <print_rest+0x5f>
mov    -0x18(%rbp),%rdi
call   1050 <strip_white_space@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     119a <print_rest+0x5a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe6b(%rip),%rsi
call   1040 <fprintf@plt>
jmp    119f <print_rest+0x5f>
cmpl   $0x0,-0xc(%rbp)
je     11b7 <print_rest+0x77>
mov    -0x8(%rbp),%rsi
mov    $0xa,%edi
call   1030 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_rest>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xeb1(%rip),%rsi
xor    %edi,%edi
call   1060 <strtok@plt>
test   %rax,%rax
je     1173 <print_rest+0x33>
mov    %rax,%rdi
call   1050 <strip_white_space@plt>
cmpb   $0x0,(%rax)
je     1173 <print_rest+0x33>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
test   %ebp,%ebp
je     118a <print_rest+0x4a>
mov    $0xa,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fputc@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @print_rest(i32* nocapture %0, i32 %1) {
%3 = tail call i8* @strtok(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = tail call i8* @strip_white_space(i8* %3)
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @fputs(i8* %6, i32* %0)
br label %11
11: ; preds = %5, %9, %2
%12 = icmp eq i32 %1, 0
br i1 %12, label %15, label %13
13: ; preds = %11
%14 = tail call i32 @fputc(i8 signext 10, i32* %0)
br label %15
15: ; preds = %13, %11
ret void
}