#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 effezero(int n) {
  int i;
  if (n == 0) {
    printf(".");
    return;
  }
  for (i = 0; i < n; i++) {
    printf("%d", n);
  }
  effezero(n - 1);
  for (i = 0; i < n; i++) {
    printf("%d", n);
  }
  return;
}


x86 assembly (clang, -O0):
<effezero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1148 <effezero+0x28>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bc <effezero+0x9c>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117a <effezero+0x5a>
mov    -0x4(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <effezero+0x2f>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <effezero@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11b7 <effezero+0x97>
mov    -0x4(%rbp),%esi
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118c <effezero+0x6c>
jmp    11bc <effezero+0x9c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<effezero>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     1196 <effezero+0x66>
mov    %edi,%ebx
jle    11a4 <effezero+0x74>
lea    0xebd(%rip),%r14
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1150 <effezero+0x20>
lea    -0x1(%rbx),%edi
call   1050 <effezero@plt>
test   %ebx,%ebx
jle    1191 <effezero+0x61>
lea    0xe8c(%rip),%r14
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1180 <effezero+0x50>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x2e,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>
add    $0xffffffff,%ebx
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <effezero@plt>

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

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