#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*/ VDP_drawText(char *, int /*<<< orphan*/, unsigned short);
int /*<<< orphan*/ addValueU16(char *, char *, unsigned short);
int /*<<< orphan*/ addValueU32(char *, char *, unsigned long);
int /*<<< orphan*/ strclr(char *);
unsigned short showValueU32U16(char *str1, unsigned long value1, char *str2,
                               unsigned short value2, unsigned short pos) {
  char s[64];
  strclr(s);
  addValueU32(s, str1, value1);
  addValueU16(s, str2, value2);
  VDP_drawText(s, 0, pos);
  return pos + 1;
}


x86 assembly (clang, -O0):
<showValueU32U16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %r8w,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %cx,-0x1a(%rbp)
mov    %ax,-0x1c(%rbp)
lea    -0x60(%rbp),%rdi
call   1060 <strclr@plt>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <addValueU32@plt>
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movzwl -0x1a(%rbp),%edx
call   1030 <addValueU16@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
movzwl -0x1c(%rbp),%edx
call   1050 <VDP_drawText@plt>
movzwl -0x1c(%rbp),%eax
add    $0x1,%eax
movzwl %ax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showValueU32U16>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbp
mov    %rsp,%r13
mov    %r13,%rdi
call   1060 <strclr@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1040 <addValueU32@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
call   1030 <addValueU16@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1050 <VDP_drawText@plt>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @showValueU32U16(i8* %0, i64 %1, i8* %2, i16 zeroext %3, i16 zeroext %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i16
%10 = alloca i16
%11 = alloca [64 x i8]
store i8* %0, i8** %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i16 %3, i16* %9
store i16 %4, i16* %10
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%13 = call i32 @strclr(i8* %12)
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = call i32 @addValueU32(i8* %14, i8* %15, i64 %16)
%18 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%19 = load i8*, i8** %8
%20 = load i16, i16* %9
%21 = call i32 @addValueU16(i8* %18, i8* %19, i16 zeroext %20)
%22 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%23 = load i16, i16* %10
%24 = call i32 @VDP_drawText(i8* %22, i32 0, i16 zeroext %23)
%25 = load i16, i16* %10
%26 = zext i16 %25 to i32
%27 = add nsw i32 %26, 1
%28 = trunc i32 %27 to i16
ret i16 %28
}

LLVM IR (-O2):
define zeroext i16 @showValueU32U16(i8* %0, i64 %1, i8* %2, i16 zeroext %3, i16 zeroext %4) {
%6 = alloca [64 x i8]
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%8 = call i32 @strclr(i8* %7)
%9 = call i32 @addValueU32(i8* %7, i8* %0, i64 %1)
%10 = call i32 @addValueU16(i8* %7, i8* %2, i16 zeroext %3)
%11 = call i32 @VDP_drawText(i8* %7, i32 0, i16 zeroext %4)
%12 = add i16 %4, 1
ret i16 %12
}