#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 *, ...);
int rand();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int orate, bsize, i, clk, psz, packetsrm = 0, nextpacket;
  int npacketsrm;
  orate = 5;
  bsize = 50;
  int packets[2];
  srand(time(NULL));
  for (i = 0; i < 2; ++i) {
    packets[i] = rand() % 10;
  }
  for (i = 0; i < 2; ++i) {
    if ((packets[i] + packetsrm) > bsize) {
      if (packets[i] > bsize) {
        printf("Incoming packet is bigger than the bucket\n");
        break;
      } else {
        printf("Bucket is full! Dropping this packet and trying the next\n");
      }
    } else {
      npacketsrm = 4 - i;
      psz = packets[i];
      packetsrm += psz;
      printf("Incoming packet remain size: %d", psz);
      printf("\n\n=============================\n");
      printf("\nPacket size remaining initially: %d", packetsrm);
      nextpacket = rand() % 10;
      printf("\nNext packet arrives after %d seconds\n", nextpacket);
      for (clk = 0; clk < nextpacket && packetsrm > 0; ++clk) {
        printf("Time left: %d\nSending...", nextpacket - clk);
        sleep(1);
        printf("Sent!\n");
        if (packetsrm <= orate) {
          packetsrm = 0;
        } else {
          packetsrm -= orate;
        }
        printf("Bytes remaining: %d\n", packetsrm);
      }
      if (nextpacket - clk > 0) {
        printf("Time left before next packet arrives %d\n", nextpacket - clk);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x32,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    11ba <main+0x6a>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
movslq -0x10(%rbp),%rax
mov    %edx,-0x2c(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    118b <main+0x3b>
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    1363 <main+0x213>
movslq -0x10(%rbp),%rax
mov    -0x2c(%rbp,%rax,4),%eax
add    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1216 <main+0xc6>
movslq -0x10(%rbp),%rax
mov    -0x2c(%rbp,%rax,4),%eax
cmp    -0xc(%rbp),%eax
jle    1203 <main+0xb3>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1363 <main+0x213>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1350 <main+0x200>
mov    $0x4,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
movslq -0x10(%rbp),%rax
mov    -0x2c(%rbp,%rax,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x20(%rbp),%ecx
mov    %al,-0x2d(%rbp)
jge    12aa <main+0x15a>
cmpl   $0x0,-0x1c(%rbp)
setg   %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
test   $0x1,%al
jne    12ba <main+0x16a>
jmp    1328 <main+0x1d8>
mov    -0x20(%rbp),%esi
sub    -0x14(%rbp),%esi
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12fe <main+0x1ae>
movl   $0x0,-0x1c(%rbp)
jmp    1309 <main+0x1b9>
mov    -0x8(%rbp),%ecx
mov    -0x1c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    128f <main+0x13f>
mov    -0x20(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    $0x0,%eax
jle    134b <main+0x1fb>
mov    -0x20(%rbp),%esi
sub    -0x14(%rbp),%esi
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1350 <main+0x200>
jmp    1355 <main+0x205>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11c1 <main+0x71>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %r15d,%r15d
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   1080 <rand@plt>
mov    %eax,%r14d
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%r12d
lea    0xe32(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xe36(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%rbp
imul   $0x66666667,%rbp,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebp
lea    0xe26(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
mov    %r14d,0x4(%rsp)
mov    %r12d,(%rsp)
jle    12a0 <main+0x140>
test   %ebx,%ebx
jle    12a0 <main+0x140>
lea    0xea3(%rip),%r12
lea    0xe3e(%rip),%r13
mov    %ebp,%r14d
xor    %r15d,%r15d
nopl   (%rax)
lea    0xe15(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <sleep@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
cmp    $0x6,%ebx
lea    -0x5(%rbx),%eax
mov    %eax,%ebx
mov    $0x0,%eax
cmovb  %eax,%ebx
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15d
cmp    %r15d,%ebp
jle    12a0 <main+0x140>
add    $0xffffffff,%r14d
test   %ebx,%ebx
jne    1250 <main+0xf0>
mov    0x4(%rsp),%r12d
sub    (%rsp),%r12d
sub    %r15d,%ebp
jle    12be <main+0x15e>
lea    0xde5(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    %r12d,%ebx
cmp    $0x32,%ebx
jle    12d7 <main+0x177>
lea    0xe1c(%rip),%rdi
call   1030 <puts@plt>
jmp    13c4 <main+0x264>
lea    0xd22(%rip),%rdi
xor    %r14d,%r14d
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdd1(%rip),%rdi
call   1030 <puts@plt>
lea    0xd22(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%r13
imul   $0x66666667,%r13,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r13d
lea    0xd11(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r13d,%r13d
jle    13ae <main+0x24e>
test   %ebx,%ebx
jle    13ae <main+0x24e>
lea    0xd95(%rip),%r15
lea    0xd30(%rip),%r12
mov    %r13d,%ebp
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
lea    0xd05(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <sleep@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
cmp    $0x6,%ebx
lea    -0x5(%rbx),%eax
mov    %eax,%ebx
mov    $0x0,%eax
cmovb  %eax,%ebx
mov    %r12,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
cmp    %r14d,%r13d
jle    13ae <main+0x24e>
add    $0xffffffff,%ebp
test   %ebx,%ebx
jne    1360 <main+0x200>
sub    %r14d,%r13d
jle    13c4 <main+0x264>
lea    0xce0(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [43 x i8] c"Incoming packet is bigger than the bucket\0A\00"
@.str.1 = [58 x i8] c"Bucket is full! Dropping this packet and trying the next\0A\00"
@.str.2 = [32 x i8] c"Incoming packet remain size: %d\00"
@.str.3 = [33 x i8] c"\0A\0A=============================\0A\00"
@.str.4 = [37 x i8] c"\0APacket size remaining initially: %d\00"
@.str.5 = [39 x i8] c"\0ANext packet arrives after %d seconds\0A\00"
@.str.6 = [25 x i8] c"Time left: %d\0ASending...\00"
@.str.7 = [7 x i8] c"Sent!\0A\00"
@.str.8 = [21 x i8] c"Bytes remaining: %d\0A\00"
@.str.9 = [41 x i8] c"Time left before next packet arrives %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [2 x i32]
store i32 0, i32* %1
store i32 0, i32* %7
store i32 5, i32* %2
store i32 50, i32* %3
%11 = call i32 @time(i32* null)
%12 = call i32 @srand(i32 %11)
store i32 0, i32* %4
br label %13
13: ; preds = %22, %0
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %25
16: ; preds = %13
%17 = call i32 (...) @rand()
%18 = srem i32 %17, 10
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %16
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %13
25: ; preds = %13
store i32 0, i32* %4
br label %26
26: ; preds = %111, %25
%27 = load i32, i32* %4
%28 = icmp slt i32 %27, 2
br i1 %28, label %29, label %114
29: ; preds = %26
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = load i32, i32* %7
%35 = add nsw i32 %33, %34
%36 = load i32, i32* %3
%37 = icmp sgt i32 %35, %36
br i1 %37, label %38, label %50
38: ; preds = %29
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = load i32, i32* %3
%44 = icmp sgt i32 %42, %43
br i1 %44, label %45, label %47
45: ; preds = %38
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
br label %114
47: ; preds = %38
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
br label %49
49: ; preds = %47
br label %110
50: ; preds = %29
%51 = load i32, i32* %4
%52 = sub nsw i32 4, %51
store i32 %52, i32* %9
%53 = load i32, i32* %4
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 %54
%56 = load i32, i32* %55
store i32 %56, i32* %6
%57 = load i32, i32* %6
%58 = load i32, i32* %7
%59 = add nsw i32 %58, %57
store i32 %59, i32* %7
%60 = load i32, i32* %6
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %60)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%63 = load i32, i32* %7
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %63)
%65 = call i32 (...) @rand()
%66 = srem i32 %65, 10
store i32 %66, i32* %8
%67 = load i32, i32* %8
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %67)
store i32 0, i32* %5
br label %69
69: ; preds = %96, %50
%70 = load i32, i32* %5
%71 = load i32, i32* %8
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* %7
%75 = icmp sgt i32 %74, 0
br label %76
76: ; preds = %73, %69
%77 = phi i1 [ false, %69 ], [ %75, %73 ]
br i1 %77, label %78, label %99
78: ; preds = %76
%79 = load i32, i32* %8
%80 = load i32, i32* %5
%81 = sub nsw i32 %79, %80
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %81)
%83 = call i32 @sleep(i32 1)
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%85 = load i32, i32* %7
%86 = load i32, i32* %2
%87 = icmp sle i32 %85, %86
br i1 %87, label %88, label %89
88: ; preds = %78
store i32 0, i32* %7
br label %93
89: ; preds = %78
%90 = load i32, i32* %2
%91 = load i32, i32* %7
%92 = sub nsw i32 %91, %90
store i32 %92, i32* %7
br label %93
93: ; preds = %89, %88
%94 = load i32, i32* %7
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %93
%97 = load i32, i32* %5
%98 = add nsw i32 %97, 1
store i32 %98, i32* %5
br label %69
99: ; preds = %76
%100 = load i32, i32* %8
%101 = load i32, i32* %5
%102 = sub nsw i32 %100, %101
%103 = icmp sgt i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %99
%105 = load i32, i32* %8
%106 = load i32, i32* %5
%107 = sub nsw i32 %105, %106
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0), i32 %107)
br label %109
109: ; preds = %104, %99
br label %110
110: ; preds = %109, %49
br label %111
111: ; preds = %110
%112 = load i32, i32* %4
%113 = add nsw i32 %112, 1
store i32 %113, i32* %4
br label %26
114: ; preds = %45, %26
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [32 x i8] c"Incoming packet remain size: %d\00"
@.str.4 = [37 x i8] c"\0APacket size remaining initially: %d\00"
@.str.5 = [39 x i8] c"\0ANext packet arrives after %d seconds\0A\00"
@.str.6 = [25 x i8] c"Time left: %d\0ASending...\00"
@.str.8 = [21 x i8] c"Bytes remaining: %d\0A\00"
@.str.9 = [41 x i8] c"Time left before next packet arrives %d\0A\00"
@str = [32 x i8] c"\0A\0A=============================\00"
@str.10 = [6 x i8] c"Sent!\00"
@str.11 = [57 x i8] c"Bucket is full! Dropping this packet and trying the next\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 10
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 10
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %4)
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = icmp sgt i32 %11, 0
%14 = icmp sgt i32 %4, 0
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %16, label %31
16: ; preds = %0, %16
%17 = phi i32 [ %27, %16 ], [ 0, %0 ]
%18 = phi i32 [ %25, %16 ], [ %4, %0 ]
%19 = sub nsw i32 %11, %17
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = tail call i32 @sleep(i32 1)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.10, i64 0, i64 0))
%23 = icmp ult i32 %18, 6
%24 = add nsw i32 %18, -5
%25 = select i1 %23, i32 0, i32 %24
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %25)
%27 = add nuw nsw i32 %17, 1
%28 = icmp sgt i32 %11, %27
%29 = icmp ne i32 %25, 0
%30 = and i1 %28, %29
br i1 %30, label %16, label %31
31: ; preds = %16, %0
%32 = phi i32 [ %4, %0 ], [ %25, %16 ]
%33 = phi i32 [ 0, %0 ], [ %27, %16 ]
%34 = sub nsw i32 %11, %33
%35 = icmp sgt i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0), i32 %34)
br label %38
38: ; preds = %36, %31
%39 = add nsw i32 %6, %32
%40 = icmp sgt i32 %39, 50
br i1 %40, label %72, label %41
41: ; preds = %38
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%45 = tail call i32 (...) @rand()
%46 = srem i32 %45, 10
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %46)
%48 = icmp sgt i32 %46, 0
%49 = icmp sgt i32 %39, 0
%50 = select i1 %48, i1 %49, i1 false
br i1 %50, label %51, label %66
51: ; preds = %41, %51
%52 = phi i32 [ %62, %51 ], [ 0, %41 ]
%53 = phi i32 [ %60, %51 ], [ %39, %41 ]
%54 = sub nsw i32 %46, %52
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %54)
%56 = tail call i32 @sleep(i32 1)
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.10, i64 0, i64 0))
%58 = icmp ult i32 %53, 6
%59 = add nsw i32 %53, -5
%60 = select i1 %58, i32 0, i32 %59
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %60)
%62 = add nuw nsw i32 %52, 1
%63 = icmp sgt i32 %46, %62
%64 = icmp ne i32 %60, 0
%65 = and i1 %63, %64
br i1 %65, label %51, label %66
66: ; preds = %51, %41
%67 = phi i32 [ 0, %41 ], [ %62, %51 ]
%68 = sub nsw i32 %46, %67
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %74
70: ; preds = %66
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0), i32 %68)
br label %74
72: ; preds = %38
%73 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.11, i64 0, i64 0))
br label %74
74: ; preds = %66, %70, %72
ret i32 0
}