#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ printf(char *);
void PrintSequence(FILE *fp, int T, int *O) {
  int i;
  fprintf(fp, "T= %d\n", T);
  for (i = 1; i <= T; i++)
    fprintf(fp, "%d ", O[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<PrintSequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1182 <PrintSequence+0x62>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe98(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114d <PrintSequence+0x2d>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintSequence>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%r13d
mov    %rdi,%r15
lea    0xec7(%rip),%rsi
mov    %r13d,%edx
call   1040 <fprintf@plt>
test   %r13d,%r13d
jle    1178 <PrintSequence+0x58>
add    $0x1,%r13d
mov    $0x1,%ebx
lea    0xeb1(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1160 <PrintSequence+0x40>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"T= %d\0A\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @PrintSequence(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9)
store i32 1, i32* %7
br label %11
11: ; preds = %23, %3
%12 = load i32, i32* %7
%13 = load i32, i32* %5
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %26
15: ; preds = %11
%16 = load i32*, i32** %4
%17 = load i32*, i32** %6
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %15
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %11
26: ; preds = %11
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"T= %d\0A\00"
@.str.1 = [4 x i8] c"%d \00"
define void @PrintSequence(i32* nocapture %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%5 = icmp slt i32 %1, 1
br i1 %5, label %16, label %6
6: ; preds = %3
%7 = add nuw i32 %1, 1
%8 = zext i32 %7 to i64
br label %9
9: ; preds = %6, %9
%10 = phi i64 [ 1, %6 ], [ %14, %9 ]
%11 = getelementptr inbounds i32, i32* %2, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %3
%17 = tail call i32 @putchar(i32 10)
ret void
}