	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_pwm_channel_enable
_aw_pwm_channel_enable:                 ## @aw_pwm_channel_enable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.1:
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.2:
	movq	_AW_PWM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_AW_PWM_READ
	movl	%eax, %edx
	movq	_AW_PWM_CTRL_GATE@GOTPCREL(%rip), %rax
	movq	_AW_PWM_CTRL_EN@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	jmp	LBB0_4
LBB0_3:
	movq	_AW_PWM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_AW_PWM_READ
	movq	_AW_PWM_CTRL_GATE@GOTPCREL(%rip), %rcx
	movq	_AW_PWM_CTRL_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
LBB0_4:
	movq	_AW_PWM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_AW_PWM_WRITE
	movl	%r14d, (%rbx)
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AW_PWM_CTRL,4,2                ## @AW_PWM_CTRL
	.comm	_AW_PWM_CTRL_GATE,4,2           ## @AW_PWM_CTRL_GATE
	.comm	_AW_PWM_CTRL_EN,4,2             ## @AW_PWM_CTRL_EN
	.no_dead_strip	_aw_pwm_channel_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_pwm_channel_enable
_aw_pwm_channel_enable:                 ; @aw_pwm_channel_enable
	.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, x2
	bl	_device_get_softc
	mov	x20, x0
	cbz	w19, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	cbnz	w8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _AW_PWM_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AW_PWM_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_AW_PWM_READ
Lloh3:
	adrp	x8, _AW_PWM_CTRL_GATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AW_PWM_CTRL_GATE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _AW_PWM_CTRL_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AW_PWM_CTRL_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _AW_PWM_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AW_PWM_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_AW_PWM_READ
Lloh12:
	adrp	x8, _AW_PWM_CTRL_GATE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AW_PWM_CTRL_GATE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _AW_PWM_CTRL_EN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AW_PWM_CTRL_EN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w0, w8
LBB0_4:
Lloh18:
	adrp	x8, _AW_PWM_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AW_PWM_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_AW_PWM_WRITE
	str	w19, [x20]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AW_PWM_CTRL,4,2                ; @AW_PWM_CTRL
	.comm	_AW_PWM_CTRL_GATE,4,2           ; @AW_PWM_CTRL_GATE
	.comm	_AW_PWM_CTRL_EN,4,2             ; @AW_PWM_CTRL_EN
	.no_dead_strip	_aw_pwm_channel_enable
.subsections_via_symbols
