#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*/ ssize_t;

/* Variables and functions */
int rdz_hexdump(char const *, int /*<<< orphan*/, size_t, int);
void rdz_hexshow(const char *a, const char *b, ssize_t n) {
  for (size_t line = 0;; ++line) {
    int oa = rdz_hexdump(a, n, line, 0);
    int ob = rdz_hexdump(b, n, line, 1);
    if (oa && ob)
      break;
  }
}


x86 assembly (clang, -O0):
<rdz_hexshow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <rdz_hexdump@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <rdz_hexdump@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1171 <rdz_hexshow+0x61>
cmpl   $0x0,-0x28(%rbp)
je     1171 <rdz_hexshow+0x61>
jmp    1187 <rdz_hexshow+0x77>
jmp    1176 <rdz_hexshow+0x66>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <rdz_hexshow+0x1b>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdz_hexshow>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r12d
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %r12d,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1030 <rdz_hexdump@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
call   1030 <rdz_hexdump@plt>
add    $0x1,%rbx
test   %ebp,%ebp
je     1130 <rdz_hexshow+0x20>
test   %eax,%eax
je     1130 <rdz_hexshow+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @rdz_hexshow(i8* %0, i8* %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ 0, %3 ], [ %11, %4 ]
%6 = tail call i32 @rdz_hexdump(i8* %0, i32 %2, i64 %5, i32 0)
%7 = tail call i32 @rdz_hexdump(i8* %1, i32 %2, i64 %5, i32 1)
%8 = icmp ne i32 %6, 0
%9 = icmp ne i32 %7, 0
%10 = select i1 %8, i1 %9, i1 false
%11 = add i64 %5, 1
br i1 %10, label %12, label %4
12: ; preds = %4
ret void
}