#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 *, ...);
extern void RigidBody(double *Angle, double *xShift, double *yShift,
                      double *xOrigin, double *yOrigin, long *Degree,
                      int *Masking) {
  printf("Give the image origin of the x-axis:\n");
  printf("--> ");
  scanf("%lf", xOrigin);
  printf("Give the image origin of the y-axis:\n");
  printf("--> ");
  scanf("%lf", yOrigin);
  printf("Give the counter-clockwise image rotation angle in degrees:\n");
  printf("--> ");
  scanf("%lf", Angle);
  printf("Give the image horizontal translation in pixels:\n");
  printf("--> ");
  scanf("%lf", xShift);
  printf("Give the image vertical translation in pixels:\n");
  printf("--> ");
  scanf("%lf", yShift);
  do {
    printf("Do you want to mask out the irrelevant part of the image (0: no; "
           "1: yes)?\n");
    printf("--> ");
    scanf("%ld", Masking);
  } while ((*Masking != 0) && (*Masking != 1));
}


x86 assembly (clang, -O0):
<RigidBody>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xdfd(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rbp),%rsi
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    0x10(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0x31(%rbp)
je     125f <RigidBody+0x13f>
mov    0x10(%rbp),%rax
cmpl   $0x1,(%rax)
setne  %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    1216 <RigidBody+0xf6>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RigidBody>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%r15
mov    %rcx,%rbx
mov    %rdx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,%rbp
mov    0x50(%rsp),%r12
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe97(%rip),%r14
mov    %r14,%rdi
call   1040 <printf@plt>
lea    0xe8d(%rip),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r13,%rdi
mov    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r13,%rdi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xedf(%rip),%rbp
lea    0xdee(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x1,(%r12)
ja     1220 <RigidBody+0xf0>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Give the image origin of the x-axis:\0A\00"
@.str.1 = [5 x i8] c"--> \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [38 x i8] c"Give the image origin of the y-axis:\0A\00"
@.str.4 = [61 x i8] c"Give the counter-clockwise image rotation angle in degrees:\0A\00"
@.str.5 = [50 x i8] c"Give the image horizontal translation in pixels:\0A\00"
@.str.6 = [48 x i8] c"Give the image vertical translation in pixels:\0A\00"
@.str.7 = [75 x i8] c"Do you want to mask out the irrelevant part of the image (0: no; 1: yes)?\0A\00"
@.str.8 = [4 x i8] c"%ld\00"
define void @RigidBody(double* %0, double* %1, double* %2, double* %3, double* %4, i64* %5, i32* %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i64*
%14 = alloca i32*
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store i64* %5, i64** %13
store i32* %6, i32** %14
%15 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%17 = load double*, double** %11
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%21 = load double*, double** %12
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%25 = load double*, double** %8
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%29 = load double*, double** %9
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%33 = load double*, double** %10
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %33)
br label %35
35: ; preds = %48, %7
%36 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.7, i64 0, i64 0))
%37 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%38 = load i32*, i32** %14
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32* %38)
br label %40
40: ; preds = %35
%41 = load i32*, i32** %14
%42 = load i32, i32* %41
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %48
44: ; preds = %40
%45 = load i32*, i32** %14
%46 = load i32, i32* %45
%47 = icmp ne i32 %46, 1
br label %48
48: ; preds = %44, %40
%49 = phi i1 [ false, %40 ], [ %47, %44 ]
br i1 %49, label %35, label %50
50: ; preds = %48
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"--> \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.8 = [4 x i8] c"%ld\00"
@str = [37 x i8] c"Give the image origin of the x-axis:\00"
@str.9 = [37 x i8] c"Give the image origin of the y-axis:\00"
@str.10 = [60 x i8] c"Give the counter-clockwise image rotation angle in degrees:\00"
@str.11 = [49 x i8] c"Give the image horizontal translation in pixels:\00"
@str.12 = [47 x i8] c"Give the image vertical translation in pixels:\00"
@str.13 = [74 x i8] c"Do you want to mask out the irrelevant part of the image (0: no; 1: yes)?\00"
define void @RigidBody(double* %0, double* %1, double* %2, double* %3, double* %4, i64* nocapture readnone %5, i32* %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %3)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.9, i64 0, i64 0))
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %4)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.10, i64 0, i64 0))
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %0)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.11, i64 0, i64 0))
%18 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.12, i64 0, i64 0))
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
br label %23
23: ; preds = %23, %7
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.13, i64 0, i64 0))
%25 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32* %6)
%27 = load i32, i32* %6
%28 = icmp ult i32 %27, 2
br i1 %28, label %29, label %23
29: ; preds = %23
ret void
}