#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*/ print_parent_info(char *, int);
void busy_child_routine_2(int child_id) {
  print_parent_info(""
                    "["
                    "\033[38;5;208m"
                    "Parent"
                    "\e[0m"
                    "]"
                    " waiting that child %d finish to process the operation\n",
                    child_id);
  print_parent_info(""
                    "["
                    "\033[38;5;208m"
                    "Parent"
                    "\e[0m"
                    "]"
                    " request the result to child %d\n",
                    child_id);
  print_parent_info(""
                    "["
                    "\033[38;5;208m"
                    "Parent"
                    "\e[0m"
                    "]"
                    " waiting for result from child %d ...\n",
                    child_id);
}


x86 assembly (clang, -O0):
<busy_child_routine_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <print_parent_info@plt>
mov    -0x4(%rbp),%esi
lea    0xf1b(%rip),%rdi
call   1030 <print_parent_info@plt>
mov    -0x4(%rbp),%esi
lea    0xf44(%rip),%rdi
call   1030 <print_parent_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<busy_child_routine_2>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <print_parent_info@plt>
lea    0xf27(%rip),%rdi
mov    %ebx,%esi
call   1030 <print_parent_info@plt>
lea    0xf51(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <print_parent_info@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"[\1B[38;5;208mParent\1B[0m] waiting that child %d finish to process the operation\0A\00"
@.str.1 = [56 x i8] c"[\1B[38;5;208mParent\1B[0m] request the result to child %d\0A\00"
@.str.2 = [62 x i8] c"[\1B[38;5;208mParent\1B[0m] waiting for result from child %d ...\0A\00"
define void @busy_child_routine_2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @print_parent_info(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @print_parent_info(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @print_parent_info(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"[\1B[38;5;208mParent\1B[0m] waiting that child %d finish to process the operation\0A\00"
@.str.1 = [56 x i8] c"[\1B[38;5;208mParent\1B[0m] request the result to child %d\0A\00"
@.str.2 = [62 x i8] c"[\1B[38;5;208mParent\1B[0m] waiting for result from child %d ...\0A\00"
define void @busy_child_routine_2(i32 %0) {
%2 = tail call i32 @print_parent_info(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @print_parent_info(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 @print_parent_info(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0), i32 %0)
ret void
}