	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_setup_encryption
_hostapd_setup_encryption:              ## @hostapd_setup_encryption
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_hostapd_broadcast_wep_set
	movq	(%r15), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hostapd_set_privacy
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	32(%rax), %esi
	movq	%r15, %rdi
	callq	_hostapd_drv_set_authmode
	xorl	%ebx, %ebx
	movq	_WPA_ALG_WEP@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	$4, %rbx
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	movq	8(%rcx), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %edx
	movl	(%rcx), %esi
	xorl	%r9d, %r9d
	cmpq	%rsi, %rbx
	sete	%r9b
	movq	16(%rcx), %rcx
	movl	(%rcx,%rbx,4), %r10d
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	pushq	%r10
	pushq	%rax
	pushq	$0
	pushq	$0
	callq	_hostapd_drv_set_key
	addq	$32, %rsp
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rax
	movq	8(%rax), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hostapd_set_privacy
	jmp	LBB0_9
LBB0_5:
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_WPA_ALG_WEP,4,2                ## @WPA_ALG_WEP
	.comm	_MSG_WARNING,4,2                ## @MSG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not set WEP encryption."

	.no_dead_strip	_hostapd_setup_encryption
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_setup_encryption
_hostapd_setup_encryption:              ; @hostapd_setup_encryption
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	mov	x0, x1
	bl	_hostapd_broadcast_wep_set
	ldr	x8, [x19]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_4
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_hostapd_set_privacy
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	w1, [x8, #32]
	mov	x0, x19
	bl	_hostapd_drv_set_authmode
	mov	x21, #0
Lloh0:
	adrp	x22, _WPA_ALG_WEP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _WPA_ALG_WEP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	cmp	x21, #4
	b.eq	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	ldr	x8, [x9, #8]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x22]
	ldr	w10, [x9]
	cmp	x21, x10
	cset	w5, eq
	ldr	x9, [x9, #16]
	ldr	w9, [x9, x21, lsl #2]
	str	w9, [sp, #8]
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	x3, #0
	mov	x4, x21
	mov	x6, #0
	mov	w7, #0
	bl	_hostapd_drv_set_key
	cbnz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	ldr	x9, [x9, x21, lsl #3]
	cbz	x9, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x8]
	cmp	x21, x8
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_hostapd_set_privacy
	b	LBB0_5
LBB0_11:
Lloh2:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_ALG_WEP,4,2                ; @WPA_ALG_WEP
	.comm	_MSG_WARNING,4,2                ; @MSG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not set WEP encryption."

	.no_dead_strip	_hostapd_setup_encryption
.subsections_via_symbols
