#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 *, ...);
void print_strings(char **strings, char *delimiter, int start) {
  int count = 0;
  while (*(strings + count) != NULL) {
    if (count >= start) {
      printf("%s%s", *(strings + count), delimiter);
    }
    count++;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1175 <print_strings+0x65>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     1167 <print_strings+0x57>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x10(%rbp),%rdx
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <print_strings+0x1a>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_strings>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r14
mov    (%rdi),%rsi
test   %rsi,%rsi
je     1172 <print_strings+0x52>
mov    %rdi,%r12
movslq %edx,%r13
lea    0xebf(%rip),%r15
xor    %ebx,%ebx
jmp    115e <print_strings+0x3e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%r12,%rbx,8),%rsi
add    $0x1,%rbx
test   %rsi,%rsi
je     1172 <print_strings+0x52>
cmp    %r13,%rbx
jl     1150 <print_strings+0x30>
mov    %r15,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1150 <print_strings+0x30>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

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