	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_ioctl_set_generic_elem
_hostapd_ioctl_set_generic_elem:        ## @hostapd_ioctl_set_generic_elem
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	addq	(%rdi), %r14
	movq	_PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r14, %rax
	cmpq	$25, %rax
	movl	$24, %r15d
	cmovaeq	%rax, %r15
	movq	%r15, %rdi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	_PRISM2_HOSTAPD_SET_GENERIC_ELEMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r14, (%rbx)
	movl	20(%r12), %esi
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movq	8(%rbx), %rdi
	movq	(%r12), %rdx
	callq	_os_memcpy
LBB0_3:
	movl	16(%r12), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.4:
	movq	(%r12), %rdi
	movq	8(%r12), %rdx
	shlq	$2, %rdi
	addq	8(%rbx), %rdi
	callq	_os_memcpy
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rcx
	callq	_wpa_hexdump
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_hostapd_ioctl
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_os_free
	movl	%r14d, %eax
	jmp	LBB0_7
LBB0_6:
	movl	$-1, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN,8,3 ## @PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN
	.comm	_PRISM2_HOSTAPD_SET_GENERIC_ELEMENT,4,2 ## @PRISM2_HOSTAPD_SET_GENERIC_ELEMENT
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hostap: Set generic IE"

	.no_dead_strip	_hostapd_ioctl_set_generic_elem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_ioctl_set_generic_elem
_hostapd_ioctl_set_generic_elem:        ; @hostapd_ioctl_set_generic_elem
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldp	x8, x9, [x0]
Lloh0:
	adrp	x10, _PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x22, x9, x8
	add	x8, x10, x22
	mov	w9, #24
	cmp	x8, #24
	csel	x20, x8, x9, hi
	mov	x0, x20
	bl	_os_zalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _PRISM2_HOSTAPD_SET_GENERIC_ELEMENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRISM2_HOSTAPD_SET_GENERIC_ELEMENT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	str	x22, [x0]
	ldr	w1, [x19, #20]
	cbz	w1, LBB0_3
; %bb.2:
	ldr	x0, [x21, #8]
	ldr	x2, [x19]
	bl	_os_memcpy
LBB0_3:
	ldr	w1, [x19, #16]
	cbz	w1, LBB0_5
; %bb.4:
	ldr	x8, [x21, #8]
	ldp	x9, x2, [x19]
	add	x0, x8, x9, lsl #2
	bl	_os_memcpy
LBB0_5:
Lloh6:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x2, [x21, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x22
	bl	_wpa_hexdump
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_hostapd_ioctl
	mov	x19, x0
	mov	x0, x21
	bl	_os_free
	mov	x0, x19
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN,8,3 ; @PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN
	.comm	_PRISM2_HOSTAPD_SET_GENERIC_ELEMENT,4,2 ; @PRISM2_HOSTAPD_SET_GENERIC_ELEMENT
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hostap: Set generic IE"

	.no_dead_strip	_hostapd_ioctl_set_generic_elem
.subsections_via_symbols
