#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*/ csc_strlcat(char *, char *, int);
int slog_csoup_trans_module(int cw, char *buf, int blen) {
  if (cw & (1 << ((0) + 4))) {
    csc_strlcat(buf, "[SLOG]", blen);
  }
  if (cw & (1 << ((1) + 4))) {
    csc_strlcat(buf, "[CLI]", blen);
  }
  if (cw & (1 << ((2) + 4))) {
    csc_strlcat(buf, "[CONFIG]", blen);
  }
  return 0;
}


x86 assembly (clang, -O0):
<slog_csoup_trans_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1144 <slog_csoup_trans_module+0x34>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1030 <csc_strlcat@plt>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1166 <slog_csoup_trans_module+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xea6(%rip),%rsi
call   1030 <csc_strlcat@plt>
mov    -0x4(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1188 <slog_csoup_trans_module+0x78>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe8a(%rip),%rsi
call   1030 <csc_strlcat@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slog_csoup_trans_module>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
test   $0x10,%bpl
jne    1147 <slog_csoup_trans_module+0x37>
test   $0x20,%bpl
jne    115f <slog_csoup_trans_module+0x4f>
test   $0x40,%bpl
je     1140 <slog_csoup_trans_module+0x30>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <csc_strlcat@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <csc_strlcat@plt>
test   $0x20,%bpl
je     1128 <slog_csoup_trans_module+0x18>
lea    0xea1(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
call   1030 <csc_strlcat@plt>
test   $0x40,%bpl
jne    112e <slog_csoup_trans_module+0x1e>
jmp    1140 <slog_csoup_trans_module+0x30>

LLVM IR (-O0):
@.str = [7 x i8] c"[SLOG]\00"
@.str.1 = [6 x i8] c"[CLI]\00"
@.str.2 = [9 x i8] c"[CONFIG]\00"
define i32 @slog_csoup_trans_module(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = and i32 %7, 16
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @csc_strlcat(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %3
%15 = load i32, i32* %4
%16 = and i32 %15, 32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i8*, i8** %5
%20 = load i32, i32* %6
%21 = call i32 @csc_strlcat(i8* %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %4
%24 = and i32 %23, 64
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i8*, i8** %5
%28 = load i32, i32* %6
%29 = call i32 @csc_strlcat(i8* %27, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %26, %22
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"[SLOG]\00"
@.str.1 = [6 x i8] c"[CLI]\00"
@.str.2 = [9 x i8] c"[CONFIG]\00"
define i32 @slog_csoup_trans_module(i32 %0, i8* %1, i32 %2) {
%4 = and i32 %0, 16
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @csc_strlcat(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %8
8: ; preds = %6, %3
%9 = and i32 %0, 32
%10 = icmp eq i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8
%12 = tail call i32 @csc_strlcat(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %13
13: ; preds = %11, %8
%14 = and i32 %0, 64
%15 = icmp eq i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call i32 @csc_strlcat(i8* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %2)
br label %18
18: ; preds = %16, %13
ret i32 0
}