void update_mixer_name() {
  char *name;
  send_int_to_srv(0x2e);
  name = get_data_str();
  internal_logit("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/christophgysin/moc/refs/"
                 "heads/lyrics/interface.c",
                 491, __FUNCTION__, "Mixer name: %s", name);
  iface_set_mixer_name(name);
  free(name);
  update_mixer_value();
}


x86 assembly (clang, -O0):
<update_mixer_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2e,%edi
mov    $0x0,%al
call   1050 <send_int_to_srv@plt>
mov    $0x0,%al
call   1080 <get_data_str@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%r8
lea    0xe74(%rip),%rdi
mov    $0x1eb,%esi
lea    0xef3(%rip),%rdx
lea    0xefe(%rip),%rcx
mov    $0x0,%al
call   1070 <internal_logit@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <iface_set_mixer_name@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1060 <update_mixer_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_mixer_name>:
push   %rbx
mov    $0x2e,%edi
xor    %eax,%eax
call   1050 <send_int_to_srv@plt>
xor    %eax,%eax
call   1080 <get_data_str@plt>
movslq %eax,%rbx
lea    0xe82(%rip),%rdi
lea    0xf06(%rip),%rdx
lea    0xf11(%rip),%rcx
mov    $0x1eb,%esi
mov    %rbx,%r8
xor    %eax,%eax
call   1070 <internal_logit@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <iface_set_mixer_name@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <update_mixer_value@plt>

LLVM IR (-O0):
@.str = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/christophgysin/moc/refs/heads/lyrics/interface.c\00"
@__FUNCTION__.update_mixer_name = [18 x i8] c"update_mixer_name\00"
@.str.1 = [15 x i8] c"Mixer name: %s\00"
define void @update_mixer_name() {
%1 = alloca i8*
%2 = call i32 (i32, ...) bitcast (i32 (...)* @send_int_to_srv to i32 (i32, ...)*)(i32 46)
%3 = call i32 (...) @get_data_str()
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @internal_logit to i32 (i8*, i32, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 491, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.update_mixer_name, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %1
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_mixer_name to i32 (i8*, ...)*)(i8* %8)
%10 = load i8*, i8** %1
%11 = call i32 (...) @update_mixer_value()
ret void
}

LLVM IR (-O2):
@.str = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/christophgysin/moc/refs/heads/lyrics/interface.c\00"
@__FUNCTION__.update_mixer_name = [18 x i8] c"update_mixer_name\00"
@.str.1 = [15 x i8] c"Mixer name: %s\00"
define void @update_mixer_name() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @send_int_to_srv to i32 (i32, ...)*)(i32 46)
%2 = tail call i32 (...) @get_data_str()
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 (i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @internal_logit to i32 (i8*, i32, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0), i32 491, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.update_mixer_name, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_mixer_name to i32 (i8*, ...)*)(i8* %4)
tail call void @free(i8* %4)
%7 = tail call i32 (...) @update_mixer_value()
ret void
}