#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 d(int);
int /*<<< orphan*/ nicename(unsigned int, char *, char *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ putchar(char);
void chuul(unsigned count) {
  int i;
  nicename(count, "chuul", "MM 40");
  for (i = 0; i < count; i++) {
    printf("%d: %d hp, 16 AC", i + 1,
           d(10) + d(10) + d(10) + d(10) + d(10) + d(10) + d(10) + d(10) +
               d(10) + d(10) + d(10) + 33);
    (void)putchar('\n');
  }
  (void)putchar('\n');
}


x86 assembly (clang, -O0):
<chuul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xeab(%rip),%rsi
lea    0xeaa(%rip),%rdx
call   1060 <nicename@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1277 <chuul+0x137>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,-0x34(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%esi
add    %eax,%edx
add    $0x21,%edx
lea    0xdb2(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1168 <chuul+0x28>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chuul>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
lea    0xea9(%rip),%rsi
lea    0xea8(%rip),%rdx
call   1060 <nicename@plt>
mov    %rbx,0x8(%rsp)
test   %ebx,%ebx
je     127a <chuul+0x13a>
mov    0x8(%rsp),%rax
neg    %eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,0x24(%rsp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,0x20(%rsp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,0x1c(%rsp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,0x18(%rsp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,0x14(%rsp)
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%ebp
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%r15d
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%r14d
mov    $0xa,%edi
call   1040 <d@plt>
mov    %eax,%r13d
mov    $0xa,%edi
call   1040 <d@plt>
add    0x24(%rsp),%ebx
add    0x20(%rsp),%ebx
add    0x1c(%rsp),%ebx
add    0x18(%rsp),%ebx
add    0x14(%rsp),%ebx
add    %ebp,%ebx
add    %r15d,%ebx
add    %r14d,%ebx
add    %r13d,%ebx
lea    (%rax,%rbx,1),%edx
add    $0x21,%edx
lea    0xdc1(%rip),%rdi
mov    %r12d,%esi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rax
add    %r12d,%eax
add    $0x1,%eax
mov    %r12d,%ecx
add    $0x1,%ecx
mov    %ecx,%r12d
cmp    $0x1,%eax
jne    1190 <chuul+0x50>
mov    $0xa,%edi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"chuul\00"
@.str.1 = [6 x i8] c"MM 40\00"
@.str.2 = [17 x i8] c"%d: %d hp, 16 AC\00"
define void @chuul(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @nicename(i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %6
6: ; preds = %37, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %40
10: ; preds = %6
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = call i32 @d(i32 10)
%14 = call i32 @d(i32 10)
%15 = add nsw i32 %13, %14
%16 = call i32 @d(i32 10)
%17 = add nsw i32 %15, %16
%18 = call i32 @d(i32 10)
%19 = add nsw i32 %17, %18
%20 = call i32 @d(i32 10)
%21 = add nsw i32 %19, %20
%22 = call i32 @d(i32 10)
%23 = add nsw i32 %21, %22
%24 = call i32 @d(i32 10)
%25 = add nsw i32 %23, %24
%26 = call i32 @d(i32 10)
%27 = add nsw i32 %25, %26
%28 = call i32 @d(i32 10)
%29 = add nsw i32 %27, %28
%30 = call i32 @d(i32 10)
%31 = add nsw i32 %29, %30
%32 = call i32 @d(i32 10)
%33 = add nsw i32 %31, %32
%34 = add nsw i32 %33, 33
%35 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 %34)
%36 = call i32 @putchar(i8 signext 10)
br label %37
37: ; preds = %10
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %6
40: ; preds = %6
%41 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"chuul\00"
@.str.1 = [6 x i8] c"MM 40\00"
@.str.2 = [17 x i8] c"%d: %d hp, 16 AC\00"
define void @chuul(i32 %0) {
%2 = tail call i32 @nicename(i32 %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32 %0, 0
br i1 %3, label %32, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw i32 %5, 1
%7 = tail call i32 @d(i32 10)
%8 = tail call i32 @d(i32 10)
%9 = tail call i32 @d(i32 10)
%10 = tail call i32 @d(i32 10)
%11 = tail call i32 @d(i32 10)
%12 = tail call i32 @d(i32 10)
%13 = tail call i32 @d(i32 10)
%14 = tail call i32 @d(i32 10)
%15 = tail call i32 @d(i32 10)
%16 = tail call i32 @d(i32 10)
%17 = tail call i32 @d(i32 10)
%18 = add i32 %7, 33
%19 = add i32 %18, %8
%20 = add i32 %19, %9
%21 = add i32 %20, %10
%22 = add i32 %21, %11
%23 = add i32 %22, %12
%24 = add i32 %23, %13
%25 = add i32 %24, %14
%26 = add i32 %25, %15
%27 = add i32 %26, %16
%28 = add i32 %27, %17
%29 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %28)
%30 = tail call i32 @putchar(i8 signext 10)
%31 = icmp eq i32 %6, %0
br i1 %31, label %32, label %4
32: ; preds = %4, %1
%33 = tail call i32 @putchar(i8 signext 10)
ret void
}