#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*/ printk(char *, ...);
int /*<<< orphan*/ rockchip_wifi_power(int /*<<< orphan*/);
int sif_get_bt_config();
void sif_platform_target_poweroff(void) {
  printk("=======================================================\n");
  printk("==== Dislaunching Wi-Fi driver! (Powered by Rockchip) ====\n");
  printk("=======================================================\n");
  printk("Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip, "
         "Ver2.25(03/10/2015),Drv: %s) exit.\n",
         "2.25");
  if (sif_get_bt_config() != 1)
    rockchip_wifi_power(0);
}


x86 assembly (clang, -O0):
<sif_platform_target_poweroff>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
lea    0xf10(%rip),%rdi
lea    0xf66(%rip),%rsi
mov    $0x0,%al
call   1030 <printk@plt>
mov    $0x0,%al
call   1050 <sif_get_bt_config@plt>
cmp    $0x1,%eax
je     118a <sif_platform_target_poweroff+0x5a>
xor    %edi,%edi
call   1040 <rockchip_wifi_power@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sif_platform_target_poweroff>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printk@plt>
lea    0xef0(%rip),%rdi
xor    %eax,%eax
call   1030 <printk@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printk@plt>
lea    0xf14(%rip),%rdi
lea    0xf6a(%rip),%rsi
xor    %eax,%eax
call   1030 <printk@plt>
xor    %eax,%eax
call   1050 <sif_get_bt_config@plt>
cmp    $0x1,%eax
jne    117d <sif_platform_target_poweroff+0x4d>
pop    %rbx
ret
xor    %edi,%edi
pop    %rbx
jmp    1040 <rockchip_wifi_power@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"=======================================================\0A\00"
@.str.1 = [60 x i8] c"==== Dislaunching Wi-Fi driver! (Powered by Rockchip) ====\0A\00"
@.str.2 = [93 x i8] c"Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip, Ver2.25(03/10/2015),Drv: %s) exit.\0A\00"
@.str.3 = [5 x i8] c"2.25\00"
define void @sif_platform_target_poweroff() {
%1 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @sif_get_bt_config()
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @rockchip_wifi_power(i32 0)
br label %9
9: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"=======================================================\0A\00"
@.str.1 = [60 x i8] c"==== Dislaunching Wi-Fi driver! (Powered by Rockchip) ====\0A\00"
@.str.2 = [93 x i8] c"Espressif ESP8089 SDIO WiFi driver (Powered by Rockchip, Ver2.25(03/10/2015),Drv: %s) exit.\0A\00"
@.str.3 = [5 x i8] c"2.25\00"
define void @sif_platform_target_poweroff() {
%1 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 (...) @sif_get_bt_config()
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = tail call i32 @rockchip_wifi_power(i32 0)
br label %9
9: ; preds = %7, %0
ret void
}