#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 */
unsigned char Frama_C_interval(int /*<<< orphan*/, int);
int compare_vst_NSS(unsigned char *);
int compare_vst_NSS_n(int n) {
  unsigned char input[n];
  int i;
  for (i = 0; i < n; i++)
    input[n] = Frama_C_interval(0, 255);
  return compare_vst_NSS(input);
}


x86 assembly (clang, -O0):
<compare_vst_NSS_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    118b <compare_vst_NSS_n+0x6b>
xor    %edi,%edi
mov    $0xff,%esi
call   1040 <Frama_C_interval@plt>
mov    %al,%dl
mov    -0x28(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1158 <compare_vst_NSS_n+0x38>
mov    -0x28(%rbp),%rdi
call   1030 <compare_vst_NSS@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_vst_NSS_n>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
mov    %rsp,%r14
lea    0xf(%r15),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
test   %edi,%edi
jle    1165 <compare_vst_NSS_n+0x45>
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
mov    $0xff,%esi
call   1040 <Frama_C_interval@plt>
mov    %al,(%r14,%r15,1)
add    $0xffffffff,%ebx
jne    1150 <compare_vst_NSS_n+0x30>
mov    %r14,%rdi
call   1030 <compare_vst_NSS@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @compare_vst_NSS_n(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
store i32 0, i32* %5
br label %10
10: ; preds = %19, %1
%11 = load i32, i32* %5
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = call zeroext i8 @Frama_C_interval(i32 0, i32 255)
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %9, i64 %17
store i8 %15, i8* %18
br label %19
19: ; preds = %14
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %10
22: ; preds = %10
%23 = call i32 @compare_vst_NSS(i8* %9)
%24 = load i8*, i8** %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @compare_vst_NSS_n(i32 %0) {
%2 = zext i32 %0 to i64
%3 = alloca i8, i64 %2
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = zext i32 %0 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
br label %8
8: ; preds = %5, %8
%9 = phi i32 [ 0, %5 ], [ %11, %8 ]
%10 = tail call zeroext i8 @Frama_C_interval(i32 0, i32 255)
store i8 %10, i8* %7
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, %0
br i1 %12, label %13, label %8
13: ; preds = %8, %1
%14 = call i32 @compare_vst_NSS(i8* %3)
ret i32 %14
}