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


x86 assembly (clang, -O0):
<DesDec_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
lea    0xec2(%rip),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    0xea5(%rip),%rdi
call   1040 <myic_DESDecrypt@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1178 <DesDec_raw+0x58>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <DesDec_raw+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DesDec_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   1030 <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    1040 <myic_DESDecrypt@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"abcd1234\00"
define i32 @DesDec_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_DESDecrypt(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
}