#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 *);
int main() {
  int a, b, x, y, v, i;
  scanf("%d %d", &a, &b);
  v = a < b ? 1 : -1;
  for (y = 1; y < 10; y++, printf("\n"))
    for (i = a;; i += v) {
      printf("%d * %d = %2d   ", i, y, i * y);
      if (i == b)
        break;
    }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%esi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11d2 <main+0xb2>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    119e <main+0x7e>
jmp    11b1 <main+0x91>
jmp    11a3 <main+0x83>
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1172 <main+0x52>
jmp    11b6 <main+0x96>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1162 <main+0x42>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
xor    %eax,%eax
cmp    0x8(%rsp),%ebx
setl   %al
lea    (%rax,%rax,1),%r15d
add    $0xffffffff,%r15d
add    %eax,%eax
mov    $0x1,%ebp
sub    %eax,%ebp
lea    0xe8d(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
lea    (%rbx,%rbp,1),%eax
cmp    0x8(%rsp),%eax
jne    1180 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    (%rbx,%rbx,1),%ebp
lea    (%r15,%r15,1),%r13d
mov    %r15d,%r12d
neg    %r12d
lea    0xe45(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
add    %r13d,%ebp
lea    (%r12,%rbx,1),%eax
cmp    0x8(%rsp),%eax
jne    11d0 <main+0xa0>
mov    %r13,0x10(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    (%rbx,%rbx,2),%ebp
lea    (%r15,%r15,2),%r13d
lea    0xdf2(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x3,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
lea    (%r12,%rbx,1),%eax
add    %r13d,%ebp
cmp    0x8(%rsp),%eax
jne    1220 <main+0xf0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    0x0(,%rbx,4),%ebp
lea    0x0(,%r15,4),%r13d
lea    0xd9f(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x4,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
add    %r13d,%ebp
lea    (%r12,%rbx,1),%eax
cmp    0x8(%rsp),%eax
jne    1270 <main+0x140>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    (%rbx,%rbx,4),%ebp
lea    (%r15,%r15,4),%r13d
lea    0xd57(%rip),%r14
nop
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x5,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
lea    (%r12,%rbx,1),%eax
add    %r13d,%ebp
cmp    0x8(%rsp),%eax
jne    12b0 <main+0x180>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    (%rbx,%rbx,1),%eax
lea    (%rax,%rax,2),%ebp
mov    0x10(%rsp),%rax
lea    (%rax,%rax,2),%r13d
lea    0xd0f(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x6,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
lea    (%r12,%rbx,1),%eax
add    %r13d,%ebp
cmp    0x8(%rsp),%eax
jne    1300 <main+0x1d0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    0x0(,%rbx,8),%ebp
sub    %ebx,%ebp
lea    0x0(,%r15,8),%r14d
mov    %r14d,%r13d
sub    %r15d,%r13d
nopl   0x0(%rax,%rax,1)
lea    0xcaf(%rip),%rdi
mov    %ebx,%esi
mov    $0x7,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
lea    (%r12,%rbx,1),%eax
add    %r13d,%ebp
cmp    0x8(%rsp),%eax
jne    1350 <main+0x220>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    0x0(,%rbx,8),%ebp
lea    0xc73(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
mov    %ebx,%esi
mov    $0x8,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
add    %r14d,%ebp
lea    (%r12,%rbx,1),%eax
cmp    0x8(%rsp),%eax
jne    13a0 <main+0x270>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%ebx
lea    (%rbx,%rbx,8),%ebp
lea    (%r15,%r15,8),%r13d
lea    0xc27(%rip),%r14
nop
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x9,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    %r15d,%ebx
lea    (%r12,%rbx,1),%eax
add    %r13d,%ebp
cmp    0x8(%rsp),%eax
jne    13e0 <main+0x2b0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [17 x i8] c"%d * %d = %2d \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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
%9 = select i1 %8, i32 1, i32 -1
br label %10
10: ; preds = %10, %0
%11 = phi i32 [ %6, %0 ], [ %15, %10 ]
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 1, i32 %11)
%13 = load i32, i32* %2
%14 = icmp eq i32 %11, %13
%15 = add nsw i32 %11, %9
br i1 %14, label %16, label %10
16: ; preds = %10
%17 = call i32 @putchar(i32 10)
%18 = load i32, i32* %1
br label %19
19: ; preds = %19, %16
%20 = phi i32 [ %18, %16 ], [ %25, %19 ]
%21 = shl nsw i32 %20, 1
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 2, i32 %21)
%23 = load i32, i32* %2
%24 = icmp eq i32 %20, %23
%25 = add nsw i32 %20, %9
br i1 %24, label %26, label %19
26: ; preds = %19
%27 = call i32 @putchar(i32 10)
%28 = load i32, i32* %1
br label %29
29: ; preds = %29, %26
%30 = phi i32 [ %28, %26 ], [ %35, %29 ]
%31 = mul nsw i32 %30, 3
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 3, i32 %31)
%33 = load i32, i32* %2
%34 = icmp eq i32 %30, %33
%35 = add nsw i32 %30, %9
br i1 %34, label %36, label %29
36: ; preds = %29
%37 = call i32 @putchar(i32 10)
%38 = load i32, i32* %1
br label %39
39: ; preds = %39, %36
%40 = phi i32 [ %38, %36 ], [ %45, %39 ]
%41 = shl nsw i32 %40, 2
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %40, i32 4, i32 %41)
%43 = load i32, i32* %2
%44 = icmp eq i32 %40, %43
%45 = add nsw i32 %40, %9
br i1 %44, label %46, label %39
46: ; preds = %39
%47 = call i32 @putchar(i32 10)
%48 = load i32, i32* %1
br label %49
49: ; preds = %49, %46
%50 = phi i32 [ %48, %46 ], [ %55, %49 ]
%51 = mul nsw i32 %50, 5
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %50, i32 5, i32 %51)
%53 = load i32, i32* %2
%54 = icmp eq i32 %50, %53
%55 = add nsw i32 %50, %9
br i1 %54, label %56, label %49
56: ; preds = %49
%57 = call i32 @putchar(i32 10)
%58 = load i32, i32* %1
br label %59
59: ; preds = %59, %56
%60 = phi i32 [ %58, %56 ], [ %65, %59 ]
%61 = mul nsw i32 %60, 6
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %60, i32 6, i32 %61)
%63 = load i32, i32* %2
%64 = icmp eq i32 %60, %63
%65 = add nsw i32 %60, %9
br i1 %64, label %66, label %59
66: ; preds = %59
%67 = call i32 @putchar(i32 10)
%68 = load i32, i32* %1
br label %69
69: ; preds = %69, %66
%70 = phi i32 [ %68, %66 ], [ %75, %69 ]
%71 = mul nsw i32 %70, 7
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %70, i32 7, i32 %71)
%73 = load i32, i32* %2
%74 = icmp eq i32 %70, %73
%75 = add nsw i32 %70, %9
br i1 %74, label %76, label %69
76: ; preds = %69
%77 = call i32 @putchar(i32 10)
%78 = load i32, i32* %1
br label %79
79: ; preds = %79, %76
%80 = phi i32 [ %78, %76 ], [ %85, %79 ]
%81 = shl nsw i32 %80, 3
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %80, i32 8, i32 %81)
%83 = load i32, i32* %2
%84 = icmp eq i32 %80, %83
%85 = add nsw i32 %80, %9
br i1 %84, label %86, label %79
86: ; preds = %79
%87 = call i32 @putchar(i32 10)
%88 = load i32, i32* %1
br label %89
89: ; preds = %89, %86
%90 = phi i32 [ %88, %86 ], [ %95, %89 ]
%91 = mul nsw i32 %90, 9
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %90, i32 9, i32 %91)
%93 = load i32, i32* %2
%94 = icmp eq i32 %90, %93
%95 = add nsw i32 %90, %9
br i1 %94, label %96, label %89
96: ; preds = %89
%97 = call i32 @putchar(i32 10)
ret i32 0
}