	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd2802_set_on
_bd2802_set_on:                         ## @bd2802_set_on
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_bd2802_is_all_off
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$0, 8(%rbx)
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_bd2802_reset_cancel
LBB0_3:
	movq	_BD2802_REG_CURRENT1SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_bd2802_get_reg_addr
	movl	(%rbx), %edi
	movl	4(%rbx), %edx
	movl	%eax, %esi
	callq	_bd2802_write_byte
	movq	_BD2802_REG_CURRENT2SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_bd2802_get_reg_addr
	movl	(%rbx), %edi
	movq	_BD2802_CURRENT_000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	callq	_bd2802_write_byte
	movq	_BD2802_REG_WAVEPATTERN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_bd2802_get_reg_addr
	movl	(%rbx), %edi
	movq	_BD2802_PATTERN_FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	callq	_bd2802_write_byte
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_bd2802_enable
	movq	_BD2802_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bd2802_update_state            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BD2802_REG_CURRENT1SETUP,4,2   ## @BD2802_REG_CURRENT1SETUP
	.comm	_BD2802_REG_CURRENT2SETUP,4,2   ## @BD2802_REG_CURRENT2SETUP
	.comm	_BD2802_CURRENT_000,4,2         ## @BD2802_CURRENT_000
	.comm	_BD2802_REG_WAVEPATTERN,4,2     ## @BD2802_REG_WAVEPATTERN
	.comm	_BD2802_PATTERN_FULL,4,2        ## @BD2802_PATTERN_FULL
	.comm	_BD2802_ON,4,2                  ## @BD2802_ON
	.no_dead_strip	_bd2802_set_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bd2802_set_on
_bd2802_set_on:                         ; @bd2802_set_on
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_bd2802_is_all_off
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_bd2802_reset_cancel
LBB0_3:
Lloh0:
	adrp	x8, _BD2802_REG_CURRENT1SETUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BD2802_REG_CURRENT1SETUP@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_bd2802_get_reg_addr
	mov	x1, x0
	ldp	w0, w2, [x21]
	bl	_bd2802_write_byte
Lloh3:
	adrp	x8, _BD2802_REG_CURRENT2SETUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BD2802_REG_CURRENT2SETUP@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_bd2802_get_reg_addr
	mov	x1, x0
	ldr	w0, [x21]
Lloh6:
	adrp	x8, _BD2802_CURRENT_000@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BD2802_CURRENT_000@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_bd2802_write_byte
Lloh9:
	adrp	x8, _BD2802_REG_WAVEPATTERN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BD2802_REG_WAVEPATTERN@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_bd2802_get_reg_addr
	mov	x1, x0
	ldr	w0, [x21]
Lloh12:
	adrp	x8, _BD2802_PATTERN_FULL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BD2802_PATTERN_FULL@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_bd2802_write_byte
	mov	x0, x21
	mov	x1, x20
	bl	_bd2802_enable
Lloh15:
	adrp	x8, _BD2802_ON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BD2802_ON@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, 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
	b	_bd2802_update_state
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BD2802_REG_CURRENT1SETUP,4,2   ; @BD2802_REG_CURRENT1SETUP
	.comm	_BD2802_REG_CURRENT2SETUP,4,2   ; @BD2802_REG_CURRENT2SETUP
	.comm	_BD2802_CURRENT_000,4,2         ; @BD2802_CURRENT_000
	.comm	_BD2802_REG_WAVEPATTERN,4,2     ; @BD2802_REG_WAVEPATTERN
	.comm	_BD2802_PATTERN_FULL,4,2        ; @BD2802_PATTERN_FULL
	.comm	_BD2802_ON,4,2                  ; @BD2802_ON
	.no_dead_strip	_bd2802_set_on
.subsections_via_symbols
