#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 */
typedef int /*<<< orphan*/ ****slot_config;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ free(int /*<<< orphan*/ ******);
void free_slot_configs(struct slot_config **slots) {
  assert(NULL != slots);
  const unsigned int NUM_SLOTS = 16;
  int x = 0;
  for (x = 0; x < NUM_SLOTS; x++) {
    assert(NULL != slots[x]);
    free(slots[x]);
  }
  free(slots);
}


x86 assembly (clang, -O0):
<free_slot_configs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0x10,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jae    1198 <free_slot_configs+0x78>
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    (%rcx,%rdx,8),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <free_slot_configs+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_slot_configs>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmpq   $0x0,(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x8(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x10(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x10(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x18(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x18(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x20(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x20(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x28(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x28(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x30(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x30(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x38(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x38(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x40(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x40(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x48(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x48(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x50(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x50(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x58(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x58(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x60(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x60(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x68(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x68(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x70(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x70(%rbx),%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmpq   $0x0,0x78(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    0x78(%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.slot_config = type opaque
define void @free_slot_configs(%struct.slot_config** %0) {
%2 = alloca %struct.slot_config**
%3 = alloca i32
%4 = alloca i32
store %struct.slot_config** %0, %struct.slot_config*** %2
%5 = load %struct.slot_config**, %struct.slot_config*** %2
%6 = icmp ne %struct.slot_config** null, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
store i32 16, i32* %3
store i32 0, i32* %4
store i32 0, i32* %4
br label %9
9: ; preds = %28, %1
%10 = load i32, i32* %4
%11 = icmp ult i32 %10, 16
br i1 %11, label %12, label %31
12: ; preds = %9
%13 = load %struct.slot_config**, %struct.slot_config*** %2
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %13, i64 %15
%17 = load %struct.slot_config*, %struct.slot_config** %16
%18 = icmp ne %struct.slot_config* null, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = load %struct.slot_config**, %struct.slot_config*** %2
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %21, i64 %23
%25 = load %struct.slot_config*, %struct.slot_config** %24
%26 = bitcast %struct.slot_config* %25 to i32******
%27 = call i32 @free(i32****** %26)
br label %28
28: ; preds = %12
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %9
31: ; preds = %9
%32 = load %struct.slot_config**, %struct.slot_config*** %2
%33 = bitcast %struct.slot_config** %32 to i32******
%34 = call i32 @free(i32****** %33)
ret void
}

LLVM IR (-O2):
%struct.slot_config = type opaque
define void @free_slot_configs(%struct.slot_config** %0) {
%2 = icmp ne %struct.slot_config** %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load %struct.slot_config*, %struct.slot_config** %0
%6 = icmp ne %struct.slot_config* %5, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = bitcast %struct.slot_config** %0 to i32*******
%10 = load i32******, i32******* %9
%11 = tail call i32 @free(i32****** %10)
%12 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 1
%13 = load %struct.slot_config*, %struct.slot_config** %12
%14 = icmp ne %struct.slot_config* %13, null
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = bitcast %struct.slot_config** %12 to i32*******
%18 = load i32******, i32******* %17
%19 = tail call i32 @free(i32****** %18)
%20 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 2
%21 = load %struct.slot_config*, %struct.slot_config** %20
%22 = icmp ne %struct.slot_config* %21, null
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = bitcast %struct.slot_config** %20 to i32*******
%26 = load i32******, i32******* %25
%27 = tail call i32 @free(i32****** %26)
%28 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 3
%29 = load %struct.slot_config*, %struct.slot_config** %28
%30 = icmp ne %struct.slot_config* %29, null
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
%33 = bitcast %struct.slot_config** %28 to i32*******
%34 = load i32******, i32******* %33
%35 = tail call i32 @free(i32****** %34)
%36 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 4
%37 = load %struct.slot_config*, %struct.slot_config** %36
%38 = icmp ne %struct.slot_config* %37, null
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert(i32 %39)
%41 = bitcast %struct.slot_config** %36 to i32*******
%42 = load i32******, i32******* %41
%43 = tail call i32 @free(i32****** %42)
%44 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 5
%45 = load %struct.slot_config*, %struct.slot_config** %44
%46 = icmp ne %struct.slot_config* %45, null
%47 = zext i1 %46 to i32
%48 = tail call i32 @assert(i32 %47)
%49 = bitcast %struct.slot_config** %44 to i32*******
%50 = load i32******, i32******* %49
%51 = tail call i32 @free(i32****** %50)
%52 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 6
%53 = load %struct.slot_config*, %struct.slot_config** %52
%54 = icmp ne %struct.slot_config* %53, null
%55 = zext i1 %54 to i32
%56 = tail call i32 @assert(i32 %55)
%57 = bitcast %struct.slot_config** %52 to i32*******
%58 = load i32******, i32******* %57
%59 = tail call i32 @free(i32****** %58)
%60 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 7
%61 = load %struct.slot_config*, %struct.slot_config** %60
%62 = icmp ne %struct.slot_config* %61, null
%63 = zext i1 %62 to i32
%64 = tail call i32 @assert(i32 %63)
%65 = bitcast %struct.slot_config** %60 to i32*******
%66 = load i32******, i32******* %65
%67 = tail call i32 @free(i32****** %66)
%68 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 8
%69 = load %struct.slot_config*, %struct.slot_config** %68
%70 = icmp ne %struct.slot_config* %69, null
%71 = zext i1 %70 to i32
%72 = tail call i32 @assert(i32 %71)
%73 = bitcast %struct.slot_config** %68 to i32*******
%74 = load i32******, i32******* %73
%75 = tail call i32 @free(i32****** %74)
%76 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 9
%77 = load %struct.slot_config*, %struct.slot_config** %76
%78 = icmp ne %struct.slot_config* %77, null
%79 = zext i1 %78 to i32
%80 = tail call i32 @assert(i32 %79)
%81 = bitcast %struct.slot_config** %76 to i32*******
%82 = load i32******, i32******* %81
%83 = tail call i32 @free(i32****** %82)
%84 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 10
%85 = load %struct.slot_config*, %struct.slot_config** %84
%86 = icmp ne %struct.slot_config* %85, null
%87 = zext i1 %86 to i32
%88 = tail call i32 @assert(i32 %87)
%89 = bitcast %struct.slot_config** %84 to i32*******
%90 = load i32******, i32******* %89
%91 = tail call i32 @free(i32****** %90)
%92 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 11
%93 = load %struct.slot_config*, %struct.slot_config** %92
%94 = icmp ne %struct.slot_config* %93, null
%95 = zext i1 %94 to i32
%96 = tail call i32 @assert(i32 %95)
%97 = bitcast %struct.slot_config** %92 to i32*******
%98 = load i32******, i32******* %97
%99 = tail call i32 @free(i32****** %98)
%100 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 12
%101 = load %struct.slot_config*, %struct.slot_config** %100
%102 = icmp ne %struct.slot_config* %101, null
%103 = zext i1 %102 to i32
%104 = tail call i32 @assert(i32 %103)
%105 = bitcast %struct.slot_config** %100 to i32*******
%106 = load i32******, i32******* %105
%107 = tail call i32 @free(i32****** %106)
%108 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 13
%109 = load %struct.slot_config*, %struct.slot_config** %108
%110 = icmp ne %struct.slot_config* %109, null
%111 = zext i1 %110 to i32
%112 = tail call i32 @assert(i32 %111)
%113 = bitcast %struct.slot_config** %108 to i32*******
%114 = load i32******, i32******* %113
%115 = tail call i32 @free(i32****** %114)
%116 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 14
%117 = load %struct.slot_config*, %struct.slot_config** %116
%118 = icmp ne %struct.slot_config* %117, null
%119 = zext i1 %118 to i32
%120 = tail call i32 @assert(i32 %119)
%121 = bitcast %struct.slot_config** %116 to i32*******
%122 = load i32******, i32******* %121
%123 = tail call i32 @free(i32****** %122)
%124 = getelementptr inbounds %struct.slot_config*, %struct.slot_config** %0, i64 15
%125 = load %struct.slot_config*, %struct.slot_config** %124
%126 = icmp ne %struct.slot_config* %125, null
%127 = zext i1 %126 to i32
%128 = tail call i32 @assert(i32 %127)
%129 = bitcast %struct.slot_config** %124 to i32*******
%130 = load i32******, i32******* %129
%131 = tail call i32 @free(i32****** %130)
%132 = bitcast %struct.slot_config** %0 to i32******
%133 = tail call i32 @free(i32****** %132)
ret void
}