#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 */
struct sockaddr_un {
  int dummy;
};
typedef int /*<<< orphan*/ recv;

/* Variables and functions */
int /*<<< orphan*/ client_close(int);
int client_open(char const *, struct sockaddr_un *);
int client_send_noreply(int, char const *, char *, int);
int client_send_msg_noreply(const char *path, const char *msg, int msg_len) {
  struct sockaddr_un socket_addr;
  int socket;
  char recv[64];
  int length;
  socket = client_open(path, &socket_addr);
  if (socket > 0) {
    length = client_send_noreply(socket, msg, recv, sizeof(recv));
    client_close(socket);
    if (length < 0) {
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<client_send_msg_noreply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <client_open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1191 <client_send_msg_noreply+0x61>
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
mov    $0x40,%ecx
call   1030 <client_send_noreply@plt>
mov    %eax,-0x64(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <client_close@plt>
cmpl   $0x0,-0x64(%rbp)
jge    118c <client_send_msg_noreply+0x5c>
jmp    118c <client_send_msg_noreply+0x5c>
jmp    1191 <client_send_msg_noreply+0x61>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<client_send_msg_noreply>:
push   %rbp
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1050 <client_open@plt>
test   %eax,%eax
jle    1164 <client_send_msg_noreply+0x34>
mov    %eax,%ebp
lea    0x10(%rsp),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x40,%ecx
call   1030 <client_send_noreply@plt>
mov    %ebp,%edi
call   1040 <client_close@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_un = type { i32 }
define i32 @client_send_msg_noreply(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca %struct.sockaddr_un
%8 = alloca i32
%9 = alloca [64 x i8]
%10 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%11 = load i8*, i8** %4
%12 = call i32 @client_open(i8* %11, %struct.sockaddr_un* %7)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %26
15: ; preds = %3
%16 = load i32, i32* %8
%17 = load i8*, i8** %5
%18 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%19 = call i32 @client_send_noreply(i32 %16, i8* %17, i8* %18, i32 64)
store i32 %19, i32* %10
%20 = load i32, i32* %8
%21 = call i32 @client_close(i32 %20)
%22 = load i32, i32* %10
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %15
br label %25
25: ; preds = %24, %15
br label %26
26: ; preds = %25, %3
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32 }
define i32 @client_send_msg_noreply(i8* %0, i8* %1, i32 %2) {
%4 = alloca %struct.sockaddr_un
%5 = alloca [64 x i8]
%6 = bitcast %struct.sockaddr_un* %4 to i8*
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%8 = call i32 @client_open(i8* %0, %struct.sockaddr_un* %4)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = call i32 @client_send_noreply(i32 %8, i8* %1, i8* %7, i32 64)
%12 = call i32 @client_close(i32 %8)
br label %13
13: ; preds = %10, %3
ret i32 0
}