#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*/ RIT128x96x4StringDraw(char *, int, int, int);
int /*<<< orphan*/ delay(unsigned long);
void display(unsigned long *delayTime, char *startChar) {
  volatile int i = 0;
  int k = 15;
  char myData[3];
  for (i = 9; i >= 0; i--) {
    myData[0] = i + *startChar;
    myData[1] = '\0';
    k = k + 10;
    RIT128x96x4StringDraw(myData, k, 44, 15);
    delay(*delayTime);
  }
  k = 15;
  myData[0] = ' ';
  myData[1] = '\0';
  for (i = 0; i < 10; i++) {
    k = k + 10;
    RIT128x96x4StringDraw(myData, k, 44, 15);
    delay(*delayTime);
  }
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xf,-0x18(%rbp)
movl   $0x9,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    $0x0,%eax
jl     119d <display+0x7d>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %al,-0x1b(%rbp)
movb   $0x0,-0x1a(%rbp)
mov    -0x18(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x18(%rbp)
lea    -0x1b(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    $0x2c,%edx
mov    $0xf,%ecx
call   1040 <RIT128x96x4StringDraw@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <delay@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <display+0x25>
movl   $0xf,-0x18(%rbp)
movb   $0x20,-0x1b(%rbp)
movb   $0x0,-0x1a(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    $0xa,%eax
jge    11f8 <display+0xd8>
mov    -0x18(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x18(%rbp)
lea    -0x1b(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    $0x2c,%edx
mov    $0xf,%ecx
call   1040 <RIT128x96x4StringDraw@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <delay@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11b3 <display+0x93>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movl   $0x0,(%rsp)
movl   $0x9,(%rsp)
cmpl   $0x0,(%rsp)
js     1188 <display+0x68>
mov    %rsi,%r14
mov    $0x19,%ebp
lea    0x5(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    (%rsp),%eax
add    (%r14),%al
mov    %al,0x5(%rsp)
movb   $0x0,0x6(%rsp)
mov    %r15,%rdi
mov    %ebp,%esi
mov    $0x2c,%edx
mov    $0xf,%ecx
call   1040 <RIT128x96x4StringDraw@plt>
mov    (%rbx),%rdi
call   1030 <delay@plt>
addl   $0xffffffff,(%rsp)
add    $0xa,%ebp
cmpl   $0x0,(%rsp)
jns    1150 <display+0x30>
movw   $0x20,0x5(%rsp)
movl   $0x0,(%rsp)
mov    (%rsp),%eax
cmp    $0x9,%eax
jg     11db <display+0xbb>
mov    $0x19,%ebp
lea    0x5(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x2c,%edx
mov    $0xf,%ecx
call   1040 <RIT128x96x4StringDraw@plt>
mov    (%rbx),%rdi
call   1030 <delay@plt>
addl   $0x1,(%rsp)
mov    (%rsp),%eax
add    $0xa,%ebp
cmp    $0xa,%eax
jl     11b0 <display+0x90>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @display(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [3 x i8]
store i64* %0, i64** %3
store i8* %1, i8** %4
store volatile i32 0, i32* %5
store i32 15, i32* %6
store volatile i32 9, i32* %5
br label %8
8: ; preds = %28, %2
%9 = load volatile i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %31
11: ; preds = %8
%12 = load volatile i32, i32* %5
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %12, %15
%17 = trunc i32 %16 to i8
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
store i8 %17, i8* %18
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 1
store i8 0, i8* %19
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 10
store i32 %21, i32* %6
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%23 = load i32, i32* %6
%24 = call i32 @RIT128x96x4StringDraw(i8* %22, i32 %23, i32 44, i32 15)
%25 = load i64*, i64** %3
%26 = load i64, i64* %25
%27 = call i32 @delay(i64 %26)
br label %28
28: ; preds = %11
%29 = load volatile i32, i32* %5
%30 = add nsw i32 %29, -1
store volatile i32 %30, i32* %5
br label %8
31: ; preds = %8
store i32 15, i32* %6
%32 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
store i8 32, i8* %32
%33 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 1
store i8 0, i8* %33
store volatile i32 0, i32* %5
br label %34
34: ; preds = %46, %31
%35 = load volatile i32, i32* %5
%36 = icmp slt i32 %35, 10
br i1 %36, label %37, label %49
37: ; preds = %34
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 10
store i32 %39, i32* %6
%40 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%41 = load i32, i32* %6
%42 = call i32 @RIT128x96x4StringDraw(i8* %40, i32 %41, i32 44, i32 15)
%43 = load i64*, i64** %3
%44 = load i64, i64* %43
%45 = call i32 @delay(i64 %44)
br label %46
46: ; preds = %37
%47 = load volatile i32, i32* %5
%48 = add nsw i32 %47, 1
store volatile i32 %48, i32* %5
br label %34
49: ; preds = %34
ret void
}

LLVM IR (-O2):
define void @display(i64* nocapture %0, i8* nocapture %1) {
%3 = alloca i32
%4 = alloca [3 x i8]
%5 = bitcast i32* %3 to i8*
store volatile i32 0, i32* %3
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
store volatile i32 9, i32* %3
%7 = load volatile i32, i32* %3
%8 = icmp sgt i32 %7, -1
br i1 %8, label %9, label %25
9: ; preds = %2
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
br label %11
11: ; preds = %9, %11
%12 = phi i32 [ 15, %9 ], [ %17, %11 ]
%13 = load volatile i32, i32* %3
%14 = load i8, i8* %1
%15 = trunc i32 %13 to i8
%16 = add i8 %14, %15
store i8 %16, i8* %6
store i8 0, i8* %10
%17 = add nuw nsw i32 %12, 10
%18 = call i32 @RIT128x96x4StringDraw(i8* %6, i32 %17, i32 44, i32 15)
%19 = load i64, i64* %0
%20 = call i32 @delay(i64 %19)
%21 = load volatile i32, i32* %3
%22 = add nsw i32 %21, -1
store volatile i32 %22, i32* %3
%23 = load volatile i32, i32* %3
%24 = icmp sgt i32 %23, -1
br i1 %24, label %11, label %25
25: ; preds = %11, %2
store i8 32, i8* %6
%26 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
store i8 0, i8* %26
store volatile i32 0, i32* %3
%27 = load volatile i32, i32* %3
%28 = icmp slt i32 %27, 10
br i1 %28, label %29, label %39
29: ; preds = %25, %29
%30 = phi i32 [ %31, %29 ], [ 15, %25 ]
%31 = add nuw nsw i32 %30, 10
%32 = call i32 @RIT128x96x4StringDraw(i8* %6, i32 %31, i32 44, i32 15)
%33 = load i64, i64* %0
%34 = call i32 @delay(i64 %33)
%35 = load volatile i32, i32* %3
%36 = add nsw i32 %35, 1
store volatile i32 %36, i32* %3
%37 = load volatile i32, i32* %3
%38 = icmp slt i32 %37, 10
br i1 %38, label %29, label %39
39: ; preds = %29, %25
ret void
}