#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 */
struct mpstr {
  int dummy;
};
struct StaticData {
  int dummy;
};

/* Variables and functions */
int synth_1to1(struct StaticData *, struct mpstr *, float *, int /*<<< orphan*/,
               unsigned char *, int *);
int synth_1to1_mono(struct StaticData *psd, struct mpstr *gmp, float *bandPtr,
                    unsigned char *samples, int *pnt) {
  short samples_tmp[64];
  short *tmp1 = samples_tmp;
  int i, ret;
  int pnt1 = 0;
  ret = synth_1to1(psd, gmp, 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    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0xb0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
movl   $0x0,-0xc4(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0xb0(%rbp),%r8
xor    %ecx,%ecx
lea    -0xc4(%rbp),%r9
call   1030 <synth_1to1@plt>
mov    %eax,-0xc0(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0xbc(%rbp)
cmpl   $0x20,-0xbc(%rbp)
jge    11dc <synth_1to1_mono+0xcc>
mov    -0xb8(%rbp),%rax
mov    (%rax),%cx
mov    -0x20(%rbp),%rax
mov    %cx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0xb8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0xb8(%rbp)
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    118c <synth_1to1_mono+0x7c>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0x40,%ecx
mov    %ecx,(%rax)
mov    -0xc0(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<synth_1to1_mono>:
push   %r14
push   %rbx
sub    $0x98,%rsp
mov    %r8,%r14
mov    %rcx,%rbx
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
xor    %ecx,%ecx
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):
%struct.StaticData = type { i32 }
%struct.mpstr = type { i32 }
define i32 @synth_1to1_mono(%struct.StaticData* %0, %struct.mpstr* %1, float* %2, i8* %3, i32* %4) {
%6 = alloca %struct.StaticData*
%7 = alloca %struct.mpstr*
%8 = alloca float*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca [64 x i16]
%12 = alloca i16*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store %struct.StaticData* %0, %struct.StaticData** %6
store %struct.mpstr* %1, %struct.mpstr** %7
store float* %2, float** %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%16 = getelementptr inbounds [64 x i16], [64 x i16]* %11, i64 0, i64 0
store i16* %16, i16** %12
store i32 0, i32* %15
%17 = load %struct.StaticData*, %struct.StaticData** %6
%18 = load %struct.mpstr*, %struct.mpstr** %7
%19 = load float*, float** %8
%20 = getelementptr inbounds [64 x i16], [64 x i16]* %11, i64 0, i64 0
%21 = bitcast i16* %20 to i8*
%22 = call i32 @synth_1to1(%struct.StaticData* %17, %struct.mpstr* %18, float* %19, i32 0, i8* %21, i32* %15)
store i32 %22, i32* %14
%23 = load i32*, i32** %10
%24 = load i32, i32* %23
%25 = load i8*, i8** %9
%26 = sext i32 %24 to i64
%27 = getelementptr inbounds i8, i8* %25, i64 %26
store i8* %27, i8** %9
store i32 0, i32* %13
br label %28
28: ; preds = %40, %5
%29 = load i32, i32* %13
%30 = icmp slt i32 %29, 32
br i1 %30, label %31, label %43
31: ; preds = %28
%32 = load i16*, i16** %12
%33 = load i16, i16* %32
%34 = load i8*, i8** %9
%35 = bitcast i8* %34 to i16*
store i16 %33, i16* %35
%36 = load i8*, i8** %9
%37 = getelementptr inbounds i8, i8* %36, i64 2
store i8* %37, i8** %9
%38 = load i16*, i16** %12
%39 = getelementptr inbounds i16, i16* %38, i64 2
store i16* %39, i16** %12
br label %40
40: ; preds = %31
%41 = load i32, i32* %13
%42 = add nsw i32 %41, 1
store i32 %42, i32* %13
br label %28
43: ; preds = %28
%44 = load i32*, i32** %10
%45 = load i32, i32* %44
%46 = add nsw i32 %45, 64
store i32 %46, i32* %44
%47 = load i32, i32* %14
ret i32 %47
}

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