	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd2802_enable_adv_conf
_bd2802_enable_adv_conf:                ## @bd2802_enable_adv_conf
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_bd2802_addr_attributes@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_7:
	movq	%r15, %rdi
	callq	_bd2802_is_all_off
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_bd2802_reset_cancel
LBB0_9:
	movl	$1, (%r15)
	jmp	LBB0_10
LBB0_3:
	movq	8(%r15), %rdi
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.4:
	incq	%rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	movq	(%r14), %rax
	movq	-16(%rax,%rbx,8), %rsi
	callq	_device_remove_file
	decq	%rbx
	cmpq	$1, %rbx
	jg	LBB0_5
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bd2802_addr_attributes,8,3     ## @bd2802_addr_attributes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed: sysfs file %s\n"

	.no_dead_strip	_bd2802_enable_adv_conf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bd2802_enable_adv_conf
_bd2802_enable_adv_conf:                ; @bd2802_enable_adv_conf
	.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	x19, x0
Lloh0:
	adrp	x20, _bd2802_addr_attributes@GOTPAGE
Lloh1:
	ldr	x20, [x20, _bd2802_addr_attributes@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x20]
	ldr	x1, [x8, x21, lsl #3]
	bl	_device_create_file
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_bd2802_is_all_off
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_bd2802_reset_cancel
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_10
LBB0_7:
	ldr	x0, [x19, #8]
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w2, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	cbz	w21, LBB0_10
; %bb.8:
	sub	x21, x21, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x20]
	ldr	x1, [x8, x21, lsl #3]
	bl	_device_remove_file
	add	x8, x21, #1
	sub	x21, x21, #1
	cmp	x8, #1
	b.gt	LBB0_9
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_bd2802_addr_attributes,8,3     ; @bd2802_addr_attributes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed: sysfs file %s\n"

	.no_dead_strip	_bd2802_enable_adv_conf
.subsections_via_symbols
