	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd2802_store_adv_conf
_bd2802_store_adv_conf:                 ## @bd2802_store_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	%rcx, %r14
	movq	%rdx, %r15
	callq	_to_i2c_client
	movl	%eax, %edi
	callq	_i2c_get_clientdata
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_down_write
	cmpq	$0, 8(%rbx)
	je	LBB0_3
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_bd2802_disable_adv_conf
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	cmpq	$0, 8(%rbx)
	jne	LBB0_6
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	callq	_bd2802_enable_adv_conf
LBB0_8:
	movq	%rbx, %rdi
	callq	_up_write
LBB0_9:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"on"

L_.str.1:                               ## @.str.1
	.asciz	"off"

	.no_dead_strip	_bd2802_store_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_store_adv_conf
_bd2802_store_adv_conf:                 ; @bd2802_store_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, x3
	mov	x21, x2
	bl	_to_i2c_client
	bl	_i2c_get_clientdata
	cbz	x19, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_down_write
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
LBB0_2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	w2, #3
	bl	_strncmp
	cbnz	w0, LBB0_8
; %bb.3:
	mov	x0, x20
	bl	_bd2802_disable_adv_conf
	b	LBB0_8
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #2
	bl	_strncmp
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_bd2802_enable_adv_conf
LBB0_8:
	mov	x0, x20
	bl	_up_write
LBB0_9:
	mov	x0, x19
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"on"

l_.str.1:                               ; @.str.1
	.asciz	"off"

	.no_dead_strip	_bd2802_store_adv_conf
.subsections_via_symbols
