	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pca9532_set_blink
_pca9532_set_blink:                     ## @pca9532_set_blink
	.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	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_ldev_to_led
	movq	%rax, %r14
	movq	8(%rax), %rdi
	movq	(%rbx), %rcx
	movq	(%r12), %rax
	testq	%rcx, %rcx
	je	LBB0_1
LBB0_3:
	leaq	-1691(%rcx), %rdx
	cmpq	$-1685, %rdx                    ## imm = 0xF96B
	jb	LBB0_5
## %bb.4:
	cmpq	%rax, %rcx
	jne	LBB0_5
## %bb.6:
	imull	$152, %eax, %eax
	decl	%eax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	shrq	$38, %rdx
	movl	(%r15), %ecx
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_pca9532_calcpwm
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	(%r14), %rax
	movq	_PCA9532_PWM0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	8(%r14), %rdi
	xorl	%esi, %esi
	callq	_pca9532_setpwm
LBB0_9:
	movq	%r14, %rdi
	callq	_pca9532_setled
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	testq	%rax, %rax
	je	LBB0_2
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	$1000, (%rbx)                   ## imm = 0x3E8
	movq	$1000, (%r12)                   ## imm = 0x3E8
	movq	(%rbx), %rcx
	movl	$1000, %eax                     ## imm = 0x3E8
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCA9532_PWM0,8,3               ## @PCA9532_PWM0
	.no_dead_strip	_pca9532_set_blink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pca9532_set_blink
_pca9532_set_blink:                     ; @pca9532_set_blink
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	bl	_ldev_to_led
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	x9, [x21]
	ldr	x8, [x22]
	cbz	x9, LBB0_6
LBB0_1:
	sub	x10, x9, #1691
	cmn	x10, #1685
	ccmp	x9, x8, #0, hs
	b.ne	LBB0_7
; %bb.2:
	mov	w9, #152
	mul	w8, w8, w9
	sub	w8, w8, #1
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x2, x8, #38
	ldr	w3, [x20]
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_pca9532_calcpwm
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _PCA9532_PWM0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCA9532_PWM0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	_pca9532_setpwm
LBB0_5:
	mov	x0, x19
	bl	_pca9532_setled
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	cbz	x8, LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
LBB0_9:
	mov	w8, #1000
	str	x8, [x21]
	str	x8, [x22]
	ldr	x9, [x21]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCA9532_PWM0,8,3               ; @PCA9532_PWM0
	.no_dead_strip	_pca9532_set_blink
.subsections_via_symbols
