#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*/ bin_exclude(char *);
int parse(char *, char **);
int /*<<< orphan*/ strcpy(char *, char *);
char *strstr(char *, char *);
void do_exclude(char *args) {
  int i, argc;
  char *p1, *argv[50];
  char argbuf[100];
  if (strstr(args, ",")) {
    strcpy(argbuf, args);
    while ((p1 = strstr(argbuf, ",")))
      *p1 = ' ';
    argc = parse(argbuf, argv);
  } else {
    argc = 1;
    argv[0] = args;
  }
  for (i = 0; i < argc; i++)
    bin_exclude(argv[i]);
}


x86 assembly (clang, -O0):
<do_exclude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
je     11c1 <do_exclude+0x81>
lea    -0x220(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x220(%rbp),%rdi
lea    0xe79(%rip),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11a6 <do_exclude+0x66>
mov    -0x18(%rbp),%rax
movb   $0x20,(%rax)
jmp    1179 <do_exclude+0x39>
lea    -0x220(%rbp),%rdi
lea    -0x1b0(%rbp),%rsi
call   1050 <parse@plt>
mov    %eax,-0x10(%rbp)
jmp    11d3 <do_exclude+0x93>
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x1b0(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1205 <do_exclude+0xc5>
movslq -0xc(%rbp),%rax
mov    -0x1b0(%rbp,%rax,8),%rdi
ff
call   1040 <bin_exclude@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11da <do_exclude+0x9a>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_exclude>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rdi,%rbx
mov    $0x2c,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     11a8 <do_exclude+0x68>
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    $0x2c,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1195 <do_exclude+0x55>
mov    %rsp,%rbx
nop
movb   $0x20,(%rax)
mov    %rbx,%rdi
mov    $0x2c,%esi
call   1040 <strchr@plt>
test   %rax,%rax
jne    1180 <do_exclude+0x40>
mov    %rsp,%rdi
lea    0x70(%rsp),%rsi
call   1060 <parse@plt>
test   %eax,%eax
jg     11b2 <do_exclude+0x72>
jmp    11d3 <do_exclude+0x93>
mov    %rbx,0x70(%rsp)
mov    $0x1,%eax
mov    %eax,%r14d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x70(%rsp,%rbx,8),%rdi
call   1050 <bin_exclude@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    11c0 <do_exclude+0x80>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define void @do_exclude(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [50 x i8*]
%7 = alloca [100 x i8]
store i8* %0, i8** %2
%8 = load i8*, i8** %2
%9 = call i8* @strstr(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %25
11: ; preds = %1
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %15
15: ; preds = %19, %11
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%17 = call i8* @strstr(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %17, i8** %5
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i8*, i8** %5
store i8 32, i8* %20
br label %15
21: ; preds = %15
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%23 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 0
%24 = call i32 @parse(i8* %22, i8** %23)
store i32 %24, i32* %4
br label %28
25: ; preds = %1
store i32 1, i32* %4
%26 = load i8*, i8** %2
%27 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 0
store i8* %26, i8** %27
br label %28
28: ; preds = %25, %21
store i32 0, i32* %3
br label %29
29: ; preds = %39, %28
%30 = load i32, i32* %3
%31 = load i32, i32* %4
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %42
33: ; preds = %29
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [50 x i8*], [50 x i8*]* %6, i64 0, i64 %35
%37 = load i8*, i8** %36
%38 = call i32 @bin_exclude(i8* %37)
br label %39
39: ; preds = %33
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %29
42: ; preds = %29
ret void
}

LLVM IR (-O2):
define void @do_exclude(i8* %0) {
%2 = alloca [50 x i8*]
%3 = alloca [100 x i8]
%4 = bitcast [50 x i8*]* %2 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 44)
%7 = icmp eq i8* %6, null
br i1 %7, label %16, label %8
8: ; preds = %1
%9 = call i32 @strcpy(i8* %5, i8* %0)
%10 = call i8* @strchr(i8* %5, i32 44)
%11 = icmp eq i8* %10, null
br i1 %11, label %18, label %12
12: ; preds = %8, %12
%13 = phi i8* [ %14, %12 ], [ %10, %8 ]
store i8 32, i8* %13
%14 = call i8* @strchr(i8* %5, i32 44)
%15 = icmp eq i8* %14, null
br i1 %15, label %18, label %12
16: ; preds = %1
%17 = getelementptr inbounds [50 x i8*], [50 x i8*]* %2, i64 0, i64 0
store i8* %0, i8** %17
br label %22
18: ; preds = %12, %8
%19 = getelementptr inbounds [50 x i8*], [50 x i8*]* %2, i64 0, i64 0
%20 = call i32 @parse(i8* %5, i8** %19)
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %32
22: ; preds = %16, %18
%23 = phi i32 [ 1, %16 ], [ %20, %18 ]
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %22, %25
%26 = phi i64 [ 0, %22 ], [ %30, %25 ]
%27 = getelementptr inbounds [50 x i8*], [50 x i8*]* %2, i64 0, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 @bin_exclude(i8* %28)
%30 = add nuw nsw i64 %26, 1
%31 = icmp eq i64 %30, %24
br i1 %31, label %32, label %25
32: ; preds = %25, %18
ret void
}