#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 synth_1to1(void *, double *, int /*<<< orphan*/, unsigned char *, int *);
int synth_1to1_mono(void *mp, double *bandPtr, unsigned char *samples,
                    int *pnt) {
  short samples_tmp[64];
  short *tmp1 = samples_tmp;
  int i, ret;
  int pnt1 = 0;
  ret = synth_1to1(mp, bandPtr, 0, (unsigned char *)samples_tmp, &pnt1);
  samples += *pnt;
  for (i = 0; i < 32; i++) {
    *((short *)samples) = *tmp1;
    samples += 2;
    tmp1 += 2;
  }
  *pnt += 64;
  return ret;
}


x86 assembly (clang, -O0):
<synth_1to1_mono>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0xa0(%rbp),%rax
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0xa0(%rbp),%rcx
xor    %edx,%edx
lea    -0xb4(%rbp),%r8
call   1030 <synth_1to1@plt>
mov    %eax,-0xb0(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xac(%rbp)
cmpl   $0x20,-0xac(%rbp)
jge    11d4 <synth_1to1_mono+0xc4>
mov    -0xa8(%rbp),%rax
mov    (%rax),%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0xa8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0xa8(%rbp)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    1184 <synth_1to1_mono+0x74>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x40,%ecx
mov    %ecx,(%rax)
mov    -0xb0(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<synth_1to1_mono>:
push   %r14
push   %rbx
sub    $0x98,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
xor    %edx,%edx
call   1030 <synth_1to1@plt>
movslq (%r14),%rcx
movzwl 0x10(%rsp),%edx
mov    %dx,(%rbx,%rcx,1)
movzwl 0x14(%rsp),%edx
mov    %dx,0x2(%rbx,%rcx,1)
movzwl 0x18(%rsp),%edx
mov    %dx,0x4(%rbx,%rcx,1)
movzwl 0x1c(%rsp),%edx
mov    %dx,0x6(%rbx,%rcx,1)
movzwl 0x20(%rsp),%edx
mov    %dx,0x8(%rbx,%rcx,1)
movzwl 0x24(%rsp),%edx
mov    %dx,0xa(%rbx,%rcx,1)
movzwl 0x28(%rsp),%edx
mov    %dx,0xc(%rbx,%rcx,1)
movzwl 0x2c(%rsp),%edx
mov    %dx,0xe(%rbx,%rcx,1)
movzwl 0x30(%rsp),%edx
mov    %dx,0x10(%rbx,%rcx,1)
movzwl 0x34(%rsp),%edx
mov    %dx,0x12(%rbx,%rcx,1)
movzwl 0x38(%rsp),%edx
mov    %dx,0x14(%rbx,%rcx,1)
movzwl 0x3c(%rsp),%edx
mov    %dx,0x16(%rbx,%rcx,1)
movzwl 0x40(%rsp),%edx
mov    %dx,0x18(%rbx,%rcx,1)
movzwl 0x44(%rsp),%edx
mov    %dx,0x1a(%rbx,%rcx,1)
movzwl 0x48(%rsp),%edx
mov    %dx,0x1c(%rbx,%rcx,1)
movzwl 0x4c(%rsp),%edx
mov    %dx,0x1e(%rbx,%rcx,1)
movzwl 0x50(%rsp),%edx
mov    %dx,0x20(%rbx,%rcx,1)
movzwl 0x54(%rsp),%edx
mov    %dx,0x22(%rbx,%rcx,1)
movzwl 0x58(%rsp),%edx
mov    %dx,0x24(%rbx,%rcx,1)
movzwl 0x5c(%rsp),%edx
mov    %dx,0x26(%rbx,%rcx,1)
movzwl 0x60(%rsp),%edx
mov    %dx,0x28(%rbx,%rcx,1)
movzwl 0x64(%rsp),%edx
mov    %dx,0x2a(%rbx,%rcx,1)
movzwl 0x68(%rsp),%edx
mov    %dx,0x2c(%rbx,%rcx,1)
movzwl 0x6c(%rsp),%edx
mov    %dx,0x2e(%rbx,%rcx,1)
movzwl 0x70(%rsp),%edx
mov    %dx,0x30(%rbx,%rcx,1)
movzwl 0x74(%rsp),%edx
mov    %dx,0x32(%rbx,%rcx,1)
movzwl 0x78(%rsp),%edx
mov    %dx,0x34(%rbx,%rcx,1)
movzwl 0x7c(%rsp),%edx
mov    %dx,0x36(%rbx,%rcx,1)
movzwl 0x80(%rsp),%edx
mov    %dx,0x38(%rbx,%rcx,1)
movzwl 0x84(%rsp),%edx
mov    %dx,0x3a(%rbx,%rcx,1)
movzwl 0x88(%rsp),%edx
mov    %dx,0x3c(%rbx,%rcx,1)
movzwl 0x8c(%rsp),%edx
mov    %dx,0x3e(%rbx,%rcx,1)
add    $0x40,%ecx
mov    %ecx,(%r14)
add    $0x98,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @synth_1to1_mono(i8* %0, double* %1, i8* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca double*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca [64 x i16]
%10 = alloca i16*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %5
store double* %1, double** %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%14 = getelementptr inbounds [64 x i16], [64 x i16]* %9, i64 0, i64 0
store i16* %14, i16** %10
store i32 0, i32* %13
%15 = load i8*, i8** %5
%16 = load double*, double** %6
%17 = getelementptr inbounds [64 x i16], [64 x i16]* %9, i64 0, i64 0
%18 = bitcast i16* %17 to i8*
%19 = call i32 @synth_1to1(i8* %15, double* %16, i32 0, i8* %18, i32* %13)
store i32 %19, i32* %12
%20 = load i32*, i32** %8
%21 = load i32, i32* %20
%22 = load i8*, i8** %7
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds i8, i8* %22, i64 %23
store i8* %24, i8** %7
store i32 0, i32* %11
br label %25
25: ; preds = %37, %4
%26 = load i32, i32* %11
%27 = icmp slt i32 %26, 32
br i1 %27, label %28, label %40
28: ; preds = %25
%29 = load i16*, i16** %10
%30 = load i16, i16* %29
%31 = load i8*, i8** %7
%32 = bitcast i8* %31 to i16*
store i16 %30, i16* %32
%33 = load i8*, i8** %7
%34 = getelementptr inbounds i8, i8* %33, i64 2
store i8* %34, i8** %7
%35 = load i16*, i16** %10
%36 = getelementptr inbounds i16, i16* %35, i64 2
store i16* %36, i16** %10
br label %37
37: ; preds = %28
%38 = load i32, i32* %11
%39 = add nsw i32 %38, 1
store i32 %39, i32* %11
br label %25
40: ; preds = %25
%41 = load i32*, i32** %8
%42 = load i32, i32* %41
%43 = add nsw i32 %42, 64
store i32 %43, i32* %41
%44 = load i32, i32* %12
ret i32 %44
}

LLVM IR (-O2):
define i32 @synth_1to1_mono(i8* %0, double* %1, i8* nocapture writeonly %2, i32* nocapture %3) {
%5 = alloca [64 x i16]
%6 = alloca i32
%7 = bitcast [64 x i16]* %5 to i8*
%8 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 0
%9 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%10 = call i32 @synth_1to1(i8* %0, double* %1, i32 0, i8* %7, i32* %6)
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %2, i64 %12
%14 = load i16, i16* %8
%15 = bitcast i8* %13 to i16*
store i16 %14, i16* %15
%16 = getelementptr inbounds i8, i8* %13, i64 2
%17 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 2
%18 = load i16, i16* %17
%19 = bitcast i8* %16 to i16*
store i16 %18, i16* %19
%20 = getelementptr inbounds i8, i8* %16, i64 2
%21 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 4
%22 = load i16, i16* %21
%23 = bitcast i8* %20 to i16*
store i16 %22, i16* %23
%24 = getelementptr inbounds i8, i8* %20, i64 2
%25 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 6
%26 = load i16, i16* %25
%27 = bitcast i8* %24 to i16*
store i16 %26, i16* %27
%28 = getelementptr inbounds i8, i8* %24, i64 2
%29 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 8
%30 = load i16, i16* %29
%31 = bitcast i8* %28 to i16*
store i16 %30, i16* %31
%32 = getelementptr inbounds i8, i8* %28, i64 2
%33 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 10
%34 = load i16, i16* %33
%35 = bitcast i8* %32 to i16*
store i16 %34, i16* %35
%36 = getelementptr inbounds i8, i8* %32, i64 2
%37 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 12
%38 = load i16, i16* %37
%39 = bitcast i8* %36 to i16*
store i16 %38, i16* %39
%40 = getelementptr inbounds i8, i8* %36, i64 2
%41 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 14
%42 = load i16, i16* %41
%43 = bitcast i8* %40 to i16*
store i16 %42, i16* %43
%44 = getelementptr inbounds i8, i8* %40, i64 2
%45 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 16
%46 = load i16, i16* %45
%47 = bitcast i8* %44 to i16*
store i16 %46, i16* %47
%48 = getelementptr inbounds i8, i8* %44, i64 2
%49 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 18
%50 = load i16, i16* %49
%51 = bitcast i8* %48 to i16*
store i16 %50, i16* %51
%52 = getelementptr inbounds i8, i8* %48, i64 2
%53 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 20
%54 = load i16, i16* %53
%55 = bitcast i8* %52 to i16*
store i16 %54, i16* %55
%56 = getelementptr inbounds i8, i8* %52, i64 2
%57 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 22
%58 = load i16, i16* %57
%59 = bitcast i8* %56 to i16*
store i16 %58, i16* %59
%60 = getelementptr inbounds i8, i8* %56, i64 2
%61 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 24
%62 = load i16, i16* %61
%63 = bitcast i8* %60 to i16*
store i16 %62, i16* %63
%64 = getelementptr inbounds i8, i8* %60, i64 2
%65 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 26
%66 = load i16, i16* %65
%67 = bitcast i8* %64 to i16*
store i16 %66, i16* %67
%68 = getelementptr inbounds i8, i8* %64, i64 2
%69 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 28
%70 = load i16, i16* %69
%71 = bitcast i8* %68 to i16*
store i16 %70, i16* %71
%72 = getelementptr inbounds i8, i8* %68, i64 2
%73 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 30
%74 = load i16, i16* %73
%75 = bitcast i8* %72 to i16*
store i16 %74, i16* %75
%76 = getelementptr inbounds i8, i8* %72, i64 2
%77 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 32
%78 = load i16, i16* %77
%79 = bitcast i8* %76 to i16*
store i16 %78, i16* %79
%80 = getelementptr inbounds i8, i8* %76, i64 2
%81 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 34
%82 = load i16, i16* %81
%83 = bitcast i8* %80 to i16*
store i16 %82, i16* %83
%84 = getelementptr inbounds i8, i8* %80, i64 2
%85 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 36
%86 = load i16, i16* %85
%87 = bitcast i8* %84 to i16*
store i16 %86, i16* %87
%88 = getelementptr inbounds i8, i8* %84, i64 2
%89 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 38
%90 = load i16, i16* %89
%91 = bitcast i8* %88 to i16*
store i16 %90, i16* %91
%92 = getelementptr inbounds i8, i8* %88, i64 2
%93 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 40
%94 = load i16, i16* %93
%95 = bitcast i8* %92 to i16*
store i16 %94, i16* %95
%96 = getelementptr inbounds i8, i8* %92, i64 2
%97 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 42
%98 = load i16, i16* %97
%99 = bitcast i8* %96 to i16*
store i16 %98, i16* %99
%100 = getelementptr inbounds i8, i8* %96, i64 2
%101 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 44
%102 = load i16, i16* %101
%103 = bitcast i8* %100 to i16*
store i16 %102, i16* %103
%104 = getelementptr inbounds i8, i8* %100, i64 2
%105 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 46
%106 = load i16, i16* %105
%107 = bitcast i8* %104 to i16*
store i16 %106, i16* %107
%108 = getelementptr inbounds i8, i8* %104, i64 2
%109 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 48
%110 = load i16, i16* %109
%111 = bitcast i8* %108 to i16*
store i16 %110, i16* %111
%112 = getelementptr inbounds i8, i8* %108, i64 2
%113 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 50
%114 = load i16, i16* %113
%115 = bitcast i8* %112 to i16*
store i16 %114, i16* %115
%116 = getelementptr inbounds i8, i8* %112, i64 2
%117 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 52
%118 = load i16, i16* %117
%119 = bitcast i8* %116 to i16*
store i16 %118, i16* %119
%120 = getelementptr inbounds i8, i8* %116, i64 2
%121 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 54
%122 = load i16, i16* %121
%123 = bitcast i8* %120 to i16*
store i16 %122, i16* %123
%124 = getelementptr inbounds i8, i8* %120, i64 2
%125 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 56
%126 = load i16, i16* %125
%127 = bitcast i8* %124 to i16*
store i16 %126, i16* %127
%128 = getelementptr inbounds i8, i8* %124, i64 2
%129 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 58
%130 = load i16, i16* %129
%131 = bitcast i8* %128 to i16*
store i16 %130, i16* %131
%132 = getelementptr inbounds i8, i8* %128, i64 2
%133 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 60
%134 = load i16, i16* %133
%135 = bitcast i8* %132 to i16*
store i16 %134, i16* %135
%136 = getelementptr inbounds i8, i8* %132, i64 2
%137 = getelementptr inbounds [64 x i16], [64 x i16]* %5, i64 0, i64 62
%138 = load i16, i16* %137
%139 = bitcast i8* %136 to i16*
store i16 %138, i16* %139
%140 = add nsw i32 %11, 64
store i32 %140, i32* %3
ret i32 %10
}