#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char *address;
  char *number;
  char *name;
  char *data;
  int /*<<< orphan*/ data_length;
};
typedef TYPE_1__ Xauth;

/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
void XauDisposeAuth(Xauth *auth) {
  if (auth) {
    if (auth->address)
      (void)free(auth->address);
    if (auth->number)
      (void)free(auth->number);
    if (auth->name)
      (void)free(auth->name);
    if (auth->data) {
      (void)bzero(auth->data, auth->data_length);
      (void)free(auth->data);
    }
    free((char *)auth);
  }
  return;
}


x86 assembly (clang, -O0):
<XauDisposeAuth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11c2 <XauDisposeAuth+0xa2>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1151 <XauDisposeAuth+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     116d <XauDisposeAuth+0x4d>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x10(%rax)
je     1189 <XauDisposeAuth+0x69>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x18(%rax)
je     11b9 <XauDisposeAuth+0x99>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%esi
call   1040 <bzero@plt>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XauDisposeAuth>:
test   %rdi,%rdi
je     1175 <XauDisposeAuth+0x55>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1136 <XauDisposeAuth+0x16>
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     1144 <XauDisposeAuth+0x24>
call   1030 <free@plt>
mov    0x10(%rbx),%rdi
test   %rdi,%rdi
je     1152 <XauDisposeAuth+0x32>
call   1030 <free@plt>
mov    0x18(%rbx),%rdi
test   %rdi,%rdi
je     116c <XauDisposeAuth+0x4c>
mov    0x20(%rbx),%esi
call   1040 <bzero@plt>
mov    0x18(%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8*, i8*, i8*, i8*, i32 }
define void @XauDisposeAuth(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = icmp ne %struct.TYPE_3__* %3, null
br i1 %4, label %5, label %56
5: ; preds = %1
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
%13 = load i8*, i8** %12
%14 = call i32 @free(i8* %13)
br label %15
15: ; preds = %10, %5
%16 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %16, i32 0, i32 1
%18 = load i8*, i8** %17
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %25
20: ; preds = %15
%21 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%22 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %21, i32 0, i32 1
%23 = load i8*, i8** %22
%24 = call i32 @free(i8* %23)
br label %25
25: ; preds = %20, %15
%26 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%27 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %26, i32 0, i32 2
%28 = load i8*, i8** %27
%29 = icmp ne i8* %28, null
br i1 %29, label %30, label %35
30: ; preds = %25
%31 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%32 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %31, i32 0, i32 2
%33 = load i8*, i8** %32
%34 = call i32 @free(i8* %33)
br label %35
35: ; preds = %30, %25
%36 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%37 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %36, i32 0, i32 3
%38 = load i8*, i8** %37
%39 = icmp ne i8* %38, null
br i1 %39, label %40, label %52
40: ; preds = %35
%41 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%42 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %41, i32 0, i32 3
%43 = load i8*, i8** %42
%44 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%45 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %44, i32 0, i32 4
%46 = load i32, i32* %45
%47 = call i32 @bzero(i8* %43, i32 %46)
%48 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%49 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %48, i32 0, i32 3
%50 = load i8*, i8** %49
%51 = call i32 @free(i8* %50)
br label %52
52: ; preds = %40, %35
%53 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%54 = bitcast %struct.TYPE_3__* %53 to i8*
%55 = call i32 @free(i8* %54)
br label %56
56: ; preds = %52, %1
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8*, i8*, i8*, i8*, i32 }
define void @XauDisposeAuth(%struct.TYPE_3__* %0) {
%2 = icmp eq %struct.TYPE_3__* %0, null
br i1 %2, label %34, label %3
3: ; preds = %1
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @free(i8* %5)
br label %9
9: ; preds = %7, %3
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %9
%14 = tail call i32 @free(i8* %11)
br label %15
15: ; preds = %13, %9
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 2
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, null
br i1 %18, label %21, label %19
19: ; preds = %15
%20 = tail call i32 @free(i8* %17)
br label %21
21: ; preds = %19, %15
%22 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 3
%23 = load i8*, i8** %22
%24 = icmp eq i8* %23, null
br i1 %24, label %31, label %25
25: ; preds = %21
%26 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 4
%27 = load i32, i32* %26
%28 = tail call i32 @bzero(i8* %23, i32 %27)
%29 = load i8*, i8** %22
%30 = tail call i32 @free(i8* %29)
br label %31
31: ; preds = %25, %21
%32 = bitcast %struct.TYPE_3__* %0 to i8*
%33 = tail call i32 @free(i8* %32)
br label %34
34: ; preds = %31, %1
ret void
}