#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(double *, int /*<<< orphan*/, unsigned char *, int *);
int synth_1to1_mono2stereo(double *bandPtr, unsigned char *samples, int *pnt) {
  int i, ret;
  ret = synth_1to1(bandPtr, 0, samples, pnt);
  samples = samples + *pnt - 64 * sizeof(short);
  for (i = 0; i < 32; i++) {
    ((short *)samples)[1] = ((short *)samples)[0];
    samples += 2 * sizeof(short);
  }
  return ret;
}


x86 assembly (clang, -O0):
<synth_1to1_mono2stereo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %esi,%esi
call   1030 <synth_1to1@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
add    %rcx,%rax
add    $0xffffffffffffff80,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x20,-0x1c(%rbp)
jge    118a <synth_1to1_mono2stereo+0x7a>
mov    -0x10(%rbp),%rax
mov    (%rax),%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x2(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1157 <synth_1to1_mono2stereo+0x47>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<synth_1to1_mono2stereo>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
xor    %esi,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <synth_1to1@plt>
movslq (%r14),%rcx
movzwl -0x80(%rbx,%rcx,1),%edx
movzwl -0x7c(%rbx,%rcx,1),%esi
mov    %dx,-0x7e(%rbx,%rcx,1)
mov    %si,-0x7a(%rbx,%rcx,1)
movzwl -0x78(%rbx,%rcx,1),%edx
mov    %dx,-0x76(%rbx,%rcx,1)
movzwl -0x74(%rbx,%rcx,1),%edx
mov    %dx,-0x72(%rbx,%rcx,1)
movzwl -0x70(%rbx,%rcx,1),%edx
mov    %dx,-0x6e(%rbx,%rcx,1)
movzwl -0x6c(%rbx,%rcx,1),%edx
mov    %dx,-0x6a(%rbx,%rcx,1)
movzwl -0x68(%rbx,%rcx,1),%edx
mov    %dx,-0x66(%rbx,%rcx,1)
movzwl -0x64(%rbx,%rcx,1),%edx
mov    %dx,-0x62(%rbx,%rcx,1)
movzwl -0x60(%rbx,%rcx,1),%edx
mov    %dx,-0x5e(%rbx,%rcx,1)
movzwl -0x5c(%rbx,%rcx,1),%edx
movzwl -0x58(%rbx,%rcx,1),%esi
mov    %dx,-0x5a(%rbx,%rcx,1)
mov    %si,-0x56(%rbx,%rcx,1)
movzwl -0x54(%rbx,%rcx,1),%edx
mov    %dx,-0x52(%rbx,%rcx,1)
movzwl -0x50(%rbx,%rcx,1),%edx
mov    %dx,-0x4e(%rbx,%rcx,1)
movzwl -0x4c(%rbx,%rcx,1),%edx
mov    %dx,-0x4a(%rbx,%rcx,1)
movzwl -0x48(%rbx,%rcx,1),%edx
mov    %dx,-0x46(%rbx,%rcx,1)
movzwl -0x44(%rbx,%rcx,1),%edx
mov    %dx,-0x42(%rbx,%rcx,1)
movzwl -0x40(%rbx,%rcx,1),%edx
mov    %dx,-0x3e(%rbx,%rcx,1)
movzwl -0x3c(%rbx,%rcx,1),%edx
mov    %dx,-0x3a(%rbx,%rcx,1)
movzwl -0x38(%rbx,%rcx,1),%edx
mov    %dx,-0x36(%rbx,%rcx,1)
movzwl -0x34(%rbx,%rcx,1),%edx
mov    %dx,-0x32(%rbx,%rcx,1)
movzwl -0x30(%rbx,%rcx,1),%edx
mov    %dx,-0x2e(%rbx,%rcx,1)
movzwl -0x2c(%rbx,%rcx,1),%edx
mov    %dx,-0x2a(%rbx,%rcx,1)
movzwl -0x28(%rbx,%rcx,1),%edx
mov    %dx,-0x26(%rbx,%rcx,1)
movzwl -0x24(%rbx,%rcx,1),%edx
mov    %dx,-0x22(%rbx,%rcx,1)
movzwl -0x20(%rbx,%rcx,1),%edx
mov    %dx,-0x1e(%rbx,%rcx,1)
movzwl -0x1c(%rbx,%rcx,1),%edx
mov    %dx,-0x1a(%rbx,%rcx,1)
movzwl -0x18(%rbx,%rcx,1),%edx
mov    %dx,-0x16(%rbx,%rcx,1)
movzwl -0x14(%rbx,%rcx,1),%edx
mov    %dx,-0x12(%rbx,%rcx,1)
movzwl -0x10(%rbx,%rcx,1),%edx
mov    %dx,-0xe(%rbx,%rcx,1)
movzwl -0xc(%rbx,%rcx,1),%edx
mov    %dx,-0xa(%rbx,%rcx,1)
movzwl -0x8(%rbx,%rcx,1),%edx
mov    %dx,-0x6(%rbx,%rcx,1)
movzwl -0x4(%rbx,%rcx,1),%edx
mov    %dx,-0x2(%rbx,%rcx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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