	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_wpa_cli_event2             ## -- Begin function get_wpa_cli_event2
	.p2align	4, 0x90
_get_wpa_cli_event2:                    ## @get_wpa_cli_event2
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r14
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_printf
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_wpa_ctrl_get_fd
	testl	%eax, %eax
	js	LBB0_17
## %bb.1:
	movl	%eax, %r15d
	leaq	-128(%rbp), %rdi
	callq	_time
	movl	%r15d, %r13d
	incl	%r13d
	leaq	-68(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_FD_ZERO
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_FD_SET
	movq	_default_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	$0, -88(%rbp)
	leaq	-96(%rbp), %r8
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_select
	testl	%eax, %eax
	je	LBB0_14
## %bb.2:
	leaq	-1(%r12), %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, -56(%rbp)
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	%r14, %rsi
	leaq	-56(%rbp), %rdx
	callq	_wpa_ctrl_recv
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax
	cmpq	%r12, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -56(%rbp)
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movb	$0, (%r14,%rax)
	movq	%r14, %rdi
	movl	$62, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	incq	%r13
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testq	%r15, %r15
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	-120(%rbp), %rdi
	callq	_time
	movl	-120(%rbp), %eax
	subl	-128(%rbp), %eax
	movq	_default_timeout@GOTPCREL(%rip), %rbx
	cmpl	%eax, (%rbx)
	jl	LBB0_14
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	-68(%rbp), %r13
	movq	%r13, %rdi
	callq	_FD_ZERO
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	callq	_FD_SET
	movl	(%rbx), %eax
	movl	%eax, -96(%rbp)
	movq	$0, -88(%rbp)
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	-96(%rbp), %r8
	callq	_select
	testl	%eax, %eax
	jne	LBB0_3
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
LBB0_15:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_16:
	callq	_printf
LBB0_17:
	movl	$-1, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	jmp	LBB0_16
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Waiting for wpa_cli event %s\n"

	.comm	_default_timeout,4,2            ## @default_timeout
L_.str.1:                               ## @.str.1
	.asciz	"Timeout on waiting for event %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"select: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"Failure while waiting for event %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_wpa_cli_event2             ; -- Begin function get_wpa_cli_event2
	.p2align	2
_get_wpa_cli_event2:                    ; @get_wpa_cli_event2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	x0, x23
	bl	_wpa_ctrl_get_fd
	tbnz	w0, #31, LBB0_16
; %bb.1:
	mov	x24, x0
	add	x0, sp, #16
	bl	_time
	add	w25, w24, #1
	add	x0, sp, #44
	bl	_FD_ZERO
	add	x1, sp, #44
	mov	x0, x24
	bl	_FD_SET
Lloh2:
	adrp	x27, _default_timeout@GOTPAGE
Lloh3:
	ldr	x27, [x27, _default_timeout@GOTPAGEOFF]
	ldr	w8, [x27]
	str	w8, [sp, #24]
	str	xzr, [sp, #32]
	add	x1, sp, #44
	add	x4, sp, #24
	mov	x0, x25
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cbz	w0, LBB0_13
; %bb.2:
	sub	x28, x20, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tbnz	w0, #31, LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x20, [sp]
	mov	x2, sp
	mov	x0, x23
	mov	x1, x21
	bl	_wpa_ctrl_recv
	tbnz	x0, #63, LBB0_19
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp]
	cmp	x8, x20
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x28, [sp]
	mov	x8, x28
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	strb	wzr, [x21, x8]
	mov	x0, x21
	mov	w1, #62
	bl	_strchr
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x0, #1
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	x0, x26
	mov	x1, x19
	bl	_strncmp
	cbz	x0, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x22, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x26
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_17
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	bl	_time
	ldr	w8, [sp, #8]
	ldr	w9, [sp, #16]
	ldr	w10, [x27]
	sub	w8, w8, w9
	cmp	w10, w8
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #44
	bl	_FD_ZERO
	add	x1, sp, #44
	mov	x0, x24
	bl	_FD_SET
	ldr	w8, [x27]
	str	w8, [sp, #24]
	str	xzr, [sp, #32]
	add	x1, sp, #44
	add	x4, sp, #24
	mov	x0, x25
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cbnz	w0, LBB0_3
LBB0_13:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	mov	x1, x19
LBB0_15:
	bl	_printf
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_18:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_19:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waiting for wpa_cli event %s\n"

	.comm	_default_timeout,4,2            ; @default_timeout
l_.str.1:                               ; @.str.1
	.asciz	"Timeout on waiting for event %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"select: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"Failure while waiting for event %s\n"

.subsections_via_symbols
