#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*/ pmu_adc_enable_sleep();
int /*<<< orphan*/ pmu_adc_reset_setting();
int /*<<< orphan*/ pmu_reg_write(int, int);
int /*<<< orphan*/ pmu_reset_solar_short();
int /*<<< orphan*/ pmu_set_active_clk(int, int, int, int);
int /*<<< orphan*/ pmu_set_sar_override(int);
int /*<<< orphan*/ pmu_set_sleep_clk(int, int, int, int);
void pmu_init() {
  pmu_set_active_clk(0xf, 0xf, 0x3f, 0xd);
  pmu_set_sleep_clk(0xf, 0xf, 0x3f, 0xf);
  pmu_reg_write(0x05, ((0 << 13) | (0 << 12) | (1 << 11) | (0 << 10) |
                       (0 << 9) | (0 << 8) | (0 << 7) | (0x45)));
  pmu_set_sar_override(0x3C);
  pmu_reset_solar_short();
  pmu_reg_write(0x45, ((0x0 << 9) | (0x0 << 8) | (0x48 << 0)));
  pmu_reg_write(0x3A,
                ((1 << 20) | (0 << 19) | (1 << 13) | (1 << 12) | (1 << 11)));
  pmu_adc_reset_setting();
  pmu_adc_enable_sleep();
}


x86 assembly (clang, -O0):
<pmu_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%esi
mov    $0x3f,%edx
mov    $0xd,%ecx
mov    %esi,%edi
call   1040 <pmu_set_active_clk@plt>
mov    $0xf,%ecx
mov    $0x3f,%edx
mov    %ecx,%edi
mov    %ecx,%esi
call   1030 <pmu_set_sleep_clk@plt>
mov    $0x5,%edi
mov    $0x845,%esi
call   1050 <pmu_reg_write@plt>
mov    $0x3c,%edi
call   1080 <pmu_set_sar_override@plt>
mov    $0x0,%al
call   1090 <pmu_reset_solar_short@plt>
mov    $0x45,%edi
mov    $0x48,%esi
call   1050 <pmu_reg_write@plt>
mov    $0x3a,%edi
mov    $0x103800,%esi
call   1050 <pmu_reg_write@plt>
mov    $0x0,%al
call   1060 <pmu_adc_reset_setting@plt>
mov    $0x0,%al
call   1070 <pmu_adc_enable_sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_init>:
push   %rax
mov    $0xf,%edi
mov    $0xf,%esi
mov    $0x3f,%edx
mov    $0xd,%ecx
call   1040 <pmu_set_active_clk@plt>
mov    $0xf,%edi
mov    $0xf,%esi
mov    $0x3f,%edx
mov    $0xf,%ecx
call   1030 <pmu_set_sleep_clk@plt>
mov    $0x5,%edi
mov    $0x845,%esi
call   1050 <pmu_reg_write@plt>
mov    $0x3c,%edi
call   1080 <pmu_set_sar_override@plt>
xor    %eax,%eax
call   1090 <pmu_reset_solar_short@plt>
mov    $0x45,%edi
mov    $0x48,%esi
call   1050 <pmu_reg_write@plt>
mov    $0x3a,%edi
mov    $0x103800,%esi
call   1050 <pmu_reg_write@plt>
xor    %eax,%eax
call   1060 <pmu_adc_reset_setting@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <pmu_adc_enable_sleep@plt>

LLVM IR (-O0):
define void @pmu_init() {
%1 = call i32 @pmu_set_active_clk(i32 15, i32 15, i32 63, i32 13)
%2 = call i32 @pmu_set_sleep_clk(i32 15, i32 15, i32 63, i32 15)
%3 = call i32 @pmu_reg_write(i32 5, i32 2117)
%4 = call i32 @pmu_set_sar_override(i32 60)
%5 = call i32 (...) @pmu_reset_solar_short()
%6 = call i32 @pmu_reg_write(i32 69, i32 72)
%7 = call i32 @pmu_reg_write(i32 58, i32 1062912)
%8 = call i32 (...) @pmu_adc_reset_setting()
%9 = call i32 (...) @pmu_adc_enable_sleep()
ret void
}

LLVM IR (-O2):
define void @pmu_init() {
%1 = tail call i32 @pmu_set_active_clk(i32 15, i32 15, i32 63, i32 13)
%2 = tail call i32 @pmu_set_sleep_clk(i32 15, i32 15, i32 63, i32 15)
%3 = tail call i32 @pmu_reg_write(i32 5, i32 2117)
%4 = tail call i32 @pmu_set_sar_override(i32 60)
%5 = tail call i32 (...) @pmu_reset_solar_short()
%6 = tail call i32 @pmu_reg_write(i32 69, i32 72)
%7 = tail call i32 @pmu_reg_write(i32 58, i32 1062912)
%8 = tail call i32 (...) @pmu_adc_reset_setting()
%9 = tail call i32 (...) @pmu_adc_enable_sleep()
ret void
}