#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 _plnorm(double);
int /*<<< orphan*/ plot(double, double, int);
int /*<<< orphan*/ printf(char *, ...);
int symbol(double x, double y, char *text, double h, double s, double th) {
  plot(x, y, 3);
  printf("S%d\n", _plnorm(h));
  printf("Q%d\n", _plnorm(s));
  printf("R%d\n", _plnorm(th));
  printf("P%s%c", text, 0);
  return (0);
}


x86 assembly (clang, -O0):
<symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x3,%edi
call   1050 <plot@plt>
movsd  -0x20(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x30(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe4d(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbol>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
mov    %rdi,%rbx
mov    $0x3,%edi
call   1050 <plot@plt>
movsd  0x8(%rsp),%xmm0
call   1030 <_plnorm@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
call   1030 <_plnorm@plt>
lea    0xe84(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
call   1030 <_plnorm@plt>
lea    0xe6e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe63(%rip),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"S%d\0A\00"
@.str.1 = [5 x i8] c"Q%d\0A\00"
@.str.2 = [5 x i8] c"R%d\0A\00"
@.str.3 = [6 x i8] c"P%s%c\00"
define i32 @symbol(double %0, double %1, i8* %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca i8*
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store i8* %2, i8** %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = call i32 @plot(double %13, double %14, i32 3)
%16 = load double, double* %10
%17 = call i32 @_plnorm(double %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load double, double* %11
%20 = call i32 @_plnorm(double %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = load double, double* %12
%23 = call i32 @_plnorm(double %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = load i8*, i8** %9
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %25, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"S%d\0A\00"
@.str.1 = [5 x i8] c"Q%d\0A\00"
@.str.2 = [5 x i8] c"R%d\0A\00"
@.str.3 = [6 x i8] c"P%s%c\00"
define i32 @symbol(double %0, double %1, i8* %2, double %3, double %4, double %5) {
%7 = tail call i32 @plot(double %0, double %1, i32 3)
%8 = tail call i32 @_plnorm(double %3)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = tail call i32 @_plnorm(double %4)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = tail call i32 @_plnorm(double %5)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %2, i32 0)
ret i32 0
}