#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 fmod(double, double);
char *gettext(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
double funcion_fmod(double a, double b, double resultado) {
  printf(gettext("Divisor:: "));
  scanf("%lf", &a);
  printf(gettext("Dividend:: "));
  scanf("%lf", &b);
  resultado = fmod(a, b);
  printf(gettext("Remainder of "));
  printf("%lf/ ", a);
  printf(gettext("is "));
  printf("%lf\n", resultado);
  return (resultado);
}


x86 assembly (clang, -O0):
<funcion_fmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
lea    0xea2(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe97(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe8b(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe71(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <fmod@plt>
movsd  %xmm0,-0x18(%rbp)
lea    0xe5d(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
lea    0xe50(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe31(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcion_fmod>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,0x18(%rsp)
lea    0xea8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9d(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xe8d(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1050 <fmod@plt>
movsd  %xmm0,0x10(%rsp)
lea    0xe5f(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xe51(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe49(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe37(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Divisor:: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [12 x i8] c"Dividend:: \00"
@.str.3 = [14 x i8] c"Remainder of \00"
@.str.4 = [6 x i8] c"%lf/ \00"
@.str.5 = [4 x i8] c"is \00"
@.str.6 = [5 x i8] c"%lf\0A\00"
define double @funcion_fmod(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = call i8* @gettext(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%10 = call i8* @gettext(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%13 = load double, double* %4
%14 = load double, double* %5
%15 = call double @fmod(double %13, double %14)
store double %15, double* %6
%16 = call i8* @gettext(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* %16)
%18 = load double, double* %4
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %18)
%20 = call i8* @gettext(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* %20)
%22 = load double, double* %6
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %22)
%24 = load double, double* %6
ret double %24
}

LLVM IR (-O2):
@.str = [11 x i8] c"Divisor:: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [12 x i8] c"Dividend:: \00"
@.str.3 = [14 x i8] c"Remainder of \00"
@.str.4 = [6 x i8] c"%lf/ \00"
@.str.5 = [4 x i8] c"is \00"
@.str.6 = [5 x i8] c"%lf\0A\00"
define double @funcion_fmod(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = tail call i8* @gettext(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = call i8* @gettext(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9)
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%12 = load double, double* %4
%13 = load double, double* %5
%14 = call double @fmod(double %12, double %13)
%15 = call i8* @gettext(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %15)
%17 = load double, double* %4
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %17)
%19 = call i8* @gettext(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %19)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %14)
ret double %14
}