#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 myic_DESEncrypt(unsigned char *, int /*<<< orphan*/, unsigned char *, int,
                    unsigned char *, int *);
int /*<<< orphan*/ strlen(char *);
int DesEnc_raw(unsigned char *pInData, int nInDataLen, unsigned char *pOutData,
               int *pOutDataLen) {
  int rv;
  unsigned char *padDate = NULL;
  unsigned int padDateLen = 0;
  rv = myic_DESEncrypt((unsigned char *)"abcd1234", strlen("abcd1234"), pInData,
                       (int)nInDataLen, pOutData, pOutDataLen);
  if (rv != 0) {
    return rv;
  }
  return 0;
}


x86 assembly (clang, -O0):
<DesEnc_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    0xe96(%rip),%rdi
call   1030 <myic_DESEncrypt@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1187 <DesEnc_raw+0x67>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118e <DesEnc_raw+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DesEnc_raw>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec6(%rip),%r12
mov    %r12,%rdi
call   1040 <strlen@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    %r15,%r8
mov    %r14,%r9
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <myic_DESEncrypt@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"abcd1234\00"
define i32 @DesEnc_raw(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32* %3, i32** %9
store i8* null, i8** %11
store i32 0, i32* %12
%13 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = load i8*, i8** %8
%17 = load i32*, i32** %9
%18 = call i32 @myic_DESEncrypt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i32 %15, i8* %16, i32* %17)
store i32 %18, i32* %10
%19 = load i32, i32* %10
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %4
%22 = load i32, i32* %10
store i32 %22, i32* %5
br label %24
23: ; preds = %4
store i32 0, i32* %5
br label %24
24: ; preds = %23, %21
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
@.str = [9 x i8] c"abcd1234\00"
define i32 @DesEnc_raw(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @myic_DESEncrypt(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %0, i32 %1, i8* %2, i32* %3)
ret i32 %6
}