#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 */
struct Node {
  int dummy;
};

/* Variables and functions */
struct Node *createTree(int, char **, int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ postorderTraversal(struct Node *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int _strArr_size = 0;
  int _strArr_i;
  scanf("%d\n", &_strArr_size);
  char *_strArr[_strArr_size];
  for (_strArr_i = 0; _strArr_i < _strArr_size; _strArr_i++) {
    char *_strArr_item;
    _strArr_item = (char *)malloc(10240 * sizeof(char));
    scanf("%s", _strArr_item);
    _strArr[_strArr_i] = _strArr_item;
  }
  int res_size = 0;
  struct Node *n = createTree(_strArr_size, _strArr, &res_size);
  postorderTraversal(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xea3(%rip),%rdi
xor    %eax,%eax
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e0 <main+0xa0>
mov    $0x2800,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x40(%rbp),%rax
mov    -0x28(%rbp),%rdx
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1196 <main+0x56>
mov    -0x40(%rbp),%rsi
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x2c(%rbp),%rdx
call   1030 <createTree@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <postorderTraversal@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movl   $0x0,-0x2c(%rbp)
lea    0xea4(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rsp,%r12
mov    -0x2c(%rbp),%eax
mov    %rsp,%r15
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    -0x2c(%rbp),%edi
test   %edi,%edi
jle    11cb <main+0x8b>
lea    0xe74(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2800,%edi
call   1050 <malloc@plt>
mov    %rax,%r13
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r13,(%r15,%rbx,8)
add    $0x1,%rbx
movslq -0x2c(%rbp),%rdi
cmp    %rdi,%rbx
jl     11a0 <main+0x60>
movl   $0x0,-0x30(%rbp)
lea    -0x30(%rbp),%rdx
mov    %r15,%rsi
call   1030 <createTree@plt>
mov    %rax,%rdi
call   1040 <postorderTraversal@plt>
mov    %r12,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.Node*
store i32 0, i32* %1
store i32 0, i32* %2
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %4
%13 = alloca i8*, i64 %11
store i64 %11, i64* %5
store i32 0, i32* %3
br label %14
14: ; preds = %27, %0
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = call i64 @malloc(i32 10240)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %6
%21 = load i8*, i8** %6
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %21)
%23 = load i8*, i8** %6
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %13, i64 %25
store i8* %23, i8** %26
br label %27
27: ; preds = %18
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %14
30: ; preds = %14
store i32 0, i32* %7
%31 = load i32, i32* %2
%32 = call %struct.Node* @createTree(i32 %31, i8** %13, i32* %7)
store %struct.Node* %32, %struct.Node** %8
%33 = load %struct.Node*, %struct.Node** %8
%34 = call i32 @postorderTraversal(%struct.Node* %33)
store i32 0, i32* %1
%35 = load i8*, i8** %4
%36 = load i32, i32* %1
ret i32 %36
}

LLVM IR (-O2):
%struct.Node = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
%8 = alloca i8*, i64 %6
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %0, %11
%12 = phi i64 [ %17, %11 ], [ 0, %0 ]
%13 = call i64 @malloc(i32 10240)
%14 = inttoptr i64 %13 to i8*
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds i8*, i8** %8, i64 %12
store i8* %14, i8** %16
%17 = add nuw nsw i64 %12, 1
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = icmp slt i64 %17, %19
br i1 %20, label %11, label %21
21: ; preds = %11, %0
%22 = phi i32 [ %9, %0 ], [ %18, %11 ]
%23 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%24 = call %struct.Node* @createTree(i32 %22, i8** %8, i32* %2)
%25 = call i32 @postorderTraversal(%struct.Node* %24)
ret i32 0
}