#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*/ expression(char *);
int /*<<< orphan*/ putchar(char);
void expression2(char *buffer) {
  char buffer2[128];
  char *buffer2_ptr = buffer2, *token = buffer;
  char next;
  while ((next = *(token++)) != ' ')
    *(buffer2_ptr++) = next;
  *buffer2_ptr = '\0';
  expression(buffer2);
  putchar(',');
  putchar(' ');
  expression(token);
}


x86 assembly (clang, -O0):
<expression2>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xa0(%rbp)
mov    (%rax),%al
mov    %al,-0xa1(%rbp)
movsbl %al,%eax
cmp    $0x20,%eax
je     1193 <expression2+0x73>
mov    -0xa1(%rbp),%cl
mov    -0x98(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x98(%rbp)
mov    %cl,(%rax)
jmp    1148 <expression2+0x28>
mov    -0x98(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x90(%rbp),%rdi
call   1040 <expression@plt>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0xa0(%rbp),%rdi
call   1040 <expression@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expression2>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
mov    (%rdi),%cl
add    $0x1,%rbx
mov    %rsp,%rax
cmp    $0x20,%cl
je     1152 <expression2+0x32>
nopl   0x0(%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rbx),%ecx
add    $0x1,%rbx
cmp    $0x20,%cl
jne    1140 <expression2+0x20>
movb   $0x0,(%rax)
mov    %rsp,%rdi
call   1040 <expression@plt>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <expression@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @expression2(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %2
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
store i8* %7, i8** %4
%8 = load i8*, i8** %2
store i8* %8, i8** %5
br label %9
9: ; preds = %15, %1
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %5
%12 = load i8, i8* %10
store i8 %12, i8* %6
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 32
br i1 %14, label %15, label %19
15: ; preds = %9
%16 = load i8, i8* %6
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
store i8 %16, i8* %17
br label %9
19: ; preds = %9
%20 = load i8*, i8** %4
store i8 0, i8* %20
%21 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%22 = call i32 @expression(i8* %21)
%23 = call i32 @putchar(i8 signext 44)
%24 = call i32 @putchar(i8 signext 32)
%25 = load i8*, i8** %5
%26 = call i32 @expression(i8* %25)
ret void
}

LLVM IR (-O2):
define void @expression2(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 32
br i1 %6, label %15, label %7
7: ; preds = %1, %7
%8 = phi i8 [ %13, %7 ], [ %5, %1 ]
%9 = phi i8* [ %12, %7 ], [ %4, %1 ]
%10 = phi i8* [ %11, %7 ], [ %3, %1 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %8, i8* %10
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 32
br i1 %14, label %15, label %7
15: ; preds = %7, %1
%16 = phi i8* [ %3, %1 ], [ %11, %7 ]
%17 = phi i8* [ %4, %1 ], [ %12, %7 ]
store i8 0, i8* %16
%18 = call i32 @expression(i8* %3)
%19 = call i32 @putchar(i8 signext 44)
%20 = call i32 @putchar(i8 signext 32)
%21 = call i32 @expression(i8* %17)
ret void
}