#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*/ executeRawApplescriptAsync(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void changeSystemVolume(int modif) {
  char command[512];
  if (modif >= 0)
    sprintf(command,
            "set volume output volume (output volume of (get volume settings)) "
            "+ %d",
            modif);
  else {
    modif = -modif;
    sprintf(command,
            "set volume output volume (output volume of (get volume settings)) "
            "- %d",
            modif);
  }
  executeRawApplescriptAsync(command);
}


x86 assembly (clang, -O0):
<changeSystemVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1153 <changeSystemVolume+0x33>
lea    -0x210(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
jmp    1171 <changeSystemVolume+0x51>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x210(%rbp),%rdi
call   1030 <executeRawApplescriptAsync@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeSystemVolume>:
sub    $0x208,%rsp
mov    %edi,%edx
test   %edi,%edi
js     1136 <changeSystemVolume+0x16>
lea    0xecc(%rip),%rsi
jmp    113f <changeSystemVolume+0x1f>
neg    %edx
lea    0xf08(%rip),%rsi
mov    %rsp,%rdi
call   1040 <sprintf@plt>
mov    %rsp,%rdi
call   1030 <executeRawApplescriptAsync@plt>
add    $0x208,%rsp
ret

LLVM IR (-O0):
@.str = [71 x i8] c"set volume output volume (output volume of (get volume settings)) + %d\00"
@.str.1 = [71 x i8] c"set volume output volume (output volume of (get volume settings)) - %d\00"
define void @changeSystemVolume(i32 %0) {
%2 = alloca i32
%3 = alloca [512 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* %2
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %16
10: ; preds = %1
%11 = load i32, i32* %2
%12 = sub nsw i32 0, %11
store i32 %12, i32* %2
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* %2
%15 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %10, %6
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%18 = call i32 @executeRawApplescriptAsync(i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"set volume output volume (output volume of (get volume settings)) + %d\00"
@.str.1 = [71 x i8] c"set volume output volume (output volume of (get volume settings)) - %d\00"
define void @changeSystemVolume(i32 %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = icmp sgt i32 %0, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %10
7: ; preds = %1
%8 = sub nsw i32 0, %0
%9 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %5
%11 = call i32 @executeRawApplescriptAsync(i8* %3)
ret void
}