#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 *, char **);
int strlen(char *);
void wywiwyg() {
  char str[100];
  int digits[100];
  int slen, i;
  printf("Enter string: ");
  scanf("%s", &str);
  slen = strlen(str);
  for (i = 0; i < slen; i++) {
    digits[i] = str[i] - '0';
  }
  for (i = 0; i < slen; i++) {
    printf("%d  ", digits[i]);
  }
}


x86 assembly (clang, -O0):
<wywiwyg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x204(%rbp)
movl   $0x0,-0x208(%rbp)
mov    -0x208(%rbp),%eax
cmp    -0x204(%rbp),%eax
jge    11b5 <wywiwyg+0x85>
movslq -0x208(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
sub    $0x30,%ecx
movslq -0x208(%rbp),%rax
mov    %ecx,-0x200(%rbp,%rax,4)
mov    -0x208(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208(%rbp)
jmp    1172 <wywiwyg+0x42>
movl   $0x0,-0x208(%rbp)
mov    -0x208(%rbp),%eax
cmp    -0x204(%rbp),%eax
jge    1201 <wywiwyg+0xd1>
movslq -0x208(%rbp),%rax
mov    -0x200(%rbp,%rax,4),%esi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x208(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208(%rbp)
jmp    11bf <wywiwyg+0x8f>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wywiwyg>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    12d7 <wywiwyg+0x1a7>
mov    %eax,%r15d
cmp    $0x8,%eax
jae    117b <wywiwyg+0x4b>
xor    %ecx,%ecx
jmp    1290 <wywiwyg+0x160>
mov    %r15d,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     12e4 <wywiwyg+0x1b4>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movdqa 0xe56(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movd   0x4(%rsp,%rdx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
punpcklbw (%rsp,%rdx,1),%xmm2
punpcklwd %xmm2,%xmm2
psrad  $0x18,%xmm2
psrad  $0x18,%xmm1
paddd  %xmm0,%xmm2
paddd  %xmm0,%xmm1
movdqa %xmm2,0x70(%rsp,%rdx,4)
movdqa %xmm1,0x80(%rsp,%rdx,4)
movq   0x8(%rsp,%rdx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
movd   0xc(%rsp,%rdx,1),%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
psrad  $0x18,%xmm1
psrad  $0x18,%xmm2
paddd  %xmm0,%xmm1
paddd  %xmm0,%xmm2
movdqa %xmm1,0x90(%rsp,%rdx,4)
movdqa %xmm2,0xa0(%rsp,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rdi
jne    11b0 <wywiwyg+0x80>
test   $0x1,%sil
je     1280 <wywiwyg+0x150>
movq   (%rsp,%rdx,1),%xmm0
movd   0x4(%rsp,%rdx,1),%xmm1
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
psrad  $0x18,%xmm0
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm1
movdqa 0xd97(%rip),%xmm2
paddd  %xmm2,%xmm0
paddd  %xmm2,%xmm1
movdqa %xmm0,0x70(%rsp,%rdx,4)
movdqa %xmm1,0x80(%rsp,%rdx,4)
cmp    %r15,%rcx
je     12a4 <wywiwyg+0x174>
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%rsp,%rcx,1),%edx
add    $0xffffffd0,%edx
mov    %edx,0x70(%rsp,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%r15
jne    1290 <wywiwyg+0x160>
test   %eax,%eax
jle    12d7 <wywiwyg+0x1a7>
lea    0xd73(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x70(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    12c0 <wywiwyg+0x190>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %edx,%edx
test   $0x1,%sil
jne    123c <wywiwyg+0x10c>
jmp    1280 <wywiwyg+0x150>

LLVM IR (-O0):
@.str = [15 x i8] c"Enter string: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"%d \00"
define void @wywiwyg() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = bitcast [100 x i8]* %1 to i8**
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %3
store i32 0, i32* %4
br label %10
10: ; preds = %24, %0
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %19, 48
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %22
store i32 %20, i32* %23
br label %24
24: ; preds = %14
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %10
27: ; preds = %10
store i32 0, i32* %4
br label %28
28: ; preds = %38, %27
%29 = load i32, i32* %4
%30 = load i32, i32* %3
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %41
32: ; preds = %28
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %36)
br label %38
38: ; preds = %32
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %28
41: ; preds = %28
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter string: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"%d \00"
define void @wywiwyg() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i32]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = bitcast [100 x i32]* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = bitcast [100 x i8]* %1 to i8**
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %6)
%8 = call i32 @strlen(i8* %3)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %98
10: ; preds = %0
%11 = zext i32 %8 to i64
%12 = icmp ult i32 %8, 8
br i1 %12, label %77, label %13
13: ; preds = %10
%14 = and i64 %11, 4294967288
%15 = add nsw i64 %14, -8
%16 = lshr exact i64 %15, 3
%17 = add nuw nsw i64 %16, 1
%18 = and i64 %17, 1
%19 = icmp eq i64 %15, 0
br i1 %19, label %57, label %20
20: ; preds = %13
%21 = and i64 %17, 4611686018427387902
br label %22
22: ; preds = %22, %20
%23 = phi i64 [ 0, %20 ], [ %54, %22 ]
%24 = phi i64 [ 0, %20 ], [ %55, %22 ]
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %23
%26 = bitcast i8* %25 to <4 x i8>*
%27 = load <4 x i8>, <4 x i8>* %26
%28 = getelementptr inbounds i8, i8* %25, i64 4
%29 = bitcast i8* %28 to <4 x i8>*
%30 = load <4 x i8>, <4 x i8>* %29
%31 = sext <4 x i8> %27 to <4 x i32>
%32 = sext <4 x i8> %30 to <4 x i32>
%33 = add nsw <4 x i32> %31, <i32 -48, i32 -48, i32 -48, i32 -48>
%34 = add nsw <4 x i32> %32, <i32 -48, i32 -48, i32 -48, i32 -48>
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %23
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> %33, <4 x i32>* %36
%37 = getelementptr inbounds i32, i32* %35, i64 4
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> %34, <4 x i32>* %38
%39 = or i64 %23, 8
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %39
%41 = bitcast i8* %40 to <4 x i8>*
%42 = load <4 x i8>, <4 x i8>* %41
%43 = getelementptr inbounds i8, i8* %40, i64 4
%44 = bitcast i8* %43 to <4 x i8>*
%45 = load <4 x i8>, <4 x i8>* %44
%46 = sext <4 x i8> %42 to <4 x i32>
%47 = sext <4 x i8> %45 to <4 x i32>
%48 = add nsw <4 x i32> %46, <i32 -48, i32 -48, i32 -48, i32 -48>
%49 = add nsw <4 x i32> %47, <i32 -48, i32 -48, i32 -48, i32 -48>
%50 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %39
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> %48, <4 x i32>* %51
%52 = getelementptr inbounds i32, i32* %50, i64 4
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> %49, <4 x i32>* %53
%54 = add nuw i64 %23, 16
%55 = add i64 %24, 2
%56 = icmp eq i64 %55, %21
br i1 %56, label %57, label %22
57: ; preds = %22, %13
%58 = phi i64 [ 0, %13 ], [ %54, %22 ]
%59 = icmp eq i64 %18, 0
br i1 %59, label %75, label %60
60: ; preds = %57
%61 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %58
%62 = bitcast i8* %61 to <4 x i8>*
%63 = load <4 x i8>, <4 x i8>* %62
%64 = getelementptr inbounds i8, i8* %61, i64 4
%65 = bitcast i8* %64 to <4 x i8>*
%66 = load <4 x i8>, <4 x i8>* %65
%67 = sext <4 x i8> %63 to <4 x i32>
%68 = sext <4 x i8> %66 to <4 x i32>
%69 = add nsw <4 x i32> %67, <i32 -48, i32 -48, i32 -48, i32 -48>
%70 = add nsw <4 x i32> %68, <i32 -48, i32 -48, i32 -48, i32 -48>
%71 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %58
%72 = bitcast i32* %71 to <4 x i32>*
store <4 x i32> %69, <4 x i32>* %72
%73 = getelementptr inbounds i32, i32* %71, i64 4
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> %70, <4 x i32>* %74
br label %75
75: ; preds = %57, %60
%76 = icmp eq i64 %14, %11
br i1 %76, label %79, label %77
77: ; preds = %10, %75
%78 = phi i64 [ 0, %10 ], [ %14, %75 ]
br label %82
79: ; preds = %82, %75
br i1 %9, label %80, label %98
80: ; preds = %79
%81 = zext i32 %8 to i64
br label %91
82: ; preds = %77, %82
%83 = phi i64 [ %89, %82 ], [ %78, %77 ]
%84 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %83
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = add nsw i32 %86, -48
%88 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %83
store i32 %87, i32* %88
%89 = add nuw nsw i64 %83, 1
%90 = icmp eq i64 %89, %11
br i1 %90, label %79, label %82
91: ; preds = %80, %91
%92 = phi i64 [ 0, %80 ], [ %96, %91 ]
%93 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %92
%94 = load i32, i32* %93
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %94)
%96 = add nuw nsw i64 %92, 1
%97 = icmp eq i64 %96, %81
br i1 %97, label %98, label %91
98: ; preds = %91, %0, %79
ret void
}