#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 */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ verify_div1(int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/, int /*<<< orphan*/);
void verify_div1_negations(int32_t rs, int32_t rt, int32_t expected_quotient,
                           int32_t expected_remainder) {
  verify_div1(rs, rt, expected_quotient, expected_remainder);
  verify_div1(rs, -rt, -expected_quotient, expected_remainder);
  verify_div1(-rs, rt, -expected_quotient, -expected_remainder);
  verify_div1(-rs, -rt, expected_quotient, -expected_remainder);
}


x86 assembly (clang, -O0):
<verify_div1_negations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <verify_div1@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
xor    %edx,%edx
sub    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <verify_div1@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
sub    -0xc(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
call   1030 <verify_div1@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
call   1030 <verify_div1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_div1_negations>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r13d
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebp
call   1030 <verify_div1@plt>
mov    %r15d,%r12d
neg    %r12d
mov    %r14d,%ebx
neg    %ebx
mov    %ebp,%edi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r13d,%ecx
call   1030 <verify_div1@plt>
neg    %ebp
neg    %r13d
mov    %ebp,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r13d,%ecx
call   1030 <verify_div1@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    %r14d,%edx
mov    %r13d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <verify_div1@plt>

LLVM IR (-O0):
define void @verify_div1_negations(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @verify_div1(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = sub nsw i32 0, %15
%17 = load i32, i32* %7
%18 = sub nsw i32 0, %17
%19 = load i32, i32* %8
%20 = call i32 @verify_div1(i32 %14, i32 %16, i32 %18, i32 %19)
%21 = load i32, i32* %5
%22 = sub nsw i32 0, %21
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = sub nsw i32 0, %24
%26 = load i32, i32* %8
%27 = sub nsw i32 0, %26
%28 = call i32 @verify_div1(i32 %22, i32 %23, i32 %25, i32 %27)
%29 = load i32, i32* %5
%30 = sub nsw i32 0, %29
%31 = load i32, i32* %6
%32 = sub nsw i32 0, %31
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = sub nsw i32 0, %34
%36 = call i32 @verify_div1(i32 %30, i32 %32, i32 %33, i32 %35)
ret void
}

LLVM IR (-O2):
define void @verify_div1_negations(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @verify_div1(i32 %0, i32 %1, i32 %2, i32 %3)
%6 = sub nsw i32 0, %1
%7 = sub nsw i32 0, %2
%8 = tail call i32 @verify_div1(i32 %0, i32 %6, i32 %7, i32 %3)
%9 = sub nsw i32 0, %0
%10 = sub nsw i32 0, %3
%11 = tail call i32 @verify_div1(i32 %9, i32 %1, i32 %7, i32 %10)
%12 = tail call i32 @verify_div1(i32 %9, i32 %6, i32 %2, i32 %10)
ret void
}