#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*/ DataManager_SetIntValue(char *, int);
int /*<<< orphan*/ DataManager_SetStrValue(char *, char *);
void SetDataState(char *operation, char *partition, int errorCode, int done) {
  DataManager_SetStrValue("tw_operation", operation);
  DataManager_SetStrValue("tw_partition", partition);
  DataManager_SetIntValue("tw_operation_status", errorCode);
  DataManager_SetIntValue("tw_operation_state", done);
}


x86 assembly (clang, -O0):
<SetDataState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1040 <DataManager_SetStrValue@plt>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1040 <DataManager_SetStrValue@plt>
mov    -0x14(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <DataManager_SetIntValue@plt>
mov    -0x18(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <DataManager_SetIntValue@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetDataState>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xeca(%rip),%rdi
call   1040 <DataManager_SetStrValue@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
call   1040 <DataManager_SetStrValue@plt>
lea    0xec9(%rip),%rdi
mov    %ebp,%esi
call   1030 <DataManager_SetIntValue@plt>
lea    0xecf(%rip),%rdi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <DataManager_SetIntValue@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"tw_operation\00"
@.str.1 = [13 x i8] c"tw_partition\00"
@.str.2 = [20 x i8] c"tw_operation_status\00"
@.str.3 = [19 x i8] c"tw_operation_state\00"
define void @SetDataState(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = call i32 @DataManager_SetStrValue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %6
%12 = call i32 @DataManager_SetStrValue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i32, i32* %7
%14 = call i32 @DataManager_SetIntValue(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %8
%16 = call i32 @DataManager_SetIntValue(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"tw_operation\00"
@.str.1 = [13 x i8] c"tw_partition\00"
@.str.2 = [20 x i8] c"tw_operation_status\00"
@.str.3 = [19 x i8] c"tw_operation_state\00"
define void @SetDataState(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @DataManager_SetStrValue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @DataManager_SetStrValue(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%7 = tail call i32 @DataManager_SetIntValue(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%8 = tail call i32 @DataManager_SetIntValue(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}