	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radio_add_work                 ## -- Begin function radio_add_work
	.p2align	4, 0x90
_radio_add_work:                        ## @radio_add_work
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$64, %edi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movq	%r13, %rcx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_wpa_dbg
	leaq	56(%rbx), %rdi
	callq	_os_get_reltime
	movl	%r14d, (%rbx)
	movq	%r13, 8(%rbx)
	movq	%r15, 48(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	%r12, 40(%rbx)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movl	%r14d, %edi
	callq	_wpas_freq_to_band
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_18
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_os_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_os_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_6:
	movq	(%r12), %rsi
	movq	%r15, %rdi
LBB0_8:
	callq	_wpas_get_bands
LBB0_9:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	%rax, 32(%rbx)
	movq	8(%r15), %rdi
	addq	$4, %rdi
	callq	_dl_list_empty
	movl	%eax, %r14d
	movq	8(%r15), %rdi
	addq	$4, %rdi
	addq	$24, %rbx
	movq	%rbx, %rsi
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.10:
	callq	_dl_list_add
	testl	%r14d, %r14d
	je	LBB0_14
LBB0_13:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_wpa_dbg
LBB0_17:
	movq	%r15, %rdi
	callq	_radio_work_check_next
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	_dl_list_add_tail
	testl	%r14d, %r14d
	jne	LBB0_13
LBB0_14:
	movq	_WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, (%r15)
	je	LBB0_18
## %bb.15:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	movq	_MAX_ACTIVE_WORKS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_18
## %bb.16:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_wpa_dbg
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Add radio work '%s'@%p"

L_.str.1:                               ## @.str.1
	.asciz	"scan"

L_.str.2:                               ## @.str.2
	.asciz	"p2p-scan"

L_.str.3:                               ## @.str.3
	.asciz	"First radio work item in the queue - schedule start immediately"

	.comm	_WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS,4,2 ## @WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS
	.comm	_MAX_ACTIVE_WORKS,4,2           ## @MAX_ACTIVE_WORKS
L_.str.4:                               ## @.str.4
	.asciz	"Try to schedule a radio work (num_active_works=%u)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radio_add_work                 ; -- Begin function radio_add_work
	.p2align	2
_radio_add_work:                        ; @radio_add_work
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x5
	mov	x25, x4
	mov	x20, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x26, [x0, #8]
	mov	w0, #64
	bl	_os_zalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x27, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x27]
	stp	x23, x0, [sp]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
	add	x0, x21, #56
	bl	_os_get_reltime
	str	w24, [x21]
	stp	x23, x25, [x21, #8]
	stp	x22, x19, [x21, #40]
	cbz	w24, LBB0_4
; %bb.2:
	mov	x0, x24
	bl	_wpas_freq_to_band
	b	LBB0_9
LBB0_3:
	mov	w0, #-1
	b	LBB0_14
LBB0_4:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_os_strcmp
	cbz	x0, LBB0_7
; %bb.5:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_os_strcmp
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, #0
	b	LBB0_8
LBB0_7:
	ldr	x1, [x22]
	mov	x0, x19
LBB0_8:
	bl	_wpas_get_bands
LBB0_9:
	str	x0, [x21, #32]
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_dl_list_empty
	mov	x22, x0
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	add	x1, x21, #24
	cbz	w20, LBB0_15
; %bb.10:
	bl	_dl_list_add
	cbz	w22, LBB0_16
LBB0_11:
	ldr	w1, [x27]
Lloh8:
	adrp	x2, l_.str.3@PAGE
Lloh9:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_wpa_dbg
	mov	x0, x19
	bl	_radio_work_check_next
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	bl	_dl_list_add_tail
	cbnz	w22, LBB0_11
LBB0_16:
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.17:
	ldr	w8, [x26]
Lloh13:
	adrp	x9, _MAX_ACTIVE_WORKS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MAX_ACTIVE_WORKS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_13
; %bb.18:
	ldr	w1, [x27]
	str	x8, [sp]
Lloh16:
	adrp	x2, l_.str.4@PAGE
Lloh17:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_12
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Add radio work '%s'@%p"

l_.str.1:                               ; @.str.1
	.asciz	"scan"

l_.str.2:                               ; @.str.2
	.asciz	"p2p-scan"

l_.str.3:                               ; @.str.3
	.asciz	"First radio work item in the queue - schedule start immediately"

	.comm	_WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS,4,2 ; @WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS
	.comm	_MAX_ACTIVE_WORKS,4,2           ; @MAX_ACTIVE_WORKS
l_.str.4:                               ; @.str.4
	.asciz	"Try to schedule a radio work (num_active_works=%u)"

.subsections_via_symbols
