#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, int, int);
double remquo(double, double, int *);
float remquof(float, float, int *);
long double remquol(long double, long double, int *);
int main(int argc, char *argv[]) {
  int quof, quo, quol;
  float rf = remquof(100.0f, 30.0f, &quof);
  double r = remquo(100.0, 30.0, &quo);
  long double rl = remquol(100.0l, 30.0l, &quol);
  printf("quo: %d, %d, %d.\n", quof, quo, quol);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xea2(%rip),%xmm0
movss  0xe9e(%rip),%xmm1
lea    -0x14(%rbp),%rdi
call   1050 <remquof@plt>
movss  %xmm0,-0x20(%rbp)
movsd  0xe8c(%rip),%xmm0
movsd  0xe8c(%rip),%xmm1
lea    -0x18(%rbp),%rdi
call   1060 <remquo@plt>
movsd  %xmm0,-0x28(%rbp)
mov    %rsp,%rax
flds   0xe69(%rip)
fstpt  0x10(%rax)
flds   0xe5c(%rip)
fstpt  (%rax)
lea    -0x1c(%rbp),%rdi
call   1040 <remquol@plt>
fstpt  -0x40(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movss  0xeb4(%rip),%xmm0
movss  0xeb0(%rip),%xmm1
lea    0x34(%rsp),%rdi
call   1050 <remquof@plt>
movsd  0xea2(%rip),%xmm0
movsd  0xea2(%rip),%xmm1
lea    0x30(%rsp),%rdi
call   1060 <remquo@plt>
flds   0xe86(%rip)
fstpt  0x10(%rsp)
flds   0xe78(%rip)
fstpt  (%rsp)
lea    0x2c(%rsp),%rdi
call   1040 <remquol@plt>
fstp   %st(0)
mov    0x34(%rsp),%esi
mov    0x30(%rsp),%edx
mov    0x2c(%rsp),%ecx
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"quo: %d, %d, %d.\0A\00"
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 double
%11 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = call float @remquof(float 1.000000e+02, float 3.000000e+01, i32* %6)
store float %12, float* %9
%13 = call double @remquo(double 1.000000e+02, double 3.000000e+01, i32* %7)
store double %13, double* %10
%14 = call x86_fp80 @remquol(x86_fp80 0xK4005C800000000000000, x86_fp80 0xK4003F000000000000000, i32* %8)
store x86_fp80 %14, x86_fp80* %11
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"quo: %d, %d, %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call float @remquof(float 1.000000e+02, float 3.000000e+01, i32* %3)
%10 = call double @remquo(double 1.000000e+02, double 3.000000e+01, i32* %4)
%11 = call x86_fp80 @remquol(x86_fp80 0xK4005C800000000000000, x86_fp80 0xK4003F000000000000000, i32* %5)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
ret i32 0
}