#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*/ delete_song(char *, char *);
int /*<<< orphan*/ populate();
int /*<<< orphan*/ print_entries_all();
int /*<<< orphan*/ printf(char *);
void test_delete_song() {
  printf(
      "====================================================================\n");
  printf("TESTING DELETE SONG...\n");
  populate();
  delete_song("make a man out of you", "donny osmond");
  delete_song("chandelier", "sia");
  delete_song("how far ill go", "lin manuel miranda");
  delete_song("legends never die", "against the current");
  delete_song("look what you made me do", "taylor swift");
  delete_song("ours", "taylor swift");
  delete_song("theirs", "taylor swift");
  delete_song("you belong with me", "taylor swift");
  delete_song("test", "t");
  delete_song("", "t");
  print_entries_all();
}


x86 assembly (clang, -O0):
<test_delete_song>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <populate@plt>
lea    0xef4(%rip),%rdi
lea    0xf03(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf04(%rip),%rdi
lea    0xf08(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf00(%rip),%rdi
lea    0xf08(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf0f(%rip),%rdi
lea    0xf1a(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf22(%rip),%rdi
lea    0xf34(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf35(%rip),%rdi
lea    0xf21(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf27(%rip),%rdi
lea    0xf0e(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf1b(%rip),%rdi
lea    0xefb(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xf1b(%rip),%rdi
lea    0xef3(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xe48(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1060 <delete_song@plt>
mov    $0x0,%al
call   1030 <print_entries_all@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_delete_song>:
push   %rbx
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <populate@plt>
lea    0xe99(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xea9(%rip),%rdi
lea    0xead(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xea5(%rip),%rdi
lea    0xead(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xeb4(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1060 <delete_song@plt>
lea    0xec7(%rip),%rdi
lea    0xed9(%rip),%rbx
mov    %rbx,%rsi
call   1060 <delete_song@plt>
lea    0xed7(%rip),%rdi
mov    %rbx,%rsi
call   1060 <delete_song@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
call   1060 <delete_song@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1060 <delete_song@plt>
lea    0xec9(%rip),%rdi
lea    0xea1(%rip),%rbx
mov    %rbx,%rsi
call   1060 <delete_song@plt>
lea    0xf13(%rip),%rdi
mov    %rbx,%rsi
call   1060 <delete_song@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <print_entries_all@plt>

LLVM IR (-O0):
@.str = [70 x i8] c"====================================================================\0A\00"
@.str.1 = [24 x i8] c"TESTING DELETE SONG...\0A\00"
@.str.2 = [22 x i8] c"make a man out of you\00"
@.str.3 = [13 x i8] c"donny osmond\00"
@.str.4 = [11 x i8] c"chandelier\00"
@.str.5 = [4 x i8] c"sia\00"
@.str.6 = [15 x i8] c"how far ill go\00"
@.str.7 = [19 x i8] c"lin manuel miranda\00"
@.str.8 = [18 x i8] c"legends never die\00"
@.str.9 = [20 x i8] c"against the current\00"
@.str.10 = [25 x i8] c"look what you made me do\00"
@.str.11 = [13 x i8] c"taylor swift\00"
@.str.12 = [5 x i8] c"ours\00"
@.str.13 = [7 x i8] c"theirs\00"
@.str.14 = [19 x i8] c"you belong with me\00"
@.str.15 = [5 x i8] c"test\00"
@.str.16 = [2 x i8] c"t\00"
@.str.17 = [1 x i8] zeroinitializer
define void @test_delete_song() {
%1 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @populate()
%4 = call i32 @delete_song(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @delete_song(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 @delete_song(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%7 = call i32 @delete_song(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%8 = call i32 @delete_song(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%9 = call i32 @delete_song(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%10 = call i32 @delete_song(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%11 = call i32 @delete_song(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%12 = call i32 @delete_song(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%13 = call i32 @delete_song(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%14 = call i32 (...) @print_entries_all()
ret void
}

LLVM IR (-O2):
@.str.2 = [22 x i8] c"make a man out of you\00"
@.str.3 = [13 x i8] c"donny osmond\00"
@.str.4 = [11 x i8] c"chandelier\00"
@.str.5 = [4 x i8] c"sia\00"
@.str.6 = [15 x i8] c"how far ill go\00"
@.str.7 = [19 x i8] c"lin manuel miranda\00"
@.str.8 = [18 x i8] c"legends never die\00"
@.str.9 = [20 x i8] c"against the current\00"
@.str.10 = [25 x i8] c"look what you made me do\00"
@.str.11 = [13 x i8] c"taylor swift\00"
@.str.12 = [5 x i8] c"ours\00"
@.str.13 = [7 x i8] c"theirs\00"
@.str.14 = [19 x i8] c"you belong with me\00"
@.str.15 = [5 x i8] c"test\00"
@.str.16 = [2 x i8] c"t\00"
@.str.17 = [1 x i8] zeroinitializer
@str = [69 x i8] c"====================================================================\00"
@str.18 = [23 x i8] c"TESTING DELETE SONG...\00"
define void @test_delete_song() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.18, i64 0, i64 0))
%3 = tail call i32 (...) @populate()
%4 = tail call i32 @delete_song(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @delete_song(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @delete_song(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%7 = tail call i32 @delete_song(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%8 = tail call i32 @delete_song(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%9 = tail call i32 @delete_song(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%10 = tail call i32 @delete_song(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%11 = tail call i32 @delete_song(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%12 = tail call i32 @delete_song(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%13 = tail call i32 @delete_song(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%14 = tail call i32 (...) @print_entries_all()
ret void
}