#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 EXIT_SUCCESS;
int /*<<< orphan*/ LC_ALL;
float cos(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
float sin(int);
int /*<<< orphan*/ stdin;
float tan(int);
int main(int argc, char *argv[]) {
  setlocale(LC_ALL, "Portuguese");
  int anguloInicial = 0;
  int anguloFinal = 0;
  int i = 0;
  float seno = 0.0;
  float cosseno = 0.0;
  float tangente = 0.0;
  do {
    printf("Digite o ângulo inicial: ");
    scanf("%d", &anguloInicial);
    setbuf(stdin, NULL);
    printf("Digite o ângulo final: ");
    scanf("%d", &anguloFinal);
    setbuf(stdin, NULL);
  } while (anguloFinal <= anguloInicial);
  printf("\n%13s %13s %13s %13s\n", "Ângulo", "Seno", "Cosseno", "Tangente");
  for (i = anguloInicial; i <= anguloFinal; i++) {
    seno = sin(i * 3.14159265 / 180);
    cosseno = cos(i * 3.14159265 / 180);
    tangente = tan(i * 3.14159265 / 180);
    if (i != 90 || i != 270)
      printf("%13d %13f %13f %13f\n", i, seno, cosseno, tangente);
    else
      printf("%13d %13f %13f %13s\n", i, seno, cosseno, "INFINITO");
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
lea    0xe7a(%rip),%rsi
call   1070 <setlocale@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe59(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1080 <scanf@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe29(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <scanf@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11c8 <main+0x58>
lea    0xe17(%rip),%rdi
lea    0xe26(%rip),%rsi
lea    0xe27(%rip),%rdx
lea    0xe25(%rip),%rcx
lea    0xe26(%rip),%r8
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1376 <main+0x206>
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xd8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd77(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movss  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xd60(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd4c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1090 <cos@plt>
movss  %xmm0,-0x24(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xd35(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd21(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <tan@plt>
movss  %xmm0,-0x28(%rbp)
cmpl   $0x5a,-0x1c(%rbp)
jne    1308 <main+0x198>
cmpl   $0x10e,-0x1c(%rbp)
je     1339 <main+0x1c9>
mov    -0x1c(%rbp),%esi
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x28(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xd59(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
jmp    1363 <main+0x1f3>
mov    -0x1c(%rbp),%esi
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd46(%rip),%rdi
lea    0xd54(%rip),%rdx
mov    $0x2,%al
call   1040 <printf@plt>
jmp    1368 <main+0x1f8>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1264 <main+0xf4>
mov    0x2c5b(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
lea    0xe82(%rip),%rsi
call   1070 <setlocale@plt>
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xe71(%rip),%r14
lea    0xe85(%rip),%rbx
lea    0xc(%rsp),%r15
mov    0x2e2b(%rip),%rbp
lea    0xe75(%rip),%r12
lea    0x8(%rsp),%r13
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1080 <scanf@plt>
mov    0x0(%rbp),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1080 <scanf@plt>
mov    0x0(%rbp),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
mov    0x8(%rsp),%eax
cmp    0xc(%rsp),%eax
jle    11d0 <main+0x60>
lea    0xe33(%rip),%rdi
lea    0xe42(%rip),%rsi
lea    0xe43(%rip),%rdx
lea    0xe41(%rip),%rcx
lea    0xe42(%rip),%r8
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%ebx
cmp    0x8(%rsp),%ebx
jg     12d4 <main+0x164>
lea    0xe2f(%rip),%r14
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xd91(%rip),%xmm0
divsd  0xd91(%rip),%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1050 <sin@plt>
movss  %xmm0,0x14(%rsp)
mov    %ebp,%edi
call   1090 <cos@plt>
movss  %xmm0,0x10(%rsp)
mov    %ebp,%edi
call   1060 <tan@plt>
movss  0x14(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %r14,%rdi
mov    %ebx,%esi
movaps %xmm3,%xmm0
mov    $0x3,%al
call   1040 <printf@plt>
lea    0x1(%rbx),%eax
cmp    0x8(%rsp),%ebx
mov    %eax,%ebx
jl     1260 <main+0xf0>
mov    0x2cfd(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [27 x i8] c"Digite o \C3\A2ngulo inicial: \00"
@.str.2 = [3 x i8] c"%d\00"
@stdin = global i32 0
@.str.3 = [25 x i8] c"Digite o \C3\A2ngulo final: \00"
@.str.4 = [22 x i8] c"\0A%13s %13s %13s %13s\0A\00"
@.str.5 = [8 x i8] c"\C3\82ngulo\00"
@.str.6 = [5 x i8] c"Seno\00"
@.str.7 = [8 x i8] c"Cosseno\00"
@.str.8 = [9 x i8] c"Tangente\00"
@.str.9 = [21 x i8] c"%13d %13f %13f %13f\0A\00"
@.str.10 = [21 x i8] c"%13d %13f %13f %13s\0A\00"
@.str.11 = [9 x i8] c"INFINITO\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
%11 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* @LC_ALL
%13 = call i32 @setlocale(i32 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store float 0.000000e+00, float* %9
store float 0.000000e+00, float* %10
store float 0.000000e+00, float* %11
br label %14
14: ; preds = %23, %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%17 = load i32, i32* @stdin
%18 = call i32 @setbuf(i32 %17, i32* null)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%21 = load i32, i32* @stdin
%22 = call i32 @setbuf(i32 %21, i32* null)
br label %23
23: ; preds = %14
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = icmp sle i32 %24, %25
br i1 %26, label %14, label %27
27: ; preds = %23
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%29 = load i32, i32* %6
store i32 %29, i32* %8
br label %30
30: ; preds = %75, %27
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = icmp sle i32 %31, %32
br i1 %33, label %34, label %78
34: ; preds = %30
%35 = load i32, i32* %8
%36 = sitofp i32 %35 to double
%37 = fmul double %36, 0x400921FB53C8D4F1
%38 = fdiv double %37, 1.800000e+02
%39 = fptosi double %38 to i32
%40 = call float @sin(i32 %39)
store float %40, float* %9
%41 = load i32, i32* %8
%42 = sitofp i32 %41 to double
%43 = fmul double %42, 0x400921FB53C8D4F1
%44 = fdiv double %43, 1.800000e+02
%45 = fptosi double %44 to i32
%46 = call float @cos(i32 %45)
store float %46, float* %10
%47 = load i32, i32* %8
%48 = sitofp i32 %47 to double
%49 = fmul double %48, 0x400921FB53C8D4F1
%50 = fdiv double %49, 1.800000e+02
%51 = fptosi double %50 to i32
%52 = call float @tan(i32 %51)
store float %52, float* %11
%53 = load i32, i32* %8
%54 = icmp ne i32 %53, 90
br i1 %54, label %58, label %55
55: ; preds = %34
%56 = load i32, i32* %8
%57 = icmp ne i32 %56, 270
br i1 %57, label %58, label %67
58: ; preds = %55, %34
%59 = load i32, i32* %8
%60 = load float, float* %9
%61 = fpext float %60 to double
%62 = load float, float* %10
%63 = fpext float %62 to double
%64 = load float, float* %11
%65 = fpext float %64 to double
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %59, double %61, double %63, double %65)
br label %74
67: ; preds = %55
%68 = load i32, i32* %8
%69 = load float, float* %9
%70 = fpext float %69 to double
%71 = load float, float* %10
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0), i32 %68, double %70, double %72, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
br label %74
74: ; preds = %67, %58
br label %75
75: ; preds = %74
%76 = load i32, i32* %8
%77 = add nsw i32 %76, 1
store i32 %77, i32* %8
br label %30
78: ; preds = %30
%79 = load i32, i32* @EXIT_SUCCESS
ret i32 %79
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [27 x i8] c"Digite o \C3\A2ngulo inicial: \00"
@.str.2 = [3 x i8] c"%d\00"
@stdin = global i32 0
@.str.3 = [25 x i8] c"Digite o \C3\A2ngulo final: \00"
@.str.4 = [22 x i8] c"\0A%13s %13s %13s %13s\0A\00"
@.str.5 = [8 x i8] c"\C3\82ngulo\00"
@.str.6 = [5 x i8] c"Seno\00"
@.str.7 = [8 x i8] c"Cosseno\00"
@.str.8 = [9 x i8] c"Tangente\00"
@.str.9 = [21 x i8] c"%13d %13f %13f %13f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = load i32, i32* @LC_ALL
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
br label %9
9: ; preds = %9, %2
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%12 = load i32, i32* @stdin
%13 = call i32 @setbuf(i32 %12, i32* null)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%16 = load i32, i32* @stdin
%17 = call i32 @setbuf(i32 %16, i32* null)
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %9
21: ; preds = %9
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = icmp sgt i32 %23, %24
br i1 %25, label %42, label %26
26: ; preds = %21, %26
%27 = phi i32 [ %39, %26 ], [ %23, %21 ]
%28 = sitofp i32 %27 to double
%29 = fmul double %28, 0x400921FB53C8D4F1
%30 = fdiv double %29, 1.800000e+02
%31 = fptosi double %30 to i32
%32 = call float @sin(i32 %31)
%33 = call float @cos(i32 %31)
%34 = call float @tan(i32 %31)
%35 = fpext float %32 to double
%36 = fpext float %33 to double
%37 = fpext float %34 to double
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %27, double %35, double %36, double %37)
%39 = add nsw i32 %27, 1
%40 = load i32, i32* %4
%41 = icmp slt i32 %27, %40
br i1 %41, label %26, label %42
42: ; preds = %26, %21
%43 = load i32, i32* @EXIT_SUCCESS
ret i32 %43
}