#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*/ fail(char *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ pass(char *);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_1();
main() {
  long l1, l2, l6;
  auto long l3;
  long oza1, oza2, oza;
  l1 = 1;
  l2 = 2;
  l3 = -1;
  l6 = 6;
  oza = ((l3 / ((l1)--)) | (l6 <= (l3 % l2)));
  printf("test 1 has a result of %d.\n", oza);
  if (oza != -1)
    fail("divide test [OKI004]");
  else
    pass("divide test [OKI004]");
  l1 = 1;
  oza1 = (l3 / ((l1)--));
  oza2 = (l6 <= (l3 % l2));
  oza = oza1 | oza2;
  printf("test 2 has a result of %d.\n", oza);
  if (oza != -1)
    fail("modulos test [OKI004]");
  else
    pass("modulos test [OKI004]");
  fflush(stdout);
  test_1();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x2,-0x18(%rbp)
movq   $0xffffffffffffffff,-0x28(%rbp)
ff
movq   $0x6,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
cqto
idiv   %rcx
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    -0x48(%rbp),%rax
cmp    %rdx,%rcx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xe32(%rip),%rdi
call   1060 <printf@plt>
cmpq   $0xffffffffffffffff,-0x40(%rbp)
je     11ef <main+0x9f>
lea    0xe37(%rip),%rdi
call   1040 <fail@plt>
jmp    11fb <main+0xab>
lea    0xe26(%rip),%rdi
call   1050 <pass@plt>
movq   $0x1,-0x10(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
cqto
idiv   %rcx
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    -0x50(%rbp),%rax
cmp    %rdx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
cltq
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xdd4(%rip),%rdi
call   1060 <printf@plt>
cmpq   $0xffffffffffffffff,-0x40(%rbp)
je     127e <main+0x12e>
lea    0xdd9(%rip),%rdi
call   1040 <fail@plt>
jmp    128a <main+0x13a>
lea    0xdc8(%rip),%rdi
call   1050 <pass@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
mov    $0x0,%al
call   1030 <test_1@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
call   1050 <printf@plt>
lea    0xec1(%rip),%rdi
call   1040 <pass@plt>
lea    0xeca(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
call   1050 <printf@plt>
lea    0xed3(%rip),%rdi
call   1040 <pass@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
call   1030 <test_1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"test 1 has a result of %d.\0A\00"
@.str.1 = [21 x i8] c"divide test [OKI004]\00"
@.str.2 = [28 x i8] c"test 2 has a result of %d.\0A\00"
@.str.3 = [22 x i8] c"modulos test [OKI004]\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
store i64 2, i64* %3
store i64 -1, i64* %5
store i64 6, i64* %4
%9 = load i64, i64* %5
%10 = load i64, i64* %2
%11 = add nsw i64 %10, -1
store i64 %11, i64* %2
%12 = sdiv i64 %9, %10
%13 = load i64, i64* %4
%14 = load i64, i64* %5
%15 = load i64, i64* %3
%16 = srem i64 %14, %15
%17 = icmp sle i64 %13, %16
%18 = zext i1 %17 to i32
%19 = sext i32 %18 to i64
%20 = or i64 %12, %19
store i64 %20, i64* %8
%21 = load i64, i64* %8
%22 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %21)
%23 = load i64, i64* %8
%24 = icmp ne i64 %23, -1
br i1 %24, label %25, label %27
25: ; preds = %0
%26 = call i32 @fail(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %29
27: ; preds = %0
%28 = call i32 @pass(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
store i64 1, i64* %2
%30 = load i64, i64* %5
%31 = load i64, i64* %2
%32 = add nsw i64 %31, -1
store i64 %32, i64* %2
%33 = sdiv i64 %30, %31
store i64 %33, i64* %6
%34 = load i64, i64* %4
%35 = load i64, i64* %5
%36 = load i64, i64* %3
%37 = srem i64 %35, %36
%38 = icmp sle i64 %34, %37
%39 = zext i1 %38 to i32
%40 = sext i32 %39 to i64
store i64 %40, i64* %7
%41 = load i64, i64* %6
%42 = load i64, i64* %7
%43 = or i64 %41, %42
store i64 %43, i64* %8
%44 = load i64, i64* %8
%45 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 %44)
%46 = load i64, i64* %8
%47 = icmp ne i64 %46, -1
br i1 %47, label %48, label %50
48: ; preds = %29
%49 = call i32 @fail(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %52
50: ; preds = %29
%51 = call i32 @pass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %52
52: ; preds = %50, %48
%53 = load i32, i32* @stdout
%54 = call i32 @fflush(i32 %53)
%55 = call i32 (...) @test_1()
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
@.str = [28 x i8] c"test 1 has a result of %d.\0A\00"
@.str.1 = [21 x i8] c"divide test [OKI004]\00"
@.str.2 = [28 x i8] c"test 2 has a result of %d.\0A\00"
@.str.3 = [22 x i8] c"modulos test [OKI004]\00"
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 -1)
%2 = tail call i32 @pass(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 -1)
%4 = tail call i32 @pass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = tail call i32 (...) @test_1()
ret i32 0
}