	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpci_led_off                   ## -- Begin function cpci_led_off
	.p2align	4, 0x90
_cpci_led_off:                          ## @cpci_led_off
	.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, %r14
	movl	(%rdi), %esi
	movl	4(%rdi), %edi
	movq	_PCI_CAP_ID_CHSWP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_bus_find_capability
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %esi
	movl	4(%r14), %edi
	addl	$2, %ebx
	leaq	-28(%rbp), %rcx
	movl	%ebx, %edx
	callq	_pci_bus_read_config_word
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movl	-28(%rbp), %ecx
	movq	_HS_CSR_LOO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	testl	%ecx, %eax
	je	LBB0_6
## %bb.3:
	notl	%eax
	andl	%eax, %ecx
	movl	%ecx, -28(%rbp)
	movl	(%r14), %esi
	movl	4(%r14), %edi
	movl	%ebx, %edx
	callq	_pci_bus_write_config_word
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_slot_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_err
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CAP_ID_CHSWP,4,2           ## @PCI_CAP_ID_CHSWP
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_HS_CSR_LOO,4,2                 ## @HS_CSR_LOO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not clear LOO for slot %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpci_led_off                   ; -- Begin function cpci_led_off
	.p2align	2
_cpci_led_off:                          ; @cpci_led_off
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x19]
Lloh0:
	adrp	x8, _PCI_CAP_ID_CHSWP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_CHSWP@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_pci_bus_find_capability
	cbz	w0, LBB0_2
; %bb.1:
	ldp	w1, w8, [x19]
	add	w20, w0, #2
	add	x3, sp, #12
	mov	x0, x8
	mov	x2, x20
	bl	_pci_bus_read_config_word
	cbz	x0, LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _HS_CSR_LOO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HS_CSR_LOO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	bic	w3, w8, w9
	str	w3, [sp, #12]
	ldp	w1, w0, [x19]
	mov	x2, x20
	bl	_pci_bus_write_config_word
	cbz	x0, LBB0_3
; %bb.6:
	mov	x0, x19
	bl	_slot_name
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	b	LBB0_2
LBB0_7:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CAP_ID_CHSWP,4,2           ; @PCI_CAP_ID_CHSWP
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_HS_CSR_LOO,4,2                 ; @HS_CSR_LOO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not clear LOO for slot %s"

.subsections_via_symbols
