	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_wps_config_ap          ## -- Begin function hostapd_wps_config_ap
	.p2align	4, 0x90
_hostapd_wps_config_ap:                 ## @hostapd_wps_config_ap
	.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	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_os_memset
	movq	%r14, %rdi
	callq	_os_strlen
	movl	$-1, %r13d
	cmpq	$8, %rax
	ja	LBB0_21
## %bb.1:
	movq	%rax, %r15
	andl	$1, %eax
	testq	%rax, %rax
	jne	LBB0_21
## %bb.2:
	movl	-60(%rbp), %esi
	shrq	%r15
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hexstr2bin
	testq	%rax, %rax
	je	LBB0_3
LBB0_21:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, -96(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	$6, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	$7, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	jne	LBB0_21
## %bb.8:
	movq	_WPS_AUTH_WPA2PSK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_WPS_AUTH_OPEN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_WPS_AUTH_WPAPSK@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_WPS_ENCR_NONE@GOTPCREL(%rip), %rbx
	testq	%r12, %r12
	je	LBB0_15
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	jne	LBB0_21
## %bb.14:
	movq	_WPS_ENCR_AES@GOTPCREL(%rip), %rbx
	jmp	LBB0_15
LBB0_12:
	movq	_WPS_ENCR_TKIP@GOTPCREL(%rip), %rbx
LBB0_15:
	movq	(%rbx), %rax
	movq	%rax, -72(%rbp)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.16:
	movq	%rbx, %rdi
	callq	_os_strlen
	cmpq	$8, %rax
	ja	LBB0_21
## %bb.17:
	movq	%rax, %r14
	andl	$1, %eax
	testq	%rax, %rax
	jne	LBB0_21
## %bb.18:
	movl	-80(%rbp), %esi
	shrq	%r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_21
## %bb.19:
	movq	%r14, -88(%rbp)
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edi
	leaq	-96(%rbp), %rsi
	callq	_wps_registrar_config_ap
	movl	%eax, %r13d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OPEN"

	.comm	_WPS_AUTH_OPEN,4,2              ## @WPS_AUTH_OPEN
L_.str.1:                               ## @.str.1
	.asciz	"WPAPSK"

	.comm	_WPS_AUTH_WPAPSK,4,2            ## @WPS_AUTH_WPAPSK
L_.str.2:                               ## @.str.2
	.asciz	"WPA2PSK"

	.comm	_WPS_AUTH_WPA2PSK,4,2           ## @WPS_AUTH_WPA2PSK
L_.str.3:                               ## @.str.3
	.asciz	"NONE"

	.comm	_WPS_ENCR_NONE,8,3              ## @WPS_ENCR_NONE
L_.str.4:                               ## @.str.4
	.asciz	"TKIP"

	.comm	_WPS_ENCR_TKIP,8,3              ## @WPS_ENCR_TKIP
L_.str.5:                               ## @.str.5
	.asciz	"CCMP"

	.comm	_WPS_ENCR_AES,8,3               ## @WPS_ENCR_AES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_wps_config_ap          ; -- Begin function hostapd_wps_config_ap
	.p2align	2
_hostapd_wps_config_ap:                 ; @hostapd_wps_config_ap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_os_memset
	mov	x0, x23
	bl	_os_strlen
	mov	x8, x0
	mov	w0, #-1
	cmp	x8, #8
	b.hi	LBB0_4
; %bb.1:
	tbnz	w8, #0, LBB0_4
; %bb.2:
	ldr	w1, [sp, #44]
	lsr	x24, x8, #1
	mov	x0, x23
	mov	x2, x24
	bl	_hexstr2bin
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
	add	sp, sp, #112
	ret
LBB0_5:
	str	x24, [sp, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	w2, #4
	bl	_os_strncmp
	cbz	x0, LBB0_9
; %bb.6:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w2, #6
	bl	_os_strncmp
	cbz	x0, LBB0_10
; %bb.7:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	w2, #7
	bl	_os_strncmp
	cbnz	x0, LBB0_3
; %bb.8:
Lloh6:
	adrp	x8, _WPS_AUTH_WPA2PSK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WPS_AUTH_WPA2PSK@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x8, _WPS_AUTH_OPEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WPS_AUTH_OPEN@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh10:
	adrp	x8, _WPS_AUTH_WPAPSK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WPS_AUTH_WPAPSK@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	cbz	x21, LBB0_16
; %bb.12:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	w2, #4
	bl	_os_strncmp
	cbz	x0, LBB0_16
; %bb.13:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	w2, #4
	bl	_os_strncmp
	cbz	x0, LBB0_23
; %bb.14:
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	w2, #4
	bl	_os_strncmp
	cbnz	x0, LBB0_3
; %bb.15:
Lloh18:
	adrp	x8, _WPS_ENCR_AES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WPS_ENCR_AES@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh20:
	adrp	x8, _WPS_ENCR_NONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WPS_ENCR_NONE@GOTPAGEOFF]
LBB0_17:
	ldr	x8, [x8]
	str	x8, [sp, #32]
	cbz	x20, LBB0_22
; %bb.18:
	mov	x0, x20
	bl	_os_strlen
	mov	x8, x0
	mov	w0, #-1
	cmp	x8, #8
	b.hi	LBB0_4
; %bb.19:
	tbnz	w8, #0, LBB0_4
; %bb.20:
	ldr	w1, [sp, #24]
	lsr	x21, x8, #1
	mov	x0, x20
	mov	x2, x21
	bl	_hexstr2bin
	cbnz	x0, LBB0_3
; %bb.21:
	str	x21, [sp, #16]
LBB0_22:
	ldr	x8, [x19]
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_wps_registrar_config_ap
	b	LBB0_4
LBB0_23:
Lloh22:
	adrp	x8, _WPS_ENCR_TKIP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _WPS_ENCR_TKIP@GOTPAGEOFF]
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OPEN"

	.comm	_WPS_AUTH_OPEN,4,2              ; @WPS_AUTH_OPEN
l_.str.1:                               ; @.str.1
	.asciz	"WPAPSK"

	.comm	_WPS_AUTH_WPAPSK,4,2            ; @WPS_AUTH_WPAPSK
l_.str.2:                               ; @.str.2
	.asciz	"WPA2PSK"

	.comm	_WPS_AUTH_WPA2PSK,4,2           ; @WPS_AUTH_WPA2PSK
l_.str.3:                               ; @.str.3
	.asciz	"NONE"

	.comm	_WPS_ENCR_NONE,8,3              ; @WPS_ENCR_NONE
l_.str.4:                               ; @.str.4
	.asciz	"TKIP"

	.comm	_WPS_ENCR_TKIP,8,3              ; @WPS_ENCR_TKIP
l_.str.5:                               ; @.str.5
	.asciz	"CCMP"

	.comm	_WPS_ENCR_AES,8,3               ; @WPS_ENCR_AES
.subsections_via_symbols
