#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*/ FileSpecActiveProfil(char *, int const);
size_t strlen(char *);
void FileSpecActiveProfils(char *specsName, const int verbose) {
  if (specsName != NULL) {
    size_t lenSpecsName, len;
    char *specName = specsName;
    lenSpecsName = strlen(specsName);
    for (len = lenSpecsName - 1; len > 0; len--)
      if (specsName[len] == ',') {
        specsName[len] = '\0';
        specName = specsName + len + 1;
        FileSpecActiveProfil(specName, verbose);
      }
    FileSpecActiveProfil(specsName, verbose);
  }
}


x86 assembly (clang, -O0):
<FileSpecActiveProfils>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11c5 <FileSpecActiveProfils+0xa5>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jbe    11b9 <FileSpecActiveProfils+0x99>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2c,%eax
jne    11a3 <FileSpecActiveProfils+0x83>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <FileSpecActiveProfil@plt>
jmp    11a8 <FileSpecActiveProfils+0x88>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    115b <FileSpecActiveProfils+0x3b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <FileSpecActiveProfil@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileSpecActiveProfils>:
test   %rdi,%rdi
je     1173 <FileSpecActiveProfils+0x53>
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x1,%rax
je     1164 <FileSpecActiveProfils+0x44>
mov    %rax,%rbp
jmp    114a <FileSpecActiveProfils+0x2a>
nop
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%rbp
je     1164 <FileSpecActiveProfils+0x44>
cmpb   $0x2c,-0x1(%rbx,%rbp,1)
jne    1140 <FileSpecActiveProfils+0x20>
lea    (%rbx,%rbp,1),%rdi
movb   $0x0,-0x1(%rbx,%rbp,1)
mov    %r14d,%esi
call   1040 <FileSpecActiveProfil@plt>
jmp    1140 <FileSpecActiveProfils+0x20>
mov    %rbx,%rdi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <FileSpecActiveProfil@plt>
ret

LLVM IR (-O0):
define void @FileSpecActiveProfils(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %45
10: ; preds = %2
%11 = load i8*, i8** %3
store i8* %11, i8** %7
%12 = load i8*, i8** %3
%13 = call i64 @strlen(i8* %12)
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = sub i64 %14, 1
store i64 %15, i64* %6
br label %16
16: ; preds = %38, %10
%17 = load i64, i64* %6
%18 = icmp ugt i64 %17, 0
br i1 %18, label %19, label %41
19: ; preds = %16
%20 = load i8*, i8** %3
%21 = load i64, i64* %6
%22 = getelementptr inbounds i8, i8* %20, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 44
br i1 %25, label %26, label %37
26: ; preds = %19
%27 = load i8*, i8** %3
%28 = load i64, i64* %6
%29 = getelementptr inbounds i8, i8* %27, i64 %28
store i8 0, i8* %29
%30 = load i8*, i8** %3
%31 = load i64, i64* %6
%32 = getelementptr inbounds i8, i8* %30, i64 %31
%33 = getelementptr inbounds i8, i8* %32, i64 1
store i8* %33, i8** %7
%34 = load i8*, i8** %7
%35 = load i32, i32* %4
%36 = call i32 @FileSpecActiveProfil(i8* %34, i32 %35)
br label %37
37: ; preds = %26, %19
br label %38
38: ; preds = %37
%39 = load i64, i64* %6
%40 = add i64 %39, -1
store i64 %40, i64* %6
br label %16
41: ; preds = %16
%42 = load i8*, i8** %3
%43 = load i32, i32* %4
%44 = call i32 @FileSpecActiveProfil(i8* %42, i32 %43)
br label %45
45: ; preds = %41, %2
ret void
}

LLVM IR (-O2):
define void @FileSpecActiveProfils(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %22, label %4
4: ; preds = %2
%5 = tail call i64 @strlen(i8* %0)
%6 = add i64 %5, -1
%7 = icmp eq i64 %6, 0
br i1 %7, label %20, label %8
8: ; preds = %4, %17
%9 = phi i64 [ %18, %17 ], [ %6, %4 ]
%10 = phi i64 [ %9, %17 ], [ %5, %4 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %9
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 44
br i1 %13, label %14, label %17
14: ; preds = %8
store i8 0, i8* %11
%15 = getelementptr inbounds i8, i8* %0, i64 %10
%16 = tail call i32 @FileSpecActiveProfil(i8* %15, i32 %1)
br label %17
17: ; preds = %8, %14
%18 = add i64 %9, -1
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %8
20: ; preds = %17, %4
%21 = tail call i32 @FileSpecActiveProfil(i8* %0, i32 %1)
br label %22
22: ; preds = %20, %2
ret void
}