#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*/ FastHairCut(char, int, int);
int /*<<< orphan*/ PrintTty(int, int, char *, ...);
int /*<<< orphan*/ nSleep(int);
int Mother(char mother, char child, int row, int delay) {
  int col;
  PrintTty(row, 10, "Madre");
  for (col = 20; col <= 60; col++) {
    PrintTty(row, col, " %c~%c", mother, child);
    nSleep(50);
  }
  FastHairCut(child, row, delay);
  for (col = 60; col >= 20; col--) {
    PrintTty(row, col, "%c%c  ", mother, child);
    nSleep(50);
  }
  return 0;
}


x86 assembly (clang, -O0):
<Mother>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %edx,-0x8(%rbp)
mov    %ecx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0xa,%esi
lea    0xea6(%rip),%rdx
mov    $0x0,%al
call   1050 <PrintTty@plt>
movl   $0x14,-0x10(%rbp)
cmpl   $0x3c,-0x10(%rbp)
jg     11a7 <Mother+0x77>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
movsbl -0x1(%rbp),%ecx
movsbl -0x2(%rbp),%r8d
lea    0xe7e(%rip),%rdx
mov    $0x0,%al
call   1050 <PrintTty@plt>
mov    $0x32,%edi
call   1040 <nSleep@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <Mother+0x38>
mov    -0x2(%rbp),%al
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movsbl %al,%edi
call   1030 <FastHairCut@plt>
movl   $0x3c,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jl     11fe <Mother+0xce>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
movsbl -0x1(%rbp),%ecx
movsbl -0x2(%rbp),%r8d
lea    0xe2e(%rip),%rdx
mov    $0x0,%al
call   1050 <PrintTty@plt>
mov    $0x32,%edi
call   1040 <nSleep@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    11bf <Mother+0x8f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mother>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %esi,%r12d
mov    %edi,%r14d
lea    0xeb3(%rip),%rdx
mov    %ebx,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <PrintTty@plt>
mov    $0x14,%ebp
lea    0xe9f(%rip),%r13
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r13,%rdx
mov    %r14d,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1050 <PrintTty@plt>
mov    $0x32,%edi
call   1040 <nSleep@plt>
add    $0x1,%ebp
cmp    $0x3d,%ebp
jne    1170 <Mother+0x40>
movsbl %r12b,%edi
mov    %ebx,%esi
mov    %r15d,%edx
call   1030 <FastHairCut@plt>
mov    $0x3d,%ebp
lea    0xe5d(%rip),%r15
add    $0xffffffff,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1050 <PrintTty@plt>
mov    $0x32,%edi
call   1040 <nSleep@plt>
cmp    $0x14,%ebp
ja     11b0 <Mother+0x80>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Madre\00"
@.str.1 = [7 x i8] c" %c~%c\00"
@.str.2 = [7 x i8] c"%c%c \00"
define i32 @Mother(i8 signext %0, i8 signext %1, i32 %2, i32 %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %5
store i8 %1, i8* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = call i32 (i32, i32, i8*, ...) @PrintTty(i32 %10, i32 10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 20, i32* %9
br label %12
12: ; preds = %24, %4
%13 = load i32, i32* %9
%14 = icmp sle i32 %13, 60
br i1 %14, label %15, label %27
15: ; preds = %12
%16 = load i32, i32* %7
%17 = load i32, i32* %9
%18 = load i8, i8* %5
%19 = sext i8 %18 to i32
%20 = load i8, i8* %6
%21 = sext i8 %20 to i32
%22 = call i32 (i32, i32, i8*, ...) @PrintTty(i32 %16, i32 %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %21)
%23 = call i32 @nSleep(i32 50)
br label %24
24: ; preds = %15
%25 = load i32, i32* %9
%26 = add nsw i32 %25, 1
store i32 %26, i32* %9
br label %12
27: ; preds = %12
%28 = load i8, i8* %6
%29 = load i32, i32* %7
%30 = load i32, i32* %8
%31 = call i32 @FastHairCut(i8 signext %28, i32 %29, i32 %30)
store i32 60, i32* %9
br label %32
32: ; preds = %44, %27
%33 = load i32, i32* %9
%34 = icmp sge i32 %33, 20
br i1 %34, label %35, label %47
35: ; preds = %32
%36 = load i32, i32* %7
%37 = load i32, i32* %9
%38 = load i8, i8* %5
%39 = sext i8 %38 to i32
%40 = load i8, i8* %6
%41 = sext i8 %40 to i32
%42 = call i32 (i32, i32, i8*, ...) @PrintTty(i32 %36, i32 %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %39, i32 %41)
%43 = call i32 @nSleep(i32 50)
br label %44
44: ; preds = %35
%45 = load i32, i32* %9
%46 = add nsw i32 %45, -1
store i32 %46, i32* %9
br label %32
47: ; preds = %32
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Madre\00"
@.str.1 = [7 x i8] c" %c~%c\00"
@.str.2 = [7 x i8] c"%c%c \00"
define i32 @Mother(i8 signext %0, i8 signext %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32, i32, i8*, ...) @PrintTty(i32 %2, i32 10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = sext i8 %0 to i32
%7 = sext i8 %1 to i32
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ 20, %4 ], [ %12, %8 ]
%10 = tail call i32 (i32, i32, i8*, ...) @PrintTty(i32 %2, i32 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7)
%11 = tail call i32 @nSleep(i32 50)
%12 = add nuw nsw i32 %9, 1
%13 = icmp eq i32 %12, 61
br i1 %13, label %14, label %8
14: ; preds = %8
%15 = tail call i32 @FastHairCut(i8 signext %1, i32 %2, i32 %3)
br label %16
16: ; preds = %14, %16
%17 = phi i32 [ 60, %14 ], [ %20, %16 ]
%18 = tail call i32 (i32, i32, i8*, ...) @PrintTty(i32 %2, i32 %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
%19 = tail call i32 @nSleep(i32 50)
%20 = add nsw i32 %17, -1
%21 = icmp ugt i32 %17, 20
br i1 %21, label %16, label %22
22: ; preds = %16
ret i32 0
}