#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 /*<<< orphan*/ create_float_dialog_entry(char *, float *);
int /*<<< orphan*/ create_int_dialog_entry(char *, int *);
int /*<<< orphan*/ printf(char *, int, float);
int /*<<< orphan*/ read_dialog_window();
int /*<<< orphan*/ set_up_dialog(char *, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
main() {
  int n = 0;
  float x = 0.0;
  create_int_dialog_entry("n", &n);
  create_float_dialog_entry("x", &x);
  set_up_dialog("Setup", 0, 0);
  read_dialog_window();
  printf("n = %d, x = %f\n", n, x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xe92(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <create_int_dialog_entry@plt>
lea    0xe84(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <create_float_dialog_entry@plt>
lea    0xe76(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1070 <set_up_dialog@plt>
mov    $0x0,%al
call   1060 <read_dialog_window@plt>
mov    -0x4(%rbp),%esi
movss  -0x8(%rbp),%xmm0
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xe99(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <create_int_dialog_entry@plt>
lea    0xe8a(%rip),%rdi
mov    %rsp,%rsi
call   1050 <create_float_dialog_entry@plt>
lea    0xe7d(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <set_up_dialog@plt>
xor    %eax,%eax
call   1060 <read_dialog_window@plt>
mov    0x4(%rsp),%esi
movss  (%rsp),%xmm0
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"n\00"
@.str.1 = [2 x i8] c"x\00"
@.str.2 = [6 x i8] c"Setup\00"
@.str.3 = [16 x i8] c"n = %d, x = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
%3 = call i32 @create_int_dialog_entry(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @create_float_dialog_entry(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = call i32 @set_up_dialog(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%6 = call i32 (...) @read_dialog_window()
%7 = load i32, i32* %1
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %7, float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"n\00"
@.str.1 = [2 x i8] c"x\00"
@.str.2 = [6 x i8] c"Setup\00"
@.str.3 = [16 x i8] c"n = %d, x = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%5 = call i32 @create_int_dialog_entry(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @create_float_dialog_entry(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), float* %2)
%7 = call i32 @set_up_dialog(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%8 = call i32 (...) @read_dialog_window()
%9 = load i32, i32* %1
%10 = load float, float* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %9, float %10)
ret i32 0
}