#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 */
char *cc(int /*<<< orphan*/, char *);
char *gn(char *, int);
int *gr(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ readLine(char *);
int /*<<< orphan*/ sort(int *);
int main(int argc, char const *argv[]) {
  char *r = (char *)malloc(sizeof(char));
  readLine(r);
  char *a = gn(r, 1);
  char *b = gn(r, 0);
  int *nums = gr(a);
  printf("%s\n", cc(sort(nums), b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <readLine@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1080 <gn@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1080 <gn@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1090 <gr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1040 <sort@plt>
mov    %eax,%edi
mov    -0x28(%rbp),%rsi
call   1070 <cc@plt>
mov    %rax,%rsi
lea    0xe17(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <readLine@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1080 <gn@plt>
mov    %rax,%r14
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <gn@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1090 <gr@plt>
mov    %rax,%rdi
call   1040 <sort@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1070 <cc@plt>
lea    0xe39(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i64 @malloc(i32 1)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @readLine(i8* %12)
%14 = load i8*, i8** %6
%15 = call i8* @gn(i8* %14, i32 1)
store i8* %15, i8** %7
%16 = load i8*, i8** %6
%17 = call i8* @gn(i8* %16, i32 0)
store i8* %17, i8** %8
%18 = load i8*, i8** %7
%19 = call i32* @gr(i8* %18)
store i32* %19, i32** %9
%20 = load i32*, i32** %9
%21 = call i32 @sort(i32* %20)
%22 = load i8*, i8** %8
%23 = call i8* @cc(i32 %21, i8* %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 1)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @readLine(i8* %4)
%6 = tail call i8* @gn(i8* %4, i32 1)
%7 = tail call i8* @gn(i8* %4, i32 0)
%8 = tail call i32* @gr(i8* %6)
%9 = tail call i32 @sort(i32* %8)
%10 = tail call i8* @cc(i32 %9, i8* %7)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}