#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 */
scalar_t__ softmixer_is_mono();
int /*<<< orphan*/ softmixer_set_mono(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ status_msg(char *);
void req_toggle_make_mono() {
  char buffer[128];
  softmixer_set_mono(!softmixer_is_mono());
  sprintf(buffer, "Mono-Mixing set to: %s", softmixer_is_mono() ? "on" : "off");
  status_msg(buffer);
}


x86 assembly (clang, -O0):
<req_toggle_make_mono>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    $0x0,%al
call   1040 <softmixer_is_mono@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <softmixer_set_mono@plt>
lea    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    $0x0,%al
call   1040 <softmixer_is_mono@plt>
mov    -0x88(%rbp),%rdi
mov    %rax,%rcx
lea    0xe92(%rip),%rdx
lea    0xe88(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xe62(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1060 <status_msg@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_toggle_make_mono>:
push   %rbx
sub    $0x80,%rsp
xor    %eax,%eax
call   1040 <softmixer_is_mono@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1030 <softmixer_set_mono@plt>
xor    %eax,%eax
call   1040 <softmixer_is_mono@plt>
test   %rax,%rax
lea    0xeac(%rip),%rax
lea    0xea2(%rip),%rdx
cmove  %rax,%rdx
lea    0xe80(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <status_msg@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Mono-Mixing set to: %s\00"
@.str.1 = [3 x i8] c"on\00"
@.str.2 = [4 x i8] c"off\00"
define void @req_toggle_make_mono() {
%1 = alloca [128 x i8]
%2 = call i64 (...) @softmixer_is_mono()
%3 = icmp ne i64 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
%6 = call i32 @softmixer_set_mono(i32 %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%8 = call i64 (...) @softmixer_is_mono()
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%12 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%14 = call i32 @status_msg(i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Mono-Mixing set to: %s\00"
@.str.1 = [3 x i8] c"on\00"
@.str.2 = [4 x i8] c"off\00"
define void @req_toggle_make_mono() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i64 (...) @softmixer_is_mono()
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @softmixer_set_mono(i32 %5)
%7 = tail call i64 (...) @softmixer_is_mono()
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%10 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 @status_msg(i8* %2)
ret void
}