#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*/ memcpy(float *, float *, int);
int nsvg__parseTransformArgs(char const *, float *, int, int *);
int nsvg__parseMatrix(float *xform, const char *str) {
  float t[6];
  int na = 0;
  int len = nsvg__parseTransformArgs(str, t, 6, &na);
  if (na != 6)
    return len;
  memcpy(xform, t, sizeof(float) * 6);
  return len;
}


x86 assembly (clang, -O0):
<nsvg__parseMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x6,%edx
lea    -0x34(%rbp),%rcx
call   1040 <nsvg__parseTransformArgs@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x6,-0x34(%rbp)
je     1165 <nsvg__parseMatrix+0x45>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117d <nsvg__parseMatrix+0x5d>
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x18,%edx
call   1030 <memcpy@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__parseMatrix>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rax
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rcx
mov    %rax,%rdi
mov    $0x6,%edx
call   1040 <nsvg__parseTransformArgs@plt>
mov    %eax,%ebp
cmpl   $0x6,0xc(%rsp)
jne    1166 <nsvg__parseMatrix+0x46>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x18,%edx
call   1030 <memcpy@plt>
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @nsvg__parseMatrix(float* %0, i8* %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca i8*
%6 = alloca [6 x float]
%7 = alloca i32
%8 = alloca i32
store float* %0, float** %4
store i8* %1, i8** %5
store i32 0, i32* %7
%9 = load i8*, i8** %5
%10 = getelementptr inbounds [6 x float], [6 x float]* %6, i64 0, i64 0
%11 = call i32 @nsvg__parseTransformArgs(i8* %9, float* %10, i32 6, i32* %7)
store i32 %11, i32* %8
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 6
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = load i32, i32* %8
store i32 %15, i32* %3
br label %21
16: ; preds = %2
%17 = load float*, float** %4
%18 = getelementptr inbounds [6 x float], [6 x float]* %6, i64 0, i64 0
%19 = call i32 @memcpy(float* %17, float* %18, i32 24)
%20 = load i32, i32* %8
store i32 %20, i32* %3
br label %21
21: ; preds = %16, %14
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @nsvg__parseMatrix(float* %0, i8* %1) {
%3 = alloca [6 x float]
%4 = alloca i32
%5 = bitcast [6 x float]* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = getelementptr inbounds [6 x float], [6 x float]* %3, i64 0, i64 0
%8 = call i32 @nsvg__parseTransformArgs(i8* %1, float* %7, i32 6, i32* %4)
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 6
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @memcpy(float* %0, float* %7, i32 24)
br label %13
13: ; preds = %2, %11
ret i32 %8
}