#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*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ print_escaped_string(char *);
int /*<<< orphan*/ stderr;
void print_tokens_gotten(size_t n, char *tokens[n]) {
  assert(tokens != NULL);
  fprintf(stderr, "=== Gotten ===\n");
  for (size_t i = 0; i < n; i++) {
    fprintf(stderr, "  %3zu: $", i);
    print_escaped_string(tokens[i]);
    fprintf(stderr, "$\n");
  }
}


x86 assembly (clang, -O0):
<print_tokens_gotten>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    11d3 <print_tokens_gotten+0xa3>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe7d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <print_escaped_string@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
lea    0xe5f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1171 <print_tokens_gotten+0x41>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tokens_gotten>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r13
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1030 <assert@plt>
mov    0x2e8a(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xea0(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r13,%r13
je     11af <print_tokens_gotten+0x7f>
lea    0xe9d(%rip),%r15
lea    0xea0(%rip),%r12
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    0x0(%rbp),%edi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14,%rbx,8),%rdi
call   1050 <print_escaped_string@plt>
mov    0x0(%rbp),%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1180 <print_tokens_gotten+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"=== Gotten ===\0A\00"
@.str.1 = [10 x i8] c" %3zu: $\00"
@.str.2 = [3 x i8] c"$\0A\00"
define void @print_tokens_gotten(i64 %0, i8** %1) {
%3 = alloca i64
%4 = alloca i8**
%5 = alloca i64
store i64 %0, i64* %3
store i8** %1, i8*** %4
%6 = load i64, i64* %3
%7 = load i8**, i8*** %4
%8 = icmp ne i8** %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %5
br label %13
13: ; preds = %28, %2
%14 = load i64, i64* %5
%15 = load i64, i64* %3
%16 = icmp ult i64 %14, %15
br i1 %16, label %17, label %31
17: ; preds = %13
%18 = load i32, i32* @stderr
%19 = load i64, i64* %5
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %19)
%21 = load i8**, i8*** %4
%22 = load i64, i64* %5
%23 = getelementptr inbounds i8*, i8** %21, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 @print_escaped_string(i8* %24)
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %17
%29 = load i64, i64* %5
%30 = add i64 %29, 1
store i64 %30, i64* %5
br label %13
31: ; preds = %13
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"=== Gotten ===\0A\00"
@.str.1 = [10 x i8] c" %3zu: $\00"
@.str.2 = [3 x i8] c"$\0A\00"
define void @print_tokens_gotten(i64 %0, i8** %1) {
%3 = icmp ne i8** %1, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %0, 0
br i1 %8, label %9, label %10
9: ; preds = %10, %2
ret void
10: ; preds = %2, %10
%11 = phi i64 [ %19, %10 ], [ 0, %2 ]
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %11)
%14 = getelementptr inbounds i8*, i8** %1, i64 %11
%15 = load i8*, i8** %14
%16 = tail call i32 @print_escaped_string(i8* %15)
%17 = load i32, i32* @stderr
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%19 = add nuw i64 %11, 1
%20 = icmp eq i64 %19, %0
br i1 %20, label %9, label %10
}