#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int padcon_prompt_for_multi_homogenization(int nvr) {
  int choice;
  printf("\n");
  printf("MENU for affine, homogeneous or multi-homogeneous coordinates :\n");
  printf("  0 : in affine coordinates, in the original variables;\n");
  printf("  1 : in 1-homogeous coordinates, in projective space;\n");
  printf("  2 or higher : in multi-homogeous coordinates, in a multi-\n");
  printf("  projective space defined by a partition of the variables.\n");
  printf("Type a number between 0 and %d : ", nvr);
  scanf("%d", &choice);
  return choice;
}


x86 assembly (clang, -O0):
<padcon_prompt_for_multi_homogenization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xfbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xfa3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_prompt_for_multi_homogenization>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    0xf01(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf58(%rip),%rdi
call   1040 <puts@plt>
lea    0xf88(%rip),%rdi
call   1040 <puts@plt>
lea    0xe6c(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe7e(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [65 x i8] c"MENU for affine, homogeneous or multi-homogeneous coordinates :\0A\00"
@.str.2 = [57 x i8] c" 0 : in affine coordinates, in the original variables;\0A\00"
@.str.3 = [56 x i8] c" 1 : in 1-homogeous coordinates, in projective space;\0A\00"
@.str.4 = [61 x i8] c" 2 or higher : in multi-homogeous coordinates, in a multi-\0A\00"
@.str.5 = [61 x i8] c" projective space defined by a partition of the variables.\0A\00"
@.str.6 = [34 x i8] c"Type a number between 0 and %d : \00"
@.str.7 = [3 x i8] c"%d\00"
define i32 @padcon_prompt_for_multi_homogenization(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str.6 = [34 x i8] c"Type a number between 0 and %d : \00"
@.str.7 = [3 x i8] c"%d\00"
@str = [64 x i8] c"MENU for affine, homogeneous or multi-homogeneous coordinates :\00"
@str.8 = [56 x i8] c" 0 : in affine coordinates, in the original variables;\00"
@str.9 = [55 x i8] c" 1 : in 1-homogeous coordinates, in projective space;\00"
@str.10 = [60 x i8] c" 2 or higher : in multi-homogeous coordinates, in a multi-\00"
@str.11 = [60 x i8] c" projective space defined by a partition of the variables.\00"
define i32 @padcon_prompt_for_multi_homogenization(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.8, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.9, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.10, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.11, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %0)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
ret i32 %12
}