	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_mac_add_interface           ## -- Begin function il_mac_add_interface
	.p2align	4, 0x90
_il_mac_add_interface:                  ## @il_mac_add_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_D_MAC80211
	movq	%r14, %rdi
	callq	_il_is_ready_rf
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	8(%r14), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.3:
	cmpq	%rbx, %r12
	je	LBB0_5
## %bb.4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_IL_WARN
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_5:
	movq	%rbx, 8(%r14)
	movl	(%rbx), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_il_set_mode
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %r15d
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_IL_WARN
	cmpq	%rbx, %r12
	je	LBB0_9
## %bb.8:
	movq	$0, 8(%r14)
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_9
LBB0_6:
	xorl	%r15d, %r15d
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_D_MAC80211
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter: type %d, addr %pM\n"

L_.str.1:                               ## @.str.1
	.asciz	"Try to add interface when device not ready\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.2:                               ## @.str.2
	.asciz	"Fail to set mode %d\n"

	.comm	_NL80211_IFTYPE_STATION,4,2     ## @NL80211_IFTYPE_STATION
L_.str.3:                               ## @.str.3
	.asciz	"leave err %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_mac_add_interface           ; -- Begin function il_mac_add_interface
	.p2align	2
_il_mac_add_interface:                  ; @il_mac_add_interface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_mutex_lock
	ldp	w1, w8, [x20]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_MAC80211
	mov	x0, x19
	bl	_il_is_ready_rf
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x22, [x19, #8]
	cmp	x22, #0
	ccmp	x22, x20, #4, ne
	b.ne	LBB0_6
; %bb.2:
	str	x20, [x19, #8]
	ldr	w8, [x20]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_il_set_mode
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IL_WARN
	cmp	x22, x20
	b.eq	LBB0_8
; %bb.4:
	str	xzr, [x19, #8]
Lloh4:
	adrp	x8, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_8
LBB0_5:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IL_WARN
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_D_MAC80211
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter: type %d, addr %pM\n"

l_.str.1:                               ; @.str.1
	.asciz	"Try to add interface when device not ready\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.2:                               ; @.str.2
	.asciz	"Fail to set mode %d\n"

	.comm	_NL80211_IFTYPE_STATION,4,2     ; @NL80211_IFTYPE_STATION
l_.str.3:                               ; @.str.3
	.asciz	"leave err %d\n"

.subsections_via_symbols
