#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 __VERIFIER_nondet_int();
int main() {
  int r, x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  if (x < 0) {
    x = -x;
  }
  if (y < 0) {
    y = -y;
  }
  while (y > 0) {
    r = x;
    while (r >= y) {
      r = r - y;
    }
    x = y;
    y = r;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1145 <main+0x35>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1157 <main+0x47>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    115c <main+0x4c>
cmpl   $0x0,-0x10(%rbp)
jle    1197 <main+0x87>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1186 <main+0x76>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    116c <main+0x5c>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    115c <main+0x4c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %0
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %4
%17 = sub nsw i32 0, %16
store i32 %17, i32* %4
br label %18
18: ; preds = %15, %12
br label %19
19: ; preds = %32, %18
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %35
22: ; preds = %19
%23 = load i32, i32* %3
store i32 %23, i32* %2
br label %24
24: ; preds = %28, %22
%25 = load i32, i32* %2
%26 = load i32, i32* %4
%27 = icmp sge i32 %25, %26
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = load i32, i32* %2
%30 = load i32, i32* %4
%31 = sub nsw i32 %29, %30
store i32 %31, i32* %2
br label %24
32: ; preds = %24
%33 = load i32, i32* %4
store i32 %33, i32* %3
%34 = load i32, i32* %2
store i32 %34, i32* %4
br label %19
35: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}