#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 *alloca(int);
int /*<<< orphan*/ gcd(int *, int *);
int main() {
  int *y1 = alloca(sizeof(int));
  int *y2 = alloca(sizeof(int));
  *y1 = __VERIFIER_nondet_int();
  *y2 = __VERIFIER_nondet_int();
  if (*y1 >= 0 && *y2 >= 0) {
    gcd(y1, y2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jl     11a0 <main+0x70>
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jl     11a0 <main+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <gcd@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,(%r14)
cmpl   $0x0,(%rbx)
js     1175 <main+0x45>
test   %eax,%eax
js     1175 <main+0x45>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <gcd@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @alloca(i32 4)
store i32* %4, i32** %2
%5 = call i32* @alloca(i32 4)
store i32* %5, i32** %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = call i32 (...) @__VERIFIER_nondet_int()
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %0
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load i32*, i32** %2
%19 = load i32*, i32** %3
%20 = call i32 @gcd(i32* %18, i32* %19)
br label %21
21: ; preds = %17, %13, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @alloca(i32 4)
%2 = tail call i32* @alloca(i32 4)
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %1
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, -1
%7 = icmp sgt i32 %4, -1
%8 = select i1 %6, i1 %7, i1 false
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = tail call i32 @gcd(i32* %1, i32* %2)
br label %11
11: ; preds = %9, %0
ret i32 0
}