	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asus_rfkill_hotplug
_asus_rfkill_hotplug:                   ## @asus_rfkill_hotplug
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	leaq	24(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_asus_wlan_rfkill_blocked
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	callq	_pci_lock_rescan_remove
	movq	16(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movl	%r14d, %esi
	callq	_rfkill_set_sw_state
LBB0_2:
	cmpq	$0, 8(%r13)
	je	LBB0_17
## %bb.3:
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_pci_find_bus
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r15
	movq	_PCI_VENDOR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_bus_read_config_dword
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_17
LBB0_4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_8:
	movl	-44(%rbp), %eax
	xorl	%ecx, %ecx
	cmpl	$-1, %eax
	sete	%cl
	cmpl	%ecx, %r14d
	jne	LBB0_9
## %bb.10:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_get_slot
	movq	%rax, %r12
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.14:
	testq	%r12, %r12
	je	LBB0_17
## %bb.15:
	movq	%r12, %rdi
	callq	_pci_stop_and_remove_bus_device
	jmp	LBB0_16
LBB0_9:
	testl	%r14d, %r14d
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rcx, %rsi
	cmpl	$-1, %eax
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	leaq	L_.str.7(%rip), %rdi
LBB0_5:
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_17:
	xorl	%eax, %eax
	callq	_pci_unlock_rescan_remove
	movq	%r13, %rdi
	callq	_mutex_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	testq	%r12, %r12
	je	LBB0_12
LBB0_16:
	movq	%r12, %rdi
	callq	_pci_dev_put
	jmp	LBB0_17
LBB0_12:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_scan_single_device
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_pci_bus_assign_resources
	movq	%r14, %rdi
	callq	_pci_bus_add_device
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to find PCI bus 1?\n"

	.comm	_PCI_VENDOR_ID,4,2              ## @PCI_VENDOR_ID
L_.str.1:                               ## @.str.1
	.asciz	"Unable to read PCI config space?\n"

L_.str.2:                               ## @.str.2
	.asciz	"BIOS says wireless lan is %s, but the pci device is %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"blocked"

L_.str.4:                               ## @.str.4
	.asciz	"unblocked"

L_.str.5:                               ## @.str.5
	.asciz	"absent"

L_.str.6:                               ## @.str.6
	.asciz	"present"

L_.str.7:                               ## @.str.7
	.asciz	"skipped wireless hotplug as probably inappropriate for this model\n"

	.no_dead_strip	_asus_rfkill_hotplug
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asus_rfkill_hotplug
_asus_rfkill_hotplug:                   ; @asus_rfkill_hotplug
	.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
	add	x21, x0, #24
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x19
	bl	_asus_wlan_rfkill_blocked
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_lock
	bl	_pci_lock_rescan_remove
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x20
	bl	_rfkill_set_sw_state
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
; %bb.3:
	mov	w0, #0
	mov	w1, #1
	bl	_pci_find_bus
	cbz	x0, LBB0_6
; %bb.4:
	mov	x21, x0
Lloh0:
	adrp	x8, _PCI_VENDOR_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_VENDOR_ID@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #28
	mov	w1, #0
	bl	_pci_bus_read_config_dword
	cbz	x0, LBB0_7
; %bb.5:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_14
LBB0_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	b	LBB0_14
LBB0_7:
	ldr	w8, [sp, #28]
	cmn	w8, #1
	cset	w9, eq
	cmp	w20, w9
	b.ne	LBB0_11
; %bb.8:
	mov	x0, x21
	mov	w1, #0
	bl	_pci_get_slot
	mov	x22, x0
	cbz	w20, LBB0_12
; %bb.9:
	cbz	x22, LBB0_14
; %bb.10:
	mov	x0, x22
	bl	_pci_stop_and_remove_bus_device
	b	LBB0_13
LBB0_11:
Lloh7:
	adrp	x9, l_.str.3@PAGE
Lloh8:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh9:
	adrp	x10, l_.str.4@PAGE
Lloh10:
	add	x10, x10, l_.str.4@PAGEOFF
	cmp	w20, #0
	csel	x9, x10, x9, eq
Lloh11:
	adrp	x10, l_.str.6@PAGE
Lloh12:
	add	x10, x10, l_.str.6@PAGEOFF
Lloh13:
	adrp	x11, l_.str.5@PAGE
Lloh14:
	add	x11, x11, l_.str.5@PAGEOFF
	cmn	w8, #1
	csel	x8, x11, x10, eq
	stp	x9, x8, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_warn
	b	LBB0_14
LBB0_12:
	cbz	x22, LBB0_15
LBB0_13:
	mov	x0, x22
	bl	_pci_dev_put
LBB0_14:
	bl	_pci_unlock_rescan_remove
	mov	x0, x19
	bl	_mutex_unlock
	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_15:
	mov	x0, x21
	mov	w1, #0
	bl	_pci_scan_single_device
	cbz	x0, LBB0_14
; %bb.16:
	mov	x20, x0
	mov	x0, x21
	bl	_pci_bus_assign_resources
	mov	x0, x20
	bl	_pci_bus_add_device
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to find PCI bus 1?\n"

	.comm	_PCI_VENDOR_ID,4,2              ; @PCI_VENDOR_ID
l_.str.1:                               ; @.str.1
	.asciz	"Unable to read PCI config space?\n"

l_.str.2:                               ; @.str.2
	.asciz	"BIOS says wireless lan is %s, but the pci device is %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"blocked"

l_.str.4:                               ; @.str.4
	.asciz	"unblocked"

l_.str.5:                               ; @.str.5
	.asciz	"absent"

l_.str.6:                               ; @.str.6
	.asciz	"present"

l_.str.7:                               ; @.str.7
	.asciz	"skipped wireless hotplug as probably inappropriate for this model\n"

	.no_dead_strip	_asus_rfkill_hotplug
.subsections_via_symbols
