#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*/ OleoSetEncoding(char *);
scalar_t__ isspace(char);
void OleoUserPrefEncoding(char *s) {
  char *p = s + 9;
  for (; *p && isspace(*p); p++)
    ;
  OleoSetEncoding(p);
}


x86 assembly (clang, -O0):
<OleoUserPrefEncoding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1163 <OleoUserPrefEncoding+0x43>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1173 <OleoUserPrefEncoding+0x53>
jmp    1189 <OleoUserPrefEncoding+0x69>
jmp    1178 <OleoUserPrefEncoding+0x58>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1138 <OleoUserPrefEncoding+0x18>
mov    -0x10(%rbp),%rdi
call   1040 <OleoSetEncoding@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OleoUserPrefEncoding>:
push   %rbx
mov    %rdi,%rbx
mov    0x9(%rdi),%al
add    $0x9,%rbx
test   %al,%al
je     1149 <OleoUserPrefEncoding+0x29>
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1149 <OleoUserPrefEncoding+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <OleoUserPrefEncoding+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <OleoSetEncoding@plt>

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

LLVM IR (-O2):
define void @OleoUserPrefEncoding(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 9
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %10
%6 = phi i8 [ %12, %10 ], [ %3, %1 ]
%7 = phi i8* [ %11, %10 ], [ %2, %1 ]
%8 = tail call i64 @isspace(i8 signext %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %1
%15 = phi i8* [ %2, %1 ], [ %11, %10 ], [ %7, %5 ]
%16 = tail call i32 @OleoSetEncoding(i8* %15)
ret void
}