	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pca9532_calcpwm
_pca9532_calcpwm:                       ## @pca9532_calcpwm
	.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
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_i2c_get_clientdata
	movq	%rax, %r8
	movq	16(%rax), %rdx
	movq	_PCA9532_TYPE_LED@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_PCA9532_PWM0@GOTPCREL(%rip), %rax
	movslq	%ebx, %r9
	movq	(%rax), %rcx
	addq	%r9, %rcx
	xorl	%eax, %eax
	movl	$16, %esi
	xorl	%ebx, %ebx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	addq	$24, %rsi
	cmpq	$400, %rsi                      ## imm = 0x190
	je	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, -16(%rdx,%rsi)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rcx, -8(%rdx,%rsi)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	addl	(%rdx,%rsi), %eax
	jmp	LBB0_4
LBB0_5:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.7:
	cltd
	idivl	%ebx
	cmpl	$256, %eax                      ## imm = 0x100
	jl	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_9:
	movq	(%r8), %rcx
	movl	%eax, (%rcx,%r9,4)
	movq	8(%r8), %rax
	movl	%r14d, (%rax,%r9,4)
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCA9532_TYPE_LED,8,3           ## @PCA9532_TYPE_LED
	.comm	_PCA9532_PWM0,8,3               ## @PCA9532_PWM0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fear of division by zero %d/%d, wanted %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_pca9532_calcpwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pca9532_calcpwm
_pca9532_calcpwm:                       ; @pca9532_calcpwm
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_i2c_get_clientdata
	mov	x10, #0
	mov	w2, #0
	mov	w8, #0
	ldr	x11, [x0, #16]
Lloh0:
	adrp	x9, _PCA9532_TYPE_LED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCA9532_TYPE_LED@GOTPAGEOFF]
Lloh2:
	ldr	x12, [x9]
Lloh3:
	adrp	x9, _PCA9532_PWM0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCA9532_PWM0@GOTPAGEOFF]
Lloh5:
	ldr	x13, [x9]
	sxtw	x9, w22
	add	x13, x13, x9
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #24
	cmp	x10, #384
	b.eq	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x11, x10]
	cmp	x14, x12
	b.ne	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x14, x11, x10
	ldr	x15, [x14, #8]
	cmp	x15, x13
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w8, #1
	ldr	w14, [x14, #16]
	add	w2, w2, w14
	b	LBB0_1
LBB0_5:
	cbz	w8, LBB0_8
; %bb.6:
	sdiv	w10, w2, w8
	cmp	w10, #256
	b.ge	LBB0_9
; %bb.7:
	mov	w8, #0
	lsl	x9, x9, #2
	ldp	x11, x12, [x0]
	str	w10, [x11, x9]
	str	w19, [x12, x9]
	b	LBB0_10
LBB0_8:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w3, #0
	mov	x4, x20
	bl	_dev_err
LBB0_9:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_10:
	mov	x0, x8
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCA9532_TYPE_LED,8,3           ; @PCA9532_TYPE_LED
	.comm	_PCA9532_PWM0,8,3               ; @PCA9532_PWM0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fear of division by zero %d/%d, wanted %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_pca9532_calcpwm
.subsections_via_symbols
