#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int valor1 = 0;
  printf("informe o valor que sera separado \n");
  scanf("%d", &valor1);
  printf("%d %d %d %d %d \n", (valor1 % 100000 - valor1 % 10000) / 10000,
         (valor1 % 10000 - valor1 % 1000) / 1000,
         (valor1 % 1000 - valor1 % 100) / 100,
         (valor1 % 100 - valor1 % 10) / 10, valor1 % 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x186a0,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%eax
sub    %edx,%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%eax
sub    %edx,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x14(%rbp),%eax
sub    %edx,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    $0x64,%edi
cltd
idiv   %edi
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%edi
cltd
idiv   %edi
mov    -0x10(%rbp),%eax
sub    %edx,%eax
mov    $0xa,%edi
cltd
idiv   %edi
mov    %eax,%r8d
mov    -0x8(%rbp),%eax
mov    $0xa,%edi
cltd
idiv   %edi
mov    %edx,%r9d
mov    -0xc(%rbp),%edx
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0x4(%rsp),%r9
imul   $0x14f8b589,%r9,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2d,%rax
add    %ecx,%eax
imul   $0x186a0,%eax,%eax
mov    %r9d,%edx
sub    %eax,%edx
imul   $0x68db8bad,%r9,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2c,%rax
add    %ecx,%eax
imul   $0x2710,%eax,%eax
mov    %r9d,%ecx
sub    %eax,%ecx
sub    %ecx,%edx
movslq %edx,%rax
imul   $0x68db8bad,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x2c,%rsi
add    %eax,%esi
imul   $0x10624dd3,%r9,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
imul   $0x3e8,%eax,%edx
mov    %r9d,%eax
sub    %edx,%eax
sub    %eax,%ecx
movswl %cx,%edx
imul   $0xffff8313,%edx,%edx
shr    $0x10,%edx
add    %ecx,%edx
movzwl %dx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
sar    $0x9,%edx
add    %ecx,%edx
movswl %dx,%edx
imul   $0x51eb851f,%r9,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x25,%rcx
add    %edi,%ecx
imul   $0x64,%ecx,%ecx
mov    %r9d,%r8d
sub    %ecx,%r8d
sub    %r8d,%eax
cwtl
imul   $0x147b,%eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x13,%ecx
add    %eax,%ecx
imul   $0x66666667,%r9,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rax
add    %edi,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r9d
sub    %r9d,%r8d
movsbl %r8b,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%edi
shr    $0xf,%eax
shr    $0xa,%edi
add    %al,%dil
movsbl %dil,%r8d
lea    0xda0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"informe o valor que sera separado \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"%d %d %d %d %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = srem i32 %5, 100000
%7 = load i32, i32* %2
%8 = srem i32 %7, 10000
%9 = sub nsw i32 %6, %8
%10 = sdiv i32 %9, 10000
%11 = load i32, i32* %2
%12 = srem i32 %11, 10000
%13 = load i32, i32* %2
%14 = srem i32 %13, 1000
%15 = sub nsw i32 %12, %14
%16 = sdiv i32 %15, 1000
%17 = load i32, i32* %2
%18 = srem i32 %17, 1000
%19 = load i32, i32* %2
%20 = srem i32 %19, 100
%21 = sub nsw i32 %18, %20
%22 = sdiv i32 %21, 100
%23 = load i32, i32* %2
%24 = srem i32 %23, 100
%25 = load i32, i32* %2
%26 = srem i32 %25, 10
%27 = sub nsw i32 %24, %26
%28 = sdiv i32 %27, 10
%29 = load i32, i32* %2
%30 = srem i32 %29, 10
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %16, i32 %22, i32 %28, i32 %30)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"%d %d %d %d %d \0A\00"
@str = [35 x i8] c"informe o valor que sera separado \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = srem i32 %5, 100000
%7 = srem i32 %5, 10000
%8 = sub nsw i32 %6, %7
%9 = sdiv i32 %8, 10000
%10 = srem i32 %5, 1000
%11 = sub nsw i32 %7, %10
%12 = trunc i32 %11 to i16
%13 = sdiv i16 %12, 1000
%14 = sext i16 %13 to i32
%15 = srem i32 %5, 100
%16 = sub nsw i32 %10, %15
%17 = trunc i32 %16 to i16
%18 = sdiv i16 %17, 100
%19 = sext i16 %18 to i32
%20 = srem i32 %5, 10
%21 = sub nsw i32 %15, %20
%22 = trunc i32 %21 to i8
%23 = sdiv i8 %22, 10
%24 = sext i8 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %14, i32 %19, i32 %24, i32 %20)
ret i32 0
}