	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_cli_reconnect
_hostapd_cli_reconnect:                 ## @hostapd_cli_reconnect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_hostapd_cli_close_connection
	movl	$-1, %r14d
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_os_strdup
	movq	%rax, %rbx
	movq	_ctrl_ifname@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_os_free
	movq	%rbx, (%r15)
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_hostapd_cli_open_connection
	movq	_ctrl_conn@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	_interactive@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_action_file@GOTPCREL(%rip), %rdx
	xorl	%r14d, %r14d
	orl	(%rdx), %ecx
	je	LBB0_7
## %bb.4:
	movl	%eax, %edi
	callq	_wpa_ctrl_attach
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_7
LBB0_5:
	movq	_hostapd_cli_attached@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movl	(%rbx), %edi
	callq	_register_event_handler
	movl	(%rbx), %edi
	callq	_update_stations
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ctrl_ifname,8,3                ## @ctrl_ifname
	.comm	_ctrl_conn,4,2                  ## @ctrl_conn
	.comm	_interactive,4,2                ## @interactive
	.comm	_action_file,4,2                ## @action_file
	.comm	_hostapd_cli_attached,4,2       ## @hostapd_cli_attached
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Warning: Failed to attach to hostapd."

	.no_dead_strip	_hostapd_cli_reconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_cli_reconnect
_hostapd_cli_reconnect:                 ; @hostapd_cli_reconnect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_hostapd_cli_close_connection
	cbz	x19, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_os_strdup
	mov	x19, x0
Lloh0:
	adrp	x20, _ctrl_ifname@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ctrl_ifname@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_os_free
	str	x19, [x20]
	cbz	x19, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_hostapd_cli_open_connection
Lloh2:
	adrp	x19, _ctrl_conn@GOTPAGE
Lloh3:
	ldr	x19, [x19, _ctrl_conn@GOTPAGEOFF]
	str	w0, [x19]
	cbz	w0, LBB0_6
; %bb.3:
Lloh4:
	adrp	x8, _interactive@GOTPAGE
Lloh5:
	ldr	x8, [x8, _interactive@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _action_file@GOTPAGE
Lloh8:
	ldr	x9, [x9, _action_file@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w8, w9
	cbz	w8, LBB0_8
; %bb.4:
	bl	_wpa_ctrl_attach
	cbz	x0, LBB0_7
; %bb.5:
Lloh10:
	adrp	x0, l_str@PAGE
Lloh11:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_8
LBB0_6:
	mov	w0, #-1
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _hostapd_cli_attached@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hostapd_cli_attached@GOTPAGEOFF]
	mov	w9, #1
Lloh14:
	str	w9, [x8]
	ldr	w0, [x19]
	bl	_register_event_handler
	ldr	w0, [x19]
	bl	_update_stations
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ctrl_ifname,8,3                ; @ctrl_ifname
	.comm	_ctrl_conn,4,2                  ; @ctrl_conn
	.comm	_interactive,4,2                ; @interactive
	.comm	_action_file,4,2                ; @action_file
	.comm	_hostapd_cli_attached,4,2       ; @hostapd_cli_attached
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Warning: Failed to attach to hostapd."

	.no_dead_strip	_hostapd_cli_reconnect
.subsections_via_symbols
