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

/* Variables and functions */
int TC_U32_HASH(unsigned int);
int TC_U32_USERHTID(unsigned int);
int /*<<< orphan*/ snprintf(char *, int, char *, int, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
const char *conv_tca_u32_hash(unsigned num, unsigned char debug) {
  static char str[128];
  strncpy(str, "", sizeof(str));
  snprintf(str, sizeof(str), "0x%x/0x%x", TC_U32_USERHTID(num),
           TC_U32_HASH(num));
  return ((const char *)str);
}


x86 assembly (clang, -O0):
<conv_tca_u32_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
lea    0x2ef8(%rip),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x80,%edx
call   1030 <strncpy@plt>
mov    -0x4(%rbp),%edi
call   1060 <TC_U32_USERHTID@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <TC_U32_HASH@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%r8d
lea    0x2ec7(%rip),%rdi
mov    $0x80,%esi
lea    0xe6b(%rip),%rdx
call   1040 <snprintf@plt>
lea    0x2eaf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_tca_u32_hash>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0x2f03(%rip),%r14
lea    0xeb5(%rip),%rsi
mov    %r14,%rdi
mov    $0x80,%edx
call   1030 <strncpy@plt>
mov    %ebx,%edi
call   1060 <TC_U32_USERHTID@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <TC_U32_HASH@plt>
lea    0xe88(%rip),%rdx
mov    %r14,%rdi
mov    $0x80,%esi
mov    %ebp,%ecx
mov    %eax,%r8d
call   1040 <snprintf@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@conv_tca_u32_hash.str = internal global [128 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
@.str.1 = [10 x i8] c"0x%x/0x%x\00"
define i8* @conv_tca_u32_hash(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = call i32 @strncpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @conv_tca_u32_hash.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 128)
%6 = load i32, i32* %3
%7 = call i32 @TC_U32_USERHTID(i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @TC_U32_HASH(i32 %8)
%10 = call i32 @snprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @conv_tca_u32_hash.str, i64 0, i64 0), i32 128, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %9)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @conv_tca_u32_hash.str, i64 0, i64 0)
}

LLVM IR (-O2):
@conv_tca_u32_hash.str = internal global [128 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
@.str.1 = [10 x i8] c"0x%x/0x%x\00"
define i8* @conv_tca_u32_hash(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @strncpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @conv_tca_u32_hash.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 128)
%4 = tail call i32 @TC_U32_USERHTID(i32 %0)
%5 = tail call i32 @TC_U32_HASH(i32 %0)
%6 = tail call i32 @snprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @conv_tca_u32_hash.str, i64 0, i64 0), i32 128, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @conv_tca_u32_hash.str, i64 0, i64 0)
}