#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_tab(int *ile, char *arg[], char *jakis) {
  int i;
  for (i = *ile - 1; i > 0; i--) {
    if (i != 1) {
      printf("%s", arg[i]);
      printf("%c", *jakis);
    } else {
      printf("%s\n", arg[i]);
    }
  }
}


x86 assembly (clang, -O0):
<print_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    11a5 <print_tab+0x95>
cmpl   $0x1,-0x1c(%rbp)
je     1178 <print_tab+0x68>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1192 <print_tab+0x82>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1197 <print_tab+0x87>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1130 <print_tab+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tab>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    (%rdi),%ebx
cmp    $0x2,%ebx
jl     119b <print_tab+0x6b>
mov    %rdx,%r14
mov    %rsi,%r12
add    $0xffffffffffffffff,%rbx
lea    0xeb0(%rip),%r15
jmp    117b <print_tab+0x4b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%r12),%rdi
call   1040 <puts@plt>
lea    -0x1(%rbx),%rax
add    $0x1,%rbx
cmp    $0x2,%rbx
mov    %rax,%rbx
jbe    119b <print_tab+0x6b>
cmp    $0x1,%ebx
je     1160 <print_tab+0x30>
mov    %ebx,%eax
mov    (%r12,%rax,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl (%r14),%edi
call   1030 <putchar@plt>
jmp    116a <print_tab+0x3a>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_tab(i32* nocapture %0, i8** nocapture %1, i8* nocapture %2) {
%4 = load i32, i32* %0
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %27
6: ; preds = %3
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = zext i32 %4 to i64
br label %9
9: ; preds = %6, %25
%10 = phi i64 [ %8, %6 ], [ %11, %25 ]
%11 = add nsw i64 %10, -1
%12 = trunc i64 %11 to i32
%13 = icmp eq i32 %12, 1
br i1 %13, label %22, label %14
14: ; preds = %9
%15 = and i64 %11, 4294967295
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = load i8*, i8** %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = tail call i32 @putchar(i32 %20)
br label %25
22: ; preds = %9
%23 = load i8*, i8** %7
%24 = tail call i32 @puts(i8* dereferenceable(1) %23)
br label %25
25: ; preds = %14, %22
%26 = icmp ugt i64 %10, 2
br i1 %26, label %9, label %27
27: ; preds = %25, %3
ret void
}