#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*/ get_cordinates_change(float *, float *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  float row[250], colum[250];
  int drums, counter;
  printf("Enter the number of drums: \n");
  scanf("%d", &drums);
  printf("Enter the row on which is PAC-MENKA: \n");
  scanf("%f", &row[0]);
  printf("Enter the colum on which is PAC-MENKA: \n");
  scanf("%f", &colum[0]);
  for (counter = 1; counter <= drums; counter++) {
    printf("Enter row for %d drum: \n", counter);
    scanf("%f", &row[counter]);
    printf("Enter colum for %d drum: \n", counter);
    scanf("%f", &colum[counter]);
  }
  get_cordinates_change(row, colum, drums);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x7e4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x7e0(%rbp),%rsi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x7e8(%rbp)
mov    -0x7e8(%rbp),%eax
cmp    -0x7e4(%rbp),%eax
jg     1249 <main+0x119>
mov    -0x7e8(%rbp),%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x7e8(%rbp),%rax
lea    -0x3f0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x7e8(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x7e8(%rbp),%rax
lea    -0x7e0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x7e8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7e8(%rbp)
jmp    11b5 <main+0x85>
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
mov    -0x7e4(%rbp),%edx
call   1050 <get_cordinates_change@plt>
xor    %eax,%eax
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7e8,%rsp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9c(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xe80(%rip),%rbx
lea    0x400(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%edx
test   %edx,%edx
jle    1228 <main+0xe8>
lea    0x14(%rsp),%r14
lea    0x404(%rsp),%rbx
lea    0xe3a(%rip),%r15
lea    0xe30(%rip),%r12
lea    0xe45(%rip),%r13
xor    %ebp,%ebp
nopl   0x0(%rax)
add    $0x1,%rbp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movslq 0xc(%rsp),%rdx
add    $0x4,%r14
add    $0x4,%rbx
cmp    %rdx,%rbp
jl     11e0 <main+0xa0>
lea    0x400(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1060 <get_cordinates_change@plt>
xor    %eax,%eax
add    $0x7e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter the number of drums: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"Enter the row on which is PAC-MENKA: \0A\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [41 x i8] c"Enter the colum on which is PAC-MENKA: \0A\00"
@.str.5 = [25 x i8] c"Enter row for %d drum: \0A\00"
@.str.6 = [27 x i8] c"Enter colum for %d drum: \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [250 x float]
%3 = alloca [250 x float]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [250 x float], [250 x float]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%12 = getelementptr inbounds [250 x float], [250 x float]* %3, i64 0, i64 0
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %12)
store i32 1, i32* %5
br label %14
14: ; preds = %31, %0
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %34
18: ; preds = %14
%19 = load i32, i32* %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [250 x float], [250 x float]* %2, i64 0, i64 %22
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %23)
%25 = load i32, i32* %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [250 x float], [250 x float]* %3, i64 0, i64 %28
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %29)
br label %31
31: ; preds = %18
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %14
34: ; preds = %14
%35 = getelementptr inbounds [250 x float], [250 x float]* %2, i64 0, i64 0
%36 = getelementptr inbounds [250 x float], [250 x float]* %3, i64 0, i64 0
%37 = load i32, i32* %4
%38 = call i32 @get_cordinates_change(float* %35, float* %36, i32 %37)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.5 = [25 x i8] c"Enter row for %d drum: \0A\00"
@.str.6 = [27 x i8] c"Enter colum for %d drum: \0A\00"
@str = [28 x i8] c"Enter the number of drums: \00"
@str.7 = [38 x i8] c"Enter the row on which is PAC-MENKA: \00"
@str.8 = [40 x i8] c"Enter the colum on which is PAC-MENKA: \00"
define i32 @main() {
%1 = alloca [250 x float]
%2 = alloca [250 x float]
%3 = alloca i32
%4 = bitcast [250 x float]* %1 to i8*
%5 = bitcast [250 x float]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @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 ([38 x i8], [38 x i8]* @str.7, i64 0, i64 0))
%10 = getelementptr inbounds [250 x float], [250 x float]* %1, i64 0, i64 0
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.8, i64 0, i64 0))
%13 = getelementptr inbounds [250 x float], [250 x float]* %2, i64 0, i64 0
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %13)
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 1
br i1 %16, label %30, label %17
17: ; preds = %0, %17
%18 = phi i64 [ %26, %17 ], [ 1, %0 ]
%19 = trunc i64 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds [250 x float], [250 x float]* %1, i64 0, i64 %18
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%24 = getelementptr inbounds [250 x float], [250 x float]* %2, i64 0, i64 %18
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %24)
%26 = add nuw nsw i64 %18, 1
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = icmp slt i64 %18, %28
br i1 %29, label %17, label %30
30: ; preds = %17, %0
%31 = phi i32 [ %15, %0 ], [ %27, %17 ]
%32 = call i32 @get_cordinates_change(float* %10, float* %13, i32 %31)
ret i32 0
}