	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r12
	callq	_i2c_get_clientdata
	movq	%rax, %r9
	movq	24(%rax), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	movl	$0, %edx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.1:
	movl	%ebx, %r11d
	movq	16(%r9), %rax
	movq	_PCA9532_TYPE_LED@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movq	_PCA9532_PWM0@GOTPCREL(%rip), %rdx
	movslq	%r13d, %r8
	movq	(%rdx), %r10
	addq	%r8, %r10
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %rsi
	cmpq	%rsi, %rbx
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, (%rax,%rsi)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r10, 8(%rax,%rsi)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ecx
	addl	16(%rax,%rsi), %edx
	jmp	LBB0_5
LBB0_6:
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.8:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	cmpl	$256, %eax                      ## imm = 0x100
	jl	LBB0_10
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_10:
	movq	(%r9), %rcx
	movl	%eax, (%rcx,%r8,4)
	movq	8(%r9), %rax
	movl	%r11d, (%rax,%r8,4)
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_i2c_get_clientdata
	ldr	x8, [x0, #24]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w2, #0
	mov	w9, #0
	ldr	x13, [x0, #16]
Lloh0:
	adrp	x10, _PCA9532_TYPE_LED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PCA9532_TYPE_LED@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x10]
Lloh3:
	adrp	x10, _PCA9532_PWM0@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PCA9532_PWM0@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x10]
	sxtw	x10, w22
	add	x12, x12, x10
	add	x13, x13, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x13, x13, #24
	subs	x8, x8, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x14, [x13, #-8]
	cmp	x14, x11
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x14, [x13]
	cmp	x14, x12
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w9, w9, #1
	ldr	w14, [x13, #8]
	add	w2, w2, w14
	b	LBB0_2
LBB0_6:
	cbz	w9, LBB0_10
; %bb.7:
	sdiv	w9, w2, w9
	cmp	w9, #256
	b.ge	LBB0_11
; %bb.8:
	mov	w8, #0
	lsl	x10, x10, #2
	ldp	x11, x12, [x0]
	str	w9, [x11, x10]
	str	w20, [x12, x10]
	b	LBB0_12
LBB0_9:
	mov	w2, #0
LBB0_10:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w3, #0
	mov	x4, x19
	bl	_dev_err
LBB0_11:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_12:
	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
