#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 power(int, unsigned char);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned char n = 0;
  unsigned char vet[] = {'1', '2', '3', '\0'};
  printf("%d %d\n", ++n, power(2, n));
  vet[n] = vet[n]++;
  printf("%s", vet);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    0xec7(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    $0x2,%edi
movzbl -0x5(%rbp),%esi
call   1030 <power@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x5(%rbp),%eax
mov    -0x9(%rbp,%rax,1),%cl
mov    %cl,%dl
add    $0x1,%dl
mov    %dl,-0x9(%rbp,%rax,1)
movzbl -0x5(%rbp),%eax
mov    %cl,-0x9(%rbp,%rax,1)
lea    -0x9(%rbp),%rsi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x333231,0x4(%rsp)
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <power@plt>
lea    0xec1(%rip),%rdi
mov    $0x1,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.vet = [4 x i8] c"123\00"
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [4 x i8]
store i32 0, i32* %1
store i8 0, i8* %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = load i8, i8* %2
%6 = add i8 %5, 1
store i8 %6, i8* %2
%7 = zext i8 %6 to i32
%8 = load i8, i8* %2
%9 = call i32 @power(i32 2, i8 zeroext %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
%11 = load i8, i8* %2
%12 = zext i8 %11 to i64
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = add i8 %14, 1
store i8 %15, i8* %13
%16 = load i8, i8* %2
%17 = zext i8 %16 to i64
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 %17
store i8 %14, i8* %18
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 3355185, i32* %1
%3 = tail call i32 @power(i32 2, i8 zeroext 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1, i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}