	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_pwm_reconf
_bcm_pwm_reconf:                        ## @bcm_pwm_reconf
	.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	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_W_CTL
	movl	48(%rbx), %edi
	movq	_BCM_PWM_CLKSRC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_bcm2835_clkman_set_frequency
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	cmpl	$0, 4(%rbx)
	je	LBB0_16
LBB0_2:
	movl	48(%rbx), %edi
	movl	(%r15), %esi
	movq	40(%rbx), %rdx
	callq	_bcm2835_clkman_set_frequency
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, 40(%rbx)
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_W_RNG
	movq	8(%rbx), %rax
	movq	16(%rbx), %rsi
	cmpq	%rax, %rsi
	jle	LBB0_8
## %bb.7:
	movq	%rax, 16(%rbx)
	movq	%rax, %rsi
LBB0_8:
	movq	%rbx, %rdi
	callq	_W_DAT
	xorl	%r14d, %r14d
	cmpl	$1, (%rbx)
	sete	%r14b
	shlq	$7, %r14
	orq	$1, %r14
	cmpl	$0, 4(%rbx)
	jne	LBB0_10
	jmp	LBB0_15
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_16
LBB0_5:
	xorl	%r14d, %r14d
	cmpl	$0, 4(%rbx)
	je	LBB0_15
LBB0_10:
	movq	24(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_W_RNG2
	movq	24(%rbx), %rax
	movq	32(%rbx), %rsi
	cmpq	%rax, %rsi
	jle	LBB0_12
## %bb.11:
	movq	%rax, 32(%rbx)
	movq	%rax, %rsi
LBB0_12:
	movq	%rbx, %rdi
	callq	_W_DAT2
	cmpl	$1, 4(%rbx)
	jne	LBB0_14
## %bb.13:
	orq	$33024, %r14                    ## imm = 0x8100
	jmp	LBB0_15
LBB0_14:
	orq	$256, %r14                      ## imm = 0x100
LBB0_15:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_W_CTL
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCM_PWM_CLKSRC,4,2             ## @BCM_PWM_CLKSRC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bcm_pwm_reconf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_pwm_reconf
_bcm_pwm_reconf:                        ; @bcm_pwm_reconf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x1, #0
	bl	_W_CTL
	ldr	w0, [x19, #48]
Lloh0:
	adrp	x20, _BCM_PWM_CLKSRC@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BCM_PWM_CLKSRC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x2, #0
	bl	_bcm2835_clkman_set_frequency
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_13
LBB0_2:
	ldr	w0, [x19, #48]
	ldr	w1, [x20]
	ldr	x2, [x19, #40]
	bl	_bcm2835_clkman_set_frequency
	cbz	x0, LBB0_7
; %bb.3:
	str	x0, [x19, #40]
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.4:
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_W_RNG
	ldp	x8, x1, [x19, #8]
	cmp	x1, x8
	b.le	LBB0_6
; %bb.5:
	str	x8, [x19, #16]
	mov	x1, x8
LBB0_6:
	mov	x0, x19
	bl	_W_DAT
	ldr	w8, [x19]
	cmp	w8, #1
	mov	w8, #129
	csinc	x20, x8, xzr, eq
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_9
	b	LBB0_12
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_14
LBB0_8:
	mov	x20, #0
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_12
LBB0_9:
	ldr	x1, [x19, #24]
	mov	x0, x19
	bl	_W_RNG2
	ldp	x8, x1, [x19, #24]
	cmp	x1, x8
	b.le	LBB0_11
; %bb.10:
	str	x8, [x19, #32]
	mov	x1, x8
LBB0_11:
	mov	x0, x19
	bl	_W_DAT2
	ldr	w8, [x19, #4]
	cmp	w8, #1
	orr	x8, x20, #0x100
	mov	w9, #33024
	orr	x9, x20, x9
	csel	x20, x8, x9, ne
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_W_CTL
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BCM_PWM_CLKSRC,4,2             ; @BCM_PWM_CLKSRC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bcm_pwm_reconf
.subsections_via_symbols
