	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_interface
_setup_interface:                       ## @setup_interface
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movq	24(%rdi), %rcx
	movq	(%rax), %rbx
	movq	$0, 32(%rdi)
	cmpl	$0, (%rcx)
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_hostapd_drv_get_radio_name
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r15
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	24(%r14), %rdi
	movq	%r15, %rsi
	movl	$8, %edx
	callq	_os_strlcpy
LBB0_3:
	movq	(%r14), %rdi
	cmpq	$2, %rdi
	jb	LBB0_11
## %bb.4:
	movq	16(%r14), %rcx
	leaq	-1(%rdi), %rdx
	addq	$-2, %rdi
	movl	%edx, %r8d
	andl	$3, %r8d
	movl	$1, %esi
	cmpq	$3, %rdi
	jb	LBB0_8
## %bb.5:
	andq	$-4, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %edi
	movq	8(%rcx,%rsi,8), %rax
	movl	%edi, 12(%rax)
	movl	8(%rbx), %edi
	movl	%edi, 8(%rax)
	movl	12(%rbx), %eax
	movq	16(%rcx,%rsi,8), %rdi
	movl	%eax, 12(%rdi)
	movl	8(%rbx), %eax
	movl	%eax, 8(%rdi)
	movl	12(%rbx), %eax
	movq	24(%rcx,%rsi,8), %rdi
	movl	%eax, 12(%rdi)
	movl	8(%rbx), %eax
	movl	%eax, 8(%rdi)
	movl	12(%rbx), %eax
	movq	32(%rcx,%rsi,8), %rdi
	movl	%eax, 12(%rdi)
	movl	8(%rbx), %eax
	movl	%eax, 8(%rdi)
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_6
## %bb.7:
	incq	%rsi
LBB0_8:
	testq	%r8, %r8
	je	LBB0_11
## %bb.9:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %eax
	movq	(%rcx,%rdx,8), %rsi
	movl	%eax, 12(%rsi)
	movl	8(%rbx), %eax
	movl	%eax, 8(%rsi)
	incq	%rdx
	cmpq	%rdx, %r8
	jne	LBB0_10
LBB0_11:
	movq	%r14, %rdi
	callq	_hostapd_validate_bssid_configuration
	movl	$-1, %r15d
	testq	%rax, %rax
	jne	LBB0_22
## %bb.12:
	movq	%r14, %rdi
	callq	_start_ctrl_iface
	testq	%rax, %rax
	jne	LBB0_22
## %bb.13:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.14:
	cmpq	$0, 8(%rax)
	je	LBB0_21
## %bb.15:
	movq	_HAPD_IFACE_COUNTRY_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hostapd_set_state
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_hostapd_get_country
	testq	%rax, %rax
	jns	LBB0_17
## %bb.16:
	movb	$0, -36(%rbp)
LBB0_17:
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_os_memcpy
	movb	$0, -37(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_hostapd_set_country
	testq	%rax, %rax
	js	LBB0_18
## %bb.19:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	-36(%rbp), %rbx
	leaq	-40(%rbp), %r15
	movq	%rbx, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$1, 8(%r14)
	movq	_channel_list_update_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$5, %edi
	xorl	%esi, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_timeout
	jmp	LBB0_22
LBB0_21:
	movq	%r14, %rdi
	callq	_setup_interface2
	movl	%eax, %r15d
LBB0_22:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy: %s"

	.comm	_HAPD_IFACE_COUNTRY_UPDATE,4,2  ## @HAPD_IFACE_COUNTRY_UPDATE
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set country code"

L_.str.2:                               ## @.str.2
	.asciz	"Previous country code %s, new country code %s"

L_.str.3:                               ## @.str.3
	.asciz	"Continue interface setup after channel list update"

	.comm	_channel_list_update_timeout,4,2 ## @channel_list_update_timeout
	.no_dead_strip	_setup_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_interface
_setup_interface:                       ; @setup_interface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, #16]
	ldr	x20, [x8]
	str	xzr, [x0, #32]
	ldr	w8, [x9]
	cbnz	w8, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_hostapd_drv_get_radio_name
	cbz	x0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [x19, #24]
	mov	x1, x21
	mov	w2, #8
	bl	_os_strlcpy
LBB0_3:
	ldr	x8, [x19]
	cmp	x8, #2
	b.lo	LBB0_6
; %bb.4:
	ldr	x9, [x19, #16]
	sub	x8, x8, #1
	add	x9, x9, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	ldr	d0, [x20, #8]
	str	d0, [x10, #8]
	subs	x8, x8, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_hostapd_validate_bssid_configuration
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_start_ctrl_iface
	cbz	x0, LBB0_10
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x9, [x8]
	cbz	x9, LBB0_17
; %bb.11:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_17
; %bb.12:
Lloh5:
	adrp	x8, _HAPD_IFACE_COUNTRY_UPDATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HAPD_IFACE_COUNTRY_UPDATE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hostapd_set_state
	add	x1, sp, #24
	mov	x0, x20
	bl	_hostapd_get_country
	tbz	x0, #63, LBB0_14
; %bb.13:
	strb	wzr, [sp, #24]
LBB0_14:
	ldr	x8, [x20]
	ldr	x1, [x8]
	add	x21, sp, #28
	add	x0, sp, #28
	mov	w2, #3
	bl	_os_memcpy
	strb	wzr, [sp, #31]
	add	x1, sp, #28
	mov	x0, x20
	bl	_hostapd_set_country
	tbnz	x0, #63, LBB0_18
; %bb.15:
Lloh8:
	adrp	x20, _MSG_DEBUG@GOTPAGE
Lloh9:
	ldr	x20, [x20, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x8, sp, #24
	stp	x8, x21, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	add	x0, sp, #24
	add	x1, sp, #28
	mov	w2, #2
	bl	_os_strncmp
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w0, [x20]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
	mov	w8, #1
	str	w8, [x19, #8]
Lloh14:
	adrp	x8, _channel_list_update_timeout@GOTPAGE
Lloh15:
	ldr	x8, [x8, _channel_list_update_timeout@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w0, #5
	mov	w1, #0
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_timeout
	mov	w0, #0
	b	LBB0_9
LBB0_17:
	mov	x0, x19
	bl	_setup_interface2
	b	LBB0_9
LBB0_18:
Lloh17:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy: %s"

	.comm	_HAPD_IFACE_COUNTRY_UPDATE,4,2  ; @HAPD_IFACE_COUNTRY_UPDATE
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set country code"

l_.str.2:                               ; @.str.2
	.asciz	"Previous country code %s, new country code %s"

l_.str.3:                               ; @.str.3
	.asciz	"Continue interface setup after channel list update"

	.comm	_channel_list_update_timeout,4,2 ; @channel_list_update_timeout
	.no_dead_strip	_setup_interface
.subsections_via_symbols
