#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*/ RCT2_CALLFUNC_X(int, int *, int *, int *, int *, int *,
                                   int *, int *);
void ride_get_status(int rideIndex, int *formatSecondary, int *argument) {
  int eax, ebx, ecx, edx, esi, edi, ebp;
  edx = rideIndex;
  RCT2_CALLFUNC_X(0x006AF561, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp);
  *formatSecondary = ebx & 0xFFFF;
  *argument = eax;
}


x86 assembly (clang, -O0):
<ride_get_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x6af561,%edi
lea    -0x1c(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x2c(%rbp),%r9
lea    -0x30(%rbp),%r10
lea    -0x34(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <RCT2_CALLFUNC_X@plt>
mov    -0x20(%rbp),%ecx
and    $0xffff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ride_get_status>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0x18(%rsp),%rax
lea    0x1c(%rsp),%r10
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x24(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x20(%rsp),%r9
mov    $0x6af561,%edi
push   %rax
push   %r10
call   1030 <RCT2_CALLFUNC_X@plt>
add    $0x10,%rsp
movzwl 0x10(%rsp),%eax
mov    %eax,(%rbx)
mov    0x14(%rsp),%eax
mov    %eax,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ride_get_status(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%14 = load i32, i32* %4
store i32 %14, i32* %10
%15 = call i32 @RCT2_CALLFUNC_X(i32 7009633, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12, i32* %13)
%16 = load i32, i32* %8
%17 = and i32 %16, 65535
%18 = load i32*, i32** %5
store i32 %17, i32* %18
%19 = load i32, i32* %7
%20 = load i32*, i32** %6
store i32 %19, i32* %20
ret void
}

LLVM IR (-O2):
define void @ride_get_status(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = bitcast i32* %10 to i8*
store i32 %0, i32* %7
%18 = call i32 @RCT2_CALLFUNC_X(i32 7009633, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10)
%19 = load i32, i32* %5
%20 = and i32 %19, 65535
store i32 %20, i32* %1
%21 = load i32, i32* %4
store i32 %21, i32* %2
ret void
}