int get_server_playlist(struct plist *plist) {
  iface_set_status("Getting the playlist...");
  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",
                 1459, __FUNCTION__, "Getting the playlist...");
  if (recv_server_plist(plist)) {
    ask_for_tags(plist, get_tags_setting());
    if (options_get_bool("ReadTags"))
      switch_titles_tags(plist);
    else
      switch_titles_file(plist);
    iface_set_status("");
    return 1;
  }
  iface_set_status("");
  return 0;
}


x86 assembly (clang, -O0):
<get_server_playlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1060 <iface_set_status@plt>
lea    0xe77(%rip),%rdi
mov    $0x5b3,%esi
lea    0xef6(%rip),%rdx
lea    0xe4c(%rip),%rcx
mov    $0x0,%al
call   10a0 <internal_logit@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <recv_server_plist@plt>
cmp    $0x0,%eax
je     1237 <get_server_playlist+0xb7>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1090 <get_tags_setting@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    $0x0,%al
call   1080 <ask_for_tags@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1070 <options_get_bool@plt>
cmp    $0x0,%eax
je     1212 <get_server_playlist+0x92>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <switch_titles_tags@plt>
jmp    121d <get_server_playlist+0x9d>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <switch_titles_file@plt>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1060 <iface_set_status@plt>
movl   $0x1,-0x4(%rbp)
jmp    124c <get_server_playlist+0xcc>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1060 <iface_set_status@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_server_playlist>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0xe72(%rip),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <iface_set_status@plt>
lea    0xe77(%rip),%rdi
lea    0xefb(%rip),%rdx
mov    $0x5b3,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   10a0 <internal_logit@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <recv_server_plist@plt>
test   %eax,%eax
je     1202 <get_server_playlist+0x82>
xor    %eax,%eax
call   1090 <get_tags_setting@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <ask_for_tags@plt>
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1070 <options_get_bool@plt>
mov    %r14,%rdi
test   %eax,%eax
je     11f6 <get_server_playlist+0x76>
xor    %eax,%eax
call   1040 <switch_titles_tags@plt>
jmp    11fd <get_server_playlist+0x7d>
xor    %eax,%eax
call   1030 <switch_titles_file@plt>
mov    $0x1,%ebp
lea    0xe0e(%rip),%rdi
xor    %eax,%eax
call   1060 <iface_set_status@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.plist = type opaque
@.str = [24 x i8] c"Getting the playlist...\00"
@.str.1 = [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__.get_server_playlist = [20 x i8] c"get_server_playlist\00"
@.str.2 = [9 x i8] c"ReadTags\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @get_server_playlist(%struct.plist* %0) {
%2 = alloca i32
%3 = alloca %struct.plist*
store %struct.plist* %0, %struct.plist** %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_status to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @internal_logit to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 1459, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__FUNCTION__.get_server_playlist, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = load %struct.plist*, %struct.plist** %3
%7 = call i32 (%struct.plist*, ...) bitcast (i32 (...)* @recv_server_plist to i32 (%struct.plist*, ...)*)(%struct.plist* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %1
%10 = load %struct.plist*, %struct.plist** %3
%11 = call i32 (...) @get_tags_setting()
%12 = call i32 (%struct.plist*, i32, ...) bitcast (i32 (...)* @ask_for_tags to i32 (%struct.plist*, i32, ...)*)(%struct.plist* %10, i32 %11)
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @options_get_bool to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load %struct.plist*, %struct.plist** %3
%17 = call i32 (%struct.plist*, ...) bitcast (i32 (...)* @switch_titles_tags to i32 (%struct.plist*, ...)*)(%struct.plist* %16)
br label %21
18: ; preds = %9
%19 = load %struct.plist*, %struct.plist** %3
%20 = call i32 (%struct.plist*, ...) bitcast (i32 (...)* @switch_titles_file to i32 (%struct.plist*, ...)*)(%struct.plist* %19)
br label %21
21: ; preds = %18, %15
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_status to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %2
br label %25
23: ; preds = %1
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_status to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %2
br label %25
25: ; preds = %23, %21
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
%struct.plist = type opaque
@.str = [24 x i8] c"Getting the playlist...\00"
@.str.1 = [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__.get_server_playlist = [20 x i8] c"get_server_playlist\00"
@.str.2 = [9 x i8] c"ReadTags\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @get_server_playlist(%struct.plist* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_status to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @internal_logit to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 1459, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__FUNCTION__.get_server_playlist, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (%struct.plist*, ...) bitcast (i32 (...)* @recv_server_plist to i32 (%struct.plist*, ...)*)(%struct.plist* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = tail call i32 (...) @get_tags_setting()
%8 = tail call i32 (%struct.plist*, i32, ...) bitcast (i32 (...)* @ask_for_tags to i32 (%struct.plist*, i32, ...)*)(%struct.plist* %0, i32 %7)
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @options_get_bool to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %6
%12 = tail call i32 (%struct.plist*, ...) bitcast (i32 (...)* @switch_titles_tags to i32 (%struct.plist*, ...)*)(%struct.plist* %0)
br label %15
13: ; preds = %6
%14 = tail call i32 (%struct.plist*, ...) bitcast (i32 (...)* @switch_titles_file to i32 (%struct.plist*, ...)*)(%struct.plist* %0)
br label %15
15: ; preds = %1, %11, %13
%16 = phi i32 [ 1, %13 ], [ 1, %11 ], [ 0, %1 ]
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @iface_set_status to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret i32 %16
}