#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
void **hash_get(void *, void **);
int /*<<< orphan*/ stdout;
void __shrink_str_1_verify(void *pc, void *k, void *v) {
  void **kp = hash_get(pc, &k);
  fprintf(stdout, "%8s: %u %s\n", (char *)k, *(uint32_t *)v,
          v == *kp ? "OK" : "FAIL");
}


x86 assembly (clang, -O0):
<__shrink_str_1_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <hash_get@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%r9
lea    0xea5(%rip),%r8
lea    0xe9b(%rip),%rax
cmp    %r9,%rsi
cmove  %rax,%r8
lea    0xe81(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__shrink_str_1_verify>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rsi,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1040 <hash_get@plt>
mov    0x2ea2(%rip),%rcx
mov    (%rcx),%edi
mov    0x8(%rsp),%rdx
mov    (%rbx),%ecx
cmp    %rbx,(%rax)
lea    0xebb(%rip),%rax
lea    0xeb7(%rip),%r8
cmove  %rax,%r8
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"%8s: %u %s\0A\00"
@.str.1 = [3 x i8] c"OK\00"
@.str.2 = [5 x i8] c"FAIL\00"
define void @__shrink_str_1_verify(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = call i8** @hash_get(i8* %8, i8** %5)
store i8** %9, i8*** %7
%10 = load i32, i32* @stdout
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = load i8*, i8** %6
%16 = load i8**, i8*** %7
%17 = load i8*, i8** %16
%18 = icmp eq i8* %15, %17
%19 = zext i1 %18 to i64
%20 = select i1 %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%21 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %14, i8* %20)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"%8s: %u %s\0A\00"
@.str.1 = [3 x i8] c"OK\00"
@.str.2 = [5 x i8] c"FAIL\00"
define void @__shrink_str_1_verify(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
store i8* %1, i8** %4
%5 = call i8** @hash_get(i8* %0, i8** %4)
%6 = load i32, i32* @stdout
%7 = load i8*, i8** %4
%8 = bitcast i8* %2 to i32*
%9 = load i32, i32* %8
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, %2
%12 = select i1 %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %9, i8* %12)
ret void
}