#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*/ sys_get_audio_params(int *, int *, int *, int *, int *,
                                        int *, int *, int *);
int /*<<< orphan*/ sys_open_audio(int, int *, int, int *, int, int *, int,
                                  int *, int, int, int);
void sys_reopen_audio(void) {
  int naudioindev, audioindev[4], chindev[4];
  int naudiooutdev, audiooutdev[4], choutdev[4];
  int rate, advance;
  sys_get_audio_params(&naudioindev, audioindev, chindev, &naudiooutdev,
                       audiooutdev, choutdev, &rate, &advance);
  sys_open_audio(naudioindev, audioindev, naudioindev, chindev, naudiooutdev,
                 audiooutdev, naudiooutdev, choutdev, rate, advance, 1);
}


x86 assembly (clang, -O0):
<sys_reopen_audio>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x88,%rsp
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x50(%rbp),%r8
lea    -0x60(%rbp),%r9
lea    -0xc(%rbp),%rdi
lea    -0x34(%rbp),%rcx
lea    -0x64(%rbp),%r10
lea    -0x68(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <sys_get_audio_params@plt>
mov    -0xc(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    -0x30(%rbp),%rcx
mov    -0x34(%rbp),%r8d
lea    -0x50(%rbp),%r9
mov    -0x34(%rbp),%ebx
lea    -0x60(%rbp),%r11
mov    -0x64(%rbp),%r10d
mov    -0x68(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
movl   $0x1,0x20(%rsp)
call   1040 <sys_open_audio@plt>
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_reopen_audio>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rax
lea    0x4(%rsp),%r10
lea    0xc(%rsp),%rdi
lea    0x40(%rsp),%r13
lea    0x30(%rsp),%r15
lea    0x8(%rsp),%rcx
lea    0x20(%rsp),%r12
lea    0x10(%rsp),%r14
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%r8
mov    %r14,%r9
push   %rax
push   %r10
call   1030 <sys_get_audio_params@plt>
add    $0x10,%rsp
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%r8d
mov    0x4(%rsp),%eax
mov    (%rsp),%ebx
sub    $0x8,%rsp
mov    %r13,%rsi
mov    %edi,%edx
mov    %r15,%rcx
mov    %r12,%r9
push   $0x1
push   %rbx
push   %rax
push   %r14
push   %r8
call   1040 <sys_open_audio@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @sys_reopen_audio() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca i32
%5 = alloca [4 x i32]
%6 = alloca [4 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%13 = call i32 @sys_get_audio_params(i32* %1, i32* %9, i32* %10, i32* %4, i32* %11, i32* %12, i32* %7, i32* %8)
%14 = load i32, i32* %1
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%16 = load i32, i32* %1
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%18 = load i32, i32* %4
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%20 = load i32, i32* %4
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = call i32 @sys_open_audio(i32 %14, i32* %15, i32 %16, i32* %17, i32 %18, i32* %19, i32 %20, i32* %21, i32 %22, i32 %23, i32 1)
ret void
}

LLVM IR (-O2):
define void @sys_reopen_audio() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca i32
%5 = alloca [4 x i32]
%6 = alloca [4 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %1 to i8*
%10 = bitcast [4 x i32]* %2 to i8*
%11 = bitcast [4 x i32]* %3 to i8*
%12 = bitcast i32* %4 to i8*
%13 = bitcast [4 x i32]* %5 to i8*
%14 = bitcast [4 x i32]* %6 to i8*
%15 = bitcast i32* %7 to i8*
%16 = bitcast i32* %8 to i8*
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%21 = call i32 @sys_get_audio_params(i32* %1, i32* %17, i32* %18, i32* %4, i32* %19, i32* %20, i32* %7, i32* %8)
%22 = load i32, i32* %1
%23 = load i32, i32* %4
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = call i32 @sys_open_audio(i32 %22, i32* %17, i32 %22, i32* %18, i32 %23, i32* %19, i32 %23, i32* %20, i32 %24, i32 %25, i32 1)
ret void
}