int handlePostReturn(int ret, int http_response_code, const char *szMsg) {
  char szMsgLog[500];
  int retval = 0;
  if (ret) {
    if (-600 == ret) {
      snprintf(
          szMsgLog, 500,
          "Info> Buffer file has data; message [%s] appended to buffer file",
          szMsg);
    } else {
      snprintf(szMsgLog, 500, "%s error> %s", "libCurl", getCommLibErr());
      retval = -1;
    }
    logMsg(szMsgLog);
  } else {
    if (204 == http_response_code || 202 == http_response_code ||
        200 == http_response_code) {
      snprintf(szMsgLog, 500, "%s--good http response! (%d)", szMsg,
               http_response_code);
      logMsg(szMsgLog);
    } else {
      snprintf(szMsgLog, 500, "%s--bad http response (%d)", szMsg,
               http_response_code);
      logMsg(szMsgLog);
    }
  }
  return retval;
}


x86 assembly (clang, -O0):
<handlePostReturn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x214(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11e0 <handlePostReturn+0xb0>
mov    $0xfffffda8,%eax
cmp    -0x4(%rbp),%eax
jne    118a <handlePostReturn+0x5a>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1f4,%esi
lea    0xe82(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    11cd <handlePostReturn+0x9d>
lea    -0x210(%rbp),%rax
mov    %rax,-0x220(%rbp)
mov    $0x0,%al
call   1050 <getCommLibErr@plt>
mov    -0x220(%rbp),%rdi
mov    %eax,%r8d
mov    $0x1f4,%esi
lea    0xe8c(%rip),%rdx
lea    0xe92(%rip),%rcx
mov    $0x0,%al
call   1030 <snprintf@plt>
movl   $0xffffffff,-0x214(%rbp)
ff ff ff
lea    -0x210(%rbp),%rdi
mov    $0x0,%al
call   1040 <logMsg@plt>
jmp    1274 <handlePostReturn+0x144>
mov    $0xcc,%eax
cmp    -0x8(%rbp),%eax
je     120a <handlePostReturn+0xda>
mov    $0xca,%eax
cmp    -0x8(%rbp),%eax
je     120a <handlePostReturn+0xda>
mov    $0xc8,%eax
cmp    -0x8(%rbp),%eax
jne    123f <handlePostReturn+0x10f>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8d
mov    $0x1f4,%esi
lea    0xe31(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
mov    $0x0,%al
call   1040 <logMsg@plt>
jmp    126f <handlePostReturn+0x13f>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8d
mov    $0x1f4,%esi
lea    0xe19(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
mov    $0x0,%al
call   1040 <logMsg@plt>
jmp    1274 <handlePostReturn+0x144>
mov    -0x214(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handlePostReturn>:
push   %rbx
sub    $0x200,%rsp
mov    %rdx,%rcx
test   %edi,%edi
je     1161 <handlePostReturn+0x31>
cmp    $0xfffffda8,%edi
jne    1183 <handlePostReturn+0x53>
lea    0xeb2(%rip),%rdx
xor    %ebx,%ebx
mov    %rsp,%rdi
mov    $0x1f4,%esi
xor    %eax,%eax
call   1030 <snprintf@plt>
jmp    11c9 <handlePostReturn+0x99>
mov    %esi,%r8d
lea    -0xc8(%r8),%eax
cmp    $0x4,%eax
ja     11b1 <handlePostReturn+0x81>
mov    $0x15,%edx
bt     %eax,%edx
jae    11b1 <handlePostReturn+0x81>
lea    0xed5(%rip),%rdx
jmp    11b8 <handlePostReturn+0x88>
xor    %eax,%eax
call   1050 <getCommLibErr@plt>
lea    0xeb0(%rip),%rdx
lea    0xeb6(%rip),%rcx
mov    %rsp,%rdi
mov    $0x1f4,%esi
mov    %eax,%r8d
xor    %eax,%eax
call   1030 <snprintf@plt>
mov    $0xffffffff,%ebx
jmp    11c9 <handlePostReturn+0x99>
lea    0xebb(%rip),%rdx
xor    %ebx,%ebx
mov    %rsp,%rdi
mov    $0x1f4,%esi
xor    %eax,%eax
call   1030 <snprintf@plt>
mov    %rsp,%rdi
xor    %eax,%eax
call   1040 <logMsg@plt>
mov    %ebx,%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [65 x i8] c"Info> Buffer file has data; message [%s] appended to buffer file\00"
@.str.1 = [13 x i8] c"%s error> %s\00"
@.str.2 = [8 x i8] c"libCurl\00"
@.str.3 = [29 x i8] c"%s--good http response! (%d)\00"
@.str.4 = [27 x i8] c"%s--bad http response (%d)\00"
define i32 @handlePostReturn(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [500 x i8]
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32 0, i32* %8
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %25
11: ; preds = %3
%12 = load i32, i32* %4
%13 = icmp eq i32 -600, %12
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%16 = load i8*, i8** %6
%17 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %15, i64 500, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %22
18: ; preds = %11
%19 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%20 = call i32 (...) @getCommLibErr()
%21 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %19, i64 500, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %20)
store i32 -1, i32* %8
br label %22
22: ; preds = %18, %14
%23 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @logMsg to i32 (i8*, ...)*)(i8* %23)
br label %49
25: ; preds = %3
%26 = load i32, i32* %5
%27 = icmp eq i32 204, %26
br i1 %27, label %34, label %28
28: ; preds = %25
%29 = load i32, i32* %5
%30 = icmp eq i32 202, %29
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* %5
%33 = icmp eq i32 200, %32
br i1 %33, label %34, label %41
34: ; preds = %31, %28, %25
%35 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%36 = load i8*, i8** %6
%37 = load i32, i32* %5
%38 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %35, i64 500, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8* %36, i32 %37)
%39 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%40 = call i32 (i8*, ...) bitcast (i32 (...)* @logMsg to i32 (i8*, ...)*)(i8* %39)
br label %48
41: ; preds = %31
%42 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%43 = load i8*, i8** %6
%44 = load i32, i32* %5
%45 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %42, i64 500, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %43, i32 %44)
%46 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%47 = call i32 (i8*, ...) bitcast (i32 (...)* @logMsg to i32 (i8*, ...)*)(i8* %46)
br label %48
48: ; preds = %41, %34
br label %49
49: ; preds = %48, %22
%50 = load i32, i32* %8
ret i32 %50
}

LLVM IR (-O2):
@.str = [65 x i8] c"Info> Buffer file has data; message [%s] appended to buffer file\00"
@.str.1 = [13 x i8] c"%s error> %s\00"
@.str.2 = [8 x i8] c"libCurl\00"
@.str.3 = [29 x i8] c"%s--good http response! (%d)\00"
@.str.4 = [27 x i8] c"%s--bad http response (%d)\00"
define i32 @handlePostReturn(i32 %0, i32 %1, i8* %2) {
%4 = alloca [500 x i8]
%5 = getelementptr inbounds [500 x i8], [500 x i8]* %4, i64 0, i64 0
switch i32 %0, label %8 [
i32 0, label %11
i32 -600, label %6
]
6: ; preds = %3
%7 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %5, i64 500, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %16
8: ; preds = %3
%9 = tail call i32 (...) @getCommLibErr()
%10 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %5, i64 500, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %16
11: ; preds = %3
switch i32 %1, label %14 [
i32 204, label %12
i32 202, label %12
i32 200, label %12
]
12: ; preds = %11, %11, %11
%13 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %5, i64 500, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8* %2, i32 %1)
br label %16
14: ; preds = %11
%15 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %5, i64 500, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %2, i32 %1)
br label %16
16: ; preds = %6, %8, %12, %14
%17 = phi i32 [ 0, %12 ], [ 0, %14 ], [ 0, %6 ], [ -1, %8 ]
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @logMsg to i32 (i8*, ...)*)(i8* %5)
ret i32 %17
}