#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 ProcessCommand(char *, char *);
int /*<<< orphan*/ strcmp(char const *, char *);
int ExecMuteCommand(char ret[], const char *arg) {
  if (!strcmp(arg, "on"))
    return (ProcessCommand(ret, "C0D\r"));
  if (!strcmp(arg, "off"))
    return (ProcessCommand(ret, "C0E\r"));
  return (2);
}


x86 assembly (clang, -O0):
<ExecMuteCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1161 <ExecMuteCommand+0x41>
mov    -0x10(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <ProcessCommand@plt>
mov    %eax,-0x4(%rbp)
jmp    1199 <ExecMuteCommand+0x79>
mov    -0x18(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1192 <ExecMuteCommand+0x72>
mov    -0x10(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   1030 <ProcessCommand@plt>
mov    %eax,-0x4(%rbp)
jmp    1199 <ExecMuteCommand+0x79>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExecMuteCommand>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     115d <ExecMuteCommand+0x3d>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1166 <ExecMuteCommand+0x46>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe9f(%rip),%rsi
jmp    116d <ExecMuteCommand+0x4d>
lea    0xe9f(%rip),%rsi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ProcessCommand@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"on\00"
@.str.1 = [5 x i8] c"C0D\0D\00"
@.str.2 = [4 x i8] c"off\00"
@.str.3 = [5 x i8] c"C0E\0D\00"
define i32 @ExecMuteCommand(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i32 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @ProcessCommand(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32 %11, i32* %3
br label %20
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %12
%17 = load i8*, i8** %4
%18 = call i32 @ProcessCommand(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
store i32 %18, i32* %3
br label %20
19: ; preds = %12
store i32 2, i32* %3
br label %20
20: ; preds = %19, %16, %9
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [3 x i8] c"on\00"
@.str.1 = [5 x i8] c"C0D\0D\00"
@.str.2 = [4 x i8] c"off\00"
@.str.3 = [5 x i8] c"C0E\0D\00"
define i32 @ExecMuteCommand(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5, %2
%9 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %5 ]
%10 = tail call i32 @ProcessCommand(i8* %0, i8* %9)
br label %11
11: ; preds = %8, %5
%12 = phi i32 [ 2, %5 ], [ %10, %8 ]
ret i32 %12
}