#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*/ sc_parse_parameters(char const *, char, char, float *,
                                       float *);
int vrna_sc_SHAPE_parse_method(const char *method_string, char *method,
                               float *param_1, float *param_2) {
  const char *params = method_string + 1;
  *param_1 = 0;
  *param_2 = 0;
  if (!method_string || !method_string[0])
    return 0;
  *method = method_string[0];
  switch (method_string[0]) {
  case 'Z':
    *param_1 = 0.89;
    sc_parse_parameters(params, 'b', '\0', param_1, NULL);
    break;
  case 'D':
    *param_1 = 1.8;
    *param_2 = -0.6;
    sc_parse_parameters(params, 'm', 'b', param_1, param_2);
    break;
  case 'W':
    break;
  default:
    *method = 0;
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<vrna_sc_SHAPE_parse_method>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1162 <vrna_sc_SHAPE_parse_method+0x52>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    116e <vrna_sc_SHAPE_parse_method+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    1241 <vrna_sc_SHAPE_parse_method+0x131>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x34(%rbp)
sub    $0x44,%eax
je     11e2 <vrna_sc_SHAPE_parse_method+0xd2>
jmp    1192 <vrna_sc_SHAPE_parse_method+0x82>
mov    -0x34(%rbp),%eax
sub    $0x57,%eax
je     1222 <vrna_sc_SHAPE_parse_method+0x112>
jmp    11a3 <vrna_sc_SHAPE_parse_method+0x93>
mov    -0x34(%rbp),%eax
sub    $0x5a,%eax
jne    1227 <vrna_sc_SHAPE_parse_method+0x117>
jmp    11b4 <vrna_sc_SHAPE_parse_method+0xa4>
mov    -0x20(%rbp),%rax
movss  0xe48(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    $0x62,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <sc_parse_parameters@plt>
jmp    123a <vrna_sc_SHAPE_parse_method+0x12a>
mov    -0x20(%rbp),%rax
movss  0xe16(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movss  0xe02(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x6d,%esi
mov    $0x62,%edx
call   1030 <sc_parse_parameters@plt>
jmp    123a <vrna_sc_SHAPE_parse_method+0x12a>
jmp    123a <vrna_sc_SHAPE_parse_method+0x12a>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1241 <vrna_sc_SHAPE_parse_method+0x131>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrna_sc_SHAPE_parse_method>:
push   %rbx
mov    %rcx,%r8
movl   $0x0,(%rdx)
movl   $0x0,(%rcx)
xor    %ebx,%ebx
test   %rdi,%rdi
je     1187 <vrna_sc_SHAPE_parse_method+0x77>
mov    (%rdi),%al
test   %al,%al
je     1187 <vrna_sc_SHAPE_parse_method+0x77>
mov    %rdx,%rcx
mov    %al,(%rsi)
movsbl (%rdi),%eax
add    $0x1,%rdi
mov    $0x1,%ebx
cmp    $0x44,%eax
je     1164 <vrna_sc_SHAPE_parse_method+0x54>
cmp    $0x57,%eax
je     1187 <vrna_sc_SHAPE_parse_method+0x77>
cmp    $0x5a,%eax
jne    1182 <vrna_sc_SHAPE_parse_method+0x72>
movl   $0x3f63d70a,(%rcx)
mov    $0x62,%esi
xor    %edx,%edx
xor    %r8d,%r8d
call   1030 <sc_parse_parameters@plt>
jmp    1187 <vrna_sc_SHAPE_parse_method+0x77>
movl   $0x3fe66666,(%rcx)
movl   $0xbf19999a,(%r8)
mov    $0x6d,%esi
mov    $0x62,%edx
call   1030 <sc_parse_parameters@plt>
jmp    1187 <vrna_sc_SHAPE_parse_method+0x77>
movb   $0x0,(%rsi)
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @vrna_sc_SHAPE_parse_method(i8* %0, i8* %1, float* %2, float* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca float*
%9 = alloca float*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store float* %2, float** %8
store float* %3, float** %9
%11 = load i8*, i8** %6
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %12, i8** %10
%13 = load float*, float** %8
store float 0.000000e+00, float* %13
%14 = load float*, float** %9
store float 0.000000e+00, float* %14
%15 = load i8*, i8** %6
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %22
17: ; preds = %4
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = icmp ne i8 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %17, %4
store i32 0, i32* %5
br label %48
23: ; preds = %17
%24 = load i8*, i8** %6
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = load i8*, i8** %7
store i8 %26, i8* %27
%28 = load i8*, i8** %6
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
switch i32 %31, label %45 [
i32 90, label %32
i32 68, label %37
i32 87, label %44
]
32: ; preds = %23
%33 = load float*, float** %8
store float 0x3FEC7AE140000000, float* %33
%34 = load i8*, i8** %10
%35 = load float*, float** %8
%36 = call i32 @sc_parse_parameters(i8* %34, i8 signext 98, i8 signext 0, float* %35, float* null)
br label %47
37: ; preds = %23
%38 = load float*, float** %8
store float 0x3FFCCCCCC0000000, float* %38
%39 = load float*, float** %9
store float 0xBFE3333340000000, float* %39
%40 = load i8*, i8** %10
%41 = load float*, float** %8
%42 = load float*, float** %9
%43 = call i32 @sc_parse_parameters(i8* %40, i8 signext 109, i8 signext 98, float* %41, float* %42)
br label %47
44: ; preds = %23
br label %47
45: ; preds = %23
%46 = load i8*, i8** %7
store i8 0, i8* %46
store i32 0, i32* %5
br label %48
47: ; preds = %44, %37, %32
store i32 1, i32* %5
br label %48
48: ; preds = %47, %45, %22
%49 = load i32, i32* %5
ret i32 %49
}

LLVM IR (-O2):
define i32 @vrna_sc_SHAPE_parse_method(i8* %0, i8* nocapture writeonly %1, float* %2, float* %3) {
%5 = getelementptr inbounds i8, i8* %0, i64 1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
%6 = icmp eq i8* %0, null
br i1 %6, label %18, label %7
7: ; preds = %4
%8 = load i8, i8* %0
%9 = icmp eq i8 %8, 0
br i1 %9, label %18, label %10
10: ; preds = %7
store i8 %8, i8* %1
%11 = load i8, i8* %0
%12 = sext i8 %11 to i32
switch i32 %12, label %17 [
i32 90, label %13
i32 68, label %15
i32 87, label %18
]
13: ; preds = %10
store float 0x3FEC7AE140000000, float* %2
%14 = tail call i32 @sc_parse_parameters(i8* %5, i8 signext 98, i8 signext 0, float* %2, float* null)
br label %18
15: ; preds = %10
store float 0x3FFCCCCCC0000000, float* %2
store float 0xBFE3333340000000, float* %3
%16 = tail call i32 @sc_parse_parameters(i8* %5, i8 signext 109, i8 signext 98, float* %2, float* %3)
br label %18
17: ; preds = %10
store i8 0, i8* %1
br label %18
18: ; preds = %13, %15, %10, %4, %7, %17
%19 = phi i32 [ 0, %17 ], [ 0, %7 ], [ 0, %4 ], [ 1, %10 ], [ 1, %15 ], [ 1, %13 ]
ret i32 %19
}