#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 main() {
  int num, i, res, c_num;
  i = 0;
  res = 0;
  c_num = 1;
  while (c_num != 5) {
    switch (c_num) {
    case 1:
      num = 5170984;
      while (num != 0) {
        res = num % 10;
        if (res != 0) {
          printf("%d", res);
        }
        num = (num - res) / 10;
      }
      printf("\n");
      break;
    case 2:
      num = 406567;
      while (num != 0) {
        res = num % 10;
        if (res != 0) {
          printf("%d", res);
        }
        num = (num - res) / 10;
      }
      printf("\n");
      break;
    case 3:
      num = 368750;
      while (num != 0) {
        res = num % 10;
        if (res != 0) {
          printf("%d", res);
        }
        num = (num - res) / 10;
      }
      printf("\n");
      break;
    case 4:
      num = 2369510;
      while (num != 0) {
        res = num % 10;
        if (res != 0) {
          printf("%d", res);
        }
        num = (num - res) / 10;
      }
      printf("\n");
      break;
    case 5:
      num = 2183293;
      while (num != 0) {
        res = num % 10;
        if (res != 0) {
          printf("%d", res);
        }
        num = (num - res) / 10;
      }
      printf("\n");
      break;
    }
    c_num = c_num + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
je     135f <main+0x24f>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x4,%eax
ja     1351 <main+0x241>
mov    -0x20(%rbp),%rax
lea    0xea2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x4ee728,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11b7 <main+0xa7>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     11a1 <main+0x91>
mov    -0x10(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    116e <main+0x5e>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1351 <main+0x241>
movl   $0x63427,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     121a <main+0x10a>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1204 <main+0xf4>
mov    -0x10(%rbp),%esi
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    11d1 <main+0xc1>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1351 <main+0x241>
movl   $0x5a06e,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     127d <main+0x16d>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1267 <main+0x157>
mov    -0x10(%rbp),%esi
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1234 <main+0x124>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1351 <main+0x241>
movl   $0x2427e6,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     12e0 <main+0x1d0>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     12ca <main+0x1ba>
mov    -0x10(%rbp),%esi
lea    0xd51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1297 <main+0x187>
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1351 <main+0x241>
movl   $0x21507d,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1343 <main+0x233>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     132d <main+0x21d>
mov    -0x10(%rbp),%esi
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    12fa <main+0x1ea>
lea    0xccd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %106, %0
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 5
br i1 %8, label %9, label %109
9: ; preds = %6
%10 = load i32, i32* %5
switch i32 %10, label %106 [
i32 1, label %11
i32 2, label %30
i32 3, label %49
i32 4, label %68
i32 5, label %87
]
11: ; preds = %9
store i32 5170984, i32* %2
br label %12
12: ; preds = %23, %11
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %28
15: ; preds = %12
%16 = load i32, i32* %2
%17 = srem i32 %16, 10
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load i32, i32* %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %15
%24 = load i32, i32* %2
%25 = load i32, i32* %4
%26 = sub nsw i32 %24, %25
%27 = sdiv i32 %26, 10
store i32 %27, i32* %2
br label %12
28: ; preds = %12
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %106
30: ; preds = %9
store i32 406567, i32* %2
br label %31
31: ; preds = %42, %30
%32 = load i32, i32* %2
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %47
34: ; preds = %31
%35 = load i32, i32* %2
%36 = srem i32 %35, 10
store i32 %36, i32* %4
%37 = load i32, i32* %4
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %34
%40 = load i32, i32* %4
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %39, %34
%43 = load i32, i32* %2
%44 = load i32, i32* %4
%45 = sub nsw i32 %43, %44
%46 = sdiv i32 %45, 10
store i32 %46, i32* %2
br label %31
47: ; preds = %31
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %106
49: ; preds = %9
store i32 368750, i32* %2
br label %50
50: ; preds = %61, %49
%51 = load i32, i32* %2
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %66
53: ; preds = %50
%54 = load i32, i32* %2
%55 = srem i32 %54, 10
store i32 %55, i32* %4
%56 = load i32, i32* %4
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %53
%59 = load i32, i32* %4
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %58, %53
%62 = load i32, i32* %2
%63 = load i32, i32* %4
%64 = sub nsw i32 %62, %63
%65 = sdiv i32 %64, 10
store i32 %65, i32* %2
br label %50
66: ; preds = %50
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %106
68: ; preds = %9
store i32 2369510, i32* %2
br label %69
69: ; preds = %80, %68
%70 = load i32, i32* %2
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %85
72: ; preds = %69
%73 = load i32, i32* %2
%74 = srem i32 %73, 10
store i32 %74, i32* %4
%75 = load i32, i32* %4
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %72
%78 = load i32, i32* %4
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %78)
br label %80
80: ; preds = %77, %72
%81 = load i32, i32* %2
%82 = load i32, i32* %4
%83 = sub nsw i32 %81, %82
%84 = sdiv i32 %83, 10
store i32 %84, i32* %2
br label %69
85: ; preds = %69
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %106
87: ; preds = %9
store i32 2183293, i32* %2
br label %88
88: ; preds = %99, %87
%89 = load i32, i32* %2
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %104
91: ; preds = %88
%92 = load i32, i32* %2
%93 = srem i32 %92, 10
store i32 %93, i32* %4
%94 = load i32, i32* %4
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %99
96: ; preds = %91
%97 = load i32, i32* %4
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %97)
br label %99
99: ; preds = %96, %91
%100 = load i32, i32* %2
%101 = load i32, i32* %4
%102 = sub nsw i32 %100, %101
%103 = sdiv i32 %102, 10
store i32 %103, i32* %2
br label %88
104: ; preds = %88
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %106
106: ; preds = %9, %104, %85, %66, %47, %28
%107 = load i32, i32* %5
%108 = add nsw i32 %107, 1
store i32 %108, i32* %5
br label %6
109: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 9)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 7)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 7)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 8)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 9)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%26 = tail call i32 @putchar(i32 10)
ret i32 0
}