#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b, i, min, yueshu;
  scanf("%d%d", &a, &b);
  min = a < b ? a : b;
  for (i = 1; i <= min; i++) {
    if (a % i == 0 && b % i == 0)
      yueshu = i;
    else
      continue;
  }
  printf("max yueshu=%d", yueshu);
  return 0;
}


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),%eax
cmp    -0xc(%rbp),%eax
jge    115a <main+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1160 <main+0x40>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11bc <main+0x9c>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    11a4 <main+0x84>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    11a4 <main+0x84>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11a9 <main+0x89>
jmp    11ae <main+0x8e>
jmp    11ae <main+0x8e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116d <main+0x4d>
mov    -0x18(%rbp),%esi
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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),%r9d
mov    (%rsp),%r8d
cmp    %r8d,%r9d
mov    %r8d,%edi
cmovl  %r9d,%edi
neg    %edi
mov    $0x1,%ecx
jmp    116e <main+0x4e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rdi,%rcx,1),%eax
add    $0x1,%eax
add    $0x1,%ecx
cmp    $0x1,%eax
je     1185 <main+0x65>
mov    %r9d,%eax
cltd
idiv   %ecx
test   %edx,%edx
jne    1160 <main+0x40>
mov    %r8d,%eax
cltd
idiv   %ecx
test   %edx,%edx
cmove  %ecx,%esi
jmp    1160 <main+0x40>
lea    0xe79(%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 = [14 x i8] c"max yueshu=%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = load i32, i32* %2
br label %15
13: ; preds = %0
%14 = load i32, i32* %3
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ]
store i32 %16, i32* %5
store i32 1, i32* %4
br label %17
17: ; preds = %35, %15
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %38
21: ; preds = %17
%22 = load i32, i32* %2
%23 = load i32, i32* %4
%24 = srem i32 %22, %23
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %33
26: ; preds = %21
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = srem i32 %27, %28
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = load i32, i32* %4
store i32 %32, i32* %6
br label %34
33: ; preds = %26, %21
br label %35
34: ; preds = %31
br label %35
35: ; preds = %34, %33
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %17
38: ; preds = %17
%39 = load i32, i32* %6
%40 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %39)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [14 x i8] c"max yueshu=%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 = icmp slt i32 %6, %7
%9 = select i1 %8, i32 %6, i32 %7
%10 = icmp sgt i32 %9, 0
br label %11
11: ; preds = %0, %20
%12 = phi i32 [ %21, %20 ], [ undef, %0 ]
%13 = phi i32 [ %22, %20 ], [ 1, %0 ]
%14 = srem i32 %6, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = srem i32 %7, %13
%18 = icmp eq i32 %17, 0
%19 = select i1 %18, i32 %13, i32 %12
br label %20
20: ; preds = %16, %11
%21 = phi i32 [ %12, %11 ], [ %19, %16 ]
%22 = add nuw i32 %13, 1
%23 = icmp eq i32 %13, %9
br i1 %23, label %24, label %11
24: ; preds = %20
%25 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %21)
ret i32 0
}