#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 g_popup_radiobox(int, char *, char *, int, char **, int);
int psnd_popup_select_array(int win_id, int select, char *title, char *subtitle,
                            int icomplex) {
  char *list[] = {"Real",   "Imaginary", "Buffer A", "Buffer B",
                  "Window", "Baseline",  "Real+Imag"};
  int item_count;
  if (icomplex)
    item_count = 7;
  else
    item_count = 6;
  return g_popup_radiobox(win_id, title, subtitle, item_count, list, select);
}


x86 assembly (clang, -O0):
<psnd_popup_select_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
lea    -0x60(%rbp),%rdi
lea    0x2c9b(%rip),%rsi
mov    $0x38,%edx
call   1030 <memcpy@plt>
cmpl   $0x0,-0x1c(%rbp)
je     1165 <psnd_popup_select_array+0x45>
movl   $0x7,-0x64(%rbp)
jmp    116c <psnd_popup_select_array+0x4c>
movl   $0x6,-0x64(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x64(%rbp),%ecx
lea    -0x60(%rbp),%r8
mov    -0x8(%rbp),%r9d
call   1040 <g_popup_radiobox@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psnd_popup_select_array>:
sub    $0x38,%rsp
mov    %esi,%r9d
mov    0x2cf2(%rip),%rax
mov    %rax,0x30(%rsp)
movaps 0x2cd6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cba(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c9e(%rip),%xmm0
movaps %xmm0,(%rsp)
cmp    $0x1,%r8d
mov    $0x7,%eax
sbb    $0x0,%eax
mov    %rsp,%r8
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %eax,%ecx
call   1030 <g_popup_radiobox@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Real\00"
@.str.1 = [10 x i8] c"Imaginary\00"
@.str.2 = [9 x i8] c"Buffer A\00"
@.str.3 = [9 x i8] c"Buffer B\00"
@.str.4 = [7 x i8] c"Window\00"
@.str.5 = [9 x i8] c"Baseline\00"
@.str.6 = [10 x i8] c"Real+Imag\00"
@__const.psnd_popup_select_array.list = [7 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0)]
define i32 @psnd_popup_select_array(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [7 x i8*]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%13 = bitcast [7 x i8*]* %11 to i8*
%14 = load i32, i32* %10
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %5
store i32 7, i32* %12
br label %18
17: ; preds = %5
store i32 6, i32* %12
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %6
%20 = load i8*, i8** %8
%21 = load i8*, i8** %9
%22 = load i32, i32* %12
%23 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 0
%24 = load i32, i32* %7
%25 = call i32 @g_popup_radiobox(i32 %19, i8* %20, i8* %21, i32 %22, i8** %23, i32 %24)
ret i32 %25
}

LLVM IR (-O2):
@.str = [5 x i8] c"Real\00"
@.str.1 = [10 x i8] c"Imaginary\00"
@.str.2 = [9 x i8] c"Buffer A\00"
@.str.3 = [9 x i8] c"Buffer B\00"
@.str.4 = [7 x i8] c"Window\00"
@.str.5 = [9 x i8] c"Baseline\00"
@.str.6 = [10 x i8] c"Real+Imag\00"
@__const.psnd_popup_select_array.list = [7 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0)]
define i32 @psnd_popup_select_array(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [7 x i8*]
%7 = bitcast [7 x i8*]* %6 to i8*
%8 = icmp eq i32 %4, 0
%9 = select i1 %8, i32 6, i32 7
%10 = getelementptr inbounds [7 x i8*], [7 x i8*]* %6, i64 0, i64 0
%11 = call i32 @g_popup_radiobox(i32 %0, i8* %2, i8* %3, i32 %9, i8** %10, i32 %1)
ret i32 %11
}