#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*/ cnfImprt(char *const, int, char *);
int /*<<< orphan*/ msgTune(char *, int, int *);
int /*<<< orphan*/ starFree(char *);
char *starMallocAtomic(int);
void msg_tune_(char *const PARAM, int *const VALUE, int *const STATUS,
               int PARAM_length) {
  int value;
  int status;
  char *param;
  ;
  value = *VALUE;
  status = *STATUS;
  param = starMallocAtomic(PARAM_length + 1);
  cnfImprt(PARAM, PARAM_length, param);
  msgTune(param, value, &status);
  starFree(param);
  *STATUS = status;
}


x86 assembly (clang, -O0):
<msg_tune_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%edi
add    $0x1,%edi
call   1050 <starMallocAtomic@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x30(%rbp),%rdx
call   1060 <cnfImprt@plt>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%esi
lea    -0x24(%rbp),%rdx
call   1030 <msgTune@plt>
mov    -0x30(%rbp),%rdi
call   1040 <starFree@plt>
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_tune_>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%ebx
mov    %rdx,%r14
mov    %rdi,%r15
mov    (%rsi),%r12d
mov    (%rdx),%eax
mov    %eax,0xc(%rsp)
lea    0x1(%rbx),%edi
call   1050 <starMallocAtomic@plt>
mov    %rax,%rbp
mov    %r15,%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1060 <cnfImprt@plt>
lea    0xc(%rsp),%rdx
mov    %rbp,%rdi
mov    %r12d,%esi
call   1030 <msgTune@plt>
mov    %rbp,%rdi
call   1040 <starFree@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @msg_tune_(i8* %0, i32* %1, i32* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
store i32 %13, i32* %9
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
store i32 %15, i32* %10
%16 = load i32, i32* %8
%17 = add nsw i32 %16, 1
%18 = call i8* @starMallocAtomic(i32 %17)
store i8* %18, i8** %11
%19 = load i8*, i8** %5
%20 = load i32, i32* %8
%21 = load i8*, i8** %11
%22 = call i32 @cnfImprt(i8* %19, i32 %20, i8* %21)
%23 = load i8*, i8** %11
%24 = load i32, i32* %9
%25 = call i32 @msgTune(i8* %23, i32 %24, i32* %10)
%26 = load i8*, i8** %11
%27 = call i32 @starFree(i8* %26)
%28 = load i32, i32* %10
%29 = load i32*, i32** %7
store i32 %28, i32* %29
ret void
}

LLVM IR (-O2):
define void @msg_tune_(i8* %0, i32* nocapture %1, i32* nocapture %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = load i32, i32* %1
%8 = load i32, i32* %2
store i32 %8, i32* %5
%9 = add nsw i32 %3, 1
%10 = tail call i8* @starMallocAtomic(i32 %9)
%11 = tail call i32 @cnfImprt(i8* %0, i32 %3, i8* %10)
%12 = call i32 @msgTune(i8* %10, i32 %7, i32* %5)
%13 = call i32 @starFree(i8* %10)
%14 = load i32, i32* %5
store i32 %14, i32* %2
ret void
}