	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function is31fl319x_probe
_is31fl319x_probe:                      ## @is31fl319x_probe
	.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, %r14
	movq	_IS31FL319X_CURRENT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	4(%rdi), %edi
	movq	_I2C_FUNC_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_is31fl319x_parse_dt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, 32(%r12)
	movq	_regmap_config@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_regmap_init_i2c
	movl	%eax, 28(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	28(%r12), %edi
	callq	_PTR_ERR
LBB0_5:
	movl	%eax, %ebx
LBB0_6:
	movq	%r12, %rdi
	callq	_mutex_destroy
	jmp	LBB0_10
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_i2c_set_clientdata
	movl	28(%r12), %edi
	movq	_IS31FL319X_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_24
## %bb.12:
	movq	16(%r12), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.13:
	movq	8(%r12), %rax
	cmpl	$1, %ecx
	jne	LBB0_26
## %bb.14:
	xorl	%edx, %edx
LBB0_15:
	testb	$1, %cl
	je	LBB0_18
## %bb.16:
	shlq	$5, %rdx
	cmpq	$0, 24(%rax,%rdx)
	je	LBB0_18
## %bb.17:
	movq	(%rax,%rdx), %rax
	cmpq	%r15, %rax
	cmovlq	%rax, %r15
LBB0_18:
	movl	28(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_IS31FL319X_CONFIG2@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_is31fl319x_microamp_to_cs
	movl	%eax, %ebx
	movl	24(%r12), %edi
	callq	_is31fl319x_db_to_gain
	orl	%eax, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
	movq	16(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_25
## %bb.19:
	movl	$8, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=1
	incq	%r13
	movslq	(%rax), %rcx
	addq	$32, %r15
	xorl	%ebx, %ebx
	cmpq	%rcx, %r13
	jge	LBB0_10
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rcx
	cmpq	$0, 16(%rcx,%r15)
	je	LBB0_20
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	leaq	(%rcx,%r15), %rsi
	movq	%r12, 8(%rcx,%r15)
	movq	_is31fl319x_brightness_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx,%r15)
	movq	%r14, %rdi
	callq	_devm_led_classdev_register
	testl	%eax, %eax
	js	LBB0_5
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	16(%r12), %rax
	jmp	LBB0_20
LBB0_24:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_25:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_26:
	movl	%ecx, %esi
	andl	$-2, %esi
	leaq	56(%rax), %rdi
	xorl	%edx, %edx
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_28 Depth=1
	addq	$2, %rdx
	addq	$64, %rdi
	cmpq	%rdx, %rsi
	je	LBB0_15
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -32(%rdi)
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	-56(%rdi), %rbx
	cmpq	%r15, %rbx
	cmovlq	%rbx, %r15
LBB0_30:                                ##   in Loop: Header=BB0_28 Depth=1
	cmpq	$0, (%rdi)
	je	LBB0_27
## %bb.31:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	-24(%rdi), %rbx
	cmpq	%r15, %rbx
	cmovlq	%rbx, %r15
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_IS31FL319X_CURRENT_MAX,8,3     ## @IS31FL319X_CURRENT_MAX
	.comm	_I2C_FUNC_I2C,4,2               ## @I2C_FUNC_I2C
	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_regmap_config,4,2              ## @regmap_config
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate register map\n"

	.comm	_IS31FL319X_RESET,4,2           ## @IS31FL319X_RESET
L_.str.1:                               ## @.str.1
	.asciz	"no response from chip write: err = %d\n"

	.comm	_IS31FL319X_CONFIG2,4,2         ## @IS31FL319X_CONFIG2
	.comm	_is31fl319x_brightness_set,4,2  ## @is31fl319x_brightness_set
	.no_dead_strip	_is31fl319x_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function is31fl319x_probe
_is31fl319x_probe:                      ; @is31fl319x_probe
	.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	x20, x0
Lloh0:
	adrp	x8, _IS31FL319X_CURRENT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IS31FL319X_CURRENT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	w0, [x0, #4]
Lloh3:
	adrp	x8, _I2C_FUNC_I2C@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_FUNC_I2C@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_i2c_check_functionality
	cbz	w0, LBB0_7
; %bb.1:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x19, x0
	bl	_mutex_init
	mov	x0, x20
	mov	x1, x19
	bl	_is31fl319x_parse_dt
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.3:
	str	x20, [x19, #32]
Lloh9:
	adrp	x1, _regmap_config@GOTPAGE
Lloh10:
	ldr	x1, [x1, _regmap_config@GOTPAGEOFF]
	mov	x0, x20
	bl	_devm_regmap_init_i2c
	str	w0, [x19, #28]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.4:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #28]
	bl	_PTR_ERR
LBB0_5:
	mov	x22, x0
LBB0_6:
	mov	x0, x19
	bl	_mutex_destroy
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	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_11:
	mov	x0, x20
	mov	x1, x19
	bl	_i2c_set_clientdata
	ldr	w0, [x19, #28]
Lloh17:
	adrp	x8, _IS31FL319X_RESET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IS31FL319X_RESET@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_regmap_write
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_23
; %bb.12:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	ldr	x9, [x19, #8]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x9, x9, #32
	subs	x8, x8, #1
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, #24]
	cbz	x10, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x10, [x9]
	cmp	x10, x21
	csel	x21, x10, x21, lt
	b	LBB0_14
LBB0_17:
	ldr	w22, [x19, #28]
Lloh20:
	adrp	x8, _IS31FL319X_CONFIG2@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IS31FL319X_CONFIG2@GOTPAGEOFF]
Lloh22:
	ldr	w23, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_is31fl319x_microamp_to_cs
	mov	x21, x0
	ldr	w0, [x19, #24]
	bl	_is31fl319x_db_to_gain
	orr	w2, w0, w21
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_24
; %bb.18:
	mov	x21, #0
	mov	x23, #0
Lloh23:
	adrp	x24, _is31fl319x_brightness_set@GOTPAGE
Lloh24:
	ldr	x24, [x24, _is31fl319x_brightness_set@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	w22, #0
	add	x23, x23, #1
	ldrsw	x9, [x8]
	add	x21, x21, #32
	cmp	x23, x9
	b.ge	LBB0_10
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	x1, x9, x21
	ldr	x9, [x1, #24]
	cbz	x9, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w8, [x24]
	str	w8, [x1, #8]!
	str	x19, [x1, #8]
	mov	x0, x20
	bl	_devm_led_classdev_register
	tbnz	w0, #31, LBB0_5
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x19, #16]
	b	LBB0_19
LBB0_23:
	str	x0, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_24:
	mov	w22, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_IS31FL319X_CURRENT_MAX,8,3     ; @IS31FL319X_CURRENT_MAX
	.comm	_I2C_FUNC_I2C,4,2               ; @I2C_FUNC_I2C
	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_regmap_config,4,2              ; @regmap_config
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate register map\n"

	.comm	_IS31FL319X_RESET,4,2           ; @IS31FL319X_RESET
l_.str.1:                               ; @.str.1
	.asciz	"no response from chip write: err = %d\n"

	.comm	_IS31FL319X_CONFIG2,4,2         ; @IS31FL319X_CONFIG2
	.comm	_is31fl319x_brightness_set,4,2  ; @is31fl319x_brightness_set
	.no_dead_strip	_is31fl319x_probe
.subsections_via_symbols
