	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd2802_probe
_bd2802_probe:                          ## @bd2802_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r15, (%rax)
	movq	%r15, %rdi
	callq	_dev_get_platdata
	movq	%rax, %rbx
	movq	%rax, 24(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_i2c_set_clientdata
	movl	(%rbx), %edi
	movq	_GPIOF_OUT_INIT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_gpio_request_one
	movl	$100, %edi
	callq	_udelay
	movq	_BD2802_REG_CLKSETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_bd2802_write_byte
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_dev_info
	movq	24(%r14), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_gpio_set_value
	movq	_BD2802_PATTERN_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_BD2802_CURRENT_032@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	%r14, %rdi
	addq	$8, %rdi
	callq	_init_rwsem
	movq	_bd2802_attributes@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_9:
	movq	%r14, %rdi
	callq	_bd2802_register_led_classdev
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jns	LBB0_14
## %bb.10:
	movl	%eax, %r12d
	testl	%ebx, %ebx
	jg	LBB0_12
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_7:
	movl	%eax, %r12d
	movq	(%r14), %rdi
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	testl	%ebx, %ebx
	jle	LBB0_14
LBB0_12:
	movl	%ebx, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	(%r15), %rax
	movq	-16(%rax,%rbx,8), %rsi
	callq	_device_remove_file
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_13
LBB0_14:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GPIOF_OUT_INIT_HIGH,4,2        ## @GPIOF_OUT_INIT_HIGH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RGB_RESETB"

	.comm	_BD2802_REG_CLKSETUP,4,2        ## @BD2802_REG_CLKSETUP
L_.str.1:                               ## @.str.1
	.asciz	"failed to detect device\n"

L_.str.2:                               ## @.str.2
	.asciz	"return 0x%02x\n"

	.comm	_BD2802_PATTERN_HALF,4,2        ## @BD2802_PATTERN_HALF
	.comm	_BD2802_CURRENT_032,4,2         ## @BD2802_CURRENT_032
	.comm	_bd2802_attributes,8,3          ## @bd2802_attributes
L_.str.3:                               ## @.str.3
	.asciz	"failed: sysfs file %s\n"

	.no_dead_strip	_bd2802_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bd2802_probe
_bd2802_probe:                          ; @bd2802_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	str	x21, [x0]
	mov	x0, x21
	bl	_dev_get_platdata
	mov	x20, x0
	str	x0, [x19, #24]
	mov	x0, x21
	mov	x1, x19
	bl	_i2c_set_clientdata
	ldr	w0, [x20]
Lloh3:
	adrp	x8, _GPIOF_OUT_INIT_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIOF_OUT_INIT_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	bl	_gpio_request_one
	mov	w0, #100
	bl	_udelay
Lloh8:
	adrp	x8, _BD2802_REG_CLKSETUP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BD2802_REG_CLKSETUP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_bd2802_write_byte
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.2:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_info
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_gpio_set_value
Lloh13:
	adrp	x8, _BD2802_PATTERN_HALF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BD2802_PATTERN_HALF@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _BD2802_CURRENT_032@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BD2802_CURRENT_032@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	add	x0, x19, #8
	bl	_init_rwsem
Lloh19:
	adrp	x21, _bd2802_attributes@GOTPAGE
Lloh20:
	ldr	x21, [x21, _bd2802_attributes@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x21]
	ldr	x1, [x8, x22, lsl #3]
	bl	_device_create_file
	cbnz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_4
	b	LBB0_9
LBB0_6:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_7:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_15
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_bd2802_register_led_classdev
	tbnz	w0, #31, LBB0_12
; %bb.10:
	mov	w20, #0
	b	LBB0_15
LBB0_11:
	mov	x20, x0
	ldr	x0, [x19]
	ldr	x8, [x21]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	cmp	w22, #1
	b.ge	LBB0_13
	b	LBB0_15
LBB0_12:
	mov	x20, x0
	cmp	w22, #1
	b.lt	LBB0_15
LBB0_13:
	mov	w8, w22
	sub	x22, x8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x21]
	ldr	x1, [x8, x22, lsl #3]
	bl	_device_remove_file
	add	x8, x22, #1
	sub	x22, x22, #1
	cmp	x8, #1
	b.hi	LBB0_14
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GPIOF_OUT_INIT_HIGH,4,2        ; @GPIOF_OUT_INIT_HIGH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RGB_RESETB"

	.comm	_BD2802_REG_CLKSETUP,4,2        ; @BD2802_REG_CLKSETUP
l_.str.1:                               ; @.str.1
	.asciz	"failed to detect device\n"

l_.str.2:                               ; @.str.2
	.asciz	"return 0x%02x\n"

	.comm	_BD2802_PATTERN_HALF,4,2        ; @BD2802_PATTERN_HALF
	.comm	_BD2802_CURRENT_032,4,2         ; @BD2802_CURRENT_032
	.comm	_bd2802_attributes,8,3          ; @bd2802_attributes
l_.str.3:                               ; @.str.3
	.asciz	"failed: sysfs file %s\n"

	.no_dead_strip	_bd2802_probe
.subsections_via_symbols
