#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ hash_free(void *);
void *hash_init_nonfile(char const *);
int /*<<< orphan*/ hash_write(void *);
int /*<<< orphan*/ stderr;
void vendor_generate_c2v(const char *C2VFilename) {
  void *ptr = hash_init_nonfile(C2VFilename);
  hash_write(ptr);
  hash_free(ptr);
  fprintf(stderr,
          "Generating C2V (Customer to Vendor) file into path:%s ,Please send "
          "to product vendor....\n",
          C2VFilename);
  fprintf(stderr, "Status : Not Licensed\n");
  fprintf(stderr, "License prepare file generated path: %s\n", C2VFilename);
}


x86 assembly (clang, -O0):
<vendor_generate_c2v>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <hash_init_nonfile@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <hash_write@plt>
mov    -0x10(%rbp),%rdi
call   1030 <hash_free@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe81(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vendor_generate_c2v>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1060 <hash_init_nonfile@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <hash_write@plt>
mov    %rbx,%rdi
call   1030 <hash_free@plt>
mov    0x2e7a(%rip),%rbx
mov    (%rbx),%edi
lea    0xe91(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [90 x i8] c"Generating C2V (Customer to Vendor) file into path:%s ,Please send to product vendor....\0A\00"
@.str.1 = [23 x i8] c"Status : Not Licensed\0A\00"
@.str.2 = [41 x i8] c"License prepare file generated path: %s\0A\00"
define void @vendor_generate_c2v(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @hash_init_nonfile(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @hash_write(i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @hash_free(i8* %8)
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %2
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %2
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i8* %16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [90 x i8] c"Generating C2V (Customer to Vendor) file into path:%s ,Please send to product vendor....\0A\00"
@.str.1 = [23 x i8] c"Status : Not Licensed\0A\00"
@.str.2 = [41 x i8] c"License prepare file generated path: %s\0A\00"
define void @vendor_generate_c2v(i8* %0) {
%2 = tail call i8* @hash_init_nonfile(i8* %0)
%3 = tail call i32 @hash_write(i8* %2)
%4 = tail call i32 @hash_free(i8* %2)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}