	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_gpio_led
_create_gpio_led:                       ## @create_gpio_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	%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	%r8, %r13
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	$0, -48(%rbp)
	movl	36(%rdi), %eax
	movl	%eax, 28(%rsi)
	movl	32(%rsi), %edi
	callq	_gpiod_cansleep
	movl	%eax, 56(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_gpio_led_set_blocking@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	jmp	LBB0_3
LBB0_1:
	movq	_gpio_led_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
LBB0_3:
	movq	$0, 48(%rbx)
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:
	movq	%r13, 40(%rbx)
	movq	_gpio_blink_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
LBB0_5:
	movq	(%r12), %rcx
	movq	_LEDS_GPIO_DEFSTATE_KEEP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_7
## %bb.6:
	movl	32(%rbx), %edi
	callq	_gpiod_get_value_cansleep
	testl	%eax, %eax
	js	LBB0_20
## %bb.8:
	testl	%eax, %eax
	jne	LBB0_9
LBB0_10:
	movq	_LED_OFF@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_7:
	movq	_LEDS_GPIO_DEFSTATE_ON@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	sete	%al
	testl	%eax, %eax
	je	LBB0_10
LBB0_9:
	movq	_LED_FULL@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rbx)
	cmpl	$0, 32(%r12)
	je	LBB0_12
## %bb.13:
	cmpq	$0, 24(%r12)
	je	LBB0_15
LBB0_14:
	movq	_LED_PANIC_INDICATOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
LBB0_15:
	cmpq	$0, 16(%r12)
	je	LBB0_17
## %bb.16:
	movq	_LED_RETAIN_AT_SHUTDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
LBB0_17:
	movl	32(%rbx), %edi
	movl	%eax, %esi
	callq	_gpiod_direction_output
	testl	%eax, %eax
	js	LBB0_20
## %bb.18:
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.21:
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_led_classdev_register     ## TAILCALL
LBB0_12:
	movq	_LED_CORE_SUSPENDRESUME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
	cmpq	$0, 24(%r12)
	jne	LBB0_14
	jmp	LBB0_15
LBB0_19:
	movq	%r15, -48(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_led_classdev_register_ext
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpio_led_set,4,2               ## @gpio_led_set
	.comm	_gpio_led_set_blocking,4,2      ## @gpio_led_set_blocking
	.comm	_gpio_blink_set,4,2             ## @gpio_blink_set
	.comm	_LEDS_GPIO_DEFSTATE_KEEP,8,3    ## @LEDS_GPIO_DEFSTATE_KEEP
	.comm	_LEDS_GPIO_DEFSTATE_ON,8,3      ## @LEDS_GPIO_DEFSTATE_ON
	.comm	_LED_FULL,4,2                   ## @LED_FULL
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ## @LED_CORE_SUSPENDRESUME
	.comm	_LED_PANIC_INDICATOR,4,2        ## @LED_PANIC_INDICATOR
	.comm	_LED_RETAIN_AT_SHUTDOWN,4,2     ## @LED_RETAIN_AT_SHUTDOWN
	.no_dead_strip	_create_gpio_led
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_gpio_led
_create_gpio_led:                       ; @create_gpio_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	x23, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	str	xzr, [sp, #8]
	ldr	w8, [x0, #36]
	str	w8, [x1, #28]
	ldr	w0, [x1, #32]
	bl	_gpiod_cansleep
	str	w0, [x19, #56]
	cbz	w0, LBB0_14
; %bb.1:
Lloh0:
	adrp	x8, _gpio_led_set_blocking@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpio_led_set_blocking@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	str	xzr, [x19, #48]
	cbz	x23, LBB0_3
LBB0_2:
	str	x23, [x19, #40]
Lloh3:
	adrp	x8, _gpio_blink_set@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gpio_blink_set@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_3:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _LEDS_GPIO_DEFSTATE_KEEP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LEDS_GPIO_DEFSTATE_KEEP@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19, #32]
	bl	_gpiod_get_value_cansleep
	mov	x1, x0
	tbz	w0, #31, LBB0_6
	b	LBB0_18
LBB0_5:
Lloh9:
	adrp	x9, _LEDS_GPIO_DEFSTATE_ON@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LEDS_GPIO_DEFSTATE_ON@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, eq
LBB0_6:
Lloh12:
	adrp	x8, _LED_FULL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LED_FULL@GOTPAGEOFF]
Lloh14:
	adrp	x9, _LED_OFF@GOTPAGE
Lloh15:
	ldr	x9, [x9, _LED_OFF@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w8, [x22, #32]
	cbz	w8, LBB0_15
; %bb.7:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_9
LBB0_8:
Lloh16:
	adrp	x8, _LED_PANIC_INDICATOR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LED_PANIC_INDICATOR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_9:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_11
; %bb.10:
Lloh19:
	adrp	x8, _LED_RETAIN_AT_SHUTDOWN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LED_RETAIN_AT_SHUTDOWN@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_11:
	ldr	w0, [x19, #32]
	bl	_gpiod_direction_output
	tbnz	w0, #31, LBB0_17
; %bb.12:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_16
; %bb.13:
	str	x8, [x19]
	mov	x0, x20
	mov	x1, x19
	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
	b	_devm_led_classdev_register
LBB0_14:
Lloh22:
	adrp	x8, _gpio_led_set@GOTPAGE
Lloh23:
	ldr	x8, [x8, _gpio_led_set@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	xzr, [x19, #48]
	cbnz	x23, LBB0_2
	b	LBB0_3
LBB0_15:
Lloh25:
	adrp	x8, _LED_CORE_SUSPENDRESUME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LED_CORE_SUSPENDRESUME@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	ldr	x8, [x22, #24]
	cbnz	x8, LBB0_8
	b	LBB0_9
LBB0_16:
	str	x21, [sp, #8]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_devm_led_classdev_register_ext
LBB0_17:
	mov	x1, x0
LBB0_18:
	mov	x0, x1
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_gpio_led_set,4,2               ; @gpio_led_set
	.comm	_gpio_led_set_blocking,4,2      ; @gpio_led_set_blocking
	.comm	_gpio_blink_set,4,2             ; @gpio_blink_set
	.comm	_LEDS_GPIO_DEFSTATE_KEEP,8,3    ; @LEDS_GPIO_DEFSTATE_KEEP
	.comm	_LEDS_GPIO_DEFSTATE_ON,8,3      ; @LEDS_GPIO_DEFSTATE_ON
	.comm	_LED_FULL,4,2                   ; @LED_FULL
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ; @LED_CORE_SUSPENDRESUME
	.comm	_LED_PANIC_INDICATOR,4,2        ; @LED_PANIC_INDICATOR
	.comm	_LED_RETAIN_AT_SHUTDOWN,4,2     ; @LED_RETAIN_AT_SHUTDOWN
	.no_dead_strip	_create_gpio_led
.subsections_via_symbols
