#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 */
struct tms {
  int tms_utime;
  int tms_stime;
  int tms_cutime;
  int tms_cstime;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ times(struct tms *);
int main(int argc, char *argv[]) {
  struct tms t;
  if (times(&t) < 0) {
    perror("times(2)");
    exit(1);
  }
  printf("u =%f\n", ((double)(t.tms_utime / 60)));
  printf("s =%f\n", ((double)(t.tms_stime / 60)));
  printf("cu=%f\n", ((double)(t.tms_cutime / 60)));
  printf("cs=%f\n", ((double)(t.tms_cstime / 60)));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <times@plt>
cmp    $0x0,%rax
jge    117f <main+0x3f>
lea    0xe90(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x20(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1040 <times@plt>
test   %rax,%rax
jns    1169 <main+0x29>
lea    0xea6(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
movslq 0x8(%rsp),%rax
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x5,%ecx
add    %eax,%ecx
cvtsi2sd %ecx,%xmm0
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
movslq 0xc(%rsp),%rax
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x5,%ecx
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
movslq 0x10(%rsp),%rax
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x5,%ecx
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
movslq 0x14(%rsp),%rax
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x5,%ecx
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
lea    0xe01(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.tms = type { i32, i32, i32, i32 }
@.str = [9 x i8] c"times(2)\00"
@.str.1 = [7 x i8] c"u =%f\0A\00"
@.str.2 = [7 x i8] c"s =%f\0A\00"
@.str.3 = [7 x i8] c"cu=%f\0A\00"
@.str.4 = [7 x i8] c"cs=%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.tms
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 @times(%struct.tms* %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 0
%14 = load i32, i32* %13
%15 = sdiv i32 %14, 60
%16 = sitofp i32 %15 to double
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %16)
%18 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 1
%19 = load i32, i32* %18
%20 = sdiv i32 %19, 60
%21 = sitofp i32 %20 to double
%22 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %21)
%23 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 2
%24 = load i32, i32* %23
%25 = sdiv i32 %24, 60
%26 = sitofp i32 %25 to double
%27 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %26)
%28 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 3
%29 = load i32, i32* %28
%30 = sdiv i32 %29, 60
%31 = sitofp i32 %30 to double
%32 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %31)
%33 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.tms = type { i32, i32, i32, i32 }
@.str = [9 x i8] c"times(2)\00"
@.str.1 = [7 x i8] c"u =%f\0A\00"
@.str.2 = [7 x i8] c"s =%f\0A\00"
@.str.3 = [7 x i8] c"cu=%f\0A\00"
@.str.4 = [7 x i8] c"cs=%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.tms
%4 = bitcast %struct.tms* %3 to i8*
%5 = call i64 @times(%struct.tms* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 0
%12 = load i32, i32* %11
%13 = sdiv i32 %12, 60
%14 = sitofp i32 %13 to double
%15 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 1
%17 = load i32, i32* %16
%18 = sdiv i32 %17, 60
%19 = sitofp i32 %18 to double
%20 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %19)
%21 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 2
%22 = load i32, i32* %21
%23 = sdiv i32 %22, 60
%24 = sitofp i32 %23 to double
%25 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %24)
%26 = getelementptr inbounds %struct.tms, %struct.tms* %3, i64 0, i32 3
%27 = load i32, i32* %26
%28 = sdiv i32 %27, 60
%29 = sitofp i32 %28 to double
%30 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %29)
%31 = tail call i32 @exit(i32 0)
unreachable
}