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

/* Variables and functions */
scalar_t__ hash_wcstr(int /*<<< orphan*/ **, int /*<<< orphan*/ *);
int /*<<< orphan*/ ht_assert(int, char *, char *, int);
int /*<<< orphan*/ swprintf(int /*<<< orphan*/ *, int, char *, int);
void ht_test_test_hash_wcstr(void *param) {
  wchar_t buf1[21];
  wchar_t buf2[21];
  wchar_t *t1 = buf1;
  wchar_t *t2 = buf2;
  int i;
  for (i = 0; i < 40; i++) {
    swprintf(buf1, 20, L"key #%d", i);
    swprintf(buf2, 20, L"key #%d", i);
    ht_assert(hash_wcstr(&t1, NULL) == hash_wcstr(&t2, NULL),
              "hash_wcstr(&t1, NULL) == hash_wcstr(&t2, NULL)",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/hwp/hwp_utils/refs/heads/master/tests/"
              "common_test.c",
              54);
  }
}


x86 assembly (clang, -O0):
<ht_test_test_hash_wcstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0xc8(%rbp)
lea    -0xc0(%rbp),%rax
mov    %rax,-0xd0(%rbp)
movl   $0x0,-0xd4(%rbp)
cmpl   $0x28,-0xd4(%rbp)
jge    1210 <ht_test_test_hash_wcstr+0xe0>
lea    -0x60(%rbp),%rdi
mov    -0xd4(%rbp),%ecx
mov    $0x14,%esi
lea    0xe7b(%rip),%rdx
call   1030 <swprintf@plt>
lea    -0xc0(%rbp),%rdi
mov    -0xd4(%rbp),%ecx
mov    $0x14,%esi
lea    0xe5d(%rip),%rdx
call   1030 <swprintf@plt>
lea    -0xc8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <hash_wcstr@plt>
mov    %rax,-0xe0(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <hash_wcstr@plt>
mov    %rax,%rcx
mov    -0xe0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe35(%rip),%rsi
lea    0xe5d(%rip),%rdx
mov    $0x36,%ecx
call   1050 <ht_assert@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1162 <ht_test_test_hash_wcstr+0x32>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_test_test_hash_wcstr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
lea    0x70(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
xor    %ebx,%ebx
lea    0xea3(%rip),%r12
mov    %rsp,%rbp
lea    0xeb9(%rip),%r14
lea    0xee1(%rip),%r15
xchg   %ax,%ax
lea    0x70(%rsp),%rdi
mov    $0x14,%esi
mov    %r12,%rdx
mov    %ebx,%ecx
call   1030 <swprintf@plt>
lea    0x10(%rsp),%rdi
mov    $0x14,%esi
mov    %r12,%rdx
mov    %ebx,%ecx
call   1030 <swprintf@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1040 <hash_wcstr@plt>
mov    %rax,%r13
mov    %rbp,%rdi
xor    %esi,%esi
call   1040 <hash_wcstr@plt>
xor    %edi,%edi
cmp    %rax,%r13
sete   %dil
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x36,%ecx
call   1050 <ht_assert@plt>
add    $0x1,%ebx
cmp    $0x28,%ebx
jne    1170 <ht_test_test_hash_wcstr+0x40>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i32] [i32 107, i32 101, i32 121, i32 32, i32 35, i32 37, i32 100, i32 0]
@.str.1 = [47 x i8] c"hash_wcstr(&t1, NULL) == hash_wcstr(&t2, NULL)\00"
@.str.2 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hwp/hwp_utils/refs/heads/master/tests/common_test.c\00"
define void @ht_test_test_hash_wcstr(i8* %0) {
%2 = alloca i8*
%3 = alloca [21 x i32]
%4 = alloca [21 x i32]
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %2
%8 = getelementptr inbounds [21 x i32], [21 x i32]* %3, i64 0, i64 0
store i32* %8, i32** %5
%9 = getelementptr inbounds [21 x i32], [21 x i32]* %4, i64 0, i64 0
store i32* %9, i32** %6
store i32 0, i32* %7
br label %10
10: ; preds = %25, %1
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 40
br i1 %12, label %13, label %28
13: ; preds = %10
%14 = getelementptr inbounds [21 x i32], [21 x i32]* %3, i64 0, i64 0
%15 = load i32, i32* %7
%16 = call i32 @swprintf(i32* %14, i32 20, i8* bitcast ([8 x i32]* @.str to i8*), i32 %15)
%17 = getelementptr inbounds [21 x i32], [21 x i32]* %4, i64 0, i64 0
%18 = load i32, i32* %7
%19 = call i32 @swprintf(i32* %17, i32 20, i8* bitcast ([8 x i32]* @.str to i8*), i32 %18)
%20 = call i64 @hash_wcstr(i32** %5, i32* null)
%21 = call i64 @hash_wcstr(i32** %6, i32* null)
%22 = icmp eq i64 %20, %21
%23 = zext i1 %22 to i32
%24 = call i32 @ht_assert(i32 %23, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.2, i64 0, i64 0), i32 54)
br label %25
25: ; preds = %13
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %10
28: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [8 x i32] [i32 107, i32 101, i32 121, i32 32, i32 35, i32 37, i32 100, i32 0]
@.str.1 = [47 x i8] c"hash_wcstr(&t1, NULL) == hash_wcstr(&t2, NULL)\00"
@.str.2 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hwp/hwp_utils/refs/heads/master/tests/common_test.c\00"
define void @ht_test_test_hash_wcstr(i8* nocapture readnone %0) {
%2 = alloca [21 x i32]
%3 = alloca [21 x i32]
%4 = alloca i32*
%5 = alloca i32*
%6 = bitcast [21 x i32]* %2 to i8*
%7 = bitcast [21 x i32]* %3 to i8*
%8 = bitcast i32** %4 to i8*
%9 = getelementptr inbounds [21 x i32], [21 x i32]* %2, i64 0, i64 0
store i32* %9, i32** %4
%10 = bitcast i32** %5 to i8*
%11 = getelementptr inbounds [21 x i32], [21 x i32]* %3, i64 0, i64 0
store i32* %11, i32** %5
br label %12
12: ; preds = %1, %12
%13 = phi i32 [ 0, %1 ], [ %21, %12 ]
%14 = call i32 @swprintf(i32* %9, i32 20, i8* bitcast ([8 x i32]* @.str to i8*), i32 %13)
%15 = call i32 @swprintf(i32* %11, i32 20, i8* bitcast ([8 x i32]* @.str to i8*), i32 %13)
%16 = call i64 @hash_wcstr(i32** %4, i32* null)
%17 = call i64 @hash_wcstr(i32** %5, i32* null)
%18 = icmp eq i64 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @ht_assert(i32 %19, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.2, i64 0, i64 0), i32 54)
%21 = add nuw nsw i32 %13, 1
%22 = icmp eq i32 %21, 40
br i1 %22, label %23, label %12
23: ; preds = %12
ret void
}