#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int fragments;
  int fragstotal;
  int fragsize;
  int bytes;
};
typedef TYPE_1__ audio_buf_info;

/* Variables and functions */
int AFMT_S16_LE;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ O_WRONLY;
int /*<<< orphan*/ SNDCTL_DSP_CHANNELS;
int /*<<< orphan*/ SNDCTL_DSP_GETISPACE;
int /*<<< orphan*/ SNDCTL_DSP_GETOSPACE;
int /*<<< orphan*/ SNDCTL_DSP_RESET;
int /*<<< orphan*/ SNDCTL_DSP_SETDUPLEX;
int /*<<< orphan*/ SNDCTL_DSP_SETFMT;
int /*<<< orphan*/ SNDCTL_DSP_SETFRAGMENT;
int /*<<< orphan*/ SNDCTL_DSP_SPEED;
int atol(char *);
int /*<<< orphan*/ close(int);
scalar_t__ ioctl(int, int /*<<< orphan*/, ...);
int log(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int dsp;
  int duplexenable = 1;
  audio_buf_info playinfo, recinfo;
  int bufsize = 0x7FFF0000;
  int fragsize;
  int format = AFMT_S16_LE;
  int channels = 2;
  int samplerate = 44100;
  if (argc < 2) {
    bufsize += 15;
  } else {
    fragsize = atol(argv[1]);
    if (fragsize <= 0)
      fragsize = 32768;
    bufsize += (long)(log(fragsize) / log(2));
  }
  printf("\n*** Half duplex\n");
  if ((dsp = open("/dev/dsp", O_WRONLY)) < 0) {
    printf("Can't open audio device.\n");
    close(dsp);
    return 1;
  }
  if (ioctl(dsp, SNDCTL_DSP_SETFRAGMENT, &bufsize))
    printf("Couldn't set buffer parameters.\n");
  if (duplexenable && ioctl(dsp, SNDCTL_DSP_SETDUPLEX, 0) == -1) {
    printf("Couldn't enable full duplex audio.\n");
    duplexenable = 0;
  }
  if (ioctl(dsp, SNDCTL_DSP_SETFMT, &format) < 0)
    printf("playback file format failed\n");
  if (ioctl(dsp, SNDCTL_DSP_CHANNELS, &channels) < 0)
    printf("playback channel allocation failed\n");
  if (ioctl(dsp, SNDCTL_DSP_SPEED, &samplerate) < 0)
    printf("playback sample rate set failed\n");
  ioctl(dsp, SNDCTL_DSP_GETOSPACE, &playinfo);
  printf("          fragments fragstotal fragsize   bytes  TOTAL BYTES "
         "AVAILABLE\n");
  printf("Playback: %9d %10d %8d %7d %12d\n", playinfo.fragments,
         playinfo.fragstotal, playinfo.fragsize, playinfo.bytes,
         playinfo.bytes);
  close(dsp);
  if ((dsp = open("/dev/dsp", O_RDONLY)) < 0) {
    printf("Can't open audio device.\n");
    close(dsp);
    return 1;
  }
  if (ioctl(dsp, SNDCTL_DSP_SETFRAGMENT, &bufsize))
    printf("Couldn't set buffer parameters.\n");
  if (duplexenable && ioctl(dsp, SNDCTL_DSP_SETDUPLEX, 0) == -1) {
    printf("Couldn't enable full duplex audio.\n");
    duplexenable = 0;
  }
  if (ioctl(dsp, SNDCTL_DSP_SETFMT, &format) < 0)
    printf("playback file format failed\n");
  if (ioctl(dsp, SNDCTL_DSP_CHANNELS, &channels) < 0)
    printf("playback channel allocation failed\n");
  if (ioctl(dsp, SNDCTL_DSP_SPEED, &samplerate) < 0)
    printf("playback sample rate set failed\n");
  if (ioctl(dsp, SNDCTL_DSP_SETFMT, &format) < 0)
    printf("record file format failed\n");
  if (ioctl(dsp, SNDCTL_DSP_CHANNELS, &channels) < 0)
    printf("record channel allocation failed\n");
  if (ioctl(dsp, SNDCTL_DSP_SPEED, &samplerate) < 0)
    printf("record sample rate set failed\n");
  ioctl(dsp, SNDCTL_DSP_GETISPACE, &recinfo);
  printf("Record:   %9d %10d %8d %7d %12d\n", recinfo.fragments,
         recinfo.fragstotal, recinfo.fragsize, recinfo.bytes,
         recinfo.fragstotal * recinfo.fragsize);
  ioctl(dsp, SNDCTL_DSP_RESET);
  close(dsp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x7fff0000,-0x3c(%rbp)
mov    0x2e35(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
movl   $0xac44,-0x4c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11b6 <main+0x56>
mov    -0x3c(%rbp),%eax
add    $0xf,%eax
mov    %eax,-0x3c(%rbp)
jmp    1201 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atol@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jg     11d7 <main+0x77>
movl   $0x8000,-0x40(%rbp)
mov    -0x40(%rbp),%edi
call   1080 <log@plt>
mov    %eax,-0x50(%rbp)
mov    $0x2,%edi
call   1080 <log@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
cltd
idiv   %ecx
movslq %eax,%rcx
movslq -0x3c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x3c(%rbp)
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d72(%rip),%rax
mov    (%rax),%esi
lea    0xdf3(%rip),%rdi
call   1070 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1252 <main+0xf2>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
movl   $0x1,-0x4(%rbp)
jmp    15b8 <main+0x458>
mov    -0x14(%rbp),%edi
mov    0x2d44(%rip),%rax
mov    (%rax),%esi
lea    -0x3c(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
je     1281 <main+0x121>
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
je     12bf <main+0x15f>
mov    -0x14(%rbp),%edi
mov    0x2d3b(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0xffffffffffffffff,%rax
jne    12bf <main+0x15f>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2ccf(%rip),%rax
mov    (%rax),%esi
lea    -0x44(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    12ee <main+0x18e>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2cb0(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    131d <main+0x1bd>
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2c91(%rip),%rax
mov    (%rax),%esi
lea    -0x4c(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    134c <main+0x1ec>
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2c8a(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    0x2c49(%rip),%rax
mov    (%rax),%esi
lea    0xc6a(%rip),%rdi
call   1070 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    13db <main+0x27b>
lea    0xc5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
movl   $0x1,-0x4(%rbp)
jmp    15b8 <main+0x458>
mov    -0x14(%rbp),%edi
mov    0x2bbb(%rip),%rax
mov    (%rax),%esi
lea    -0x3c(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
je     140a <main+0x2aa>
lea    0xc32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
je     1448 <main+0x2e8>
mov    -0x14(%rbp),%edi
mov    0x2bb2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0xffffffffffffffff,%rax
jne    1448 <main+0x2e8>
lea    0xc1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2b46(%rip),%rax
mov    (%rax),%esi
lea    -0x44(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    1477 <main+0x317>
lea    0xc0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2b27(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    14a6 <main+0x346>
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2b08(%rip),%rax
mov    (%rax),%esi
lea    -0x4c(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    14d5 <main+0x375>
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2ab9(%rip),%rax
mov    (%rax),%esi
lea    -0x44(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    1504 <main+0x3a4>
lea    0xc48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2a9a(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    1533 <main+0x3d3>
lea    0xc34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2a7b(%rip),%rax
mov    (%rax),%esi
lea    -0x4c(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    1562 <main+0x402>
lea    0xc27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2a6c(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1040 <ioctl@plt>
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x34(%rbp),%r9d
imul   -0x30(%rbp),%r9d
lea    0xc0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    0x2a09(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1040 <ioctl@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0x2e3b(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
movl   $0x2,0xc(%rsp)
movl   $0xac44,0x8(%rsp)
mov    $0x7fff000f,%eax
cmp    $0x2,%edi
jl     11d5 <main+0x65>
mov    0x8(%rsi),%rdi
call   1070 <atol@plt>
test   %eax,%eax
mov    $0x8000,%edi
cmovg  %eax,%edi
call   1090 <log@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1090 <log@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
add    $0x7fff0000,%eax
mov    %eax,0x14(%rsp)
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%esi
lea    0xe0b(%rip),%rdi
call   1080 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
js     14b5 <main+0x345>
mov    0x2d95(%rip),%r13
mov    0x0(%r13),%esi
lea    0x14(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
je     122e <main+0xbe>
lea    0xf55(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <ioctl@plt>
mov    %rax,%r14
cmp    $0xffffffffffffffff,%rax
jne    1257 <main+0xe7>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d3a(%rip),%r15
mov    (%r15),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    1280 <main+0x110>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d21(%rip),%r12
mov    (%r12),%esi
lea    0xc(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    12aa <main+0x13a>
lea    0xe77(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d07(%rip),%rbp
mov    0x0(%rbp),%esi
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    12d3 <main+0x163>
lea    0xe2e(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d06(%rip),%rax
mov    (%rax),%esi
lea    0x28(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
lea    0xd6b(%rip),%rdi
call   1030 <puts@plt>
mov    0x28(%rsp),%esi
mov    0x2c(%rsp),%edx
mov    0x30(%rsp),%ecx
mov    0x34(%rsp),%r8d
lea    0xcfb(%rip),%rdi
mov    %r8d,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
call   1060 <close@plt>
mov    0x2cc2(%rip),%rax
mov    (%rax),%esi
lea    0xcd1(%rip),%rdi
call   1080 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
js     14b5 <main+0x345>
mov    0x0(%r13),%esi
lea    0x14(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
je     1361 <main+0x1f1>
lea    0xe22(%rip),%rdi
call   1030 <puts@plt>
cmp    $0xffffffffffffffff,%r14
je     138d <main+0x21d>
mov    0x2c62(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <ioctl@plt>
cmp    $0xffffffffffffffff,%rax
jne    138d <main+0x21d>
lea    0xdd3(%rip),%rdi
call   1030 <puts@plt>
mov    (%r15),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    13af <main+0x23f>
lea    0xd95(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%esi
lea    0xc(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    13d2 <main+0x262>
lea    0xd4f(%rip),%rdi
call   1030 <puts@plt>
mov    0x0(%rbp),%esi
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    13f4 <main+0x284>
lea    0xd0d(%rip),%rdi
call   1030 <puts@plt>
mov    (%r15),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    1416 <main+0x2a6>
lea    0xcd1(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%esi
lea    0xc(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    1439 <main+0x2c9>
lea    0xc8d(%rip),%rdi
call   1030 <puts@plt>
mov    0x0(%rbp),%esi
xor    %ebp,%ebp
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
test   %rax,%rax
jns    145d <main+0x2ed>
lea    0xc4b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2b74(%rip),%rax
mov    (%rax),%esi
lea    0x18(%rsp),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
mov    0x18(%rsp),%esi
mov    0x1c(%rsp),%edx
mov    0x20(%rsp),%ecx
mov    0x24(%rsp),%r8d
mov    %ecx,%r9d
imul   %edx,%r9d
lea    0xb97(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2b0f(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <ioctl@plt>
mov    %ebx,%edi
call   1060 <close@plt>
jmp    14cd <main+0x35d>
lea    0xce2(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1060 <close@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32, i32, i32, i32 }
@AFMT_S16_LE = global i32 0
@.str = [18 x i8] c"\0A*** Half duplex\0A\00"
@.str.1 = [9 x i8] c"/dev/dsp\00"
@O_WRONLY = global i32 0
@.str.2 = [26 x i8] c"Can't open audio device.\0A\00"
@SNDCTL_DSP_SETFRAGMENT = global i32 0
@.str.3 = [33 x i8] c"Couldn't set buffer parameters.\0A\00"
@SNDCTL_DSP_SETDUPLEX = global i32 0
@.str.4 = [36 x i8] c"Couldn't enable full duplex audio.\0A\00"
@SNDCTL_DSP_SETFMT = global i32 0
@.str.5 = [29 x i8] c"playback file format failed\0A\00"
@SNDCTL_DSP_CHANNELS = global i32 0
@.str.6 = [36 x i8] c"playback channel allocation failed\0A\00"
@SNDCTL_DSP_SPEED = global i32 0
@.str.7 = [33 x i8] c"playback sample rate set failed\0A\00"
@SNDCTL_DSP_GETOSPACE = global i32 0
@.str.8 = [72 x i8] c" fragments fragstotal fragsize bytes TOTAL BYTES AVAILABLE\0A\00"
@.str.9 = [33 x i8] c"Playback: %9d %10d %8d %7d %12d\0A\00"
@O_RDONLY = global i32 0
@.str.10 = [27 x i8] c"record file format failed\0A\00"
@.str.11 = [34 x i8] c"record channel allocation failed\0A\00"
@.str.12 = [31 x i8] c"record sample rate set failed\0A\00"
@SNDCTL_DSP_GETISPACE = global i32 0
@.str.13 = [33 x i8] c"Record: %9d %10d %8d %7d %12d\0A\00"
@SNDCTL_DSP_RESET = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.TYPE_2__
%9 = alloca %struct.TYPE_2__
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %7
store i32 2147418112, i32* %10
%15 = load i32, i32* @AFMT_S16_LE
store i32 %15, i32* %12
store i32 2, i32* %13
store i32 44100, i32* %14
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 2
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = load i32, i32* %10
%20 = add nsw i32 %19, 15
store i32 %20, i32* %10
br label %39
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @atol(i8* %24)
store i32 %25, i32* %11
%26 = load i32, i32* %11
%27 = icmp sle i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %21
store i32 32768, i32* %11
br label %29
29: ; preds = %28, %21
%30 = load i32, i32* %11
%31 = call i32 @log(i32 %30)
%32 = call i32 @log(i32 2)
%33 = sdiv i32 %31, %32
%34 = sext i32 %33 to i64
%35 = load i32, i32* %10
%36 = sext i32 %35 to i64
%37 = add nsw i64 %36, %34
%38 = trunc i64 %37 to i32
store i32 %38, i32* %10
br label %39
39: ; preds = %29, %18
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%41 = load i32, i32* @O_WRONLY
%42 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %41)
store i32 %42, i32* %6
%43 = icmp slt i32 %42, 0
br i1 %43, label %44, label %48
44: ; preds = %39
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%46 = load i32, i32* %6
%47 = call i32 @close(i32 %46)
store i32 1, i32* %3
br label %193
48: ; preds = %39
%49 = load i32, i32* %6
%50 = load i32, i32* @SNDCTL_DSP_SETFRAGMENT
%51 = call i64 (i32, i32, ...) @ioctl(i32 %49, i32 %50, i32* %10)
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %48
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %55
55: ; preds = %53, %48
%56 = load i32, i32* %7
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %65
58: ; preds = %55
%59 = load i32, i32* %6
%60 = load i32, i32* @SNDCTL_DSP_SETDUPLEX
%61 = call i64 (i32, i32, ...) @ioctl(i32 %59, i32 %60, i32 0)
%62 = icmp eq i64 %61, -1
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %65
65: ; preds = %63, %58, %55
%66 = load i32, i32* %6
%67 = load i32, i32* @SNDCTL_DSP_SETFMT
%68 = call i64 (i32, i32, ...) @ioctl(i32 %66, i32 %67, i32* %12)
%69 = icmp slt i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %65
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %72
72: ; preds = %70, %65
%73 = load i32, i32* %6
%74 = load i32, i32* @SNDCTL_DSP_CHANNELS
%75 = call i64 (i32, i32, ...) @ioctl(i32 %73, i32 %74, i32* %13)
%76 = icmp slt i64 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %72
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %79
79: ; preds = %77, %72
%80 = load i32, i32* %6
%81 = load i32, i32* @SNDCTL_DSP_SPEED
%82 = call i64 (i32, i32, ...) @ioctl(i32 %80, i32 %81, i32* %14)
%83 = icmp slt i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %79
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %86
86: ; preds = %84, %79
%87 = load i32, i32* %6
%88 = load i32, i32* @SNDCTL_DSP_GETOSPACE
%89 = call i64 (i32, i32, ...) @ioctl(i32 %87, i32 %88, %struct.TYPE_2__* %8)
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0))
%91 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
%92 = load i32, i32* %91
%93 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 1
%94 = load i32, i32* %93
%95 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 2
%96 = load i32, i32* %95
%97 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 3
%98 = load i32, i32* %97
%99 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 3
%100 = load i32, i32* %99
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i32 %92, i32 %94, i32 %96, i32 %98, i32 %100)
%102 = load i32, i32* %6
%103 = call i32 @close(i32 %102)
%104 = load i32, i32* @O_RDONLY
%105 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %104)
store i32 %105, i32* %6
%106 = icmp slt i32 %105, 0
br i1 %106, label %107, label %111
107: ; preds = %86
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%109 = load i32, i32* %6
%110 = call i32 @close(i32 %109)
store i32 1, i32* %3
br label %193
111: ; preds = %86
%112 = load i32, i32* %6
%113 = load i32, i32* @SNDCTL_DSP_SETFRAGMENT
%114 = call i64 (i32, i32, ...) @ioctl(i32 %112, i32 %113, i32* %10)
%115 = icmp ne i64 %114, 0
br i1 %115, label %116, label %118
116: ; preds = %111
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %118
118: ; preds = %116, %111
%119 = load i32, i32* %7
%120 = icmp ne i32 %119, 0
br i1 %120, label %121, label %128
121: ; preds = %118
%122 = load i32, i32* %6
%123 = load i32, i32* @SNDCTL_DSP_SETDUPLEX
%124 = call i64 (i32, i32, ...) @ioctl(i32 %122, i32 %123, i32 0)
%125 = icmp eq i64 %124, -1
br i1 %125, label %126, label %128
126: ; preds = %121
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %128
128: ; preds = %126, %121, %118
%129 = load i32, i32* %6
%130 = load i32, i32* @SNDCTL_DSP_SETFMT
%131 = call i64 (i32, i32, ...) @ioctl(i32 %129, i32 %130, i32* %12)
%132 = icmp slt i64 %131, 0
br i1 %132, label %133, label %135
133: ; preds = %128
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %135
135: ; preds = %133, %128
%136 = load i32, i32* %6
%137 = load i32, i32* @SNDCTL_DSP_CHANNELS
%138 = call i64 (i32, i32, ...) @ioctl(i32 %136, i32 %137, i32* %13)
%139 = icmp slt i64 %138, 0
br i1 %139, label %140, label %142
140: ; preds = %135
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %142
142: ; preds = %140, %135
%143 = load i32, i32* %6
%144 = load i32, i32* @SNDCTL_DSP_SPEED
%145 = call i64 (i32, i32, ...) @ioctl(i32 %143, i32 %144, i32* %14)
%146 = icmp slt i64 %145, 0
br i1 %146, label %147, label %149
147: ; preds = %142
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %149
149: ; preds = %147, %142
%150 = load i32, i32* %6
%151 = load i32, i32* @SNDCTL_DSP_SETFMT
%152 = call i64 (i32, i32, ...) @ioctl(i32 %150, i32 %151, i32* %12)
%153 = icmp slt i64 %152, 0
br i1 %153, label %154, label %156
154: ; preds = %149
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
br label %156
156: ; preds = %154, %149
%157 = load i32, i32* %6
%158 = load i32, i32* @SNDCTL_DSP_CHANNELS
%159 = call i64 (i32, i32, ...) @ioctl(i32 %157, i32 %158, i32* %13)
%160 = icmp slt i64 %159, 0
br i1 %160, label %161, label %163
161: ; preds = %156
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0))
br label %163
163: ; preds = %161, %156
%164 = load i32, i32* %6
%165 = load i32, i32* @SNDCTL_DSP_SPEED
%166 = call i64 (i32, i32, ...) @ioctl(i32 %164, i32 %165, i32* %14)
%167 = icmp slt i64 %166, 0
br i1 %167, label %168, label %170
168: ; preds = %163
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
br label %170
170: ; preds = %168, %163
%171 = load i32, i32* %6
%172 = load i32, i32* @SNDCTL_DSP_GETISPACE
%173 = call i64 (i32, i32, ...) @ioctl(i32 %171, i32 %172, %struct.TYPE_2__* %9)
%174 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 0
%175 = load i32, i32* %174
%176 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 1
%177 = load i32, i32* %176
%178 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 2
%179 = load i32, i32* %178
%180 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 3
%181 = load i32, i32* %180
%182 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 1
%183 = load i32, i32* %182
%184 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 2
%185 = load i32, i32* %184
%186 = mul nsw i32 %183, %185
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i32 %175, i32 %177, i32 %179, i32 %181, i32 %186)
%188 = load i32, i32* %6
%189 = load i32, i32* @SNDCTL_DSP_RESET
%190 = call i64 (i32, i32, ...) @ioctl(i32 %188, i32 %189)
%191 = load i32, i32* %6
%192 = call i32 @close(i32 %191)
br label %193
193: ; preds = %170, %107, %44
%194 = load i32, i32* %3
ret i32 %194
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32, i32, i32, i32 }
@AFMT_S16_LE = global i32 0
@.str.1 = [9 x i8] c"/dev/dsp\00"
@O_WRONLY = global i32 0
@SNDCTL_DSP_SETFRAGMENT = global i32 0
@SNDCTL_DSP_SETDUPLEX = global i32 0
@SNDCTL_DSP_SETFMT = global i32 0
@SNDCTL_DSP_CHANNELS = global i32 0
@SNDCTL_DSP_SPEED = global i32 0
@SNDCTL_DSP_GETOSPACE = global i32 0
@.str.9 = [33 x i8] c"Playback: %9d %10d %8d %7d %12d\0A\00"
@O_RDONLY = global i32 0
@SNDCTL_DSP_GETISPACE = global i32 0
@.str.13 = [33 x i8] c"Record: %9d %10d %8d %7d %12d\0A\00"
@SNDCTL_DSP_RESET = global i32 0
@str = [17 x i8] c"\0A*** Half duplex\00"
@str.14 = [71 x i8] c" fragments fragstotal fragsize bytes TOTAL BYTES AVAILABLE\00"
@str.15 = [30 x i8] c"record sample rate set failed\00"
@str.16 = [33 x i8] c"record channel allocation failed\00"
@str.17 = [26 x i8] c"record file format failed\00"
@str.24 = [32 x i8] c"playback sample rate set failed\00"
@str.25 = [35 x i8] c"playback channel allocation failed\00"
@str.26 = [28 x i8] c"playback file format failed\00"
@str.27 = [35 x i8] c"Couldn't enable full duplex audio.\00"
@str.28 = [32 x i8] c"Couldn't set buffer parameters.\00"
@str.29 = [25 x i8] c"Can't open audio device.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.TYPE_2__
%4 = alloca %struct.TYPE_2__
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast %struct.TYPE_2__* %3 to i8*
%10 = bitcast %struct.TYPE_2__* %4 to i8*
%11 = bitcast i32* %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = load i32, i32* @AFMT_S16_LE
store i32 %13, i32* %6
%14 = bitcast i32* %7 to i8*
store i32 2, i32* %7
%15 = bitcast i32* %8 to i8*
store i32 44100, i32* %8
%16 = icmp slt i32 %0, 2
br i1 %16, label %27, label %17
17: ; preds = %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i32 @atol(i8* %19)
%21 = icmp slt i32 %20, 1
%22 = select i1 %21, i32 32768, i32 %20
%23 = tail call i32 @log(i32 %22)
%24 = tail call i32 @log(i32 2)
%25 = sdiv i32 %23, %24
%26 = add i32 %25, 2147418112
br label %27
27: ; preds = %2, %17
%28 = phi i32 [ %26, %17 ], [ 2147418127, %2 ]
store i32 %28, i32* %5
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%30 = load i32, i32* @O_WRONLY
%31 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %27
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.29, i64 0, i64 0))
%35 = tail call i32 @close(i32 %31)
br label %151
36: ; preds = %27
%37 = load i32, i32* @SNDCTL_DSP_SETFRAGMENT
%38 = call i64 (i32, i32, ...) @ioctl(i32 %31, i32 %37, i32* %5)
%39 = icmp eq i64 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %36
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.28, i64 0, i64 0))
br label %42
42: ; preds = %36, %40
%43 = load i32, i32* @SNDCTL_DSP_SETDUPLEX
%44 = call i64 (i32, i32, ...) @ioctl(i32 %31, i32 %43, i32 0)
%45 = icmp eq i64 %44, -1
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.27, i64 0, i64 0))
br label %48
48: ; preds = %46, %42
%49 = load i32, i32* @SNDCTL_DSP_SETFMT
%50 = call i64 (i32, i32, ...) @ioctl(i32 %31, i32 %49, i32* %6)
%51 = icmp slt i64 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.26, i64 0, i64 0))
br label %54
54: ; preds = %52, %48
%55 = load i32, i32* @SNDCTL_DSP_CHANNELS
%56 = call i64 (i32, i32, ...) @ioctl(i32 %31, i32 %55, i32* %7)
%57 = icmp slt i64 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %54
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.25, i64 0, i64 0))
br label %60
60: ; preds = %58, %54
%61 = load i32, i32* @SNDCTL_DSP_SPEED
%62 = call i64 (i32, i32, ...) @ioctl(i32 %31, i32 %61, i32* %8)
%63 = icmp slt i64 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.24, i64 0, i64 0))
br label %66
66: ; preds = %64, %60
%67 = load i32, i32* @SNDCTL_DSP_GETOSPACE
%68 = call i64 (i32, i32, ...) @ioctl(i32 %31, i32 %67, %struct.TYPE_2__* %3)
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.14, i64 0, i64 0))
%70 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %3, i64 0, i32 0
%71 = load i32, i32* %70
%72 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %3, i64 0, i32 1
%73 = load i32, i32* %72
%74 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %3, i64 0, i32 2
%75 = load i32, i32* %74
%76 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %3, i64 0, i32 3
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i32 %71, i32 %73, i32 %75, i32 %77, i32 %77)
%79 = call i32 @close(i32 %31)
%80 = load i32, i32* @O_RDONLY
%81 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %80)
%82 = icmp slt i32 %81, 0
br i1 %82, label %83, label %86
83: ; preds = %66
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.29, i64 0, i64 0))
%85 = call i32 @close(i32 %81)
br label %151
86: ; preds = %66
%87 = load i32, i32* @SNDCTL_DSP_SETFRAGMENT
%88 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %87, i32* %5)
%89 = icmp eq i64 %88, 0
br i1 %89, label %92, label %90
90: ; preds = %86
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.28, i64 0, i64 0))
br label %92
92: ; preds = %90, %86
br i1 %45, label %99, label %93
93: ; preds = %92
%94 = load i32, i32* @SNDCTL_DSP_SETDUPLEX
%95 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %94, i32 0)
%96 = icmp eq i64 %95, -1
br i1 %96, label %97, label %99
97: ; preds = %93
%98 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.27, i64 0, i64 0))
br label %99
99: ; preds = %97, %93, %92
%100 = load i32, i32* @SNDCTL_DSP_SETFMT
%101 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %100, i32* %6)
%102 = icmp slt i64 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %99
%104 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.26, i64 0, i64 0))
br label %105
105: ; preds = %103, %99
%106 = load i32, i32* @SNDCTL_DSP_CHANNELS
%107 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %106, i32* %7)
%108 = icmp slt i64 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %105
%110 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.25, i64 0, i64 0))
br label %111
111: ; preds = %109, %105
%112 = load i32, i32* @SNDCTL_DSP_SPEED
%113 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %112, i32* %8)
%114 = icmp slt i64 %113, 0
br i1 %114, label %115, label %117
115: ; preds = %111
%116 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.24, i64 0, i64 0))
br label %117
117: ; preds = %115, %111
%118 = load i32, i32* @SNDCTL_DSP_SETFMT
%119 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %118, i32* %6)
%120 = icmp slt i64 %119, 0
br i1 %120, label %121, label %123
121: ; preds = %117
%122 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.17, i64 0, i64 0))
br label %123
123: ; preds = %121, %117
%124 = load i32, i32* @SNDCTL_DSP_CHANNELS
%125 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %124, i32* %7)
%126 = icmp slt i64 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %123
%128 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.16, i64 0, i64 0))
br label %129
129: ; preds = %127, %123
%130 = load i32, i32* @SNDCTL_DSP_SPEED
%131 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %130, i32* %8)
%132 = icmp slt i64 %131, 0
br i1 %132, label %133, label %135
133: ; preds = %129
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.15, i64 0, i64 0))
br label %135
135: ; preds = %133, %129
%136 = load i32, i32* @SNDCTL_DSP_GETISPACE
%137 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %136, %struct.TYPE_2__* %4)
%138 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 0, i32 0
%139 = load i32, i32* %138
%140 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 0, i32 1
%141 = load i32, i32* %140
%142 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 0, i32 2
%143 = load i32, i32* %142
%144 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 0, i32 3
%145 = load i32, i32* %144
%146 = mul nsw i32 %143, %141
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i32 %139, i32 %141, i32 %143, i32 %145, i32 %146)
%148 = load i32, i32* @SNDCTL_DSP_RESET
%149 = call i64 (i32, i32, ...) @ioctl(i32 %81, i32 %148)
%150 = call i32 @close(i32 %81)
br label %151
151: ; preds = %135, %83, %33
%152 = phi i32 [ 1, %33 ], [ 1, %83 ], [ 0, %135 ]
ret i32 %152
}