	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8327_led_create
_ar8327_led_create:                     ## @ar8327_led_create
	.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	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	_CONFIG_AR8216_PHY_LEDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	movl	20(%r12), %edi
	testl	%edi, %edi
	je	LBB0_2
## %bb.4:
	movq	(%r12), %rax
	movq	_AR8327_NUM_LEDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.5:
	callq	_strlen
	leaq	89(%rax), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movq	%rbx, 80(%rax)
	movl	24(%r12), %eax
	movl	%eax, 72(%r14)
	movq	8(%r12), %rax
	movups	(%r12), %xmm0
	movups	%xmm0, (%r14)
	movq	_AR8327_LED_MODE_HW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movl	$1, 16(%r14)
LBB0_9:
	leaq	88(%r14), %rdi
	movq	%rdi, 24(%r14)
	movl	20(%r12), %esi
	callq	_strcpy
	movq	24(%r14), %rax
	movq	%rax, 48(%r14)
	movq	_ar8327_led_set_brightness@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r14)
	movq	_ar8327_led_blink_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r14)
	movl	16(%r12), %eax
	movl	%eax, 56(%r14)
	leaq	40(%r14), %rdi
	callq	_spin_lock_init
	leaq	36(%r14), %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	addq	$32, %rdi
	movq	_ar8327_led_work_func@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r14, %rdi
	callq	_ar8327_led_register
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_kfree
	movl	%ebx, %r15d
	jmp	LBB0_12
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_10:
	movq	8(%r13), %rax
	movslq	(%r13), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r13)
	movq	%r14, (%rax,%rcx,8)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_AR8216_PHY_LEDS,4,2     ## @CONFIG_AR8216_PHY_LEDS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR8327_NUM_LEDS,8,3            ## @AR8327_NUM_LEDS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AR8327_LED_MODE_HW,8,3         ## @AR8327_LED_MODE_HW
	.comm	_ar8327_led_set_brightness,4,2  ## @ar8327_led_set_brightness
	.comm	_ar8327_led_blink_set,4,2       ## @ar8327_led_blink_set
	.comm	_ar8327_led_work_func,4,2       ## @ar8327_led_work_func
	.no_dead_strip	_ar8327_led_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8327_led_create
_ar8327_led_create:                     ; @ar8327_led_create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _CONFIG_AR8216_PHY_LEDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_AR8216_PHY_LEDS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_10
; %bb.1:
	ldr	w0, [x20, #20]
	cbz	w0, LBB0_8
; %bb.2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _AR8327_NUM_LEDS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AR8327_NUM_LEDS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.3:
	bl	_strlen
	add	x0, x0, #89
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.4:
	mov	x19, x0
	str	x21, [x0, #80]
	ldr	w8, [x20, #24]
	str	w8, [x0, #72]
	ldp	x8, x9, [x20]
	stp	x8, x9, [x0]
Lloh9:
	adrp	x8, _AR8327_LED_MODE_HW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR8327_LED_MODE_HW@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_6:
	add	x0, x19, #88
	str	x0, [x19, #24]
	ldr	w1, [x20, #20]
	bl	_strcpy
	ldr	x8, [x19, #24]
	str	x8, [x19, #48]
Lloh12:
	adrp	x8, _ar8327_led_set_brightness@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ar8327_led_set_brightness@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _ar8327_led_blink_set@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ar8327_led_blink_set@GOTPAGEOFF]
	str	w8, [x19, #64]
Lloh17:
	ldr	w8, [x9]
	ldr	w9, [x20, #16]
	stp	w9, w8, [x19, #56]
	add	x0, x19, #40
	bl	_spin_lock_init
	add	x0, x19, #36
	bl	_mutex_init
	add	x0, x19, #32
Lloh18:
	adrp	x8, _ar8327_led_work_func@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ar8327_led_work_func@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	x0, x19
	bl	_ar8327_led_register
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.7:
	mov	x0, x19
	bl	_kfree
	b	LBB0_11
LBB0_8:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_13:
	ldr	x8, [x22, #8]
	ldrsw	x9, [x22]
	add	w10, w9, #1
	str	w10, [x22]
	str	x19, [x8, x9, lsl #3]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_AR8216_PHY_LEDS,4,2     ; @CONFIG_AR8216_PHY_LEDS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR8327_NUM_LEDS,8,3            ; @AR8327_NUM_LEDS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AR8327_LED_MODE_HW,8,3         ; @AR8327_LED_MODE_HW
	.comm	_ar8327_led_set_brightness,4,2  ; @ar8327_led_set_brightness
	.comm	_ar8327_led_blink_set,4,2       ; @ar8327_led_blink_set
	.comm	_ar8327_led_work_func,4,2       ; @ar8327_led_work_func
	.no_dead_strip	_ar8327_led_create
.subsections_via_symbols
