#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 */
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void DumpRange(FILE *fp, unsigned short n) {
  unsigned char c = 0;
  unsigned short i = 0;
  for (i = 0; i < (0xFF - 0xA0); i++) {
    c = 0xA0 + n;
    fwrite(&c, sizeof(c), 1, fp);
    c = 0xA0 + i;
    fwrite(&c, sizeof(c), 1, fp);
  }
  fflush(fp);
  return;
}


x86 assembly (clang, -O0):
<DumpRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movb   $0x0,-0xb(%rbp)
movw   $0x0,-0xe(%rbp)
movw   $0x0,-0xe(%rbp)
movzwl -0xe(%rbp),%eax
cmp    $0x5f,%eax
jge    11a1 <DumpRange+0x81>
movzwl -0xa(%rbp),%eax
add    $0xa0,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xb(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
movzwl -0xe(%rbp),%eax
add    $0xa0,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xb(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
mov    -0xe(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xe(%rbp)
jmp    1143 <DumpRange+0x23>
mov    -0x8(%rbp),%rdi
call   1030 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DumpRange>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
add    $0xa0,%sil
movsbl %sil,%r14d
mov    $0xa0000000,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14d,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    %ebp,%edi
sar    $0x18,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0x1000000,%ebp
cmp    $0xff000000,%ebp
jne    1140 <DumpRange+0x20>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fflush@plt>

LLVM IR (-O0):
define void @DumpRange(i32* %0, i16 zeroext %1) {
%3 = alloca i32*
%4 = alloca i16
%5 = alloca i8
%6 = alloca i16
store i32* %0, i32** %3
store i16 %1, i16* %4
store i8 0, i8* %5
store i16 0, i16* %6
store i16 0, i16* %6
br label %7
7: ; preds = %24, %2
%8 = load i16, i16* %6
%9 = zext i16 %8 to i32
%10 = icmp slt i32 %9, 95
br i1 %10, label %11, label %27
11: ; preds = %7
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = add nsw i32 160, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %5
%16 = load i32*, i32** %3
%17 = call i32 @fwrite(i8* %5, i32 1, i32 1, i32* %16)
%18 = load i16, i16* %6
%19 = zext i16 %18 to i32
%20 = add nsw i32 160, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %5
%22 = load i32*, i32** %3
%23 = call i32 @fwrite(i8* %5, i32 1, i32 1, i32* %22)
br label %24
24: ; preds = %11
%25 = load i16, i16* %6
%26 = add i16 %25, 1
store i16 %26, i16* %6
br label %7
27: ; preds = %7
%28 = load i32*, i32** %3
%29 = call i32 @fflush(i32* %28)
ret void
}

LLVM IR (-O2):
define void @DumpRange(i32* nocapture %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = shl i32 %3, 24
%5 = add i32 %4, -1610612736
%6 = ashr exact i32 %5, 24
br label %7
7: ; preds = %2, %7
%8 = phi i32 [ 0, %2 ], [ %14, %7 ]
%9 = tail call i32 @fputc(i32 %6, i32* %0)
%10 = shl nuw nsw i32 %8, 24
%11 = add nuw nsw i32 %10, -1610612736
%12 = ashr exact i32 %11, 24
%13 = tail call i32 @fputc(i32 %12, i32* %0)
%14 = add nuw nsw i32 %8, 1
%15 = icmp eq i32 %14, 95
br i1 %15, label %16, label %7
16: ; preds = %7
%17 = tail call i32 @fflush(i32* %0)
ret void
}