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

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ write16(char *, int, int);
int /*<<< orphan*/ write32(char *, int, int);
int _set_RDA(char *BASE1, int print, unsigned int samples_to_collect,
             int skip_samples, int fifo_lvl, int channel) {
  struct timespec start, stop;
  unsigned int *to_write;
  clock_gettime(CLOCK_REALTIME, &start);
  if (channel == 0) {
    write16(BASE1, 0x300, 0x0002);
    write16(BASE1, 0x400, 0x0002);
    write16(BASE1, 0x500, 0x0002);
    write32(BASE1, 0x30c, fifo_lvl);
    write32(BASE1, 0x40c, fifo_lvl);
    write32(BASE1, 0x50c, fifo_lvl);
    write32(BASE1, 0x304, samples_to_collect);
    write32(BASE1, 0x404, samples_to_collect);
    write32(BASE1, 0x504, samples_to_collect);
    write32(BASE1, 0x308, skip_samples);
    write32(BASE1, 0x408, skip_samples);
    write32(BASE1, 0x508, skip_samples);
    write32(BASE1, 0x314, samples_to_collect);
    write32(BASE1, 0x414, samples_to_collect);
    write32(BASE1, 0x514, samples_to_collect);
    write32(BASE1, 0x310, 0x8);
    write32(BASE1, 0x410, 0x8);
    write32(BASE1, 0x510, 0x8);
  } else if (channel == 1) {
    write16(BASE1, 0x340, 0x0002);
    write16(BASE1, 0x440, 0x0002);
    write16(BASE1, 0x540, 0x0002);
    write32(BASE1, 0x34c, fifo_lvl);
    write32(BASE1, 0x44c, fifo_lvl);
    write32(BASE1, 0x54c, fifo_lvl);
    write32(BASE1, 0x344, samples_to_collect);
    write32(BASE1, 0x444, samples_to_collect);
    write32(BASE1, 0x544, samples_to_collect);
    write32(BASE1, 0x348, skip_samples);
    write32(BASE1, 0x448, skip_samples);
    write32(BASE1, 0x548, skip_samples);
    write32(BASE1, 0x354, samples_to_collect);
    write32(BASE1, 0x454, samples_to_collect);
    write32(BASE1, 0x554, samples_to_collect);
    write32(BASE1, 0x350, 0x8);
    write32(BASE1, 0x450, 0x8);
    write32(BASE1, 0x550, 0x8);
  } else if (channel == 2) {
    write16(BASE1, 0x380, 0x0002);
    write16(BASE1, 0x480, 0x0002);
    write16(BASE1, 0x580, 0x0002);
    write32(BASE1, 0x38c, fifo_lvl);
    write32(BASE1, 0x48c, fifo_lvl);
    write32(BASE1, 0x58c, fifo_lvl);
    write32(BASE1, 0x384, samples_to_collect);
    write32(BASE1, 0x484, samples_to_collect);
    write32(BASE1, 0x584, samples_to_collect);
    write32(BASE1, 0x388, skip_samples);
    write32(BASE1, 0x488, skip_samples);
    write32(BASE1, 0x588, skip_samples);
    write32(BASE1, 0x394, samples_to_collect);
    write32(BASE1, 0x494, samples_to_collect);
    write32(BASE1, 0x594, samples_to_collect);
    write32(BASE1, 0x390, 0x8);
    write32(BASE1, 0x490, 0x8);
    write32(BASE1, 0x590, 0x8);
  } else if (channel == 3) {
    write16(BASE1, 0x3c0, 0x0002);
    write16(BASE1, 0x4c0, 0x0002);
    write16(BASE1, 0x5c0, 0x0002);
    write32(BASE1, 0x3cc, fifo_lvl);
    write32(BASE1, 0x4cc, fifo_lvl);
    write32(BASE1, 0x5cc, fifo_lvl);
    write32(BASE1, 0x3c4, samples_to_collect);
    write32(BASE1, 0x4c4, samples_to_collect);
    write32(BASE1, 0x5c4, samples_to_collect);
    write32(BASE1, 0x3c8, skip_samples);
    write32(BASE1, 0x4c8, skip_samples);
    write32(BASE1, 0x5c8, skip_samples);
    write32(BASE1, 0x3d4, samples_to_collect);
    write32(BASE1, 0x4d4, samples_to_collect);
    write32(BASE1, 0x5d4, samples_to_collect);
    write32(BASE1, 0x3d0, 0x8);
    write32(BASE1, 0x4d0, 0x8);
    write32(BASE1, 0x5d0, 0x8);
  }
  return 1;
}


x86 assembly (clang, -O0):
<_set_RDA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
call   1040 <clock_gettime@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    12ac <_set_RDA+0x17c>
mov    -0x8(%rbp),%rdi
mov    $0x300,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x400,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x500,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x30c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x40c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x50c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x304,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x404,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x504,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x308,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x408,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x508,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x314,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x414,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x514,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x310,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x410,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x510,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
jmp    169d <_set_RDA+0x56d>
cmpl   $0x1,-0x1c(%rbp)
jne    13f9 <_set_RDA+0x2c9>
mov    -0x8(%rbp),%rdi
mov    $0x340,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x440,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x540,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x34c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x44c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x54c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x344,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x444,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x544,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x348,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x448,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x548,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x354,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x454,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x554,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x350,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x450,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x550,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
jmp    1698 <_set_RDA+0x568>
cmpl   $0x2,-0x1c(%rbp)
jne    1546 <_set_RDA+0x416>
mov    -0x8(%rbp),%rdi
mov    $0x380,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x480,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x580,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x38c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x48c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x58c,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x384,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x484,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x584,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x388,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x488,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x588,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x394,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x494,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x594,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x390,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x490,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x590,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
jmp    1693 <_set_RDA+0x563>
cmpl   $0x3,-0x1c(%rbp)
jne    168e <_set_RDA+0x55e>
mov    -0x8(%rbp),%rdi
mov    $0x3c0,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4c0,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5c0,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x3cc,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x4cc,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0x5cc,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x3c4,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x4c4,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x5c4,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x3c8,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x4c8,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x5c8,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x3d4,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x4d4,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x5d4,%esi
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3d0,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4d0,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5d0,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
jmp    1693 <_set_RDA+0x563>
jmp    1698 <_set_RDA+0x568>
jmp    169d <_set_RDA+0x56d>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_RDA>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9d,%ebx
mov    %r8d,%r12d
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %rdi,%r14
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0x40(%rsp),%rsi
call   1040 <clock_gettime@plt>
cmp    $0x3,%ebx
ja     1321 <_set_RDA+0x1f1>
shl    $0x6,%ebx
lea    0x300(%rbx),%esi
lea    0x400(%rbx),%r13d
lea    0x500(%rbx),%eax
mov    %eax,0x4(%rsp)
lea    0x30c(%rbx),%eax
mov    %eax,0x8(%rsp)
lea    0x40c(%rbx),%eax
mov    %eax,0xc(%rsp)
lea    0x50c(%rbx),%eax
mov    %eax,0x10(%rsp)
lea    0x304(%rbx),%eax
mov    %eax,0x14(%rsp)
lea    0x404(%rbx),%eax
mov    %eax,0x18(%rsp)
lea    0x504(%rbx),%eax
mov    %eax,0x1c(%rsp)
lea    0x308(%rbx),%eax
mov    %eax,0x20(%rsp)
lea    0x408(%rbx),%eax
mov    %eax,0x24(%rsp)
lea    0x508(%rbx),%eax
mov    %eax,0x28(%rsp)
lea    0x314(%rbx),%eax
mov    %eax,0x2c(%rsp)
lea    0x414(%rbx),%eax
mov    %eax,0x30(%rsp)
lea    0x514(%rbx),%eax
mov    %eax,0x34(%rsp)
lea    0x310(%rbx),%eax
mov    %eax,0x38(%rsp)
lea    0x410(%rbx),%eax
mov    %eax,0x3c(%rsp)
add    $0x510,%ebx
mov    %r14,%rdi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    %r14,%rdi
mov    %r13d,%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    %r14,%rdi
mov    0x4(%rsp),%esi
mov    $0x2,%edx
call   1050 <write16@plt>
mov    %r14,%rdi
mov    0x8(%rsp),%esi
mov    %r12d,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0xc(%rsp),%esi
mov    %r12d,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x10(%rsp),%esi
mov    %r12d,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x14(%rsp),%esi
mov    %ebp,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x18(%rsp),%esi
mov    %ebp,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x1c(%rsp),%esi
mov    %ebp,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x20(%rsp),%esi
mov    %r15d,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x24(%rsp),%esi
mov    %r15d,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x28(%rsp),%esi
mov    %r15d,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x2c(%rsp),%esi
mov    %ebp,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x30(%rsp),%esi
mov    %ebp,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x34(%rsp),%esi
mov    %ebp,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x38(%rsp),%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    0x3c(%rsp),%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x8,%edx
call   1030 <write32@plt>
mov    $0x1,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @_set_RDA(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca %struct.timespec
%14 = alloca %struct.timespec
%15 = alloca i32*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%16 = load i32, i32* @CLOCK_REALTIME
%17 = call i32 @clock_gettime(i32 %16, %struct.timespec* %13)
%18 = load i32, i32* %12
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %69
20: ; preds = %6
%21 = load i8*, i8** %7
%22 = call i32 @write16(i8* %21, i32 768, i32 2)
%23 = load i8*, i8** %7
%24 = call i32 @write16(i8* %23, i32 1024, i32 2)
%25 = load i8*, i8** %7
%26 = call i32 @write16(i8* %25, i32 1280, i32 2)
%27 = load i8*, i8** %7
%28 = load i32, i32* %11
%29 = call i32 @write32(i8* %27, i32 780, i32 %28)
%30 = load i8*, i8** %7
%31 = load i32, i32* %11
%32 = call i32 @write32(i8* %30, i32 1036, i32 %31)
%33 = load i8*, i8** %7
%34 = load i32, i32* %11
%35 = call i32 @write32(i8* %33, i32 1292, i32 %34)
%36 = load i8*, i8** %7
%37 = load i32, i32* %9
%38 = call i32 @write32(i8* %36, i32 772, i32 %37)
%39 = load i8*, i8** %7
%40 = load i32, i32* %9
%41 = call i32 @write32(i8* %39, i32 1028, i32 %40)
%42 = load i8*, i8** %7
%43 = load i32, i32* %9
%44 = call i32 @write32(i8* %42, i32 1284, i32 %43)
%45 = load i8*, i8** %7
%46 = load i32, i32* %10
%47 = call i32 @write32(i8* %45, i32 776, i32 %46)
%48 = load i8*, i8** %7
%49 = load i32, i32* %10
%50 = call i32 @write32(i8* %48, i32 1032, i32 %49)
%51 = load i8*, i8** %7
%52 = load i32, i32* %10
%53 = call i32 @write32(i8* %51, i32 1288, i32 %52)
%54 = load i8*, i8** %7
%55 = load i32, i32* %9
%56 = call i32 @write32(i8* %54, i32 788, i32 %55)
%57 = load i8*, i8** %7
%58 = load i32, i32* %9
%59 = call i32 @write32(i8* %57, i32 1044, i32 %58)
%60 = load i8*, i8** %7
%61 = load i32, i32* %9
%62 = call i32 @write32(i8* %60, i32 1300, i32 %61)
%63 = load i8*, i8** %7
%64 = call i32 @write32(i8* %63, i32 784, i32 8)
%65 = load i8*, i8** %7
%66 = call i32 @write32(i8* %65, i32 1040, i32 8)
%67 = load i8*, i8** %7
%68 = call i32 @write32(i8* %67, i32 1296, i32 8)
br label %228
69: ; preds = %6
%70 = load i32, i32* %12
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %121
72: ; preds = %69
%73 = load i8*, i8** %7
%74 = call i32 @write16(i8* %73, i32 832, i32 2)
%75 = load i8*, i8** %7
%76 = call i32 @write16(i8* %75, i32 1088, i32 2)
%77 = load i8*, i8** %7
%78 = call i32 @write16(i8* %77, i32 1344, i32 2)
%79 = load i8*, i8** %7
%80 = load i32, i32* %11
%81 = call i32 @write32(i8* %79, i32 844, i32 %80)
%82 = load i8*, i8** %7
%83 = load i32, i32* %11
%84 = call i32 @write32(i8* %82, i32 1100, i32 %83)
%85 = load i8*, i8** %7
%86 = load i32, i32* %11
%87 = call i32 @write32(i8* %85, i32 1356, i32 %86)
%88 = load i8*, i8** %7
%89 = load i32, i32* %9
%90 = call i32 @write32(i8* %88, i32 836, i32 %89)
%91 = load i8*, i8** %7
%92 = load i32, i32* %9
%93 = call i32 @write32(i8* %91, i32 1092, i32 %92)
%94 = load i8*, i8** %7
%95 = load i32, i32* %9
%96 = call i32 @write32(i8* %94, i32 1348, i32 %95)
%97 = load i8*, i8** %7
%98 = load i32, i32* %10
%99 = call i32 @write32(i8* %97, i32 840, i32 %98)
%100 = load i8*, i8** %7
%101 = load i32, i32* %10
%102 = call i32 @write32(i8* %100, i32 1096, i32 %101)
%103 = load i8*, i8** %7
%104 = load i32, i32* %10
%105 = call i32 @write32(i8* %103, i32 1352, i32 %104)
%106 = load i8*, i8** %7
%107 = load i32, i32* %9
%108 = call i32 @write32(i8* %106, i32 852, i32 %107)
%109 = load i8*, i8** %7
%110 = load i32, i32* %9
%111 = call i32 @write32(i8* %109, i32 1108, i32 %110)
%112 = load i8*, i8** %7
%113 = load i32, i32* %9
%114 = call i32 @write32(i8* %112, i32 1364, i32 %113)
%115 = load i8*, i8** %7
%116 = call i32 @write32(i8* %115, i32 848, i32 8)
%117 = load i8*, i8** %7
%118 = call i32 @write32(i8* %117, i32 1104, i32 8)
%119 = load i8*, i8** %7
%120 = call i32 @write32(i8* %119, i32 1360, i32 8)
br label %227
121: ; preds = %69
%122 = load i32, i32* %12
%123 = icmp eq i32 %122, 2
br i1 %123, label %124, label %173
124: ; preds = %121
%125 = load i8*, i8** %7
%126 = call i32 @write16(i8* %125, i32 896, i32 2)
%127 = load i8*, i8** %7
%128 = call i32 @write16(i8* %127, i32 1152, i32 2)
%129 = load i8*, i8** %7
%130 = call i32 @write16(i8* %129, i32 1408, i32 2)
%131 = load i8*, i8** %7
%132 = load i32, i32* %11
%133 = call i32 @write32(i8* %131, i32 908, i32 %132)
%134 = load i8*, i8** %7
%135 = load i32, i32* %11
%136 = call i32 @write32(i8* %134, i32 1164, i32 %135)
%137 = load i8*, i8** %7
%138 = load i32, i32* %11
%139 = call i32 @write32(i8* %137, i32 1420, i32 %138)
%140 = load i8*, i8** %7
%141 = load i32, i32* %9
%142 = call i32 @write32(i8* %140, i32 900, i32 %141)
%143 = load i8*, i8** %7
%144 = load i32, i32* %9
%145 = call i32 @write32(i8* %143, i32 1156, i32 %144)
%146 = load i8*, i8** %7
%147 = load i32, i32* %9
%148 = call i32 @write32(i8* %146, i32 1412, i32 %147)
%149 = load i8*, i8** %7
%150 = load i32, i32* %10
%151 = call i32 @write32(i8* %149, i32 904, i32 %150)
%152 = load i8*, i8** %7
%153 = load i32, i32* %10
%154 = call i32 @write32(i8* %152, i32 1160, i32 %153)
%155 = load i8*, i8** %7
%156 = load i32, i32* %10
%157 = call i32 @write32(i8* %155, i32 1416, i32 %156)
%158 = load i8*, i8** %7
%159 = load i32, i32* %9
%160 = call i32 @write32(i8* %158, i32 916, i32 %159)
%161 = load i8*, i8** %7
%162 = load i32, i32* %9
%163 = call i32 @write32(i8* %161, i32 1172, i32 %162)
%164 = load i8*, i8** %7
%165 = load i32, i32* %9
%166 = call i32 @write32(i8* %164, i32 1428, i32 %165)
%167 = load i8*, i8** %7
%168 = call i32 @write32(i8* %167, i32 912, i32 8)
%169 = load i8*, i8** %7
%170 = call i32 @write32(i8* %169, i32 1168, i32 8)
%171 = load i8*, i8** %7
%172 = call i32 @write32(i8* %171, i32 1424, i32 8)
br label %226
173: ; preds = %121
%174 = load i32, i32* %12
%175 = icmp eq i32 %174, 3
br i1 %175, label %176, label %225
176: ; preds = %173
%177 = load i8*, i8** %7
%178 = call i32 @write16(i8* %177, i32 960, i32 2)
%179 = load i8*, i8** %7
%180 = call i32 @write16(i8* %179, i32 1216, i32 2)
%181 = load i8*, i8** %7
%182 = call i32 @write16(i8* %181, i32 1472, i32 2)
%183 = load i8*, i8** %7
%184 = load i32, i32* %11
%185 = call i32 @write32(i8* %183, i32 972, i32 %184)
%186 = load i8*, i8** %7
%187 = load i32, i32* %11
%188 = call i32 @write32(i8* %186, i32 1228, i32 %187)
%189 = load i8*, i8** %7
%190 = load i32, i32* %11
%191 = call i32 @write32(i8* %189, i32 1484, i32 %190)
%192 = load i8*, i8** %7
%193 = load i32, i32* %9
%194 = call i32 @write32(i8* %192, i32 964, i32 %193)
%195 = load i8*, i8** %7
%196 = load i32, i32* %9
%197 = call i32 @write32(i8* %195, i32 1220, i32 %196)
%198 = load i8*, i8** %7
%199 = load i32, i32* %9
%200 = call i32 @write32(i8* %198, i32 1476, i32 %199)
%201 = load i8*, i8** %7
%202 = load i32, i32* %10
%203 = call i32 @write32(i8* %201, i32 968, i32 %202)
%204 = load i8*, i8** %7
%205 = load i32, i32* %10
%206 = call i32 @write32(i8* %204, i32 1224, i32 %205)
%207 = load i8*, i8** %7
%208 = load i32, i32* %10
%209 = call i32 @write32(i8* %207, i32 1480, i32 %208)
%210 = load i8*, i8** %7
%211 = load i32, i32* %9
%212 = call i32 @write32(i8* %210, i32 980, i32 %211)
%213 = load i8*, i8** %7
%214 = load i32, i32* %9
%215 = call i32 @write32(i8* %213, i32 1236, i32 %214)
%216 = load i8*, i8** %7
%217 = load i32, i32* %9
%218 = call i32 @write32(i8* %216, i32 1492, i32 %217)
%219 = load i8*, i8** %7
%220 = call i32 @write32(i8* %219, i32 976, i32 8)
%221 = load i8*, i8** %7
%222 = call i32 @write32(i8* %221, i32 1232, i32 8)
%223 = load i8*, i8** %7
%224 = call i32 @write32(i8* %223, i32 1488, i32 8)
br label %225
225: ; preds = %176, %173
br label %226
226: ; preds = %225, %124
br label %227
227: ; preds = %226, %72
br label %228
228: ; preds = %227, %20
ret i32 1
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @_set_RDA(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca %struct.timespec
%8 = bitcast %struct.timespec* %7 to i8*
%9 = load i32, i32* @CLOCK_REALTIME
%10 = call i32 @clock_gettime(i32 %9, %struct.timespec* %7)
%11 = icmp ult i32 %5, 4
br i1 %11, label %12, label %67
12: ; preds = %6
%13 = shl i32 %5, 6
%14 = add i32 %13, 768
%15 = shl i32 %5, 6
%16 = add i32 %15, 1024
%17 = shl i32 %5, 6
%18 = add i32 %17, 1280
%19 = shl i32 %5, 6
%20 = add i32 %19, 780
%21 = shl i32 %5, 6
%22 = add i32 %21, 1036
%23 = shl i32 %5, 6
%24 = add i32 %23, 1292
%25 = shl i32 %5, 6
%26 = add i32 %25, 772
%27 = shl i32 %5, 6
%28 = add i32 %27, 1028
%29 = shl i32 %5, 6
%30 = add i32 %29, 1284
%31 = shl i32 %5, 6
%32 = add i32 %31, 776
%33 = shl i32 %5, 6
%34 = add i32 %33, 1032
%35 = shl i32 %5, 6
%36 = add i32 %35, 1288
%37 = shl i32 %5, 6
%38 = add i32 %37, 788
%39 = shl i32 %5, 6
%40 = add i32 %39, 1044
%41 = shl i32 %5, 6
%42 = add i32 %41, 1300
%43 = shl i32 %5, 6
%44 = add i32 %43, 784
%45 = shl i32 %5, 6
%46 = add i32 %45, 1040
%47 = shl i32 %5, 6
%48 = add i32 %47, 1296
%49 = call i32 @write16(i8* %0, i32 %14, i32 2)
%50 = call i32 @write16(i8* %0, i32 %16, i32 2)
%51 = call i32 @write16(i8* %0, i32 %18, i32 2)
%52 = call i32 @write32(i8* %0, i32 %20, i32 %4)
%53 = call i32 @write32(i8* %0, i32 %22, i32 %4)
%54 = call i32 @write32(i8* %0, i32 %24, i32 %4)
%55 = call i32 @write32(i8* %0, i32 %26, i32 %2)
%56 = call i32 @write32(i8* %0, i32 %28, i32 %2)
%57 = call i32 @write32(i8* %0, i32 %30, i32 %2)
%58 = call i32 @write32(i8* %0, i32 %32, i32 %3)
%59 = call i32 @write32(i8* %0, i32 %34, i32 %3)
%60 = call i32 @write32(i8* %0, i32 %36, i32 %3)
%61 = call i32 @write32(i8* %0, i32 %38, i32 %2)
%62 = call i32 @write32(i8* %0, i32 %40, i32 %2)
%63 = call i32 @write32(i8* %0, i32 %42, i32 %2)
%64 = call i32 @write32(i8* %0, i32 %44, i32 8)
%65 = call i32 @write32(i8* %0, i32 %46, i32 8)
%66 = call i32 @write32(i8* %0, i32 %48, i32 8)
br label %67
67: ; preds = %6, %12
ret i32 1
}