#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 /*<<< orphan*/ puts(char *);
void StampaPosizioneTartaruga(unsigned int posizioneT,
                              unsigned int lunghezzaCampo) {
  size_t i;
  if (posizioneT <= 70) {
    i = 1;
    while (i < posizioneT) {
      printf(" ");
      i++;
    }
    printf("%s", "T");
    i += 1;
    while (i <= lunghezzaCampo) {
      printf(" ");
      i++;
    }
    puts("");
  }
  return;
}


x86 assembly (clang, -O0):
<StampaPosizioneTartaruga>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x46,-0x4(%rbp)
ja     11cb <StampaPosizioneTartaruga+0xab>
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
cmp    %rcx,%rax
jae    116f <StampaPosizioneTartaruga+0x4f>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1140 <StampaPosizioneTartaruga+0x20>
lea    0xe8c(%rip),%rdi
lea    0xe88(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
cmp    %rcx,%rax
ja     11bf <StampaPosizioneTartaruga+0x9f>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1190 <StampaPosizioneTartaruga+0x70>
lea    0xe3b(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StampaPosizioneTartaruga>:
cmp    $0x46,%edi
ja     117e <StampaPosizioneTartaruga+0x6e>
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    $0x2,%ebx
cmp    $0x2,%edi
jb     1144 <StampaPosizioneTartaruga+0x34>
mov    %edi,%ebx
lea    -0x1(%rbx),%rbp
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbp
jne    1130 <StampaPosizioneTartaruga+0x20>
add    $0x1,%rbx
mov    $0x54,%edi
call   1030 <putchar@plt>
mov    %r14d,%ebp
cmp    %rbp,%rbx
ja     1170 <StampaPosizioneTartaruga+0x60>
sub    %rbx,%rbp
add    $0x1,%rbp
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbp
jne    1160 <StampaPosizioneTartaruga+0x50>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"T\00"
@.str.3 = [1 x i8] zeroinitializer
define void @StampaPosizioneTartaruga(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = icmp ule i32 %6, 70
br i1 %7, label %8, label %33
8: ; preds = %2
store i64 1, i64* %5
br label %9
9: ; preds = %14, %8
%10 = load i64, i64* %5
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = icmp ult i64 %10, %12
br i1 %13, label %14, label %18
14: ; preds = %9
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = load i64, i64* %5
%17 = add i64 %16, 1
store i64 %17, i64* %5
br label %9
18: ; preds = %9
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = load i64, i64* %5
%21 = add i64 %20, 1
store i64 %21, i64* %5
br label %22
22: ; preds = %27, %18
%23 = load i64, i64* %5
%24 = load i32, i32* %4
%25 = zext i32 %24 to i64
%26 = icmp ule i64 %23, %25
br i1 %26, label %27, label %31
27: ; preds = %22
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = load i64, i64* %5
%30 = add i64 %29, 1
store i64 %30, i64* %5
br label %22
31: ; preds = %22
%32 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %33
33: ; preds = %31, %2
ret void
}

LLVM IR (-O2):
define void @StampaPosizioneTartaruga(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 71
br i1 %3, label %4, label %26
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = icmp ugt i32 %0, 1
br i1 %6, label %7, label %14
7: ; preds = %4, %7
%8 = phi i64 [ %10, %7 ], [ 1, %4 ]
%9 = tail call i32 @putchar(i32 32)
%10 = add nuw nsw i64 %8, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %7
12: ; preds = %7
%13 = add nuw nsw i64 %5, 1
br label %14
14: ; preds = %12, %4
%15 = phi i64 [ 2, %4 ], [ %13, %12 ]
%16 = tail call i32 @putchar(i32 84)
%17 = zext i32 %1 to i64
%18 = icmp ugt i64 %15, %17
br i1 %18, label %24, label %19
19: ; preds = %14, %19
%20 = phi i64 [ %22, %19 ], [ %15, %14 ]
%21 = tail call i32 @putchar(i32 32)
%22 = add nuw nsw i64 %20, 1
%23 = icmp eq i64 %20, %17
br i1 %23, label %24, label %19
24: ; preds = %19, %14
%25 = tail call i32 @putchar(i32 10)
br label %26
26: ; preds = %24, %2
ret void
}