#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*/ printf(char *, ...);
void runEDF(int serveA, int cycA, int serveB, int cycB) {
  int A, B;
  float m;
  int i, j, a = 0, b = 0, ka = 0, kb = 0;
  int numa = 0, numb = 0;
  int T;
  printf("\t\t\t------------------------------------------------\n");
  printf("\t\t\t\tearliest deadline first schedule algorithm\n");
  printf("\t\t\t------------------------------------------------\n");
  printf("Process A runs every %d seconds and needs %d seconds to finish\n",
         cycA, serveA);
  printf("Process B runs every %d seconds and needs %d seconds to finish\n",
         cycB, serveB);
  m = (float)serveA / cycA + (float)serveB / cycB;
  for (T = 0; T <= 100; T++) {
    int timeLeftForA = serveA - numa;
    int isAFinished = numa == serveA + 1;
    int timeLeftForB = serveB - numb;
    int isBFinished = numb == serveB + 1;
    if (ka == 1 && !isBFinished && timeLeftForB < timeLeftForA) {
      printf("when T=%d, ", T);
      printf("run process B%d\n", b);
      kb = 1;
      ka = 0;
    } else if (kb == 1 && !isAFinished && timeLeftForA < timeLeftForB) {
      printf("when T=%d, ", T);
      printf("run process A%d\n", a);
      kb = 0;
      ka = 1;
    }
    if (numa == serveA) {
      numa = serveA + 1;
      printf("when T=%d, ", T);
      printf("process A%d is done\n", a);
      if (numb < serveB) {
        printf("run process B%d\n", b);
        kb = 1;
      }
      ka = 0;
    }
    if (numb == serveB) {
      numb = serveB + 1;
      printf("when T=%d, ", T);
      printf("process B%d is done\n", b);
      if (numa < serveA) {
        printf("run process A%d\n", a);
        ka = 1;
      }
      kb = 0;
    }
    if (T % cycA == 0 && T % cycB == 0) {
      A = B = T;
      j = ++a;
      i = ++b;
      printf("when T=%d, process A%d and process B%d are generated together\n",
             T, j, i);
      if (cycA <= cycB) {
        printf("run process A%d and suspend process B%d\n", j, i);
        printf("---------------------------------------\n");
        ka = 1;
        kb = 0;
      } else {
        printf("run process B%d and suspend process A%d\n", i, j);
        ka = 0;
        kb = 1;
      }
      numa = numb = 0;
    }
    if (T % cycA == 0 && T % cycB != 0) {
      A = T;
      printf("when T=%d, ", T);
      printf("process A%d is generated\n", ++a);
      numa = 0;
      if (numb < serveB) {
        if (cycB > cycA) {
          printf("run process A%d\n", a);
          ka = 1;
          kb = 0;
        } else {
          printf("process B%d is moving forward\n", b);
        }
      } else {
        printf("process A%d is run\n", a);
        ka = 1;
      }
    }
    if (T % cycA != 0 && T % cycB == 0) {
      B = T;
      printf("when T=%d, ", T);
      printf("process B%d is generated\n", ++b);
      numb = 0;
      if (numa < serveA) {
        if (cycB >= cycA) {
          printf("process A%d is on run\n", a);
        } else {
          printf("process B%d is to run\n", b);
          kb = 1;
          ka = 0;
        }
      } else {
        printf("process B%d is on run\n", b);
        kb = 1;
      }
    }
    if (ka) {
      numa++;
    }
    if (kb) {
      numb++;
    }
  }
}


x86 assembly (clang, -O0):
<runEDF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x0,-0x40(%rbp)
cmpl   $0x64,-0x40(%rbp)
jg     160c <runEDF+0x4fc>
mov    -0x4(%rbp),%eax
sub    -0x38(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x3c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x50(%rbp)
cmpl   $0x1,-0x30(%rbp)
jne    1269 <runEDF+0x159>
cmpl   $0x0,-0x50(%rbp)
jne    1269 <runEDF+0x159>
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1269 <runEDF+0x159>
mov    -0x40(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
jmp    12be <runEDF+0x1ae>
cmpl   $0x1,-0x34(%rbp)
jne    12b9 <runEDF+0x1a9>
cmpl   $0x0,-0x48(%rbp)
jne    12b9 <runEDF+0x1a9>
mov    -0x44(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    12b9 <runEDF+0x1a9>
mov    -0x40(%rbp),%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
movl   $0x1,-0x30(%rbp)
jmp    12be <runEDF+0x1ae>
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1320 <runEDF+0x210>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%esi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1319 <runEDF+0x209>
mov    -0x2c(%rbp),%esi
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1382 <runEDF+0x272>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%esi
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    137b <runEDF+0x26b>
mov    -0x28(%rbp),%esi
lea    0xd95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x40(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    144b <runEDF+0x33b>
mov    -0x40(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    144b <runEDF+0x33b>
mov    -0x40(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    %eax,-0x24(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    %eax,-0x20(%rbp)
mov    -0x40(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     141b <runEDF+0x30b>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
jmp    143d <runEDF+0x32d>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xd7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x40(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    150f <runEDF+0x3ff>
mov    -0x40(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
je     150f <runEDF+0x3ff>
mov    -0x40(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x40(%rbp),%esi
lea    0xc6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x28(%rbp)
lea    0xd3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    14f2 <runEDF+0x3e2>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    14dc <runEDF+0x3cc>
mov    -0x28(%rbp),%esi
lea    0xc40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
jmp    14ed <runEDF+0x3dd>
mov    -0x2c(%rbp),%esi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    150a <runEDF+0x3fa>
mov    -0x28(%rbp),%esi
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x30(%rbp)
jmp    150f <runEDF+0x3ff>
mov    -0x40(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
je     15d3 <runEDF+0x4c3>
mov    -0x40(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    15d3 <runEDF+0x4c3>
mov    -0x40(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x40(%rbp),%esi
lea    0xba6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x2c(%rbp)
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15b6 <runEDF+0x4a6>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1592 <runEDF+0x482>
mov    -0x28(%rbp),%esi
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    15b1 <runEDF+0x4a1>
mov    -0x2c(%rbp),%esi
lea    0xcb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
jmp    15ce <runEDF+0x4be>
mov    -0x2c(%rbp),%esi
lea    0xca3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x34(%rbp)
jmp    15d3 <runEDF+0x4c3>
cmpl   $0x0,-0x30(%rbp)
je     15e6 <runEDF+0x4d6>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     15f9 <runEDF+0x4e9>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    15fe <runEDF+0x4ee>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11cc <runEDF+0xbc>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runEDF>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0x1105(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0x10c7(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe9e(%rip),%rdi
mov    %ebx,0x4(%rsp)
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %r15d,0x8(%rsp)
mov    %r15d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rax
mov    %rbp,0x18(%rsp)
lea    0x1(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    %r12,%rax
mov    %r12,0x20(%rsp)
lea    0x1(%r12),%eax
mov    %eax,0x14(%rsp)
movl   $0x0,(%rsp)
xor    %ebp,%ebp
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %r13d,%r13d
xor    %ebx,%ebx
xor    %r12d,%r12d
jmp    1200 <runEDF+0xe0>
xor    %r15d,%r15d
lea    0xf4a(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1071(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%r13d
mov    $0x1,%r12d
xor    %ebx,%ebx
add    $0x1,%r14d
cmp    $0x65,%r14d
je     1524 <runEDF+0x404>
mov    0x18(%rsp),%rax
sub    %r13d,%eax
mov    0x20(%rsp),%rcx
sub    %r15d,%ecx
cmp    $0x1,%r12d
jne    1250 <runEDF+0x130>
cmp    0x14(%rsp),%r15d
je     1250 <runEDF+0x130>
cmp    %eax,%ecx
jge    1250 <runEDF+0x130>
xor    %r12d,%r12d
lea    0xe55(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe50(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
jmp    1290 <runEDF+0x170>
nopl   0x0(%rax)
cmp    $0x1,%ebx
jne    1290 <runEDF+0x170>
cmp    0x10(%rsp),%r13d
je     1290 <runEDF+0x170>
mov    $0x1,%ebx
cmp    %ecx,%eax
jge    1290 <runEDF+0x170>
xor    %ebx,%ebx
lea    0xe12(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe1e(%rip),%rdi
mov    (%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%r12d
nop
cmp    0x18(%rsp),%r13d
jne    12e5 <runEDF+0x1c5>
xor    %r12d,%r12d
lea    0xddf(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdfc(%rip),%rdi
mov    (%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%r13d
cmp    0x20(%rsp),%r15d
jge    12e5 <runEDF+0x1c5>
xor    %r12d,%r12d
lea    0xdba(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
mov    0x10(%rsp),%r13d
cmp    0x20(%rsp),%r15d
jne    1339 <runEDF+0x219>
xor    %ebx,%ebx
lea    0xd8b(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdbd(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%r15d
cmp    0x18(%rsp),%r13d
jge    1339 <runEDF+0x219>
xor    %ebx,%ebx
lea    0xd79(%rip),%rdi
mov    (%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%r12d
mov    0x14(%rsp),%r15d
mov    %r14d,%eax
cltd
idivl  0x4(%rsp)
mov    %edx,%ecx
mov    %r14d,%eax
cltd
idivl  0x8(%rsp)
test   %ecx,%ecx
je     1370 <runEDF+0x250>
test   %edx,%edx
je     13f0 <runEDF+0x2d0>
test   %r12d,%r12d
je     1510 <runEDF+0x3f0>
add    $0x1,%r13d
jmp    1513 <runEDF+0x3f3>
nopl   0x0(%rax)
test   %edx,%edx
je     144a <runEDF+0x32a>
mov    %ebp,0xc(%rsp)
lea    0xcfd(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%ebp
add    $0x1,%ebp
lea    0xdcf(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0x20(%rsp),%r15d
mov    %ebp,(%rsp)
jge    1498 <runEDF+0x378>
mov    0x4(%rsp),%eax
cmp    %eax,0x8(%rsp)
jle    14dd <runEDF+0x3bd>
lea    0xcd7(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%r13d
mov    $0x1,%r12d
mov    0xc(%rsp),%ebp
jmp    11f0 <runEDF+0xd0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xc89(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
lea    0xdab(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0x18(%rsp),%r13d
jge    14ba <runEDF+0x39a>
mov    0x4(%rsp),%eax
cmp    %eax,0x8(%rsp)
jge    14ef <runEDF+0x3cf>
xor    %r15d,%r15d
lea    0xdb0(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
jmp    1510 <runEDF+0x3f0>
mov    (%rsp),%ebx
add    $0x1,%ebx
add    $0x1,%ebp
lea    0xc7e(%rip),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
cmp    %eax,0x8(%rsp)
mov    %ebx,(%rsp)
jge    11c3 <runEDF+0xa3>
xor    %r15d,%r15d
lea    0xcbd(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
xor    %r13d,%r13d
jmp    1510 <runEDF+0x3f0>
lea    0xd03(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%r12d
mov    $0x1,%r13d
mov    0xc(%rsp),%ebp
jmp    1513 <runEDF+0x3f3>
xor    %r15d,%r15d
lea    0xd3a(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebx
test   %r12d,%r12d
jne    1360 <runEDF+0x240>
jmp    1510 <runEDF+0x3f0>
xor    %r13d,%r13d
lea    0xc9c(%rip),%rdi
mov    0xc(%rsp),%ebp
mov    %ebp,%esi
jmp    14fc <runEDF+0x3dc>
xor    %r15d,%r15d
lea    0xcd7(%rip),%rdi
mov    (%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r12d,%r12d
jne    1360 <runEDF+0x240>
nopl   0x0(%rax)
xor    %r12d,%r12d
test   %ebx,%ebx
je     11f0 <runEDF+0xd0>
add    $0x1,%r15d
jmp    11f2 <runEDF+0xd2>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"\09\09\09------------------------------------------------\0A\00"
@.str.1 = [48 x i8] c"\09\09\09\09earliest deadline first schedule algorithm\0A\00"
@.str.2 = [64 x i8] c"Process A runs every %d seconds and needs %d seconds to finish\0A\00"
@.str.3 = [64 x i8] c"Process B runs every %d seconds and needs %d seconds to finish\0A\00"
@.str.4 = [12 x i8] c"when T=%d, \00"
@.str.5 = [17 x i8] c"run process B%d\0A\00"
@.str.6 = [17 x i8] c"run process A%d\0A\00"
@.str.7 = [21 x i8] c"process A%d is done\0A\00"
@.str.8 = [21 x i8] c"process B%d is done\0A\00"
@.str.9 = [63 x i8] c"when T=%d, process A%d and process B%d are generated together\0A\00"
@.str.10 = [41 x i8] c"run process A%d and suspend process B%d\0A\00"
@.str.11 = [41 x i8] c"---------------------------------------\0A\00"
@.str.12 = [41 x i8] c"run process B%d and suspend process A%d\0A\00"
@.str.13 = [26 x i8] c"process A%d is generated\0A\00"
@.str.14 = [31 x i8] c"process B%d is moving forward\0A\00"
@.str.15 = [20 x i8] c"process A%d is run\0A\00"
@.str.16 = [26 x i8] c"process B%d is generated\0A\00"
@.str.17 = [23 x i8] c"process A%d is on run\0A\00"
@.str.18 = [23 x i8] c"process B%d is to run\0A\00"
@.str.19 = [23 x i8] c"process B%d is on run\0A\00"
define void @runEDF(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
store i32 0, i32* %19
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%28 = load i32, i32* %6
%29 = load i32, i32* %5
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i32 %28, i32 %29)
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %32)
%34 = load i32, i32* %5
%35 = sitofp i32 %34 to float
%36 = load i32, i32* %6
%37 = sitofp i32 %36 to float
%38 = fdiv float %35, %37
%39 = load i32, i32* %7
%40 = sitofp i32 %39 to float
%41 = load i32, i32* %8
%42 = sitofp i32 %41 to float
%43 = fdiv float %40, %42
%44 = fadd float %38, %43
store float %44, float* %11
store i32 0, i32* %20
br label %45
45: ; preds = %247, %4
%46 = load i32, i32* %20
%47 = icmp sle i32 %46, 100
br i1 %47, label %48, label %250
48: ; preds = %45
%49 = load i32, i32* %5
%50 = load i32, i32* %18
%51 = sub nsw i32 %49, %50
store i32 %51, i32* %21
%52 = load i32, i32* %18
%53 = load i32, i32* %5
%54 = add nsw i32 %53, 1
%55 = icmp eq i32 %52, %54
%56 = zext i1 %55 to i32
store i32 %56, i32* %22
%57 = load i32, i32* %7
%58 = load i32, i32* %19
%59 = sub nsw i32 %57, %58
store i32 %59, i32* %23
%60 = load i32, i32* %19
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
%63 = icmp eq i32 %60, %62
%64 = zext i1 %63 to i32
store i32 %64, i32* %24
%65 = load i32, i32* %16
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %79
67: ; preds = %48
%68 = load i32, i32* %24
%69 = icmp ne i32 %68, 0
br i1 %69, label %79, label %70
70: ; preds = %67
%71 = load i32, i32* %23
%72 = load i32, i32* %21
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %79
74: ; preds = %70
%75 = load i32, i32* %20
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %75)
%77 = load i32, i32* %15
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %77)
store i32 1, i32* %17
store i32 0, i32* %16
br label %95
79: ; preds = %70, %67, %48
%80 = load i32, i32* %17
%81 = icmp eq i32 %80, 1
br i1 %81, label %82, label %94
82: ; preds = %79
%83 = load i32, i32* %22
%84 = icmp ne i32 %83, 0
br i1 %84, label %94, label %85
85: ; preds = %82
%86 = load i32, i32* %21
%87 = load i32, i32* %23
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %94
89: ; preds = %85
%90 = load i32, i32* %20
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %90)
%92 = load i32, i32* %14
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %92)
store i32 0, i32* %17
store i32 1, i32* %16
br label %94
94: ; preds = %89, %85, %82, %79
br label %95
95: ; preds = %94, %74
%96 = load i32, i32* %18
%97 = load i32, i32* %5
%98 = icmp eq i32 %96, %97
br i1 %98, label %99, label %113
99: ; preds = %95
%100 = load i32, i32* %5
%101 = add nsw i32 %100, 1
store i32 %101, i32* %18
%102 = load i32, i32* %20
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %102)
%104 = load i32, i32* %14
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %104)
%106 = load i32, i32* %19
%107 = load i32, i32* %7
%108 = icmp slt i32 %106, %107
br i1 %108, label %109, label %112
109: ; preds = %99
%110 = load i32, i32* %15
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %110)
store i32 1, i32* %17
br label %112
112: ; preds = %109, %99
store i32 0, i32* %16
br label %113
113: ; preds = %112, %95
%114 = load i32, i32* %19
%115 = load i32, i32* %7
%116 = icmp eq i32 %114, %115
br i1 %116, label %117, label %131
117: ; preds = %113
%118 = load i32, i32* %7
%119 = add nsw i32 %118, 1
store i32 %119, i32* %19
%120 = load i32, i32* %20
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %120)
%122 = load i32, i32* %15
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %122)
%124 = load i32, i32* %18
%125 = load i32, i32* %5
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %130
127: ; preds = %117
%128 = load i32, i32* %14
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %128)
store i32 1, i32* %16
br label %130
130: ; preds = %127, %117
store i32 0, i32* %17
br label %131
131: ; preds = %130, %113
%132 = load i32, i32* %20
%133 = load i32, i32* %6
%134 = srem i32 %132, %133
%135 = icmp eq i32 %134, 0
br i1 %135, label %136, label %164
136: ; preds = %131
%137 = load i32, i32* %20
%138 = load i32, i32* %8
%139 = srem i32 %137, %138
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %164
141: ; preds = %136
%142 = load i32, i32* %20
store i32 %142, i32* %10
store i32 %142, i32* %9
%143 = load i32, i32* %14
%144 = add nsw i32 %143, 1
store i32 %144, i32* %14
store i32 %144, i32* %13
%145 = load i32, i32* %15
%146 = add nsw i32 %145, 1
store i32 %146, i32* %15
store i32 %146, i32* %12
%147 = load i32, i32* %20
%148 = load i32, i32* %13
%149 = load i32, i32* %12
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i32 %147, i32 %148, i32 %149)
%151 = load i32, i32* %6
%152 = load i32, i32* %8
%153 = icmp sle i32 %151, %152
br i1 %153, label %154, label %159
154: ; preds = %141
%155 = load i32, i32* %13
%156 = load i32, i32* %12
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), i32 %155, i32 %156)
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
store i32 1, i32* %16
store i32 0, i32* %17
br label %163
159: ; preds = %141
%160 = load i32, i32* %12
%161 = load i32, i32* %13
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %160, i32 %161)
store i32 0, i32* %16
store i32 1, i32* %17
br label %163
163: ; preds = %159, %154
store i32 0, i32* %19
store i32 0, i32* %18
br label %164
164: ; preds = %163, %136, %131
%165 = load i32, i32* %20
%166 = load i32, i32* %6
%167 = srem i32 %165, %166
%168 = icmp eq i32 %167, 0
br i1 %168, label %169, label %199
169: ; preds = %164
%170 = load i32, i32* %20
%171 = load i32, i32* %8
%172 = srem i32 %170, %171
%173 = icmp ne i32 %172, 0
br i1 %173, label %174, label %199
174: ; preds = %169
%175 = load i32, i32* %20
store i32 %175, i32* %9
%176 = load i32, i32* %20
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %176)
%178 = load i32, i32* %14
%179 = add nsw i32 %178, 1
store i32 %179, i32* %14
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 %179)
store i32 0, i32* %18
%181 = load i32, i32* %19
%182 = load i32, i32* %7
%183 = icmp slt i32 %181, %182
br i1 %183, label %184, label %195
184: ; preds = %174
%185 = load i32, i32* %8
%186 = load i32, i32* %6
%187 = icmp sgt i32 %185, %186
br i1 %187, label %188, label %191
188: ; preds = %184
%189 = load i32, i32* %14
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %189)
store i32 1, i32* %16
store i32 0, i32* %17
br label %194
191: ; preds = %184
%192 = load i32, i32* %15
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i32 %192)
br label %194
194: ; preds = %191, %188
br label %198
195: ; preds = %174
%196 = load i32, i32* %14
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %196)
store i32 1, i32* %16
br label %198
198: ; preds = %195, %194
br label %199
199: ; preds = %198, %169, %164
%200 = load i32, i32* %20
%201 = load i32, i32* %6
%202 = srem i32 %200, %201
%203 = icmp ne i32 %202, 0
br i1 %203, label %204, label %234
204: ; preds = %199
%205 = load i32, i32* %20
%206 = load i32, i32* %8
%207 = srem i32 %205, %206
%208 = icmp eq i32 %207, 0
br i1 %208, label %209, label %234
209: ; preds = %204
%210 = load i32, i32* %20
store i32 %210, i32* %10
%211 = load i32, i32* %20
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %211)
%213 = load i32, i32* %15
%214 = add nsw i32 %213, 1
store i32 %214, i32* %15
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %214)
store i32 0, i32* %19
%216 = load i32, i32* %18
%217 = load i32, i32* %5
%218 = icmp slt i32 %216, %217
br i1 %218, label %219, label %230
219: ; preds = %209
%220 = load i32, i32* %8
%221 = load i32, i32* %6
%222 = icmp sge i32 %220, %221
br i1 %222, label %223, label %226
223: ; preds = %219
%224 = load i32, i32* %14
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i32 %224)
br label %229
226: ; preds = %219
%227 = load i32, i32* %15
%228 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i32 %227)
store i32 1, i32* %17
store i32 0, i32* %16
br label %229
229: ; preds = %226, %223
br label %233
230: ; preds = %209
%231 = load i32, i32* %15
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i32 %231)
store i32 1, i32* %17
br label %233
233: ; preds = %230, %229
br label %234
234: ; preds = %233, %204, %199
%235 = load i32, i32* %16
%236 = icmp ne i32 %235, 0
br i1 %236, label %237, label %240
237: ; preds = %234
%238 = load i32, i32* %18
%239 = add nsw i32 %238, 1
store i32 %239, i32* %18
br label %240
240: ; preds = %237, %234
%241 = load i32, i32* %17
%242 = icmp ne i32 %241, 0
br i1 %242, label %243, label %246
243: ; preds = %240
%244 = load i32, i32* %19
%245 = add nsw i32 %244, 1
store i32 %245, i32* %19
br label %246
246: ; preds = %243, %240
br label %247
247: ; preds = %246
%248 = load i32, i32* %20
%249 = add nsw i32 %248, 1
store i32 %249, i32* %20
br label %45
250: ; preds = %45
ret void
}

LLVM IR (-O2):
@.str.2 = [64 x i8] c"Process A runs every %d seconds and needs %d seconds to finish\0A\00"
@.str.3 = [64 x i8] c"Process B runs every %d seconds and needs %d seconds to finish\0A\00"
@.str.4 = [12 x i8] c"when T=%d, \00"
@.str.5 = [17 x i8] c"run process B%d\0A\00"
@.str.6 = [17 x i8] c"run process A%d\0A\00"
@.str.7 = [21 x i8] c"process A%d is done\0A\00"
@.str.8 = [21 x i8] c"process B%d is done\0A\00"
@.str.9 = [63 x i8] c"when T=%d, process A%d and process B%d are generated together\0A\00"
@.str.10 = [41 x i8] c"run process A%d and suspend process B%d\0A\00"
@.str.12 = [41 x i8] c"run process B%d and suspend process A%d\0A\00"
@.str.13 = [26 x i8] c"process A%d is generated\0A\00"
@.str.14 = [31 x i8] c"process B%d is moving forward\0A\00"
@.str.15 = [20 x i8] c"process A%d is run\0A\00"
@.str.16 = [26 x i8] c"process B%d is generated\0A\00"
@.str.17 = [23 x i8] c"process A%d is on run\0A\00"
@.str.18 = [23 x i8] c"process B%d is to run\0A\00"
@.str.19 = [23 x i8] c"process B%d is on run\0A\00"
@str.20 = [47 x i8] c"\09\09\09\09earliest deadline first schedule algorithm\00"
@str.21 = [52 x i8] c"\09\09\09------------------------------------------------\00"
@str.22 = [40 x i8] c"---------------------------------------\00"
define void @runEDF(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.21, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.20, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.21, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 %0)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i32 %3, i32 %2)
%10 = add nsw i32 %0, 1
%11 = add nsw i32 %2, 1
%12 = icmp slt i32 %3, %1
%13 = icmp sgt i32 %3, %1
br label %14
14: ; preds = %4, %134
%15 = phi i32 [ 0, %4 ], [ %136, %134 ]
%16 = phi i32 [ 0, %4 ], [ %139, %134 ]
%17 = phi i32 [ 0, %4 ], [ %141, %134 ]
%18 = phi i32 [ 0, %4 ], [ %140, %134 ]
%19 = phi i32 [ 0, %4 ], [ %135, %134 ]
%20 = phi i32 [ 0, %4 ], [ %138, %134 ]
%21 = phi i32 [ 0, %4 ], [ %137, %134 ]
%22 = sub nsw i32 %0, %19
%23 = sub nsw i32 %2, %18
%24 = icmp ne i32 %18, %11
%25 = icmp eq i32 %21, 1
%26 = select i1 %25, i1 %24, i1 false
%27 = icmp slt i32 %23, %22
%28 = select i1 %26, i1 %27, i1 false
br i1 %28, label %29, label %32
29: ; preds = %14
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %16)
br label %41
32: ; preds = %14
%33 = icmp eq i32 %19, %10
%34 = icmp ne i32 %20, 1
%35 = select i1 %34, i1 true, i1 %33
br i1 %35, label %41, label %36
36: ; preds = %32
%37 = icmp slt i32 %22, %23
br i1 %37, label %38, label %41
38: ; preds = %36
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %15)
br label %41
41: ; preds = %32, %36, %38, %29
%42 = phi i32 [ %21, %32 ], [ 1, %38 ], [ %21, %36 ], [ 0, %29 ]
%43 = phi i32 [ %20, %32 ], [ 0, %38 ], [ 1, %36 ], [ 1, %29 ]
%44 = icmp eq i32 %19, %0
br i1 %44, label %45, label %51
45: ; preds = %41
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%48 = icmp slt i32 %18, %2
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %16)
br label %51
51: ; preds = %45, %49, %41
%52 = phi i32 [ %42, %41 ], [ 0, %49 ], [ 0, %45 ]
%53 = phi i32 [ %43, %41 ], [ 1, %49 ], [ %43, %45 ]
%54 = phi i32 [ %19, %41 ], [ %10, %49 ], [ %10, %45 ]
%55 = icmp eq i32 %18, %2
br i1 %55, label %56, label %62
56: ; preds = %51
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %16)
%59 = icmp slt i32 %54, %0
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %15)
br label %62
62: ; preds = %56, %60, %51
%63 = phi i32 [ %52, %51 ], [ 1, %60 ], [ %52, %56 ]
%64 = phi i32 [ %53, %51 ], [ 0, %60 ], [ 0, %56 ]
%65 = phi i32 [ %18, %51 ], [ %11, %60 ], [ %11, %56 ]
%66 = srem i32 %17, %1
%67 = icmp eq i32 %66, 0
%68 = srem i32 %17, %3
%69 = icmp eq i32 %68, 0
br i1 %67, label %70, label %92
70: ; preds = %62
br i1 %69, label %71, label %80
71: ; preds = %70
%72 = add nsw i32 %15, 1
%73 = add nsw i32 %16, 1
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i32 %17, i32 %72, i32 %73)
br i1 %12, label %78, label %75
75: ; preds = %71
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), i32 %72, i32 %73)
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.22, i64 0, i64 0))
br label %128
78: ; preds = %71
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %73, i32 %72)
br label %113
80: ; preds = %70
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%82 = add nsw i32 %15, 1
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 %82)
%84 = icmp slt i32 %65, %2
br i1 %84, label %85, label %90
85: ; preds = %80
br i1 %13, label %86, label %88
86: ; preds = %85
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %82)
br label %128
88: ; preds = %85
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0), i32 %16)
br label %105
90: ; preds = %80
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %82)
br label %119
92: ; preds = %62
br i1 %69, label %93, label %105
93: ; preds = %92
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%95 = add nsw i32 %16, 1
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i32 %95)
%97 = icmp slt i32 %54, %0
br i1 %97, label %98, label %103
98: ; preds = %93
br i1 %12, label %101, label %99
99: ; preds = %98
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i32 %15)
br label %105
101: ; preds = %98
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i32 %95)
br label %113
103: ; preds = %93
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i32 %95)
br label %105
105: ; preds = %88, %103, %99, %92
%106 = phi i32 [ %15, %99 ], [ %15, %103 ], [ %15, %92 ], [ %82, %88 ]
%107 = phi i32 [ %54, %99 ], [ %54, %103 ], [ %54, %92 ], [ 0, %88 ]
%108 = phi i32 [ %64, %99 ], [ 1, %103 ], [ %64, %92 ], [ %64, %88 ]
%109 = phi i32 [ 0, %99 ], [ 0, %103 ], [ %65, %92 ], [ %65, %88 ]
%110 = phi i32 [ %95, %99 ], [ %95, %103 ], [ %16, %92 ], [ %16, %88 ]
%111 = icmp eq i32 %63, 0
%112 = add nsw i32 %107, 1
br i1 %111, label %113, label %119
113: ; preds = %78, %101, %105
%114 = phi i32 [ %95, %101 ], [ %110, %105 ], [ %73, %78 ]
%115 = phi i32 [ 0, %101 ], [ %109, %105 ], [ 0, %78 ]
%116 = phi i32 [ 1, %101 ], [ %108, %105 ], [ 1, %78 ]
%117 = phi i32 [ %54, %101 ], [ %107, %105 ], [ 0, %78 ]
%118 = phi i32 [ %15, %101 ], [ %106, %105 ], [ %72, %78 ]
br label %119
119: ; preds = %90, %105, %113
%120 = phi i32 [ %114, %113 ], [ %110, %105 ], [ %16, %90 ]
%121 = phi i32 [ %115, %113 ], [ %109, %105 ], [ %65, %90 ]
%122 = phi i32 [ %116, %113 ], [ %108, %105 ], [ %64, %90 ]
%123 = phi i32 [ 0, %113 ], [ %63, %105 ], [ 1, %90 ]
%124 = phi i32 [ %118, %113 ], [ %106, %105 ], [ %82, %90 ]
%125 = phi i32 [ %117, %113 ], [ %112, %105 ], [ 1, %90 ]
%126 = icmp eq i32 %122, 0
%127 = add nsw i32 %121, 1
br i1 %126, label %128, label %134
128: ; preds = %75, %86, %119
%129 = phi i32 [ 1, %86 ], [ %125, %119 ], [ 1, %75 ]
%130 = phi i32 [ %82, %86 ], [ %124, %119 ], [ %72, %75 ]
%131 = phi i32 [ 1, %86 ], [ %123, %119 ], [ 1, %75 ]
%132 = phi i32 [ %65, %86 ], [ %121, %119 ], [ 0, %75 ]
%133 = phi i32 [ %16, %86 ], [ %120, %119 ], [ %73, %75 ]
br label %134
134: ; preds = %119, %128
%135 = phi i32 [ %129, %128 ], [ %125, %119 ]
%136 = phi i32 [ %130, %128 ], [ %124, %119 ]
%137 = phi i32 [ %131, %128 ], [ %123, %119 ]
%138 = phi i32 [ 0, %128 ], [ %122, %119 ]
%139 = phi i32 [ %133, %128 ], [ %120, %119 ]
%140 = phi i32 [ %132, %128 ], [ %127, %119 ]
%141 = add nuw nsw i32 %17, 1
%142 = icmp eq i32 %141, 101
br i1 %142, label %143, label %14
143: ; preds = %134
ret void
}