#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 EXIT_SUCCESS;
int /*<<< orphan*/ fget(char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int ideviceenterrecovery() {
  char buildCommand[1024];
  char UDID[80];
  system("clear");
  printf("Enter UDID : ");
  fget(UDID, 80);
  sprintf(buildCommand, "ideviceenterrecovery %s", UDID);
  system(buildCommand);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<ideviceenterrecovery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
lea    0xeae(%rip),%rdi
call   1030 <system@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    -0x450(%rbp),%rdi
mov    $0x50,%esi
call   1050 <fget@plt>
lea    -0x400(%rbp),%rdi
lea    -0x450(%rbp),%rdx
lea    0xe8b(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x400(%rbp),%rdi
call   1030 <system@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ideviceenterrecovery>:
push   %r14
push   %rbx
sub    $0x458,%rsp
lea    0xeaf(%rip),%rdi
call   1030 <system@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x50,%esi
call   1050 <fget@plt>
lea    0xe9b(%rip),%rsi
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
add    $0x458,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [14 x i8] c"Enter UDID : \00"
@.str.2 = [24 x i8] c"ideviceenterrecovery %s\00"
@EXIT_SUCCESS = global i32 0
define i32 @ideviceenterrecovery() {
%1 = alloca [1024 x i8]
%2 = alloca [80 x i8]
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = call i32 @fget(i8* %5, i32 80)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%11 = call i32 @system(i8* %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [14 x i8] c"Enter UDID : \00"
@.str.2 = [24 x i8] c"ideviceenterrecovery %s\00"
@EXIT_SUCCESS = global i32 0
define i32 @ideviceenterrecovery() {
%1 = alloca [1024 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @fget(i8* %4, i32 80)
%8 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%9 = call i32 @system(i8* %3)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}