void free_supported(struct supported_body **sb) {
  if (sb && *sb) {
    sys_free((*sb),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/chiforbogdan/opensips/refs/heads/"
             "master/parser/parse_supported.h",
             __FUNCTION__, 79);
    *sb = 0;
  }
}


x86 assembly (clang, -O0):
<free_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1161 <free_supported+0x51>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1161 <free_supported+0x51>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xebd(%rip),%rsi
lea    0xf51(%rip),%rdx
mov    $0x4f,%ecx
mov    $0x0,%al
call   1030 <sys_free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_supported>:
push   %rbx
test   %rdi,%rdi
je     1142 <free_supported+0x32>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1142 <free_supported+0x32>
lea    0xed8(%rip),%rsi
lea    0xf6c(%rip),%rdx
mov    $0x4f,%ecx
xor    %eax,%eax
call   1030 <sys_free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.supported_body = type opaque
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/chiforbogdan/opensips/refs/heads/master/parser/parse_supported.h\00"
@__FUNCTION__.free_supported = [15 x i8] c"free_supported\00"
define void @free_supported(%struct.supported_body** %0) {
%2 = alloca %struct.supported_body**
store %struct.supported_body** %0, %struct.supported_body*** %2
%3 = load %struct.supported_body**, %struct.supported_body*** %2
%4 = icmp ne %struct.supported_body** %3, null
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load %struct.supported_body**, %struct.supported_body*** %2
%7 = load %struct.supported_body*, %struct.supported_body** %6
%8 = icmp ne %struct.supported_body* %7, null
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load %struct.supported_body**, %struct.supported_body*** %2
%11 = load %struct.supported_body*, %struct.supported_body** %10
%12 = call i32 (%struct.supported_body*, i8*, i8*, i32, ...) bitcast (i32 (...)* @sys_free to i32 (%struct.supported_body*, i8*, i8*, i32, ...)*)(%struct.supported_body* %11, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.free_supported, i64 0, i64 0), i32 79)
%13 = load %struct.supported_body**, %struct.supported_body*** %2
store %struct.supported_body* null, %struct.supported_body** %13
br label %14
14: ; preds = %9, %5, %1
ret void
}

LLVM IR (-O2):
%struct.supported_body = type opaque
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/chiforbogdan/opensips/refs/heads/master/parser/parse_supported.h\00"
@__FUNCTION__.free_supported = [15 x i8] c"free_supported\00"
define void @free_supported(%struct.supported_body** %0) {
%2 = icmp eq %struct.supported_body** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load %struct.supported_body*, %struct.supported_body** %0
%5 = icmp eq %struct.supported_body* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (%struct.supported_body*, i8*, i8*, i32, ...) bitcast (i32 (...)* @sys_free to i32 (%struct.supported_body*, i8*, i8*, i32, ...)*)(%struct.supported_body* %4, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.free_supported, i64 0, i64 0), i32 79)
store %struct.supported_body* null, %struct.supported_body** %0
br label %8
8: ; preds = %6, %3, %1
ret void
}