#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, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, na, b, nb;
  scanf("%d%d", &a, &b);
  na = (a + b > 10) ? 10 - a : (b - 1) > 0 ? b - 1 : 0;
  nb = (a + b > 10) ? 10 - b : (a - 1) > 0 ? a - 1 : 0;
  printf("%d %d", na, nb);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    $0xa,%eax
jle    1162 <main+0x42>
mov    $0xa,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    118f <main+0x6f>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jle    117f <main+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1189 <main+0x69>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    1189 <main+0x69>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    $0xa,%eax
jle    11b4 <main+0x94>
mov    $0xa,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11e1 <main+0xc1>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jle    11d1 <main+0xb1>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11db <main+0xbb>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    11db <main+0xbb>
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
lea    (%rcx,%rax,1),%r8d
mov    $0xa,%r9d
mov    $0xa,%edi
sub    %eax,%edi
test   %ecx,%ecx
mov    $0x1,%esi
cmovg  %ecx,%esi
mov    $0x1,%edx
add    $0xffffffff,%esi
sub    %ecx,%r9d
test   %eax,%eax
cmovg  %eax,%edx
add    $0xffffffff,%edx
cmp    $0xb,%r8d
cmovge %edi,%esi
cmovge %r9d,%edx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = icmp sgt i32 %8, 10
%10 = sub nsw i32 10, %6
%11 = icmp sgt i32 %7, 1
%12 = select i1 %11, i32 %7, i32 1
%13 = add nsw i32 %12, -1
%14 = select i1 %9, i32 %10, i32 %13
%15 = sub nsw i32 10, %7
%16 = icmp sgt i32 %6, 1
%17 = select i1 %16, i32 %6, i32 1
%18 = add nsw i32 %17, -1
%19 = select i1 %9, i32 %15, i32 %18
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %19)
ret i32 0
}