#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 isn;
int /*<<< orphan*/ number(int);
int /*<<< orphan*/ xwrite(char);
void blkend() {
  extern isn;
  auto i;
  if (!isn)
    return;
  xwrite('1:');
  i = 0;
  while (i < isn) {
    xwrite('l');
    number(i);
    xwrite('\n');
    i = i + 1;
  }
  isn = 0;
}


x86 assembly (clang, -O0):
<blkend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
cmpl   $0x0,(%rax)
jne    113d <blkend+0x1d>
jmp    1197 <blkend+0x77>
mov    $0x3a,%edi
call   1030 <xwrite@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%eax
jge    118a <blkend+0x6a>
mov    $0x6c,%edi
call   1030 <xwrite@plt>
mov    -0x4(%rbp),%edi
call   1040 <number@plt>
mov    $0xa,%edi
call   1030 <xwrite@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114e <blkend+0x2e>
mov    0x2e67(%rip),%rax
movl   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blkend>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
cmpl   $0x0,(%r14)
je     117a <blkend+0x5a>
mov    $0x3a,%edi
call   1030 <xwrite@plt>
cmpl   $0x0,(%r14)
jle    1173 <blkend+0x53>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x6c,%edi
call   1030 <xwrite@plt>
mov    %ebx,%edi
call   1040 <number@plt>
mov    $0xa,%edi
call   1030 <xwrite@plt>
add    $0x1,%ebx
cmp    (%r14),%ebx
jl     1150 <blkend+0x30>
movl   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@isn = global i32 0
define void @blkend() {
%1 = alloca i32
%2 = load i32, i32* @isn
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
br label %19
5: ; preds = %0
%6 = call i32 @xwrite(i8 signext 58)
store i32 0, i32* %1
br label %7
7: ; preds = %11, %5
%8 = load i32, i32* %1
%9 = load i32, i32* @isn
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = call i32 @xwrite(i8 signext 108)
%13 = load i32, i32* %1
%14 = call i32 @number(i32 %13)
%15 = call i32 @xwrite(i8 signext 10)
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %7
18: ; preds = %7
store i32 0, i32* @isn
br label %19
19: ; preds = %18, %4
ret void
}

LLVM IR (-O2):
@isn = global i32 0
define void @blkend() {
%1 = load i32, i32* @isn
%2 = icmp eq i32 %1, 0
br i1 %2, label %16, label %3
3: ; preds = %0
%4 = tail call i32 @xwrite(i8 signext 58)
%5 = load i32, i32* @isn
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %3, %7
%8 = phi i32 [ %12, %7 ], [ 0, %3 ]
%9 = tail call i32 @xwrite(i8 signext 108)
%10 = tail call i32 @number(i32 %8)
%11 = tail call i32 @xwrite(i8 signext 10)
%12 = add nuw nsw i32 %8, 1
%13 = load i32, i32* @isn
%14 = icmp slt i32 %12, %13
br i1 %14, label %7, label %15
15: ; preds = %7, %3
store i32 0, i32* @isn
br label %16
16: ; preds = %0, %15
ret void
}