#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*/ debugMsg(char *);
int /*<<< orphan*/ free(char *);
char *httpGetPost(char *, char *, int, char *);
void tellToLinuxBr(void) {
  debugMsg("tellToLinuxBr() ...");
  char *ret = httpGetPost("daemon.gq",
                          "/linuxBr"
                          "/tellme.php?cmd=save"
                          "&name="
                          "srv-1",
                          80, "GET");
  debugMsg("tellToLinuxBr() ... ok ...");
  if (ret != NULL) {
    free(ret);
  }
}


x86 assembly (clang, -O0):
<tellToLinuxBr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <debugMsg@plt>
lea    0xec9(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x50,%edx
lea    0xee8(%rip),%rcx
call   1050 <httpGetPost@plt>
mov    %rax,-0x8(%rbp)
lea    0xedc(%rip),%rdi
call   1040 <debugMsg@plt>
cmpq   $0x0,-0x8(%rbp)
je     1187 <tellToLinuxBr+0x57>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tellToLinuxBr>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <debugMsg@plt>
lea    0xed0(%rip),%rdi
lea    0xed3(%rip),%rsi
lea    0xef4(%rip),%rcx
mov    $0x50,%edx
call   1050 <httpGetPost@plt>
mov    %rax,%rbx
lea    0xee4(%rip),%rdi
call   1040 <debugMsg@plt>
test   %rbx,%rbx
je     1179 <tellToLinuxBr+0x49>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"tellToLinuxBr() ...\00"
@.str.1 = [10 x i8] c"daemon.gq\00"
@.str.2 = [40 x i8] c"/linuxBr/tellme.php?cmd=save&name=srv-1\00"
@.str.3 = [4 x i8] c"GET\00"
@.str.4 = [27 x i8] c"tellToLinuxBr() ... ok ...\00"
define void @tellToLinuxBr() {
%1 = alloca i8*
%2 = call i32 @debugMsg(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i8* @httpGetPost(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %3, i8** %1
%4 = call i32 @debugMsg(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%5 = load i8*, i8** %1
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"tellToLinuxBr() ...\00"
@.str.1 = [10 x i8] c"daemon.gq\00"
@.str.2 = [40 x i8] c"/linuxBr/tellme.php?cmd=save&name=srv-1\00"
@.str.3 = [4 x i8] c"GET\00"
@.str.4 = [27 x i8] c"tellToLinuxBr() ... ok ...\00"
define void @tellToLinuxBr() {
%1 = tail call i32 @debugMsg(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @httpGetPost(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @debugMsg(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%4 = icmp eq i8* %2, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @free(i8* %2)
br label %7
7: ; preds = %5, %0
ret void
}