	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_ns2_led
_create_ns2_led:                        ## @create_ns2_led
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	12(%rdx), %ebx
	movl	%ebx, %edi
	callq	_gpio_get_value_cansleep
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_GPIOF_OUT_INIT_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GPIOF_OUT_INIT_HIGH@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	movl	20(%r12), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_devm_gpio_request_one
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	movl	20(%r12), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movl	8(%r12), %ebx
	movl	%ebx, %edi
	callq	_gpio_get_value_cansleep
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	_GPIOF_OUT_INIT_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_GPIOF_OUT_INIT_HIGH@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edx
	movl	20(%r12), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_devm_gpio_request_one
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movl	20(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_20:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	64(%r15), %rdi
	callq	_rwlock_init
	movl	20(%r12), %eax
	movl	%eax, 44(%r15)
	movl	16(%r12), %eax
	movl	%eax, 40(%r15)
	movq	$0, 32(%r15)
	movq	_LED_CORE_SUSPENDRESUME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r15)
	movq	_ns2_led_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movl	12(%r12), %edi
	movl	%edi, 60(%r15)
	movl	8(%r12), %eax
	movl	%eax, 56(%r15)
	callq	_gpio_cansleep
	movl	%eax, %ebx
	movl	56(%r15), %edi
	callq	_gpio_cansleep
	orl	%ebx, %eax
	movl	%eax, (%r15)
	je	LBB0_13
## %bb.12:
	movq	_ns2_led_set_blocking@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	jmp	LBB0_14
LBB0_13:
	movq	_ns2_led_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
LBB0_14:
	movl	4(%r12), %eax
	movl	%eax, 52(%r15)
	movl	(%r12), %eax
	movl	%eax, 48(%r15)
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ns2_led_get_mode
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	leaq	8(%r15), %rsi
	movl	-36(%rbp), %eax
	movq	_NS_V2_LED_SATA@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	sete	%dl
	movl	%edx, 4(%r15)
	movq	_NS_V2_LED_OFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.18:
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_15:
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_17:
	movq	_LED_FULL@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	%r14, %rdi
	callq	_led_classdev_register
	movl	%eax, %ebx
	sarl	$31, %ebx
	andl	%eax, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIOF_OUT_INIT_HIGH,4,2        ## @GPIOF_OUT_INIT_HIGH
	.comm	_GPIOF_OUT_INIT_LOW,4,2         ## @GPIOF_OUT_INIT_LOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: failed to setup command GPIO\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: failed to setup slow GPIO\n"

	.comm	_LED_CORE_SUSPENDRESUME,4,2     ## @LED_CORE_SUSPENDRESUME
	.comm	_ns2_led_groups,4,2             ## @ns2_led_groups
	.comm	_ns2_led_set_blocking,4,2       ## @ns2_led_set_blocking
	.comm	_ns2_led_set,4,2                ## @ns2_led_set
	.comm	_NS_V2_LED_SATA,4,2             ## @NS_V2_LED_SATA
	.comm	_NS_V2_LED_OFF,4,2              ## @NS_V2_LED_OFF
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_LED_FULL,4,2                   ## @LED_FULL
	.no_dead_strip	_create_ns2_led
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_ns2_led
_create_ns2_led:                        ; @create_ns2_led
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w22, [x2, #12]
	mov	x0, x22
	bl	_gpio_get_value_cansleep
Lloh0:
	adrp	x23, _GPIOF_OUT_INIT_HIGH@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GPIOF_OUT_INIT_HIGH@GOTPAGEOFF]
Lloh2:
	adrp	x24, _GPIOF_OUT_INIT_LOW@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GPIOF_OUT_INIT_LOW@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x24, x23, eq
	ldr	w2, [x8]
	ldr	w3, [x21, #20]
	mov	x0, x19
	mov	x1, x22
	bl	_devm_gpio_request_one
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w2, [x21, #20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w22, [x21, #8]
	mov	x0, x22
	bl	_gpio_get_value_cansleep
	cmp	x0, #0
	csel	x8, x24, x23, eq
	ldr	w2, [x8]
	ldr	w3, [x21, #20]
	mov	x0, x19
	mov	x1, x22
	bl	_devm_gpio_request_one
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
	ldr	w2, [x21, #20]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
LBB0_5:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	add	x0, x20, #64
	bl	_rwlock_init
	ldr	d0, [x21, #16]
	str	d0, [x20, #40]
	str	xzr, [x20, #32]
Lloh8:
	adrp	x8, _LED_CORE_SUSPENDRESUME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LED_CORE_SUSPENDRESUME@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20, #24]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _ns2_led_groups@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ns2_led_groups@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #20]
	ldp	w8, w0, [x21, #8]
	stp	w8, w0, [x20, #56]
	bl	_gpio_cansleep
	mov	x22, x0
	ldr	w0, [x20, #56]
	bl	_gpio_cansleep
	orr	w8, w0, w22
	str	w8, [x20]
	cbz	w8, LBB0_8
; %bb.7:
Lloh14:
	adrp	x8, _ns2_led_set_blocking@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ns2_led_set_blocking@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	b	LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _ns2_led_set@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ns2_led_set@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20, #12]
LBB0_9:
	ldr	d0, [x21]
	str	d0, [x20, #48]
	add	x1, sp, #12
	mov	x0, x20
	bl	_ns2_led_get_mode
	tbnz	w0, #31, LBB0_11
; %bb.10:
	add	x1, x20, #8
	ldr	w8, [sp, #12]
Lloh20:
	adrp	x9, _NS_V2_LED_SATA@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NS_V2_LED_SATA@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w9, eq
	str	w9, [x20, #4]
Lloh23:
	adrp	x9, _NS_V2_LED_OFF@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NS_V2_LED_OFF@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _LED_OFF@GOTPAGE
Lloh27:
	ldr	x10, [x10, _LED_OFF@GOTPAGEOFF]
Lloh28:
	adrp	x11, _LED_FULL@GOTPAGE
Lloh29:
	ldr	x11, [x11, _LED_FULL@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	x0, x19
	bl	_led_classdev_register
	cmp	w0, #0
	csel	w22, w0, wzr, lt
	b	LBB0_5
LBB0_11:
	mov	x22, x0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIOF_OUT_INIT_HIGH,4,2        ; @GPIOF_OUT_INIT_HIGH
	.comm	_GPIOF_OUT_INIT_LOW,4,2         ; @GPIOF_OUT_INIT_LOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: failed to setup command GPIO\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: failed to setup slow GPIO\n"

	.comm	_LED_CORE_SUSPENDRESUME,4,2     ; @LED_CORE_SUSPENDRESUME
	.comm	_ns2_led_groups,4,2             ; @ns2_led_groups
	.comm	_ns2_led_set_blocking,4,2       ; @ns2_led_set_blocking
	.comm	_ns2_led_set,4,2                ; @ns2_led_set
	.comm	_NS_V2_LED_SATA,4,2             ; @NS_V2_LED_SATA
	.comm	_NS_V2_LED_OFF,4,2              ; @NS_V2_LED_OFF
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_LED_FULL,4,2                   ; @LED_FULL
	.no_dead_strip	_create_ns2_led
.subsections_via_symbols
