#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*/ assertTrue(char *, int);
int rotate(int);
void test_rotate_long() {
  assertTrue("rotate(0x1) == 0x100000000ULL", rotate(0x1) == 0x100000000ULL);
  ;
  assertTrue("rotate(0x1234567) == 0x123456700000000ULL",
             rotate(0x1234567) == 0x123456700000000ULL);
  ;
  assertTrue("rotate(0xcafebabe0123456ULL) == 0xe01234560cafebabULL",
             rotate(0xcafebabe0123456ULL) == 0xe01234560cafebabULL);
  ;
}


x86 assembly (clang, -O0):
<test_rotate_long>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <rotate@plt>
cltq
movabs $0x100000000,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb4(%rip),%rdi
call   1030 <assertTrue@plt>
mov    $0x1234567,%edi
call   1040 <rotate@plt>
cltq
movabs $0x123456700000000,%rcx
45 23 01
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea5(%rip),%rdi
call   1030 <assertTrue@plt>
mov    $0xe0123456,%edi
call   1040 <rotate@plt>
cltq
movabs $0xe01234560cafebab,%rcx
34 12 e0
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea2(%rip),%rdi
call   1030 <assertTrue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rotate_long>:
push   %rax
mov    $0x1,%edi
call   1040 <rotate@plt>
lea    0xece(%rip),%rdi
xor    %esi,%esi
call   1030 <assertTrue@plt>
mov    $0x1234567,%edi
call   1040 <rotate@plt>
lea    0xed4(%rip),%rdi
xor    %esi,%esi
call   1030 <assertTrue@plt>
mov    $0xe0123456,%edi
call   1040 <rotate@plt>
lea    0xee6(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"rotate(0x1) == 0x100000000ULL\00"
@.str.1 = [42 x i8] c"rotate(0x1234567) == 0x123456700000000ULL\00"
@.str.2 = [54 x i8] c"rotate(0xcafebabe0123456ULL) == 0xe01234560cafebabULL\00"
define void @test_rotate_long() {
%1 = call i32 @rotate(i32 1)
%2 = sext i32 %1 to i64
%3 = icmp eq i64 %2, 4294967296
%4 = zext i1 %3 to i32
%5 = call i32 @assertTrue(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @rotate(i32 19088743)
%7 = sext i32 %6 to i64
%8 = icmp eq i64 %7, 81985526906748928
%9 = zext i1 %8 to i32
%10 = call i32 @assertTrue(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 @rotate(i32 -535677866)
%12 = sext i32 %11 to i64
%13 = icmp eq i64 %12, -2300718915448214613
%14 = zext i1 %13 to i32
%15 = call i32 @assertTrue(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"rotate(0x1) == 0x100000000ULL\00"
@.str.1 = [42 x i8] c"rotate(0x1234567) == 0x123456700000000ULL\00"
@.str.2 = [54 x i8] c"rotate(0xcafebabe0123456ULL) == 0xe01234560cafebabULL\00"
define void @test_rotate_long() {
%1 = tail call i32 @rotate(i32 1)
%2 = tail call i32 @assertTrue(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = tail call i32 @rotate(i32 19088743)
%4 = tail call i32 @assertTrue(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = tail call i32 @rotate(i32 -535677866)
%6 = tail call i32 @assertTrue(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret void
}