#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*/ UI_Enable(int /*<<< orphan*/);
int /*<<< orphan*/ exec_redirect_io(char *, char *, char *);
char *mbed_get_target_path();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
void btnClean_Click() {
  char *s = mbed_get_target_path();
  printf("\n\n=============================== Clean "
         "=============================== \n");
  printf("%s\n\n", s);
  UI_Enable(0);
  sleep(300);
  exec_redirect_io("make.exe", " clean", "exec_done_cb");
}


x86 assembly (clang, -O0):
<btnClean_Click>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <mbed_get_target_path@plt>
mov    %rax,-0x8(%rbp)
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <UI_Enable@plt>
mov    $0x12c,%edi
call   1070 <sleep@plt>
lea    0xeb4(%rip),%rdi
lea    0xeb6(%rip),%rsi
lea    0xeb6(%rip),%rdx
call   1030 <exec_redirect_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btnClean_Click>:
push   %rbx
xor    %eax,%eax
call   1070 <mbed_get_target_path@plt>
mov    %rax,%rbx
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe82(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <UI_Enable@plt>
mov    $0x12c,%edi
call   1080 <sleep@plt>
lea    0xe65(%rip),%rdi
lea    0xe67(%rip),%rsi
lea    0xe67(%rip),%rdx
pop    %rbx
jmp    1040 <exec_redirect_io@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"\0A\0A=============================== Clean =============================== \0A\00"
@.str.1 = [5 x i8] c"%s\0A\0A\00"
@.str.2 = [9 x i8] c"make.exe\00"
@.str.3 = [7 x i8] c" clean\00"
@.str.4 = [13 x i8] c"exec_done_cb\00"
define void @btnClean_Click() {
%1 = alloca i8*
%2 = call i8* (...) @mbed_get_target_path()
store i8* %2, i8** %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @UI_Enable(i32 0)
%7 = call i32 @sleep(i32 300)
%8 = call i32 @exec_redirect_io(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%s\0A\0A\00"
@.str.2 = [9 x i8] c"make.exe\00"
@.str.3 = [7 x i8] c" clean\00"
@.str.4 = [13 x i8] c"exec_done_cb\00"
@str = [73 x i8] c"\0A\0A=============================== Clean =============================== \00"
define void @btnClean_Click() {
%1 = tail call i8* (...) @mbed_get_target_path()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = tail call i32 @UI_Enable(i32 0)
%5 = tail call i32 @sleep(i32 300)
%6 = tail call i32 @exec_redirect_io(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
ret void
}