#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 my_atoi(int, char const *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ uint2quint(char *, int const, char);
void main_convertNumber(int base, char const *s) {
  int const QUINT_LEN = 5 * 2 + 1;
  int const DOUBLE_QUINT_LEN = 2 * QUINT_LEN + 1;
  int const n = my_atoi(base, s);
  char quint[DOUBLE_QUINT_LEN + 1];
  int i;
  for (i = 0; i < DOUBLE_QUINT_LEN + 1; ++i)
    quint[i] = '\0';
  uint2quint(quint, n, '-');
  printf("%s ", quint);
}


x86 assembly (clang, -O0):
<main_convertNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xb,-0x14(%rbp)
movl   $0x17,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <my_atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    %rsp,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x18,-0x2c(%rbp)
jge    118b <main_convertNumber+0x5b>
movslq -0x2c(%rbp),%rax
movb   $0x0,-0x50(%rbp,%rax,1)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    116a <main_convertNumber+0x3a>
mov    -0x1c(%rbp),%esi
lea    -0x50(%rbp),%rdi
mov    $0x2d,%edx
call   1050 <uint2quint@plt>
lea    0xe5d(%rip),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_convertNumber>:
push   %rbx
sub    $0x20,%rsp
call   1030 <my_atoi@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x2d,%edx
call   1050 <uint2quint@plt>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @main_convertNumber(i32 %0, i8* %1) {
%3 = tail call i32 @my_atoi(i32 %0, i8* %1)
%4 = alloca [24 x i8]
%5 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%6 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%7 = call i32 @uint2quint(i8* %6, i32 %3, i8 signext 45)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}