#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*/ free(char *);
int ft_atoi_btod(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ft_putchar(int);
char *ft_strnew(int);
void ft_split_size(char *ret, int time) {
  int i;
  int nb;
  char *str;
  str = ft_strnew(sizeof(char) * 8 + 1);
  str[9] = '\0';
  while (time > 0) {
    i = -1;
    while (++i < 8)
      str[i] = ret[i];
    str[i] = '\0';
    nb = ft_atoi_btod(str, 7, 0, 0);
    ft_putchar(nb);
    ret += i;
    time--;
  }
  free(str);
}


x86 assembly (clang, -O0):
<ft_split_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x9,%edi
call   1050 <ft_strnew@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x0,0x9(%rax)
cmpl   $0x0,-0xc(%rbp)
jle    11eb <ft_split_size+0xab>
movl   $0xffffffff,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmp    $0x8,%eax
jge    11a3 <ft_split_size+0x63>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1176 <ft_split_size+0x36>
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rdi
mov    $0x7,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1040 <ft_atoi_btod@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1060 <ft_putchar@plt>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <ft_split_size+0x25>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_split_size>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0x9,%edi
call   1050 <ft_strnew@plt>
mov    %rax,%rbp
movb   $0x0,0x9(%rax)
test   %r14d,%r14d
jle    11d1 <ft_split_size+0x91>
add    $0x1,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
mov    %al,0x0(%rbp)
movzbl 0x1(%rbx),%eax
mov    %al,0x1(%rbp)
movzbl 0x2(%rbx),%eax
mov    %al,0x2(%rbp)
movzbl 0x3(%rbx),%eax
mov    %al,0x3(%rbp)
movzbl 0x4(%rbx),%eax
mov    %al,0x4(%rbp)
movzbl 0x5(%rbx),%eax
mov    %al,0x5(%rbp)
movzbl 0x6(%rbx),%eax
mov    %al,0x6(%rbp)
movzbl 0x7(%rbx),%eax
mov    %al,0x7(%rbp)
movb   $0x0,0x8(%rbp)
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <ft_atoi_btod@plt>
mov    %eax,%edi
call   1060 <ft_putchar@plt>
add    $0xffffffff,%r14d
add    $0x8,%rbx
cmp    $0x1,%r14d
ja     1170 <ft_split_size+0x30>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ft_split_size(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = call i8* @ft_strnew(i32 9)
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = getelementptr inbounds i8, i8* %9, i64 9
store i8 0, i8* %10
br label %11
11: ; preds = %29, %2
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %44
14: ; preds = %11
store i32 -1, i32* %5
br label %15
15: ; preds = %19, %14
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
%18 = icmp slt i32 %17, 8
br i1 %18, label %19, label %29
19: ; preds = %15
%20 = load i8*, i8** %3
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = load i8*, i8** %7
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
store i8 %24, i8* %28
br label %15
29: ; preds = %15
%30 = load i8*, i8** %7
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
store i8 0, i8* %33
%34 = load i8*, i8** %7
%35 = call i32 @ft_atoi_btod(i8* %34, i32 7, i32 0, i32 0)
store i32 %35, i32* %6
%36 = load i32, i32* %6
%37 = call i32 @ft_putchar(i32 %36)
%38 = load i32, i32* %5
%39 = load i8*, i8** %3
%40 = sext i32 %38 to i64
%41 = getelementptr inbounds i8, i8* %39, i64 %40
store i8* %41, i8** %3
%42 = load i32, i32* %4
%43 = add nsw i32 %42, -1
store i32 %43, i32* %4
br label %11
44: ; preds = %11
%45 = load i8*, i8** %7
%46 = call i32 @free(i8* %45)
ret void
}

LLVM IR (-O2):
define void @ft_split_size(i8* nocapture %0, i32 %1) {
%3 = tail call i8* @ft_strnew(i32 9)
%4 = getelementptr inbounds i8, i8* %3, i64 9
store i8 0, i8* %4
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %38
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = getelementptr inbounds i8, i8* %3, i64 2
%9 = getelementptr inbounds i8, i8* %3, i64 3
%10 = getelementptr inbounds i8, i8* %3, i64 4
%11 = getelementptr inbounds i8, i8* %3, i64 5
%12 = getelementptr inbounds i8, i8* %3, i64 6
%13 = getelementptr inbounds i8, i8* %3, i64 7
%14 = getelementptr inbounds i8, i8* %3, i64 8
br label %15
15: ; preds = %6, %15
%16 = phi i8* [ %35, %15 ], [ %0, %6 ]
%17 = phi i32 [ %36, %15 ], [ %1, %6 ]
%18 = load i8, i8* %16
store i8 %18, i8* %3
%19 = getelementptr inbounds i8, i8* %16, i64 1
%20 = load i8, i8* %19
store i8 %20, i8* %7
%21 = getelementptr inbounds i8, i8* %16, i64 2
%22 = load i8, i8* %21
store i8 %22, i8* %8
%23 = getelementptr inbounds i8, i8* %16, i64 3
%24 = load i8, i8* %23
store i8 %24, i8* %9
%25 = getelementptr inbounds i8, i8* %16, i64 4
%26 = load i8, i8* %25
store i8 %26, i8* %10
%27 = getelementptr inbounds i8, i8* %16, i64 5
%28 = load i8, i8* %27
store i8 %28, i8* %11
%29 = getelementptr inbounds i8, i8* %16, i64 6
%30 = load i8, i8* %29
store i8 %30, i8* %12
%31 = getelementptr inbounds i8, i8* %16, i64 7
%32 = load i8, i8* %31
store i8 %32, i8* %13
store i8 0, i8* %14
%33 = tail call i32 @ft_atoi_btod(i8* %3, i32 7, i32 0, i32 0)
%34 = tail call i32 @ft_putchar(i32 %33)
%35 = getelementptr inbounds i8, i8* %16, i64 8
%36 = add nsw i32 %17, -1
%37 = icmp ugt i32 %17, 1
br i1 %37, label %15, label %38
38: ; preds = %15, %2
%39 = tail call i32 @free(i8* %3)
ret void
}