#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 */
struct ss7 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ isup_get_number(char *, unsigned char *, int,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ ss7_message(struct ss7 *, char *, char *);
int((jip_dump))(struct ss7 *ss7, int messagetype, unsigned char *parm,
                int len) {
  char numbuf[64] = "";
  isup_get_number(numbuf, &parm[0], len, 0);
  ss7_message(ss7, "\t\t\tJIP: %s\n", numbuf);
  return len;
}


x86 assembly (clang, -O0):
<jip_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
xor    %ecx,%ecx
call   1040 <isup_get_number@plt>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xe89(%rip),%rsi
call   1050 <ss7_message@plt>
mov    -0x1c(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jip_dump>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %ecx,%ebx
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
xor    %ecx,%ecx
call   1030 <isup_get_number@plt>
lea    0xea3(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
call   1040 <ss7_message@plt>
mov    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.ss7 = type { i32 }
@.str = [12 x i8] c"\09\09\09JIP: %s\0A\00"
define i32 @jip_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.ss7*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [64 x i8]
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = bitcast [64 x i8]* %9 to i8*
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i32, i32* %8
%15 = call i32 @isup_get_number(i8* %11, i8* %13, i32 %14, i32 0)
%16 = load %struct.ss7*, %struct.ss7** %5
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%18 = call i32 @ss7_message(%struct.ss7* %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = load i32, i32* %8
ret i32 %19
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [12 x i8] c"\09\09\09JIP: %s\0A\00"
define i32 @jip_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 returned %3) {
%5 = alloca [64 x i8]
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = call i32 @isup_get_number(i8* %6, i8* %2, i32 %3, i32 0)
%8 = call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 %3
}