#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 */

/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
int /*<<< orphan*/ pmu_set_adc_period(int);
int /*<<< orphan*/ pmu_set_sar_override(int);
void pmu_set_clk_init() {
  mbus_remote_register_write(
      0x6, 0x17, ((3 << 14) | (0 << 13) | (0xF << 9) | (0x0 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(
      0x6, 0x17, ((3 << 14) | (0 << 13) | (0xF << 9) | (0x0 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(
      0x6, 0x18, ((3 << 14) | (0 << 13) | (2 << 9) | (12 << 5) | (16)));
  delay(100);
  mbus_remote_register_write(0x6, 0x19,
                             ((0 << 13) | (0xF << 9) | (0x0 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x1A,
                             ((0 << 13) | (4 << 9) | (1 << 5) | (16)));
  delay(100);
  mbus_remote_register_write(0x6, 0x15,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (0 << 13) | (0xF << 9) | (0x0 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x16,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (0 << 13) | (7 << 9) | (12 << 5) | (16)));
  delay(100);
  mbus_remote_register_write(0x6, 0x05,
                             ((0 << 13) | (0 << 12) | (1 << 11) | (0 << 10) |
                              (0 << 9) | (0 << 8) | (0 << 7) | (0x45)));
  delay(100);
  pmu_set_sar_override(0x4D);
  pmu_set_adc_period(1);
}


x86 assembly (clang, -O0):
<pmu_set_clk_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xde01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xde01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x18,%esi
mov    $0xc590,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x1e01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x1a,%esi
mov    $0x830,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xde01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x16,%esi
mov    $0xcf90,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x5,%esi
mov    $0x845,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x4d,%edi
call   1050 <pmu_set_sar_override@plt>
mov    $0x1,%edi
call   1060 <pmu_set_adc_period@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_clk_init>:
push   %rax
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xde01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xde01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x18,%esi
mov    $0xc590,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x1e01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x1a,%esi
mov    $0x830,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xde01,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x16,%esi
mov    $0xcf90,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x5,%esi
mov    $0x845,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x4d,%edi
call   1050 <pmu_set_sar_override@plt>
mov    $0x1,%edi
pop    %rax
jmp    1060 <pmu_set_adc_period@plt>

LLVM IR (-O0):
define void @pmu_set_clk_init() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 23, i32 56833)
%2 = call i32 @delay(i32 100)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 23, i32 56833)
%4 = call i32 @delay(i32 100)
%5 = call i32 @mbus_remote_register_write(i32 6, i32 24, i32 50576)
%6 = call i32 @delay(i32 100)
%7 = call i32 @mbus_remote_register_write(i32 6, i32 25, i32 7681)
%8 = call i32 @delay(i32 100)
%9 = call i32 @mbus_remote_register_write(i32 6, i32 26, i32 2096)
%10 = call i32 @delay(i32 100)
%11 = call i32 @mbus_remote_register_write(i32 6, i32 21, i32 56833)
%12 = call i32 @delay(i32 100)
%13 = call i32 @mbus_remote_register_write(i32 6, i32 22, i32 53136)
%14 = call i32 @delay(i32 100)
%15 = call i32 @mbus_remote_register_write(i32 6, i32 5, i32 2117)
%16 = call i32 @delay(i32 100)
%17 = call i32 @pmu_set_sar_override(i32 77)
%18 = call i32 @pmu_set_adc_period(i32 1)
ret void
}

LLVM IR (-O2):
define void @pmu_set_clk_init() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 23, i32 56833)
%2 = tail call i32 @delay(i32 100)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 23, i32 56833)
%4 = tail call i32 @delay(i32 100)
%5 = tail call i32 @mbus_remote_register_write(i32 6, i32 24, i32 50576)
%6 = tail call i32 @delay(i32 100)
%7 = tail call i32 @mbus_remote_register_write(i32 6, i32 25, i32 7681)
%8 = tail call i32 @delay(i32 100)
%9 = tail call i32 @mbus_remote_register_write(i32 6, i32 26, i32 2096)
%10 = tail call i32 @delay(i32 100)
%11 = tail call i32 @mbus_remote_register_write(i32 6, i32 21, i32 56833)
%12 = tail call i32 @delay(i32 100)
%13 = tail call i32 @mbus_remote_register_write(i32 6, i32 22, i32 53136)
%14 = tail call i32 @delay(i32 100)
%15 = tail call i32 @mbus_remote_register_write(i32 6, i32 5, i32 2117)
%16 = tail call i32 @delay(i32 100)
%17 = tail call i32 @pmu_set_sar_override(i32 77)
%18 = tail call i32 @pmu_set_adc_period(i32 1)
ret void
}