#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 *);
int /*<<< orphan*/ hash_generate_license(void *);
void *hash_init(char const *);
int /*<<< orphan*/ hash_read(void *);
int /*<<< orphan*/ hash_set_path(void *, char const *);
int /*<<< orphan*/ stderr;
void vendor_generate_v2c(const char *c2vfile, const char *new_v2cfile) {
  void *ptr = hash_init(c2vfile);
  hash_read(ptr);
  hash_set_path(ptr, new_v2cfile);
  fprintf(stderr, "License  file generated....\n");
  hash_generate_license(ptr);
  hash_free(ptr);
  fprintf(stderr,
          "Generating V2C (Vendor to Customer) file into path:%s ,Please send "
          "to customer to check license is valid\n",
          new_v2cfile);
  fprintf(stderr, "Status : Not Licensed\n");
  fprintf(stderr, "V2C file generation done\n");
}


x86 assembly (clang, -O0):
<vendor_generate_v2c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hash_init@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <hash_read@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <hash_set_path@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1080 <hash_generate_license@plt>
mov    -0x18(%rbp),%rdi
call   1040 <hash_free@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vendor_generate_v2c>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
call   1030 <hash_init@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <hash_read@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <hash_set_path@plt>
mov    0x2e56(%rip),%r15
mov    (%r15),%edi
lea    0xe6c(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1080 <hash_generate_license@plt>
mov    %rbx,%rdi
call   1040 <hash_free@plt>
mov    (%r15),%edi
lea    0xe68(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
lea    0xebe(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r15),%edi
lea    0xec4(%rip),%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"License file generated....\0A\00"
@.str.1 = [106 x i8] c"Generating V2C (Vendor to Customer) file into path:%s ,Please send to customer to check license is valid\0A\00"
@.str.2 = [23 x i8] c"Status : Not Licensed\0A\00"
@.str.3 = [26 x i8] c"V2C file generation done\0A\00"
define void @vendor_generate_v2c(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @hash_init(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @hash_read(i8* %8)
%10 = load i8*, i8** %5
%11 = load i8*, i8** %4
%12 = call i32 @hash_set_path(i8* %10, i8* %11)
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %5
%16 = call i32 @hash_generate_license(i8* %15)
%17 = load i8*, i8** %5
%18 = call i32 @hash_free(i8* %17)
%19 = load i32, i32* @stderr
%20 = load i8*, i8** %4
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"License file generated....\0A\00"
@.str.1 = [106 x i8] c"Generating V2C (Vendor to Customer) file into path:%s ,Please send to customer to check license is valid\0A\00"
@.str.2 = [23 x i8] c"Status : Not Licensed\0A\00"
@.str.3 = [26 x i8] c"V2C file generation done\0A\00"
define void @vendor_generate_v2c(i8* %0, i8* %1) {
%3 = tail call i8* @hash_init(i8* %0)
%4 = tail call i32 @hash_read(i8* %3)
%5 = tail call i32 @hash_set_path(i8* %3, i8* %1)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @hash_generate_license(i8* %3)
%9 = tail call i32 @hash_free(i8* %3)
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
ret void
}