#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 hermite(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  int x = 0;
  printf("Please enter two number.I will use  Hermite Polynomials figure it "
         "out....^_^\n\n");
  printf("\nPlease enter the number of n \n");
  while (!scanf("%d", &n)) {
    printf("The data you entered is wrong ,please enter again !");
  }
  printf("\nPlease enter the number of x \n");
  while (!scanf("%d", &x)) {
    printf("The data you entered is wrong ,please enter again !");
  }
  printf("The number after Hermite Polynomials is :%d\n\n", hermite(n, x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    118e <main+0x5e>
jmp    11a1 <main+0x71>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1169 <main+0x39>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11d4 <main+0xa4>
jmp    11e7 <main+0xb7>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11af <main+0x7f>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <hermite@plt>
mov    %eax,%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf47(%rip),%rdi
call   1030 <puts@plt>
lea    0xe88(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
test   %eax,%eax
jne    11b9 <main+0x79>
lea    0xe76(%rip),%r14
lea    0xe6c(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
test   %eax,%eax
je     11a0 <main+0x60>
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
lea    0xe34(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
test   %eax,%eax
jne    1209 <main+0xc9>
lea    0xe22(%rip),%r14
lea    0xe18(%rip),%r15
lea    0x8(%rsp),%rbx
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
test   %eax,%eax
je     11f0 <main+0xb0>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1050 <hermite@plt>
lea    0xe1a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [79 x i8] c"Please enter two number.I will use Hermite Polynomials figure it out....^_^\0A\0A\00"
@.str.1 = [32 x i8] c"\0APlease enter the number of n \0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [52 x i8] c"The data you entered is wrong ,please enter again !\00"
@.str.4 = [32 x i8] c"\0APlease enter the number of x \0A\00"
@.str.5 = [46 x i8] c"The number after Hermite Polynomials is :%d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %10, %0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
br label %6
12: ; preds = %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
br label %14
14: ; preds = %18, %12
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
br label %14
20: ; preds = %14
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = call i32 @hermite(i32 %21, i32 %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [52 x i8] c"The data you entered is wrong ,please enter again !\00"
@.str.5 = [46 x i8] c"The number after Hermite Polynomials is :%d\0A\0A\00"
@str = [78 x i8] c"Please enter two number.I will use Hermite Polynomials figure it out....^_^\0A\00"
@str.6 = [31 x i8] c"\0APlease enter the number of n \00"
@str.7 = [31 x i8] c"\0APlease enter the number of x \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.6, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %0, %9
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%12 = icmp eq i32 %11, 0
br i1 %12, label %9, label %13
13: ; preds = %9, %0
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.7, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %13, %17
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%20 = icmp eq i32 %19, 0
br i1 %20, label %17, label %21
21: ; preds = %17, %13
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = call i32 @hermite(i32 %22, i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i32 %24)
ret i32 0
}