#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*/ __CrestApply2(int, int, long long);
int /*<<< orphan*/ __CrestCall(int, int);
int /*<<< orphan*/ __CrestLoad(int, unsigned long, long long);
int /*<<< orphan*/ __CrestReturn(int);
int /*<<< orphan*/ __CrestStore(int, unsigned long);
int _divides(int n, int m) {
  int __retres3;
  {
    __CrestCall(3, 1);
    __CrestStore(2, (unsigned long)(&m));
    __CrestStore(1, (unsigned long)(&n));
    __CrestLoad(8, (unsigned long)(&m), (long long)m);
    __CrestLoad(7, (unsigned long)(&n), (long long)n);
    __CrestApply2(6, 4, (long long)(m % n));
    __CrestLoad(5, (unsigned long)0, (long long)0);
    __CrestApply2(4, 12, (long long)(m % n == 0));
    __CrestStore(9, (unsigned long)(&__retres3));
    __retres3 = m % n == 0;
    {
      __CrestLoad(10, (unsigned long)(&__retres3), (long long)__retres3);
      __CrestReturn(11);
      return (__retres3);
    }
  }
}


x86 assembly (clang, -O0):
<_divides>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x3,%edi
mov    $0x1,%esi
call   1060 <__CrestCall@plt>
lea    -0x8(%rbp),%rsi
mov    $0x2,%edi
call   1040 <__CrestStore@plt>
lea    -0x4(%rbp),%rsi
mov    $0x1,%edi
call   1040 <__CrestStore@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x8,%edi
call   1070 <__CrestLoad@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x7,%edi
call   1070 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
movslq %edx,%rdx
mov    $0x6,%edi
mov    $0x4,%esi
call   1030 <__CrestApply2@plt>
mov    $0x5,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1070 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x4,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x9,%edi
call   1040 <__CrestStore@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0xa,%edi
call   1070 <__CrestLoad@plt>
mov    $0xb,%edi
call   1050 <__CrestReturn@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_divides>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,0x10(%rsp)
mov    %esi,0xc(%rsp)
mov    $0x3,%edi
mov    $0x1,%esi
call   1060 <__CrestCall@plt>
lea    0xc(%rsp),%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
call   1040 <__CrestStore@plt>
lea    0x10(%rsp),%r14
mov    $0x1,%edi
mov    %r14,%rsi
call   1040 <__CrestStore@plt>
movslq 0xc(%rsp),%rdx
mov    $0x8,%edi
mov    %rbx,%rsi
call   1070 <__CrestLoad@plt>
movslq 0x10(%rsp),%rdx
mov    $0x7,%edi
mov    %r14,%rsi
call   1070 <__CrestLoad@plt>
mov    0xc(%rsp),%eax
cltd
idivl  0x10(%rsp)
movslq %edx,%rdx
mov    $0x6,%edi
mov    $0x4,%esi
call   1030 <__CrestApply2@plt>
mov    $0x5,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <__CrestLoad@plt>
mov    0xc(%rsp),%eax
cltd
idivl  0x10(%rsp)
xor    %eax,%eax
test   %edx,%edx
sete   %al
mov    $0x4,%edi
mov    $0xc,%esi
mov    %rax,%rdx
call   1030 <__CrestApply2@plt>
lea    0x14(%rsp),%rbx
mov    $0x9,%edi
mov    %rbx,%rsi
call   1040 <__CrestStore@plt>
mov    0xc(%rsp),%eax
cltd
idivl  0x10(%rsp)
xor    %eax,%eax
test   %edx,%edx
sete   %al
mov    %eax,0x14(%rsp)
mov    $0xa,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1070 <__CrestLoad@plt>
mov    $0xb,%edi
call   1050 <__CrestReturn@plt>
mov    0x14(%rsp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @_divides(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @__CrestCall(i32 3, i32 1)
%7 = ptrtoint i32* %4 to i64
%8 = call i32 @__CrestStore(i32 2, i64 %7)
%9 = ptrtoint i32* %3 to i64
%10 = call i32 @__CrestStore(i32 1, i64 %9)
%11 = ptrtoint i32* %4 to i64
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = call i32 @__CrestLoad(i32 8, i64 %11, i64 %13)
%15 = ptrtoint i32* %3 to i64
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = call i32 @__CrestLoad(i32 7, i64 %15, i64 %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = srem i32 %19, %20
%22 = sext i32 %21 to i64
%23 = call i32 @__CrestApply2(i32 6, i32 4, i64 %22)
%24 = call i32 @__CrestLoad(i32 5, i64 0, i64 0)
%25 = load i32, i32* %4
%26 = load i32, i32* %3
%27 = srem i32 %25, %26
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i32
%30 = sext i32 %29 to i64
%31 = call i32 @__CrestApply2(i32 4, i32 12, i64 %30)
%32 = ptrtoint i32* %5 to i64
%33 = call i32 @__CrestStore(i32 9, i64 %32)
%34 = load i32, i32* %4
%35 = load i32, i32* %3
%36 = srem i32 %34, %35
%37 = icmp eq i32 %36, 0
%38 = zext i1 %37 to i32
store i32 %38, i32* %5
%39 = ptrtoint i32* %5 to i64
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = call i32 @__CrestLoad(i32 10, i64 %39, i64 %41)
%43 = call i32 @__CrestReturn(i32 11)
%44 = load i32, i32* %5
ret i32 %44
}

LLVM IR (-O2):
define i32 @_divides(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast i32* %5 to i8*
%7 = tail call i32 @__CrestCall(i32 3, i32 1)
%8 = ptrtoint i32* %4 to i64
%9 = call i32 @__CrestStore(i32 2, i64 %8)
%10 = ptrtoint i32* %3 to i64
%11 = call i32 @__CrestStore(i32 1, i64 %10)
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = call i32 @__CrestLoad(i32 8, i64 %8, i64 %13)
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = call i32 @__CrestLoad(i32 7, i64 %10, i64 %16)
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = srem i32 %18, %19
%21 = sext i32 %20 to i64
%22 = call i32 @__CrestApply2(i32 6, i32 4, i64 %21)
%23 = call i32 @__CrestLoad(i32 5, i64 0, i64 0)
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = srem i32 %24, %25
%27 = icmp eq i32 %26, 0
%28 = zext i1 %27 to i64
%29 = call i32 @__CrestApply2(i32 4, i32 12, i64 %28)
%30 = ptrtoint i32* %5 to i64
%31 = call i32 @__CrestStore(i32 9, i64 %30)
%32 = load i32, i32* %4
%33 = load i32, i32* %3
%34 = srem i32 %32, %33
%35 = icmp eq i32 %34, 0
%36 = zext i1 %35 to i32
store i32 %36, i32* %5
%37 = zext i1 %35 to i64
%38 = call i32 @__CrestLoad(i32 10, i64 %30, i64 %37)
%39 = call i32 @__CrestReturn(i32 11)
%40 = load i32, i32* %5
ret i32 %40
}