#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*/ Float_Parse(char **, float *);
int /*<<< orphan*/ Q_strncpyz(char *, char const *, int);
scalar_t__ isdigit(char);
float UI_Parse_Indent(const char **text) {
  char indentWidth[1024];
  char *p = indentWidth;
  int numChars;
  float pixels;
  Q_strncpyz(indentWidth, *text, 1024);
  while (isdigit(*p) || *p == '.')
    p++;
  if (*p != '\v')
    return 0.0f;
  *p++ = '\0';
  numChars = (p - indentWidth);
  p = indentWidth;
  if (!Float_Parse(&p, &pixels))
    return 0.0f;
  (*text) += numChars;
  return pixels;
}


x86 assembly (clang, -O0):
<UI_Parse_Indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x400,%edx
call   1050 <Q_strncpyz@plt>
mov    -0x418(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x421(%rbp)
jne    119f <UI_Parse_Indent+0x6f>
mov    -0x418(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x421(%rbp)
mov    -0x421(%rbp),%al
test   $0x1,%al
jne    11b2 <UI_Parse_Indent+0x82>
jmp    11c9 <UI_Parse_Indent+0x99>
mov    -0x418(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x418(%rbp)
jmp    1165 <UI_Parse_Indent+0x35>
mov    -0x418(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xb,%eax
je     11e9 <UI_Parse_Indent+0xb9>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1272 <UI_Parse_Indent+0x142>
mov    -0x418(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x418(%rbp)
movb   $0x0,(%rax)
mov    -0x418(%rbp),%rax
lea    -0x410(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x41c(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
lea    -0x418(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1040 <Float_Parse@plt>
cmp    $0x0,%eax
jne    124f <UI_Parse_Indent+0x11f>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1272 <UI_Parse_Indent+0x142>
mov    -0x41c(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
movss  -0x420(%rbp),%xmm0
ff
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_Parse_Indent>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x410,%rsp
mov    %rdi,%r15
movabs $0x100000000,%r12
mov    (%rdi),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x400,%edx
call   1050 <Q_strncpyz@plt>
lea    0x11(%rsp),%rbx
mov    %r12,%r13
jmp    117c <UI_Parse_Indent+0x4c>
nopl   0x0(%rax)
mov    %rbx,0x8(%rsp)
add    %r12,%r13
add    $0x1,%rbx
movsbl -0x1(%rbx),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1170 <UI_Parse_Indent+0x40>
movzbl -0x1(%rbx),%eax
cmp    $0x2e,%al
je     1170 <UI_Parse_Indent+0x40>
cmp    $0xb,%al
jne    11c1 <UI_Parse_Indent+0x91>
movb   $0x0,-0x1(%rbx)
mov    %r14,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1040 <Float_Parse@plt>
test   %eax,%eax
je     11c1 <UI_Parse_Indent+0x91>
sar    $0x20,%r13
add    %r13,(%r15)
movss  0x4(%rsp),%xmm0
jmp    11c4 <UI_Parse_Indent+0x94>
xorps  %xmm0,%xmm0
add    $0x410,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define float @UI_Parse_Indent(i8** %0) {
%2 = alloca float
%3 = alloca i8**
%4 = alloca [1024 x i8]
%5 = alloca i8*
%6 = alloca i32
%7 = alloca float
store i8** %0, i8*** %3
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
store i8* %8, i8** %5
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = call i32 @Q_strncpyz(i8* %9, i8* %11, i32 1024)
br label %13
13: ; preds = %25, %1
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = call i64 @isdigit(i8 signext %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i8*, i8** %5
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 46
br label %23
23: ; preds = %18, %13
%24 = phi i1 [ true, %13 ], [ %22, %18 ]
br i1 %24, label %25, label %28
25: ; preds = %23
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %5
br label %13
28: ; preds = %23
%29 = load i8*, i8** %5
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 11
br i1 %32, label %33, label %34
33: ; preds = %28
store float 0.000000e+00, float* %2
br label %54
34: ; preds = %28
%35 = load i8*, i8** %5
%36 = getelementptr inbounds i8, i8* %35, i32 1
store i8* %36, i8** %5
store i8 0, i8* %35
%37 = load i8*, i8** %5
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%39 = ptrtoint i8* %37 to i64
%40 = ptrtoint i8* %38 to i64
%41 = sub i64 %39, %40
%42 = trunc i64 %41 to i32
store i32 %42, i32* %6
%43 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
store i8* %43, i8** %5
%44 = call i32 @Float_Parse(i8** %5, float* %7)
%45 = icmp ne i32 %44, 0
br i1 %45, label %47, label %46
46: ; preds = %34
store float 0.000000e+00, float* %2
br label %54
47: ; preds = %34
%48 = load i32, i32* %6
%49 = load i8**, i8*** %3
%50 = load i8*, i8** %49
%51 = sext i32 %48 to i64
%52 = getelementptr inbounds i8, i8* %50, i64 %51
store i8* %52, i8** %49
%53 = load float, float* %7
store float %53, float* %2
br label %54
54: ; preds = %47, %46, %33
%55 = load float, float* %2
ret float %55
}

LLVM IR (-O2):
define float @UI_Parse_Indent(i8** nocapture %0) {
%2 = alloca [1024 x i8]
%3 = alloca i8*
%4 = alloca float
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%6 = bitcast i8** %3 to i8*
%7 = bitcast float* %4 to i8*
%8 = load i8*, i8** %0
%9 = call i32 @Q_strncpyz(i8* %5, i8* %8, i32 1024)
br label %10
10: ; preds = %17, %1
%11 = phi i8* [ %18, %17 ], [ %5, %1 ]
%12 = load i8, i8* %11
%13 = call i64 @isdigit(i8 signext %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = load i8, i8* %11
switch i8 %16, label %32 [
i8 46, label %17
i8 11, label %19
]
17: ; preds = %15, %10
%18 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %18, i8** %3
br label %10
19: ; preds = %15
store i8 0, i8* %11
store i8* %5, i8** %3
%20 = call i32 @Float_Parse(i8** %3, float* %4)
%21 = icmp eq i32 %20, 0
br i1 %21, label %32, label %22
22: ; preds = %19
%23 = getelementptr inbounds i8, i8* %11, i64 1
%24 = ptrtoint i8* %23 to i64
%25 = ptrtoint [1024 x i8]* %2 to i64
%26 = sub i64 %24, %25
%27 = load i8*, i8** %0
%28 = shl i64 %26, 32
%29 = ashr exact i64 %28, 32
%30 = getelementptr inbounds i8, i8* %27, i64 %29
store i8* %30, i8** %0
%31 = load float, float* %4
br label %32
32: ; preds = %15, %19, %22
%33 = phi float [ %31, %22 ], [ 0.000000e+00, %19 ], [ 0.000000e+00, %15 ]
ret float %33
}