#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_solution(size_t n, int numbers[n], char ops[n - 1]) {
  printf("%d", numbers[0]);
  size_t i;
  for (i = 0; i < n - 1; i++) {
    printf("%c%d", ops[i], numbers[i + 1]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jae    118c <print_solution+0x7c>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    0x4(%rax,%rcx,4),%edx
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1140 <print_solution+0x30>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_solution>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r13
mov    (%rsi),%esi
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%r13
je     117d <print_solution+0x5d>
lea    0xeb1(%rip),%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%esi
mov    0x4(%r15,%rbx,4),%edx
add    $0x1,%rbx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %rbx,%r13
jne    1160 <print_solution+0x40>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

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