#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 */
double atoi(char *);
int /*<<< orphan*/ printf(char *, char *, double);
double rad_pat(double, double, double, double, double, int);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  double strike = 107;
  double dip = 38;
  double rake = -141;
  double az = 314.338;
  double take_off = 33.47;
  double prediction = 0;
  take_off = atoi(argv[1]);
  az = atoi(argv[2]);
  char sta[200];
  strcpy(sta, argv[3]);
  prediction = rad_pat(strike, dip, rake, az, take_off, 2);
  printf(" sta %s polarity prediction is %10.2lf \n", sta, prediction);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe80(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe6b(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
movsd  %xmm0,-0x30(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1030 <strcpy@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
mov    $0x2,%edi
call   1040 <rad_pat@plt>
movsd  %xmm0,-0x40(%rbp)
lea    -0x110(%rbp),%rsi
movsd  -0x40(%rbp),%xmm0
lea    0xe13(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xe0,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1060 <atoi@plt>
movsd  %xmm0,0x8(%rsp)
mov    0x10(%rbx),%rdi
call   1060 <atoi@plt>
movsd  %xmm0,(%rsp)
mov    0x18(%rbx),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
movsd  0xe7f(%rip),%xmm0
movsd  0xe7f(%rip),%xmm1
movsd  0xe7f(%rip),%xmm2
movsd  (%rsp),%xmm3
movsd  0x8(%rsp),%xmm4
mov    $0x2,%edi
call   1040 <rad_pat@plt>
lea    0xe6b(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c" sta %s polarity prediction is %10.2lf \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca [200 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.070000e+02, double* %6
store double 3.800000e+01, double* %7
store double -1.410000e+02, double* %8
store double 3.143380e+02, double* %9
store double 3.347000e+01, double* %10
store double 0.000000e+00, double* %11
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call double @atoi(i8* %15)
store double %16, double* %10
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call double @atoi(i8* %19)
store double %20, double* %9
%21 = getelementptr inbounds [200 x i8], [200 x i8]* %12, i64 0, i64 0
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 3
%24 = load i8*, i8** %23
%25 = call i32 @strcpy(i8* %21, i8* %24)
%26 = load double, double* %6
%27 = load double, double* %7
%28 = load double, double* %8
%29 = load double, double* %9
%30 = load double, double* %10
%31 = call double @rad_pat(double %26, double %27, double %28, double %29, double %30, i32 2)
store double %31, double* %11
%32 = getelementptr inbounds [200 x i8], [200 x i8]* %12, i64 0, i64 0
%33 = load double, double* %11
%34 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %32, double %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c" sta %s polarity prediction is %10.2lf \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [200 x i8]
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call double @atoi(i8* %5)
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call double @atoi(i8* %8)
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = load i8*, i8** %11
%13 = call i32 @strcpy(i8* %10, i8* %12)
%14 = call double @rad_pat(double 1.070000e+02, double 3.800000e+01, double -1.410000e+02, double %9, double %6, i32 2)
%15 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %10, double %14)
ret i32 0
}