#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 *, ...);
void xyz(int m) {
  int j, k;
  for (j = 0; j < m; j++) {
    printf(" ");
  }
  for (k = 0; k < 9 - 2 * m; k++) {
    printf("%c", '0' + 5 - m);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<xyz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114a <xyz+0x3a>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <xyz+0x12>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
mov    $0x9,%ecx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    118d <xyz+0x7d>
mov    $0x35,%esi
sub    -0x4(%rbp),%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1151 <xyz+0x41>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyz>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
test   %edi,%edi
jle    112f <xyz+0x1f>
mov    %r14d,%ebx
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <xyz+0x10>
mov    $0x9,%ebx
sub    %r14d,%ebx
sub    %r14d,%ebx
test   %ebx,%ebx
jle    115c <xyz+0x4c>
mov    $0x35,%ebp
sub    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1150 <xyz+0x40>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @xyz(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %9, %1
%4 = mul i32 %0, -2
%5 = add i32 %4, 9
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %19
7: ; preds = %3
%8 = sub nsw i32 53, %0
br label %14
9: ; preds = %1, %9
%10 = phi i32 [ %12, %9 ], [ 0, %1 ]
%11 = tail call i32 @putchar(i32 32)
%12 = add nuw nsw i32 %10, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %3, label %9
14: ; preds = %7, %14
%15 = phi i32 [ 0, %7 ], [ %17, %14 ]
%16 = tail call i32 @putchar(i32 %8)
%17 = add nuw nsw i32 %15, 1
%18 = icmp eq i32 %17, %5
br i1 %18, label %19, label %14
19: ; preds = %14, %3
%20 = tail call i32 @putchar(i32 10)
ret void
}