#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*/ findprime(int *, float);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int arr[100], n, m, p, i, l[100], j;
  float x;
  printf("Enter the no1:\n");
  scanf("%d", &m);
  printf("Enter the no2:\n");
  scanf("%d", &n);
  if (m <= n) {
    x = m;
  } else {
    x = n;
  }
  findprime(arr, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x350,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x1a8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x1a8(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jg     11a7 <main+0x77>
cvtsi2ssl -0x1a8(%rbp),%xmm0
ff
movss  %xmm0,-0x348(%rbp)
ff
jmp    11b7 <main+0x87>
cvtsi2ssl -0x1a4(%rbp),%xmm0
ff
movss  %xmm0,-0x348(%rbp)
ff
lea    -0x1a0(%rbp),%rdi
movss  -0x348(%rbp),%xmm0
ff
call   1040 <findprime@plt>
xor    %eax,%eax
add    $0x350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1a0,%rsp
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
cmovg  %ecx,%eax
cvtsi2ss %eax,%xmm0
lea    0x10(%rsp),%rdi
call   1040 <findprime@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter the no1:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Enter the no2:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [100 x i32]
%8 = alloca i32
%9 = alloca float
store i32 0, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %0
%18 = load i32, i32* %4
%19 = sitofp i32 %18 to float
store float %19, float* %9
br label %23
20: ; preds = %0
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to float
store float %22, float* %9
br label %23
23: ; preds = %20, %17
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%25 = load float, float* %9
%26 = call i32 @findprime(i32* %24, float %25)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [15 x i8] c"Enter the no1:\00"
@str.3 = [15 x i8] c"Enter the no2:\00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [100 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp sgt i32 %11, %12
%14 = select i1 %13, i32 %12, i32 %11
%15 = sitofp i32 %14 to float
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%17 = call i32 @findprime(i32* %16, float %15)
ret i32 0
}