#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*/ os_printoutput(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
scalar_t__ strlen(char *);
void llsif_start() {
  static char cmd[2048] = {0};
  if (strlen(cmd) == 0) {
    sprintf(cmd, "adb shell am start -n %s/%s", "klb.android.lovelive_en",
            "klb.android.GameEngine.GameEngineActivity");
  }
  os_printoutput(cmd);
}


x86 assembly (clang, -O0):
<llsif_start>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jne    116b <llsif_start+0x3b>
lea    0x2eff(%rip),%rdi
lea    0xea8(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xece(%rip),%rcx
call   1050 <sprintf@plt>
lea    0x2ede(%rip),%rdi
call   1030 <os_printoutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<llsif_start>:
push   %rax
cmpb   $0x0,0x2f18(%rip)
jne    114b <llsif_start+0x2b>
lea    0x2f0f(%rip),%rdi
lea    0xec8(%rip),%rsi
lea    0xedd(%rip),%rdx
lea    0xeee(%rip),%rcx
call   1040 <sprintf@plt>
lea    0x2eee(%rip),%rdi
pop    %rax
jmp    1030 <os_printoutput@plt>

LLVM IR (-O0):
@llsif_start.cmd = internal global [2048 x i8] zeroinitializer
@.str = [28 x i8] c"adb shell am start -n %s/%s\00"
@.str.1 = [24 x i8] c"klb.android.lovelive_en\00"
@.str.2 = [42 x i8] c"klb.android.GameEngine.GameEngineActivity\00"
define void @llsif_start() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @llsif_start.cmd, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @sprintf(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @llsif_start.cmd, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i32 @os_printoutput(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @llsif_start.cmd, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llsif_start.cmd = internal global [2048 x i8] zeroinitializer
@.str = [28 x i8] c"adb shell am start -n %s/%s\00"
@.str.1 = [24 x i8] c"klb.android.lovelive_en\00"
@.str.2 = [42 x i8] c"klb.android.GameEngine.GameEngineActivity\00"
define void @llsif_start() {
%1 = load i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @llsif_start.cmd, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([2048 x i8], [2048 x i8]* @llsif_start.cmd, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @os_printoutput(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @llsif_start.cmd, i64 0, i64 0))
ret void
}