#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 clcle(unsigned long *, unsigned long *, unsigned long *, unsigned long *,
          char);
int /*<<< orphan*/ printf(char *, int, unsigned long, unsigned long,
                          unsigned long, unsigned long, unsigned long,
                          unsigned long);
void testrun(void *_a1, unsigned long _l1, void *_a3, unsigned long _l3,
             char pad) {
  unsigned long a1, a3, l1, l3;
  int cc;
  a1 = (unsigned long)_a1;
  l1 = _l1;
  a3 = (unsigned long)_a3;
  l3 = _l3;
  cc = clcle(&a1, &l1, &a3, &l3, pad);
  printf("cc: %d, l1: %lu(%lu) l3: %lu(%lu) diff1: %lu diff3: %lu\n", cc, l1,
         _l1, l3, _l3, a1 - (unsigned long)_a1, a3 - (unsigned long)_a3);
}


x86 assembly (clang, -O0):
<testrun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %al,-0x21(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x48(%rbp),%rcx
movsbl -0x21(%rbp),%r8d
call   1030 <clcle@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%esi
mov    -0x40(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    -0x8(%rbp),%rax
sub    %rax,%r10
mov    -0x38(%rbp),%rax
mov    -0x18(%rbp),%rdi
sub    %rdi,%rax
lea    0xe55(%rip),%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testrun>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%r15
mov    %rdi,%r13
mov    %rdi,0x18(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rcx,(%rsp)
lea    0x18(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <clcle@plt>
mov    0x8(%rsp),%rdx
mov    (%rsp),%r8
mov    0x18(%rsp),%r10
sub    %r13,%r10
mov    0x10(%rsp),%rbx
sub    %r12,%rbx
lea    0xe7d(%rip),%rdi
mov    %eax,%esi
mov    %r15,%rcx
mov    %r14,%r9
push   %rbx
push   %r10
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [57 x i8] c"cc: %d, l1: %lu(%lu) l3: %lu(%lu) diff1: %lu diff3: %lu\0A\00"
define void @testrun(i8* %0, i64 %1, i8* %2, i64 %3, i8 signext %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
store i8* %0, i8** %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i8 %4, i8* %10
%16 = load i8*, i8** %6
%17 = ptrtoint i8* %16 to i64
store i64 %17, i64* %11
%18 = load i64, i64* %7
store i64 %18, i64* %13
%19 = load i8*, i8** %8
%20 = ptrtoint i8* %19 to i64
store i64 %20, i64* %12
%21 = load i64, i64* %9
store i64 %21, i64* %14
%22 = load i8, i8* %10
%23 = call i32 @clcle(i64* %11, i64* %13, i64* %12, i64* %14, i8 signext %22)
store i32 %23, i32* %15
%24 = load i32, i32* %15
%25 = load i64, i64* %13
%26 = load i64, i64* %7
%27 = load i64, i64* %14
%28 = load i64, i64* %9
%29 = load i64, i64* %11
%30 = load i8*, i8** %6
%31 = ptrtoint i8* %30 to i64
%32 = sub i64 %29, %31
%33 = load i64, i64* %12
%34 = load i8*, i8** %8
%35 = ptrtoint i8* %34 to i64
%36 = sub i64 %33, %35
%37 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %24, i64 %25, i64 %26, i64 %27, i64 %28, i64 %32, i64 %36)
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"cc: %d, l1: %lu(%lu) l3: %lu(%lu) diff1: %lu diff3: %lu\0A\00"
define void @testrun(i8* %0, i64 %1, i8* %2, i64 %3, i8 signext %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = bitcast i64* %6 to i8*
%11 = bitcast i64* %7 to i8*
%12 = bitcast i64* %8 to i8*
%13 = bitcast i64* %9 to i8*
%14 = ptrtoint i8* %0 to i64
store i64 %14, i64* %6
store i64 %1, i64* %8
%15 = ptrtoint i8* %2 to i64
store i64 %15, i64* %7
store i64 %3, i64* %9
%16 = call i32 @clcle(i64* %6, i64* %8, i64* %7, i64* %9, i8 signext %4)
%17 = load i64, i64* %8
%18 = load i64, i64* %9
%19 = load i64, i64* %6
%20 = sub i64 %19, %14
%21 = load i64, i64* %7
%22 = sub i64 %21, %15
%23 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %16, i64 %17, i64 %1, i64 %18, i64 %3, i64 %20, i64 %22)
ret void
}