#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*/ getch();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  printf("Arithmetic Progressions\n");
  printf("\nMenu: \n");
  printf("\n  [Operation]                            [Code]\n"
         "\n Find nth term (General term)             1"
         "\n Find sum of 'n' terms (Sn)               2"
         "\n Find 'a' (first term)                    3"
         "\n Enter your choice: ");
  int menuChoice;
  scanf("%i", &menuChoice);
  while (menuChoice < 1 || menuChoice > 3) {
    printf("\n Invalid Choice!\n"
           " Please enter your choice properly again: ");
    scanf("%i", &menuChoice);
  }
  switch (menuChoice) {
  case 1: {
    int a, n, d, an;
    printf("\n\n [*** Finding nth term (General term) ***]\n"
           "\n Enter the value of 'a': ");
    scanf("%i", &a);
    printf("\n Enter the value of 'n': ");
    scanf("%i", &n);
    printf("\n Enter the value of 'd': ");
    scanf("%i", &d);
    an = a + ((n - 1) * d);
    printf("\n The nth term is %i", an);
  } break;
  case 2: {
    int a, n, d, sn;
    printf("\n\n [*** Finding sum of 'n' terms (Sn) ***]\n"
           "\n Enter the value of 'a': ");
    scanf("%i", &a);
    printf("\n Enter the value of 'n': ");
    scanf("%i", &n);
    printf("\n Enter the value of 'd': ");
    scanf("%i", &d);
    sn = (n / 2) * (2 * a + ((n - 1) * d));
    printf("\n The sum of 'n' terms is: %i ", sn);
  } break;
  case 3: {
    int an, n, d, a;
    printf("\n\n [*** Finding 'a' (first term) ***]\n"
           "\n Enter the value of nth term: ");
    scanf("%i", &an);
    printf("\n Enter the value of 'n': ");
    scanf("%i", &n);
    printf("\n Enter the value of 'd': ");
    scanf("%i", &d);
    a = an - ((n - 1) * d);
    printf("\n First term ('a') is: %i ", a);
  } break;
  }
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x39(%rbp)
jl     1192 <main+0x62>
cmpl   $0x3,-0x8(%rbp)
setg   %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    11a2 <main+0x72>
jmp    11c5 <main+0x95>
lea    0xf44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1003(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1179 <main+0x49>
mov    -0x8(%rbp),%eax
mov    %eax,-0x40(%rbp)
sub    $0x1,%eax
je     11fb <main+0xcb>
jmp    11d9 <main+0xa9>
mov    -0x40(%rbp),%eax
sub    $0x2,%eax
je     127d <main+0x14d>
jmp    11ea <main+0xba>
mov    -0x40(%rbp),%eax
sub    $0x3,%eax
je     1310 <main+0x1e0>
jmp    138d <main+0x25d>
lea    0xf28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8c(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6e(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    138d <main+0x25d>
lea    0xf39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
imul   -0x24(%rbp),%edx
add    %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    138d <main+0x25d>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe77(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe59(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x2c(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x34(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%esi
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0x1111(%rip),%rdi
call   1030 <puts@plt>
lea    0x111d(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1022(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x4(%rax),%ecx
cmp    $0xfffffffc,%ecx
ja     11c1 <main+0x81>
lea    0xf38(%rip),%r14
lea    0xffe(%rip),%r15
lea    0xc(%rsp),%rbx
nop
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x4(%rax),%ecx
cmp    $0xfffffffd,%ecx
jb     11a0 <main+0x60>
cmp    $0x3,%eax
je     124d <main+0x10d>
cmp    $0x2,%eax
je     12bd <main+0x17d>
cmp    $0x1,%eax
jne    133f <main+0x1ff>
lea    0xf25(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfa7(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
add    $0xffffffff,%esi
imul   (%rsp),%esi
add    0x8(%rsp),%esi
lea    0xf3e(%rip),%rdi
jmp    1338 <main+0x1f8>
lea    0xfac(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf36(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
imul   (%rsp),%eax
sub    %eax,%esi
lea    0xf8b(%rip),%rdi
jmp    1338 <main+0x1f8>
lea    0xed7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    0x8(%rsp),%edx
add    $0xffffffff,%eax
imul   (%rsp),%eax
lea    (%rax,%rdx,2),%esi
imul   %ecx,%esi
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Arithmetic Progressions\0A\00"
@.str.1 = [9 x i8] c"\0AMenu: \0A\00"
@.str.2 = [203 x i8] c"\0A [Operation] [Code]\0A\0A Find nth term (General term) 1\0A Find sum of 'n' terms (Sn) 2\0A Find 'a' (first term) 3\0A Enter your choice: \00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [61 x i8] c"\0A Invalid Choice!\0A Please enter your choice properly again: \00"
@.str.5 = [72 x i8] c"\0A\0A [*** Finding nth term (General term) ***]\0A\0A Enter the value of 'a': \00"
@.str.6 = [27 x i8] c"\0A Enter the value of 'n': \00"
@.str.7 = [27 x i8] c"\0A Enter the value of 'd': \00"
@.str.8 = [21 x i8] c"\0A The nth term is %i\00"
@.str.9 = [70 x i8] c"\0A\0A [*** Finding sum of 'n' terms (Sn) ***]\0A\0A Enter the value of 'a': \00"
@.str.10 = [31 x i8] c"\0A The sum of 'n' terms is: %i \00"
@.str.11 = [70 x i8] c"\0A\0A [*** Finding 'a' (first term) ***]\0A\0A Enter the value of nth term: \00"
@.str.12 = [27 x i8] c"\0A First term ('a') is: %i \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([203 x i8], [203 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
br label %19
19: ; preds = %27, %0
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 1
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 3
br label %25
25: ; preds = %22, %19
%26 = phi i1 [ true, %19 ], [ %24, %22 ]
br i1 %26, label %27, label %30
27: ; preds = %25
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
br label %19
30: ; preds = %25
%31 = load i32, i32* %2
switch i32 %31, label %81 [
i32 1, label %32
i32 2, label %47
i32 3, label %66
]
32: ; preds = %30
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%39 = load i32, i32* %3
%40 = load i32, i32* %4
%41 = sub nsw i32 %40, 1
%42 = load i32, i32* %5
%43 = mul nsw i32 %41, %42
%44 = add nsw i32 %39, %43
store i32 %44, i32* %6
%45 = load i32, i32* %6
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %45)
br label %81
47: ; preds = %30
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%53 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%54 = load i32, i32* %8
%55 = sdiv i32 %54, 2
%56 = load i32, i32* %7
%57 = mul nsw i32 2, %56
%58 = load i32, i32* %8
%59 = sub nsw i32 %58, 1
%60 = load i32, i32* %9
%61 = mul nsw i32 %59, %60
%62 = add nsw i32 %57, %61
%63 = mul nsw i32 %55, %62
store i32 %63, i32* %10
%64 = load i32, i32* %10
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %64)
br label %81
66: ; preds = %30
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.11, i64 0, i64 0))
%68 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %11)
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%70 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %12)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%72 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %13)
%73 = load i32, i32* %11
%74 = load i32, i32* %12
%75 = sub nsw i32 %74, 1
%76 = load i32, i32* %13
%77 = mul nsw i32 %75, %76
%78 = sub nsw i32 %73, %77
store i32 %78, i32* %14
%79 = load i32, i32* %14
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i32 %79)
br label %81
81: ; preds = %30, %66, %47, %32
%82 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [203 x i8] c"\0A [Operation] [Code]\0A\0A Find nth term (General term) 1\0A Find sum of 'n' terms (Sn) 2\0A Find 'a' (first term) 3\0A Enter your choice: \00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [61 x i8] c"\0A Invalid Choice!\0A Please enter your choice properly again: \00"
@.str.5 = [72 x i8] c"\0A\0A [*** Finding nth term (General term) ***]\0A\0A Enter the value of 'a': \00"
@.str.6 = [27 x i8] c"\0A Enter the value of 'n': \00"
@.str.7 = [27 x i8] c"\0A Enter the value of 'd': \00"
@.str.8 = [21 x i8] c"\0A The nth term is %i\00"
@.str.9 = [70 x i8] c"\0A\0A [*** Finding sum of 'n' terms (Sn) ***]\0A\0A Enter the value of 'a': \00"
@.str.10 = [31 x i8] c"\0A The sum of 'n' terms is: %i \00"
@.str.11 = [70 x i8] c"\0A\0A [*** Finding 'a' (first term) ***]\0A\0A Enter the value of nth term: \00"
@.str.12 = [27 x i8] c"\0A First term ('a') is: %i \00"
@str = [24 x i8] c"Arithmetic Progressions\00"
@str.13 = [8 x i8] c"\0AMenu: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.13, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([203 x i8], [203 x i8]* @.str.2, i64 0, i64 0))
%14 = bitcast i32* %1 to i8*
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%16 = load i32, i32* %1
%17 = add i32 %16, -4
%18 = icmp ult i32 %17, -3
br i1 %18, label %19, label %25
19: ; preds = %0, %19
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%22 = load i32, i32* %1
%23 = add i32 %22, -4
%24 = icmp ult i32 %23, -3
br i1 %24, label %19, label %25
25: ; preds = %19, %0
%26 = phi i32 [ %16, %0 ], [ %22, %19 ]
switch i32 %26, label %81 [
i32 1, label %27
i32 2, label %44
i32 3, label %64
]
27: ; preds = %25
%28 = bitcast i32* %2 to i8*
%29 = bitcast i32* %3 to i8*
%30 = bitcast i32* %4 to i8*
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0))
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%37 = load i32, i32* %2
%38 = load i32, i32* %3
%39 = add nsw i32 %38, -1
%40 = load i32, i32* %4
%41 = mul nsw i32 %39, %40
%42 = add nsw i32 %41, %37
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %42)
br label %81
44: ; preds = %25
%45 = bitcast i32* %5 to i8*
%46 = bitcast i32* %6 to i8*
%47 = bitcast i32* %7 to i8*
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %6)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%53 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%54 = load i32, i32* %6
%55 = sdiv i32 %54, 2
%56 = load i32, i32* %5
%57 = shl nsw i32 %56, 1
%58 = add nsw i32 %54, -1
%59 = load i32, i32* %7
%60 = mul nsw i32 %59, %58
%61 = add nsw i32 %60, %57
%62 = mul nsw i32 %61, %55
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %62)
br label %81
64: ; preds = %25
%65 = bitcast i32* %8 to i8*
%66 = bitcast i32* %9 to i8*
%67 = bitcast i32* %10 to i8*
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.11, i64 0, i64 0))
%69 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%71 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%73 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %10)
%74 = load i32, i32* %8
%75 = load i32, i32* %9
%76 = add nsw i32 %75, -1
%77 = load i32, i32* %10
%78 = mul nsw i32 %76, %77
%79 = sub nsw i32 %74, %78
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i32 %79)
br label %81
81: ; preds = %25, %64, %44, %27
%82 = call i32 (...) @getch()
ret i32 0
}