#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 x;
  int y;
  int tmp;
  int xtmp;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (y > 0 && x > 0) {
    tmp = y;
    xtmp = x;
    if (y == 0) {
      y = y;
    } else {
      if (y < 0) {
        xtmp = -xtmp;
      }
    }
    if (xtmp > 0) {
      while (xtmp >= y) {
        xtmp = xtmp - y;
      }
      y = xtmp;
    } else {
      while (xtmp < 0) {
        xtmp = xtmp - y;
      }
      y = xtmp;
    }
    x = tmp;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x15(%rbp)
jle    114c <main+0x3c>
cmpl   $0x0,-0x8(%rbp)
setg   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    11f6 <main+0xe6>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    117d <main+0x6d>
mov    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1194 <main+0x84>
cmpl   $0x0,-0xc(%rbp)
jge    118f <main+0x7f>
xor    %eax,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1194 <main+0x84>
cmpl   $0x0,-0x14(%rbp)
jle    11c8 <main+0xb8>
jmp    11a3 <main+0x93>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     11bd <main+0xad>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11a3 <main+0x93>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11eb <main+0xdb>
jmp    11cd <main+0xbd>
cmpl   $0x0,-0x14(%rbp)
jge    11e5 <main+0xd5>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11cd <main+0xbd>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x20,%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
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %2
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %3
br label %8
8: ; preds = %54, %0
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 0
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br i1 %15, label %16, label %56
16: ; preds = %14
%17 = load i32, i32* %3
store i32 %17, i32* %4
%18 = load i32, i32* %2
store i32 %18, i32* %5
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = load i32, i32* %3
store i32 %22, i32* %3
br label %30
23: ; preds = %16
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load i32, i32* %5
%28 = sub nsw i32 0, %27
store i32 %28, i32* %5
br label %29
29: ; preds = %26, %23
br label %30
30: ; preds = %29, %21
%31 = load i32, i32* %5
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %44
33: ; preds = %30
br label %34
34: ; preds = %38, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %3
%37 = icmp sge i32 %35, %36
br i1 %37, label %38, label %42
38: ; preds = %34
%39 = load i32, i32* %5
%40 = load i32, i32* %3
%41 = sub nsw i32 %39, %40
store i32 %41, i32* %5
br label %34
42: ; preds = %34
%43 = load i32, i32* %5
store i32 %43, i32* %3
br label %54
44: ; preds = %30
br label %45
45: ; preds = %48, %44
%46 = load i32, i32* %5
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %52
48: ; preds = %45
%49 = load i32, i32* %5
%50 = load i32, i32* %3
%51 = sub nsw i32 %49, %50
store i32 %51, i32* %5
br label %45
52: ; preds = %45
%53 = load i32, i32* %5
store i32 %53, i32* %3
br label %54
54: ; preds = %52, %42
%55 = load i32, i32* %4
store i32 %55, i32* %2
br label %8
56: ; preds = %14
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
}