#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 */
scalar_t__ func_81(int);
int /*<<< orphan*/ func_98(int);
void func_18(int t) {
  unsigned l_889;
  int l_895 = 1;
  for (0; 1; ++l_889) {
    int t1 = 0;
    func_98(0);
    func_98(0);
    if (func_81(1)) {
      int rhs = l_895;
      if (rhs == 0)
        rhs = 1;
      if (1 & (t % rhs))
        t1 = 1;
    }
    func_98(t1);
    l_895 = 0;
  }
}


x86 assembly (clang, -O0):
<func_18>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1141 <func_18+0x21>
jmp    11bd <func_18+0x9d>
movl   $0x0,-0x10(%rbp)
xor    %edi,%edi
call   1040 <func_98@plt>
xor    %edi,%edi
call   1040 <func_98@plt>
mov    $0x1,%edi
call   1030 <func_81@plt>
cmp    $0x0,%rax
je     11a0 <func_18+0x80>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1181 <func_18+0x61>
movl   $0x1,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x14(%rbp)
and    $0x1,%edx
cmp    $0x0,%edx
je     119b <func_18+0x7b>
movl   $0x1,-0x10(%rbp)
jmp    11a0 <func_18+0x80>
mov    -0x10(%rbp),%edi
call   1040 <func_98@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <func_18+0x12>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_18>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <func_98@plt>
xor    %edi,%edi
call   1040 <func_98@plt>
mov    $0x1,%edi
call   1030 <func_81@plt>
xor    %edi,%edi
call   1040 <func_98@plt>
jmp    1130 <func_18+0x10>

LLVM IR (-O0):
define void @func_18(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %4
br label %7
7: ; preds = %29, %1
br i1 true, label %8, label %32
8: ; preds = %7
store i32 0, i32* %5
%9 = call i32 @func_98(i32 0)
%10 = call i32 @func_98(i32 0)
%11 = call i64 @func_81(i32 1)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %8
%14 = load i32, i32* %4
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %6
br label %18
18: ; preds = %17, %13
%19 = load i32, i32* %2
%20 = load i32, i32* %6
%21 = srem i32 %19, %20
%22 = and i32 1, %21
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 1, i32* %5
br label %25
25: ; preds = %24, %18
br label %26
26: ; preds = %25, %8
%27 = load i32, i32* %5
%28 = call i32 @func_98(i32 %27)
store i32 0, i32* %4
br label %29
29: ; preds = %26
%30 = load i32, i32* %3
%31 = add i32 %30, 1
store i32 %31, i32* %3
br label %7
32: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @func_18(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @func_98(i32 0)
%4 = tail call i32 @func_98(i32 0)
%5 = tail call i64 @func_81(i32 1)
%6 = tail call i32 @func_98(i32 0)
br label %2
}