#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*/ time_t;
struct rtc_time {
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ RTC_RD_TIME;
int /*<<< orphan*/ RTC_SET_TIME;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int ioctl(int, int /*<<< orphan*/, struct rtc_time *);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
char *strerror(int /*<<< orphan*/);
int main(void) {
  int rtc_fd;
  unsigned long data;
  int ret, i;
  struct rtc_time rtc_tm;
  char *rtc_dev = "/dev/rtc0";
  time_t t1, t2;
  rtc_fd = open(rtc_dev, O_RDONLY);
  if (rtc_fd == -1) {
    printf("failed to open '%s': %s\n", rtc_dev, strerror(errno));
    exit(1);
  } else
    printf("opened '%s': fd = %d\n", rtc_dev, rtc_fd);
  printf("Get RTC Time\n");
  ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
  if (ret == -1) {
    perror("rtc ioctl RTC_RD_TIME error");
  }
  printf("Current RTC date/time is %d-%d-%d, %02d:%02d:%02d\n", rtc_tm.tm_mday,
         rtc_tm.tm_mon + 1, rtc_tm.tm_year, rtc_tm.tm_hour, rtc_tm.tm_min,
         rtc_tm.tm_sec);
  rtc_tm.tm_mday = 31;
  rtc_tm.tm_mon = 4;
  rtc_tm.tm_year = 104;
  rtc_tm.tm_hour = 2;
  rtc_tm.tm_min = 30;
  rtc_tm.tm_sec = 0;
  printf("Set RTC Time\n");
  ret = ioctl(rtc_fd, RTC_SET_TIME, &rtc_tm);
  if (ret == -1) {
    perror("rtc ioctl RTC_SET_TIME error");
  }
  printf("Set Current RTC date/time to %d-%d-%d, %02d:%02d:%02d\n",
         rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year, rtc_tm.tm_hour,
         rtc_tm.tm_min, rtc_tm.tm_sec);
  printf("Get RTC time\n");
  ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
  if (ret == -1) {
    perror("rtc ioctl RTC_RD_TIME error");
  }
  printf("Current RTC date/time is %d-%d-%d, %02d:%02d:%02d\n", rtc_tm.tm_mday,
         rtc_tm.tm_mon + 1, rtc_tm.tm_year, rtc_tm.tm_hour, rtc_tm.tm_min,
         rtc_tm.tm_sec);
  printf("RTC Tests done !!\n");
  close(rtc_fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    0x2e53(%rip),%rax
mov    (%rax),%esi
call   1060 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    11de <main+0x6e>
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x48(%rbp),%rsi
mov    %rax,%rdx
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x38(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2db5(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    122f <main+0xbf>
lea    0xe1d(%rip),%rdi
call   1070 <perror@plt>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x1c(%rbp),%eax
lea    0xe16(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1f,-0x30(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x68,-0x28(%rbp)
movl   $0x2,-0x24(%rbp)
movl   $0x1e,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2d47(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    12bd <main+0x14d>
lea    0xdec(%rip),%rdi
call   1070 <perror@plt>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x1c(%rbp),%eax
lea    0xde6(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    0x2cc3(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1321 <main+0x1b1>
lea    0xd2b(%rip),%rdi
call   1070 <perror@plt>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x1c(%rbp),%eax
lea    0xd24(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    0x2e5a(%rip),%rax
mov    (%rax),%esi
lea    0xe79(%rip),%rdi
call   1070 <open@plt>
cmp    $0xffffffff,%eax
je     131f <main+0x19f>
mov    %eax,%ebx
lea    0xe85(%rip),%rdi
lea    0xe5b(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
mov    0x2def(%rip),%r14
mov    (%r14),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
call   1050 <ioctl@plt>
cmp    $0xffffffff,%eax
je     12ef <main+0x16f>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
add    $0x1,%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9d
mov    0x24(%rsp),%eax
mov    %eax,(%rsp)
lea    0xe55(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movaps 0xde2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x1e,0x20(%rsp)
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    0x2da1(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
call   1050 <ioctl@plt>
cmp    $0xffffffff,%eax
je     1300 <main+0x180>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
add    $0x1,%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9d
mov    0x24(%rsp),%eax
mov    %eax,(%rsp)
lea    0xe38(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7b(%rip),%rdi
call   1030 <puts@plt>
mov    (%r14),%esi
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
call   1050 <ioctl@plt>
cmp    $0xffffffff,%eax
je     1311 <main+0x191>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
add    $0x1,%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9d
mov    0x24(%rsp),%eax
mov    %eax,(%rsp)
lea    0xd9a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe3a(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1060 <close@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret
lea    0xd53(%rip),%rdi
call   1080 <perror@plt>
jmp    11e9 <main+0x69>
lea    0xd91(%rip),%rdi
call   1080 <perror@plt>
jmp    1256 <main+0xd6>
lea    0xd31(%rip),%rdi
call   1080 <perror@plt>
jmp    12a4 <main+0x124>
mov    0x2caa(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
lea    0xce6(%rip),%rdi
lea    0xcd5(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.rtc_time = type { i32, i32, i32, i32, i32, i32 }
@.str = [10 x i8] c"/dev/rtc0\00"
@O_RDONLY = global i32 0
@.str.1 = [25 x i8] c"failed to open '%s': %s\0A\00"
@errno = global i32 0
@.str.2 = [22 x i8] c"opened '%s': fd = %d\0A\00"
@.str.3 = [14 x i8] c"Get RTC Time\0A\00"
@RTC_RD_TIME = global i32 0
@.str.4 = [28 x i8] c"rtc ioctl RTC_RD_TIME error\00"
@.str.5 = [51 x i8] c"Current RTC date/time is %d-%d-%d, %02d:%02d:%02d\0A\00"
@.str.6 = [14 x i8] c"Set RTC Time\0A\00"
@RTC_SET_TIME = global i32 0
@.str.7 = [29 x i8] c"rtc ioctl RTC_SET_TIME error\00"
@.str.8 = [55 x i8] c"Set Current RTC date/time to %d-%d-%d, %02d:%02d:%02d\0A\00"
@.str.9 = [14 x i8] c"Get RTC time\0A\00"
@.str.10 = [19 x i8] c"RTC Tests done !!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.rtc_time
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %7
%10 = load i8*, i8** %7
%11 = load i32, i32* @O_RDONLY
%12 = call i32 @open(i8* %10, i32 %11)
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %21
15: ; preds = %0
%16 = load i8*, i8** %7
%17 = load i32, i32* @errno
%18 = call i8* @strerror(i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* %18)
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %0
%22 = load i8*, i8** %7
%23 = load i32, i32* %2
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %22, i32 %23)
br label %25
25: ; preds = %21
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%27 = load i32, i32* %2
%28 = load i32, i32* @RTC_RD_TIME
%29 = call i32 @ioctl(i32 %27, i32 %28, %struct.rtc_time* %6)
store i32 %29, i32* %4
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, -1
br i1 %31, label %32, label %34
32: ; preds = %25
%33 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %34
34: ; preds = %32, %25
%35 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 0
%36 = load i32, i32* %35
%37 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 1
%38 = load i32, i32* %37
%39 = add nsw i32 %38, 1
%40 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 2
%41 = load i32, i32* %40
%42 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 3
%43 = load i32, i32* %42
%44 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 4
%45 = load i32, i32* %44
%46 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 5
%47 = load i32, i32* %46
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32 %36, i32 %39, i32 %41, i32 %43, i32 %45, i32 %47)
%49 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 0
store i32 31, i32* %49
%50 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 1
store i32 4, i32* %50
%51 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 2
store i32 104, i32* %51
%52 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 3
store i32 2, i32* %52
%53 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 4
store i32 30, i32* %53
%54 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 5
store i32 0, i32* %54
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%56 = load i32, i32* %2
%57 = load i32, i32* @RTC_SET_TIME
%58 = call i32 @ioctl(i32 %56, i32 %57, %struct.rtc_time* %6)
store i32 %58, i32* %4
%59 = load i32, i32* %4
%60 = icmp eq i32 %59, -1
br i1 %60, label %61, label %63
61: ; preds = %34
%62 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %63
63: ; preds = %61, %34
%64 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 0
%65 = load i32, i32* %64
%66 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 1
%67 = load i32, i32* %66
%68 = add nsw i32 %67, 1
%69 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 2
%70 = load i32, i32* %69
%71 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 3
%72 = load i32, i32* %71
%73 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 4
%74 = load i32, i32* %73
%75 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 5
%76 = load i32, i32* %75
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0), i32 %65, i32 %68, i32 %70, i32 %72, i32 %74, i32 %76)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%79 = load i32, i32* %2
%80 = load i32, i32* @RTC_RD_TIME
%81 = call i32 @ioctl(i32 %79, i32 %80, %struct.rtc_time* %6)
store i32 %81, i32* %4
%82 = load i32, i32* %4
%83 = icmp eq i32 %82, -1
br i1 %83, label %84, label %86
84: ; preds = %63
%85 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %86
86: ; preds = %84, %63
%87 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 0
%88 = load i32, i32* %87
%89 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 1
%90 = load i32, i32* %89
%91 = add nsw i32 %90, 1
%92 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 2
%93 = load i32, i32* %92
%94 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 3
%95 = load i32, i32* %94
%96 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 4
%97 = load i32, i32* %96
%98 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %6, i32 0, i32 5
%99 = load i32, i32* %98
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32 %88, i32 %91, i32 %93, i32 %95, i32 %97, i32 %99)
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%102 = load i32, i32* %2
%103 = call i32 @close(i32 %102)
ret i32 0
}

LLVM IR (-O2):
%struct.rtc_time = type { i32, i32, i32, i32, i32, i32 }
@.str = [10 x i8] c"/dev/rtc0\00"
@O_RDONLY = global i32 0
@.str.1 = [25 x i8] c"failed to open '%s': %s\0A\00"
@errno = global i32 0
@.str.2 = [22 x i8] c"opened '%s': fd = %d\0A\00"
@RTC_RD_TIME = global i32 0
@.str.4 = [28 x i8] c"rtc ioctl RTC_RD_TIME error\00"
@.str.5 = [51 x i8] c"Current RTC date/time is %d-%d-%d, %02d:%02d:%02d\0A\00"
@RTC_SET_TIME = global i32 0
@.str.7 = [29 x i8] c"rtc ioctl RTC_SET_TIME error\00"
@.str.8 = [55 x i8] c"Set Current RTC date/time to %d-%d-%d, %02d:%02d:%02d\0A\00"
@str = [13 x i8] c"Get RTC Time\00"
@str.11 = [13 x i8] c"Set RTC Time\00"
@str.12 = [13 x i8] c"Get RTC time\00"
@str.13 = [18 x i8] c"RTC Tests done !!\00"
define i32 @main() {
%1 = alloca %struct.rtc_time
%2 = bitcast %struct.rtc_time* %1 to i8*
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* @errno
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %0
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%14 = load i32, i32* @RTC_RD_TIME
%15 = call i32 @ioctl(i32 %4, i32 %14, %struct.rtc_time* %1)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %19
19: ; preds = %17, %11
%20 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %1, i64 0, i32 0
%21 = load i32, i32* %20
%22 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %1, i64 0, i32 1
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
%25 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %1, i64 0, i32 2
%26 = load i32, i32* %25
%27 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %1, i64 0, i32 3
%28 = load i32, i32* %27
%29 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %1, i64 0, i32 4
%30 = load i32, i32* %29
%31 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %1, i64 0, i32 5
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32 %21, i32 %24, i32 %26, i32 %28, i32 %30, i32 %32)
%34 = bitcast %struct.rtc_time* %1 to <4 x i32>*
store <4 x i32> <i32 31, i32 4, i32 104, i32 2>, <4 x i32>* %34
store i32 30, i32* %29
store i32 0, i32* %31
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.11, i64 0, i64 0))
%36 = load i32, i32* @RTC_SET_TIME
%37 = call i32 @ioctl(i32 %4, i32 %36, %struct.rtc_time* %1)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %41
39: ; preds = %19
%40 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %41
41: ; preds = %39, %19
%42 = load i32, i32* %20
%43 = load i32, i32* %22
%44 = add nsw i32 %43, 1
%45 = load i32, i32* %25
%46 = load i32, i32* %27
%47 = load i32, i32* %29
%48 = load i32, i32* %31
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0), i32 %42, i32 %44, i32 %45, i32 %46, i32 %47, i32 %48)
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.12, i64 0, i64 0))
%51 = load i32, i32* @RTC_RD_TIME
%52 = call i32 @ioctl(i32 %4, i32 %51, %struct.rtc_time* %1)
%53 = icmp eq i32 %52, -1
br i1 %53, label %54, label %56
54: ; preds = %41
%55 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %56
56: ; preds = %54, %41
%57 = load i32, i32* %20
%58 = load i32, i32* %22
%59 = add nsw i32 %58, 1
%60 = load i32, i32* %25
%61 = load i32, i32* %27
%62 = load i32, i32* %29
%63 = load i32, i32* %31
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32 %57, i32 %59, i32 %60, i32 %61, i32 %62, i32 %63)
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.13, i64 0, i64 0))
%66 = call i32 @close(i32 %4)
ret i32 0
}