#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 */
typedef int /*<<< orphan*/ tempString;

/* Variables and functions */
int /*<<< orphan*/ IDLog(char *, char *);
int /*<<< orphan*/ getSexComponents(double, int *, int *, int *);
int setStandardProcedure(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int, int, int);
int setObjectRA(double ra) {
  int h, m, s;
  char tempString[16];
  getSexComponents(ra, &h, &m, &s);
  snprintf(tempString, sizeof(tempString), "#:Sr %02d:%02d:%02d#", h, m, s);
  IDLog("Set Object RA String %s\n", tempString);
  return (setStandardProcedure(tempString));
}


x86 assembly (clang, -O0):
<setObjectRA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1060 <getSexComponents@plt>
lea    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    $0x10,%esi
lea    0xe82(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x30(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1050 <IDLog@plt>
lea    -0x30(%rbp),%rdi
call   1030 <setStandardProcedure@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setObjectRA>:
push   %rbx
sub    $0x20,%rsp
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
call   1060 <getSexComponents@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%r8d
mov    0x4(%rsp),%r9d
lea    0xe92(%rip),%rdx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <snprintf@plt>
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
call   1050 <IDLog@plt>
mov    %rbx,%rdi
call   1030 <setStandardProcedure@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"#:Sr %02d:%02d:%02d#\00"
@.str.1 = [25 x i8] c"Set Object RA String %s\0A\00"
define i32 @setObjectRA(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [16 x i8]
store double %0, double* %2
%7 = load double, double* %2
%8 = call i32 @getSexComponents(double %7, i32* %3, i32* %4, i32* %5)
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @snprintf(i8* %9, i32 16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%15 = call i32 @IDLog(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%17 = call i32 @setStandardProcedure(i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [21 x i8] c"#:Sr %02d:%02d:%02d#\00"
@.str.1 = [25 x i8] c"Set Object RA String %s\0A\00"
define i32 @setObjectRA(double %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [16 x i8]
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%10 = call i32 @getSexComponents(double %0, i32* %2, i32* %3, i32* %4)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @snprintf(i8* %9, i32 16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
%15 = call i32 @IDLog(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%16 = call i32 @setStandardProcedure(i8* %9)
ret i32 %16
}