#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*/ nsvg__parseMatrix(float *, char const *);
int /*<<< orphan*/ nsvg__parseRotate(float *, char const *);
int /*<<< orphan*/ nsvg__parseScale(float *, char const *);
int /*<<< orphan*/ nsvg__parseSkewX(float *, char const *);
int /*<<< orphan*/ nsvg__parseSkewY(float *, char const *);
int /*<<< orphan*/ nsvg__parseTranslate(float *, char const *);
int /*<<< orphan*/ nsvg__xformIdentity(float *);
int /*<<< orphan*/ nsvg__xformPremultiply(float *, float *);
scalar_t__ strncmp(char const *, char *, int);
void nsvg__parseTransform(float *xform, const char *str) {
  float t[6];
  nsvg__xformIdentity(xform);
  while (*str) {
    if (strncmp(str, "matrix", 6) == 0)
      str += nsvg__parseMatrix(t, str);
    else if (strncmp(str, "translate", 9) == 0)
      str += nsvg__parseTranslate(t, str);
    else if (strncmp(str, "scale", 5) == 0)
      str += nsvg__parseScale(t, str);
    else if (strncmp(str, "rotate", 6) == 0)
      str += nsvg__parseRotate(t, str);
    else if (strncmp(str, "skewX", 5) == 0)
      str += nsvg__parseSkewX(t, str);
    else if (strncmp(str, "skewY", 5) == 0)
      str += nsvg__parseSkewY(t, str);
    else {
      ++str;
      continue;
    }
    nsvg__xformPremultiply(xform, t);
  }
}


x86 assembly (clang, -O0):
<nsvg__parseTransform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   10a0 <nsvg__xformIdentity@plt>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1378 <nsvg__parseTransform+0x1e8>
mov    -0x10(%rbp),%rdi
lea    0xe3f(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11f7 <nsvg__parseTransform+0x67>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <nsvg__parseMatrix@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1366 <nsvg__parseTransform+0x1d6>
mov    -0x10(%rbp),%rdi
lea    0xe05(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1238 <nsvg__parseTransform+0xa8>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1080 <nsvg__parseTranslate@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1361 <nsvg__parseTransform+0x1d1>
mov    -0x10(%rbp),%rdi
lea    0xdce(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1279 <nsvg__parseTransform+0xe9>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <nsvg__parseScale@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    135c <nsvg__parseTransform+0x1cc>
mov    -0x10(%rbp),%rdi
lea    0xd93(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12ba <nsvg__parseTransform+0x12a>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <nsvg__parseRotate@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1357 <nsvg__parseTransform+0x1c7>
mov    -0x10(%rbp),%rdi
lea    0xd59(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12fb <nsvg__parseTransform+0x16b>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <nsvg__parseSkewX@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1352 <nsvg__parseTransform+0x1c2>
mov    -0x10(%rbp),%rdi
lea    0xd1e(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    133c <nsvg__parseTransform+0x1ac>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1090 <nsvg__parseSkewY@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    134d <nsvg__parseTransform+0x1bd>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11a9 <nsvg__parseTransform+0x19>
jmp    1352 <nsvg__parseTransform+0x1c2>
jmp    1357 <nsvg__parseTransform+0x1c7>
jmp    135c <nsvg__parseTransform+0x1cc>
jmp    1361 <nsvg__parseTransform+0x1d1>
jmp    1366 <nsvg__parseTransform+0x1d6>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10b0 <nsvg__xformPremultiply@plt>
jmp    11a9 <nsvg__parseTransform+0x19>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__parseTransform>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
call   10a0 <nsvg__xformIdentity@plt>
cmpb   $0x0,(%rbx)
je     12e9 <nsvg__parseTransform+0x159>
lea    0xe47(%rip),%r15
mov    %rsp,%r12
lea    0xe44(%rip),%r13
lea    0xe47(%rip),%rbp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1280 <nsvg__parseTransform+0xf0>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1290 <nsvg__parseTransform+0x100>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     129d <nsvg__parseTransform+0x10d>
mov    %rbx,%rdi
lea    0xdf2(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12aa <nsvg__parseTransform+0x11a>
mov    %rbx,%rdi
lea    0xde0(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12b7 <nsvg__parseTransform+0x127>
mov    %rbx,%rdi
lea    0xdcd(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12c4 <nsvg__parseTransform+0x134>
add    $0x1,%rbx
cmpb   $0x0,(%rbx)
jne    11d0 <nsvg__parseTransform+0x40>
jmp    12e9 <nsvg__parseTransform+0x159>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
mov    %rbx,%rsi
call   1070 <nsvg__parseMatrix@plt>
jmp    12d0 <nsvg__parseTransform+0x140>
nopl   (%rax)
mov    %r12,%rdi
mov    %rbx,%rsi
call   1080 <nsvg__parseTranslate@plt>
jmp    12d0 <nsvg__parseTransform+0x140>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <nsvg__parseScale@plt>
jmp    12d0 <nsvg__parseTransform+0x140>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <nsvg__parseRotate@plt>
jmp    12d0 <nsvg__parseTransform+0x140>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <nsvg__parseSkewX@plt>
jmp    12d0 <nsvg__parseTransform+0x140>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1090 <nsvg__parseSkewY@plt>
nop
cltq
add    %rax,%rbx
mov    %r14,%rdi
mov    %r12,%rsi
call   10b0 <nsvg__xformPremultiply@plt>
cmpb   $0x0,(%rbx)
jne    11d0 <nsvg__parseTransform+0x40>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"matrix\00"
@.str.1 = [10 x i8] c"translate\00"
@.str.2 = [6 x i8] c"scale\00"
@.str.3 = [7 x i8] c"rotate\00"
@.str.4 = [6 x i8] c"skewX\00"
@.str.5 = [6 x i8] c"skewY\00"
define void @nsvg__parseTransform(float* %0, i8* %1) {
%3 = alloca float*
%4 = alloca i8*
%5 = alloca [6 x float]
store float* %0, float** %3
store i8* %1, i8** %4
%6 = load float*, float** %3
%7 = call i32 @nsvg__xformIdentity(float* %6)
br label %8
8: ; preds = %86, %78, %2
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %90
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %12
%17 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%18 = load i8*, i8** %4
%19 = call i32 @nsvg__parseMatrix(float* %17, i8* %18)
%20 = load i8*, i8** %4
%21 = sext i32 %19 to i64
%22 = getelementptr inbounds i8, i8* %20, i64 %21
store i8* %22, i8** %4
br label %86
23: ; preds = %12
%24 = load i8*, i8** %4
%25 = call i64 @strncmp(i8* %24, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%29 = load i8*, i8** %4
%30 = call i32 @nsvg__parseTranslate(float* %28, i8* %29)
%31 = load i8*, i8** %4
%32 = sext i32 %30 to i64
%33 = getelementptr inbounds i8, i8* %31, i64 %32
store i8* %33, i8** %4
br label %85
34: ; preds = %23
%35 = load i8*, i8** %4
%36 = call i64 @strncmp(i8* %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %45
38: ; preds = %34
%39 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%40 = load i8*, i8** %4
%41 = call i32 @nsvg__parseScale(float* %39, i8* %40)
%42 = load i8*, i8** %4
%43 = sext i32 %41 to i64
%44 = getelementptr inbounds i8, i8* %42, i64 %43
store i8* %44, i8** %4
br label %84
45: ; preds = %34
%46 = load i8*, i8** %4
%47 = call i64 @strncmp(i8* %46, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %56
49: ; preds = %45
%50 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%51 = load i8*, i8** %4
%52 = call i32 @nsvg__parseRotate(float* %50, i8* %51)
%53 = load i8*, i8** %4
%54 = sext i32 %52 to i64
%55 = getelementptr inbounds i8, i8* %53, i64 %54
store i8* %55, i8** %4
br label %83
56: ; preds = %45
%57 = load i8*, i8** %4
%58 = call i64 @strncmp(i8* %57, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %67
60: ; preds = %56
%61 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%62 = load i8*, i8** %4
%63 = call i32 @nsvg__parseSkewX(float* %61, i8* %62)
%64 = load i8*, i8** %4
%65 = sext i32 %63 to i64
%66 = getelementptr inbounds i8, i8* %64, i64 %65
store i8* %66, i8** %4
br label %82
67: ; preds = %56
%68 = load i8*, i8** %4
%69 = call i64 @strncmp(i8* %68, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %78
71: ; preds = %67
%72 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%73 = load i8*, i8** %4
%74 = call i32 @nsvg__parseSkewY(float* %72, i8* %73)
%75 = load i8*, i8** %4
%76 = sext i32 %74 to i64
%77 = getelementptr inbounds i8, i8* %75, i64 %76
store i8* %77, i8** %4
br label %81
78: ; preds = %67
%79 = load i8*, i8** %4
%80 = getelementptr inbounds i8, i8* %79, i32 1
store i8* %80, i8** %4
br label %8
81: ; preds = %71
br label %82
82: ; preds = %81, %60
br label %83
83: ; preds = %82, %49
br label %84
84: ; preds = %83, %38
br label %85
85: ; preds = %84, %27
br label %86
86: ; preds = %85, %16
%87 = load float*, float** %3
%88 = getelementptr inbounds [6 x float], [6 x float]* %5, i64 0, i64 0
%89 = call i32 @nsvg__xformPremultiply(float* %87, float* %88)
br label %8
90: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"matrix\00"
@.str.1 = [10 x i8] c"translate\00"
@.str.2 = [6 x i8] c"scale\00"
@.str.3 = [7 x i8] c"rotate\00"
@.str.4 = [6 x i8] c"skewX\00"
@.str.5 = [6 x i8] c"skewY\00"
define void @nsvg__parseTransform(float* %0, i8* %1) {
%3 = alloca [6 x float]
%4 = bitcast [6 x float]* %3 to i8*
%5 = tail call i32 @nsvg__xformIdentity(float* %0)
%6 = load i8, i8* %1
%7 = icmp eq i8 %6, 0
br i1 %7, label %52, label %8
8: ; preds = %2
%9 = getelementptr inbounds [6 x float], [6 x float]* %3, i64 0, i64 0
br label %10
10: ; preds = %8, %43
%11 = phi i8* [ %1, %8 ], [ %44, %43 ]
%12 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @nsvg__parseMatrix(float* %9, i8* %11)
br label %47
16: ; preds = %10
%17 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @nsvg__parseTranslate(float* %9, i8* %11)
br label %47
21: ; preds = %16
%22 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @nsvg__parseScale(float* %9, i8* %11)
br label %47
26: ; preds = %21
%27 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @nsvg__parseRotate(float* %9, i8* %11)
br label %47
31: ; preds = %26
%32 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @nsvg__parseSkewX(float* %9, i8* %11)
br label %47
36: ; preds = %31
%37 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @nsvg__parseSkewY(float* %9, i8* %11)
br label %47
41: ; preds = %36
%42 = getelementptr inbounds i8, i8* %11, i64 1
br label %43
43: ; preds = %41, %47
%44 = phi i8* [ %50, %47 ], [ %42, %41 ]
%45 = load i8, i8* %44
%46 = icmp eq i8 %45, 0
br i1 %46, label %52, label %10
47: ; preds = %19, %29, %39, %34, %24, %14
%48 = phi i32 [ %20, %19 ], [ %30, %29 ], [ %40, %39 ], [ %35, %34 ], [ %25, %24 ], [ %15, %14 ]
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %11, i64 %49
%51 = call i32 @nsvg__xformPremultiply(float* %0, float* %9)
br label %43
52: ; preds = %43, %2
ret void
}