#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 tm {
  int dummy;
};

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ dectodoz(char *, double);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int sectotim(char *s, struct tm *thetime) {
  int tim;
  char tmp[256];
  char tmp2[256];
  int minutes;
  int seconds;
  strftime(tmp, 256, "%S", thetime);
  strftime(tmp2, 256, "%M", thetime);
  minutes = atoi(tmp2) * 60;
  seconds = atoi(tmp);
  tim = (minutes + seconds) * 5.76;
  dectodoz(s, (double)tim);
  return 0;
}


x86 assembly (clang, -O0):
<sectotim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x100,%esi
lea    0xeae(%rip),%rdx
call   1040 <strftime@plt>
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x100,%esi
lea    0xe95(%rip),%rdx
call   1040 <strftime@plt>
lea    -0x220(%rbp),%rdi
call   1050 <atoi@plt>
imul   $0x3c,%eax,%eax
mov    %eax,-0x224(%rbp)
lea    -0x120(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x228(%rbp)
mov    -0x224(%rbp),%eax
add    -0x228(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe46(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
cvtsi2sdl -0x14(%rbp),%xmm0
call   1030 <dectodoz@plt>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sectotim>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x208,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xebd(%rip),%rdx
lea    0x100(%rsp),%r15
mov    %r15,%rdi
mov    $0x100,%esi
mov    %rbx,%rcx
call   1040 <strftime@plt>
lea    0xea1(%rip),%rdx
mov    %rsp,%r12
mov    %r12,%rdi
mov    $0x100,%esi
mov    %rbx,%rcx
call   1040 <strftime@plt>
mov    %r12,%rdi
call   1050 <atoi@plt>
imul   $0x3c,%eax,%ebx
mov    %r15,%rdi
call   1050 <atoi@plt>
add    %ebx,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xe62(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
mov    %r14,%rdi
call   1030 <dectodoz@plt>
xor    %eax,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%S\00"
@.str.1 = [3 x i8] c"%M\00"
define i32 @sectotim(i8* %0, %struct.tm* %1) {
%3 = alloca i8*
%4 = alloca %struct.tm*
%5 = alloca i32
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %3
store %struct.tm* %1, %struct.tm** %4
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%11 = load %struct.tm*, %struct.tm** %4
%12 = call i32 @strftime(i8* %10, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.tm* %11)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%14 = load %struct.tm*, %struct.tm** %4
%15 = call i32 @strftime(i8* %13, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %struct.tm* %14)
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%17 = call i32 @atoi(i8* %16)
%18 = mul nsw i32 %17, 60
store i32 %18, i32* %8
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%20 = call i32 @atoi(i8* %19)
store i32 %20, i32* %9
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = add nsw i32 %21, %22
%24 = sitofp i32 %23 to double
%25 = fmul double %24, 5.760000e+00
%26 = fptosi double %25 to i32
store i32 %26, i32* %5
%27 = load i8*, i8** %3
%28 = load i32, i32* %5
%29 = sitofp i32 %28 to double
%30 = call i32 @dectodoz(i8* %27, double %29)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%S\00"
@.str.1 = [3 x i8] c"%M\00"
define i32 @sectotim(i8* %0, %struct.tm* %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = call i32 @strftime(i8* %5, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.tm* %1)
%8 = call i32 @strftime(i8* %6, i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %struct.tm* %1)
%9 = call i32 @atoi(i8* %6)
%10 = mul nsw i32 %9, 60
%11 = call i32 @atoi(i8* %5)
%12 = add nsw i32 %10, %11
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 5.760000e+00
%15 = fptosi double %14 to i32
%16 = sitofp i32 %15 to double
%17 = call i32 @dectodoz(i8* %0, double %16)
ret i32 0
}