#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*/ proto_unescape(char *);
char *strsep(char **, char *);
char *proto_get_ascii(char **s) {
  char *ret;
  ret = strsep(s, " ");
  if (ret == NULL)
    return (NULL);
  if (*ret == '\0') {
    *s = NULL;
    return (NULL);
  }
  proto_unescape(ret);
  return (ret);
}


x86 assembly (clang, -O0):
<proto_get_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strsep@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <proto_get_ascii+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1191 <proto_get_ascii+0x71>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1180 <proto_get_ascii+0x60>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1191 <proto_get_ascii+0x71>
mov    -0x18(%rbp),%rdi
call   1040 <proto_unescape@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proto_get_ascii>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
call   1030 <strsep@plt>
test   %rax,%rax
je     1151 <proto_get_ascii+0x31>
mov    %rax,%rbx
cmpb   $0x0,(%rax)
je     114a <proto_get_ascii+0x2a>
mov    %rbx,%rdi
call   1040 <proto_unescape@plt>
jmp    1153 <proto_get_ascii+0x33>
movq   $0x0,(%r14)
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define i8* @proto_get_ascii(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
%5 = load i8**, i8*** %3
%6 = call i8* @strsep(i8** %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* null, i8** %2
br label %21
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = load i8**, i8*** %3
store i8* null, i8** %16
store i8* null, i8** %2
br label %21
17: ; preds = %10
%18 = load i8*, i8** %4
%19 = call i32 @proto_unescape(i8* %18)
%20 = load i8*, i8** %4
store i8* %20, i8** %2
br label %21
21: ; preds = %17, %15, %9
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i8* @proto_get_ascii(i8** %0) {
%2 = tail call i8* @strsep(i8** %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
store i8* null, i8** %0
br label %10
8: ; preds = %4
%9 = tail call i32 @proto_unescape(i8* %2)
br label %10
10: ; preds = %1, %8, %7
%11 = phi i8* [ null, %7 ], [ %2, %8 ], [ null, %1 ]
ret i8* %11
}