#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int tm_wday;
  int tm_year;
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
  int tm_sec;
};
struct rtc_wkalrm {
  int tm_wday;
  int tm_year;
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
  int tm_sec;
  TYPE_1__ time;
};
struct rtc_time {
  int tm_wday;
  int tm_year;
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
  int tm_sec;
  TYPE_1__ time;
};

/* Variables and functions */
int /*<<< orphan*/ RTC_SET_TIME;
int /*<<< orphan*/ RTC_WKALM_SET;
int /*<<< orphan*/ _IO(char, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int ioctl(int, int /*<<< orphan*/, struct rtc_wkalrm *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int auto_pwoff_alarm_test_tmdt(int fd) {
  int retval;
  struct rtc_time tm;
  struct rtc_wkalrm alarm;
  tm.tm_wday = 2;
  tm.tm_year = 2006 - 1900;
  tm.tm_mon = 12 - 1;
  tm.tm_mday = 31;
  tm.tm_hour = 23;
  tm.tm_min = 59;
  tm.tm_sec = 55;
  fprintf(stderr, "Set RTC date/time is %04d-%02d-%02d, %02d:%02d:%02d w(%d)\n",
          tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min,
          tm.tm_sec, tm.tm_wday);
  retval = ioctl(fd, RTC_SET_TIME, &tm);
  if (retval == -1) {
    perror("ioctl RTC_SET_TIME fail!\n");
    exit(errno);
  }
  alarm.time.tm_wday = 3;
  alarm.time.tm_year = 2007 - 1900;
  alarm.time.tm_mon = 1 - 1;
  alarm.time.tm_mday = 1;
  alarm.time.tm_hour = 0;
  alarm.time.tm_min = 0;
  alarm.time.tm_sec = 5;
  fprintf(stderr,
          "Set RTC alarm date/time is %04d-%02d-%02d, %02d:%02d:%02d w(%d)\n",
          alarm.time.tm_year + 1900, alarm.time.tm_mon + 1, alarm.time.tm_mday,
          alarm.time.tm_hour, alarm.time.tm_min, alarm.time.tm_sec,
          alarm.time.tm_wday);
  retval = ioctl(fd, RTC_WKALM_SET, &alarm);
  if (retval == -1) {
    perror("ioctl RTC_WKALM_SET fail!\n");
    exit(errno);
  }
  fprintf(stderr, "Waiting 10 seconds for poweroff alarm...\n");
  fprintf(stderr, "Sleeping...\n");
  retval = ioctl(fd, _IO('p', 0x23), 0);
  if (retval == -1) {
    perror("ioctl RTC_PWR_OFF fail!\n");
    exit(errno);
  }
  return 0;
}


x86 assembly (clang, -O0):
<auto_pwoff_alarm_test_tmdt>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x40(%rbp)
movl   $0x6a,-0x3c(%rbp)
movl   $0xb,-0x38(%rbp)
movl   $0x1f,-0x34(%rbp)
movl   $0x17,-0x30(%rbp)
movl   $0x3b,-0x2c(%rbp)
movl   $0x37,-0x28(%rbp)
mov    0x2e3a(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%edx
add    $0x76c,%edx
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
mov    -0x34(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x2c(%rbp),%r11d
mov    -0x28(%rbp),%r10d
mov    -0x40(%rbp),%eax
lea    0xe3f(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e01(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1211 <auto_pwoff_alarm_test_tmdt+0xc1>
lea    0xe3d(%rip),%rdi
call   1060 <perror@plt>
mov    0x2dbe(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
movl   $0x3,-0x5c(%rbp)
movl   $0x6b,-0x58(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x1,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x5,-0x44(%rbp)
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%edx
add    $0x76c,%edx
mov    -0x54(%rbp),%ecx
add    $0x1,%ecx
mov    -0x50(%rbp),%r8d
mov    -0x4c(%rbp),%r9d
mov    -0x48(%rbp),%r11d
mov    -0x44(%rbp),%r10d
mov    -0x5c(%rbp),%eax
lea    0xde1(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%edi
mov    0x2d56(%rip),%rax
mov    (%rax),%esi
lea    -0x78(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    12c4 <auto_pwoff_alarm_test_tmdt+0x174>
lea    0xde5(%rip),%rdi
call   1060 <perror@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
lea    0xddd(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
lea    0xdf0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    $0x70,%edi
mov    $0x23,%esi
call   1030 <_IO@plt>
mov    -0x7c(%rbp),%edi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <ioctl@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    133c <auto_pwoff_alarm_test_tmdt+0x1ec>
lea    0xdbf(%rip),%rdi
call   1060 <perror@plt>
mov    0x2c93(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auto_pwoff_alarm_test_tmdt>:
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %edi,%ebx
movaps 0xea0(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x3b00000017,%rax
mov    %rax,0x10(%rsp)
movl   $0x37,0x18(%rsp)
mov    0x2e4e(%rip),%r14
mov    (%r14),%edi
sub    $0x8,%rsp
lea    0xe90(%rip),%rsi
mov    $0x7d6,%edx
mov    $0xc,%ecx
mov    $0x1f,%r8d
mov    $0x17,%r9d
xor    %eax,%eax
push   $0x2
push   $0x37
push   $0x3b
call   1050 <fprintf@plt>
add    $0x20,%rsp
mov    0x2e22(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    %ebx,%edi
call   1040 <ioctl@plt>
cmp    $0xffffffff,%eax
je     1287 <auto_pwoff_alarm_test_tmdt+0x137>
movaps 0xe36(%rip),%xmm0
movups %xmm0,0x5c(%rsp)
movq   $0x0,0x6c(%rsp)
movl   $0x5,0x74(%rsp)
mov    (%r14),%edi
sub    $0x8,%rsp
lea    0xe77(%rip),%rsi
mov    $0x7d7,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x3
push   $0x5
push   $0x0
call   1050 <fprintf@plt>
add    $0x20,%rsp
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdx
mov    %ebx,%edi
call   1040 <ioctl@plt>
cmp    $0xffffffff,%eax
je     1290 <auto_pwoff_alarm_test_tmdt+0x140>
mov    (%r14),%edi
lea    0xe8b(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r14),%edi
lea    0xea4(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x70,%edi
mov    $0x23,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <ioctl@plt>
cmp    $0xffffffff,%eax
je     1299 <auto_pwoff_alarm_test_tmdt+0x149>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret
lea    0xdcd(%rip),%rdi
jmp    12a0 <auto_pwoff_alarm_test_tmdt+0x150>
lea    0xe1f(%rip),%rdi
jmp    12a0 <auto_pwoff_alarm_test_tmdt+0x150>
lea    0xe68(%rip),%rdi
call   1060 <perror@plt>
mov    0x2d1c(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%struct.rtc_time = type { i32, i32, i32, i32, i32, i32, i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.rtc_wkalrm = type { i32, i32, i32, i32, i32, i32, i32, %struct.TYPE_2__ }
@stderr = global i32 0
@.str = [59 x i8] c"Set RTC date/time is %04d-%02d-%02d, %02d:%02d:%02d w(%d)\0A\00"
@RTC_SET_TIME = global i32 0
@.str.1 = [26 x i8] c"ioctl RTC_SET_TIME fail!\0A\00"
@errno = global i32 0
@.str.2 = [65 x i8] c"Set RTC alarm date/time is %04d-%02d-%02d, %02d:%02d:%02d w(%d)\0A\00"
@RTC_WKALM_SET = global i32 0
@.str.3 = [27 x i8] c"ioctl RTC_WKALM_SET fail!\0A\00"
@.str.4 = [42 x i8] c"Waiting 10 seconds for poweroff alarm...\0A\00"
@.str.5 = [13 x i8] c"Sleeping...\0A\00"
@.str.6 = [25 x i8] c"ioctl RTC_PWR_OFF fail!\0A\00"
define i32 @auto_pwoff_alarm_test_tmdt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.rtc_time
%5 = alloca %struct.rtc_wkalrm
store i32 %0, i32* %2
%6 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 0
store i32 2, i32* %6
%7 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 1
store i32 106, i32* %7
%8 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 2
store i32 11, i32* %8
%9 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 3
store i32 31, i32* %9
%10 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 4
store i32 23, i32* %10
%11 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 5
store i32 59, i32* %11
%12 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 6
store i32 55, i32* %12
%13 = load i32, i32* @stderr
%14 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 1
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 1900
%17 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 2
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
%20 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 3
%21 = load i32, i32* %20
%22 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 4
%23 = load i32, i32* %22
%24 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 5
%25 = load i32, i32* %24
%26 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 6
%27 = load i32, i32* %26
%28 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %4, i32 0, i32 0
%29 = load i32, i32* %28
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %19, i32 %21, i32 %23, i32 %25, i32 %27, i32 %29)
%31 = load i32, i32* %2
%32 = load i32, i32* @RTC_SET_TIME
%33 = bitcast %struct.rtc_time* %4 to %struct.rtc_wkalrm*
%34 = call i32 @ioctl(i32 %31, i32 %32, %struct.rtc_wkalrm* %33)
store i32 %34, i32* %3
%35 = load i32, i32* %3
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %41
37: ; preds = %1
%38 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%39 = load i32, i32* @errno
%40 = call i32 @exit(i32 %39)
unreachable
41: ; preds = %1
%42 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%43 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %42, i32 0, i32 0
store i32 3, i32* %43
%44 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%45 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %44, i32 0, i32 1
store i32 107, i32* %45
%46 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%47 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %46, i32 0, i32 2
store i32 0, i32* %47
%48 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%49 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %48, i32 0, i32 3
store i32 1, i32* %49
%50 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%51 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %50, i32 0, i32 4
store i32 0, i32* %51
%52 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%53 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %52, i32 0, i32 5
store i32 0, i32* %53
%54 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%55 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %54, i32 0, i32 6
store i32 5, i32* %55
%56 = load i32, i32* @stderr
%57 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%58 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %57, i32 0, i32 1
%59 = load i32, i32* %58
%60 = add nsw i32 %59, 1900
%61 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%62 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %61, i32 0, i32 2
%63 = load i32, i32* %62
%64 = add nsw i32 %63, 1
%65 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%66 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %65, i32 0, i32 3
%67 = load i32, i32* %66
%68 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%69 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %68, i32 0, i32 4
%70 = load i32, i32* %69
%71 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%72 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %71, i32 0, i32 5
%73 = load i32, i32* %72
%74 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%75 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %74, i32 0, i32 6
%76 = load i32, i32* %75
%77 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %5, i32 0, i32 7
%78 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %77, i32 0, i32 0
%79 = load i32, i32* %78
%80 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i32 %60, i32 %64, i32 %67, i32 %70, i32 %73, i32 %76, i32 %79)
%81 = load i32, i32* %2
%82 = load i32, i32* @RTC_WKALM_SET
%83 = call i32 @ioctl(i32 %81, i32 %82, %struct.rtc_wkalrm* %5)
store i32 %83, i32* %3
%84 = load i32, i32* %3
%85 = icmp eq i32 %84, -1
br i1 %85, label %86, label %90
86: ; preds = %41
%87 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%88 = load i32, i32* @errno
%89 = call i32 @exit(i32 %88)
unreachable
90: ; preds = %41
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
%93 = load i32, i32* @stderr
%94 = call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%95 = load i32, i32* %2
%96 = call i32 @_IO(i8 signext 112, i32 35)
%97 = call i32 @ioctl(i32 %95, i32 %96, %struct.rtc_wkalrm* null)
store i32 %97, i32* %3
%98 = load i32, i32* %3
%99 = icmp eq i32 %98, -1
br i1 %99, label %100, label %104
100: ; preds = %90
%101 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%102 = load i32, i32* @errno
%103 = call i32 @exit(i32 %102)
unreachable
104: ; preds = %90
ret i32 0
}

LLVM IR (-O2):
%struct.rtc_time = type { i32, i32, i32, i32, i32, i32, i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.rtc_wkalrm = type { i32, i32, i32, i32, i32, i32, i32, %struct.TYPE_2__ }
@stderr = global i32 0
@.str = [59 x i8] c"Set RTC date/time is %04d-%02d-%02d, %02d:%02d:%02d w(%d)\0A\00"
@RTC_SET_TIME = global i32 0
@.str.1 = [26 x i8] c"ioctl RTC_SET_TIME fail!\0A\00"
@errno = global i32 0
@.str.2 = [65 x i8] c"Set RTC alarm date/time is %04d-%02d-%02d, %02d:%02d:%02d w(%d)\0A\00"
@RTC_WKALM_SET = global i32 0
@.str.3 = [27 x i8] c"ioctl RTC_WKALM_SET fail!\0A\00"
@.str.4 = [42 x i8] c"Waiting 10 seconds for poweroff alarm...\0A\00"
@.str.5 = [13 x i8] c"Sleeping...\0A\00"
@.str.6 = [25 x i8] c"ioctl RTC_PWR_OFF fail!\0A\00"
define i32 @auto_pwoff_alarm_test_tmdt(i32 %0) {
%2 = alloca %struct.rtc_time
%3 = alloca %struct.rtc_wkalrm
%4 = bitcast %struct.rtc_time* %2 to i8*
%5 = bitcast %struct.rtc_wkalrm* %3 to i8*
%6 = bitcast %struct.rtc_time* %2 to <4 x i32>*
store <4 x i32> <i32 2, i32 106, i32 11, i32 31>, <4 x i32>* %6
%7 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %2, i64 0, i32 4
store i32 23, i32* %7
%8 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %2, i64 0, i32 5
store i32 59, i32* %8
%9 = getelementptr inbounds %struct.rtc_time, %struct.rtc_time* %2, i64 0, i32 6
store i32 55, i32* %9
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 2006, i32 12, i32 31, i32 23, i32 59, i32 55, i32 2)
%12 = load i32, i32* @RTC_SET_TIME
%13 = bitcast %struct.rtc_time* %2 to %struct.rtc_wkalrm*
%14 = call i32 @ioctl(i32 %0, i32 %12, %struct.rtc_wkalrm* %13)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %20
16: ; preds = %1
%17 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @errno
%19 = call i32 @exit(i32 %18)
unreachable
20: ; preds = %1
%21 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %3, i64 0, i32 7, i32 0
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 3, i32 107, i32 0, i32 1>, <4 x i32>* %22
%23 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %3, i64 0, i32 7, i32 4
store i32 0, i32* %23
%24 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %3, i64 0, i32 7, i32 5
store i32 0, i32* %24
%25 = getelementptr inbounds %struct.rtc_wkalrm, %struct.rtc_wkalrm* %3, i64 0, i32 7, i32 6
store i32 5, i32* %25
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i32 2007, i32 1, i32 1, i32 0, i32 0, i32 5, i32 3)
%28 = load i32, i32* @RTC_WKALM_SET
%29 = call i32 @ioctl(i32 %0, i32 %28, %struct.rtc_wkalrm* %3)
%30 = icmp eq i32 %29, -1
br i1 %30, label %31, label %35
31: ; preds = %20
%32 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%33 = load i32, i32* @errno
%34 = call i32 @exit(i32 %33)
unreachable
35: ; preds = %20
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%40 = call i32 @_IO(i8 signext 112, i32 35)
%41 = call i32 @ioctl(i32 %0, i32 %40, %struct.rtc_wkalrm* null)
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %47
43: ; preds = %35
%44 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%45 = load i32, i32* @errno
%46 = call i32 @exit(i32 %45)
unreachable
47: ; preds = %35
ret i32 0
}