	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwifiex_update_uap_custom_ie
_mwifiex_update_uap_custom_ie:          ## @mwifiex_update_uap_custom_ie
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r12
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_TLV_TYPE_MGMT_IE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, 12(%r15)
	movq	(%r15), %r12
	testq	%rbx, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	movq	_IEEE_MAX_IE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	4(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	subl	%r13d, %r14d
	addl	$8, %r14d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movslq	%r14d, %rsi
	leaq	(%r12,%rsi,4), %r12
	leaq	8(%r15), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_le16_unaligned_add_cpu
LBB0_4:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_6
## %bb.5:
	movq	_IEEE_MAX_IE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	4(%r13), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	subl	%r14d, %ebx
	addl	$8, %ebx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rsi
	leaq	(%r12,%rsi,4), %r12
	leaq	8(%r15), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_le16_unaligned_add_cpu
LBB0_6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	_IEEE_MAX_IE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r14), %edi
	callq	_le16_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	subl	%ebx, %eax
	leal	8(%rax), %ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	%r15, %rdi
	addq	$8, %rdi
	movl	%ebx, %esi
	callq	_le16_unaligned_add_cpu
LBB0_8:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_mwifiex_update_autoindex_ies
	movl	%eax, %r12d
	movq	(%r15), %r13
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.9:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	movq	_MWIFIEX_AUTO_IDX_MASK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r13), %edi
	callq	_le16_to_cpu
	movl	%eax, (%rbx)
	movq	_IEEE_MAX_IE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	subl	%r14d, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	addl	$8, %eax
	cltq
	leaq	(%r13,%rax,4), %r13
LBB0_11:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.12:
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movq	_MWIFIEX_AUTO_IDX_MASK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:
	movl	(%r13), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_IEEE_MAX_IE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	4(%rbx), %edi
	callq	_le16_to_cpu
	subl	%r14d, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	addl	$8, %eax
	cltq
	leaq	(%r13,%rax,4), %r13
LBB0_14:
	testq	%r14, %r14
	je	LBB0_17
## %bb.15:
	movl	(%r14), %edi
	callq	_le16_to_cpu
	movq	_MWIFIEX_AUTO_IDX_MASK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.16:
	movq	16(%rbp), %rax
	movl	(%r13), %ecx
	movl	%ecx, (%rax)
LBB0_17:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TLV_TYPE_MGMT_IE,4,2           ## @TLV_TYPE_MGMT_IE
	.comm	_IEEE_MAX_IE_SIZE,4,2           ## @IEEE_MAX_IE_SIZE
	.comm	_MWIFIEX_AUTO_IDX_MASK,4,2      ## @MWIFIEX_AUTO_IDX_MASK
	.no_dead_strip	_mwifiex_update_uap_custom_ie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwifiex_update_uap_custom_ie
_mwifiex_update_uap_custom_ie:          ; @mwifiex_update_uap_custom_ie
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x6
	mov	x21, x5
	mov	x23, x4
	mov	x22, x3
	mov	x25, x2
	mov	x24, x1
	mov	x26, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_17
; %bb.1:
	mov	x20, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _TLV_TYPE_MGMT_IE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TLV_TYPE_MGMT_IE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	w0, [x20, #12]
	ldr	x27, [x20]
Lloh6:
	adrp	x19, _IEEE_MAX_IE_SIZE@GOTPAGE
Lloh7:
	ldr	x19, [x19, _IEEE_MAX_IE_SIZE@GOTPAGEOFF]
	cbz	x24, LBB0_3
; %bb.2:
	ldr	w28, [x19]
	ldr	w0, [x24, #4]
	bl	_le16_to_cpu
	sub	w8, w0, w28
	add	w28, w8, #8
	mov	x0, x27
	mov	x1, x24
	mov	x2, x28
	bl	_memcpy
	add	x27, x27, w28, sxtw #2
	add	x0, x20, #8
	mov	x1, x28
	bl	_le16_unaligned_add_cpu
LBB0_3:
	cbz	x22, LBB0_5
; %bb.4:
	ldr	w28, [x19]
	ldr	w0, [x22, #4]
	bl	_le16_to_cpu
	sub	w8, w0, w28
	add	w28, w8, #8
	mov	x0, x27
	mov	x1, x22
	mov	x2, x28
	bl	_memcpy
	add	x27, x27, w28, sxtw #2
	add	x0, x20, #8
	mov	x1, x28
	bl	_le16_unaligned_add_cpu
LBB0_5:
	cbz	x21, LBB0_7
; %bb.6:
	ldr	w28, [x19]
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	sub	w8, w0, w28
	add	w28, w8, #8
	mov	x0, x27
	mov	x1, x21
	mov	x2, x28
	bl	_memcpy
	add	x0, x20, #8
	mov	x1, x28
	bl	_le16_unaligned_add_cpu
LBB0_7:
	mov	x0, x26
	mov	x1, x20
	bl	_mwifiex_update_autoindex_ies
	mov	x26, x0
	ldr	x27, [x20]
Lloh8:
	adrp	x28, _MWIFIEX_AUTO_IDX_MASK@GOTPAGE
Lloh9:
	ldr	x28, [x28, _MWIFIEX_AUTO_IDX_MASK@GOTPAGEOFF]
	cbz	x24, LBB0_10
; %bb.8:
	ldr	w8, [x25]
	ldr	w9, [x28]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.9:
	ldr	w0, [x27]
	bl	_le16_to_cpu
	str	w0, [x25]
	ldr	w25, [x19]
	ldr	w0, [x24, #4]
	bl	_le16_to_cpu
	sub	w8, w0, w25
	add	w8, w8, #8
	add	x27, x27, w8, sxtw #2
LBB0_10:
	cbz	x22, LBB0_13
; %bb.11:
	ldr	w0, [x22]
	bl	_le16_to_cpu
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.12:
	ldr	w8, [x27]
	str	w8, [x23]
	ldr	w19, [x19]
	ldr	w0, [x22, #4]
	bl	_le16_to_cpu
	sub	w8, w0, w19
	add	w8, w8, #8
	add	x27, x27, w8, sxtw #2
LBB0_13:
	cbz	x21, LBB0_16
; %bb.14:
	ldr	w0, [x21]
	bl	_le16_to_cpu
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.15:
	ldr	w8, [x27]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_16:
	mov	x0, x20
	bl	_kfree
	b	LBB0_18
LBB0_17:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_18:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TLV_TYPE_MGMT_IE,4,2           ; @TLV_TYPE_MGMT_IE
	.comm	_IEEE_MAX_IE_SIZE,4,2           ; @IEEE_MAX_IE_SIZE
	.comm	_MWIFIEX_AUTO_IDX_MASK,4,2      ; @MWIFIEX_AUTO_IDX_MASK
	.no_dead_strip	_mwifiex_update_uap_custom_ie
.subsections_via_symbols
