	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bcm_pwm_attach
LCPI0_0:
	.long	125000000                       ## 0x7735940
	.long	10000                           ## 0x2710
	.long	2500                            ## 0x9c4
	.long	10000                           ## 0x2710
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bcm_pwm_attach:                        ## @bcm_pwm_attach
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	callq	_device_get_unit
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	%ebx, %edi
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 40(%rax)
	leaq	L_.str.1(%rip), %rdi
	callq	_devclass_find
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_devclass_get_device
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	$0, -20(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-20(%rbp), %rdx
	movl	%ebx, %edi
	callq	_bus_alloc_resource_any
	movl	%eax, 20(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %edi
	callq	_rman_get_bustag
	movl	%eax, 28(%r14)
	movl	20(%r14), %edi
	callq	_rman_get_bushandle
	movl	%eax, 24(%r14)
	movq	%r14, %rdi
	callq	_bcm_pwm_sysctl_init
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [125000000,10000,2500,10000]
	movups	%xmm0, (%r14)
	movl	$2500, 16(%r14)                 ## imm = 0x9C4
	movl	%ebx, %edi
	callq	_bus_generic_attach
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"only one PWM controller supported\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"bcm2835_clkman"

L_.str.2:                               ## @.str.2
	.asciz	"cannot find Clock Manager\n"

	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
L_.str.3:                               ## @.str.3
	.asciz	"cannot allocate memory window\n"

	.no_dead_strip	_bcm_pwm_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function bcm_pwm_attach
lCPI0_0:
	.long	125000000                       ; 0x7735940
	.long	10000                           ; 0x2710
	.long	2500                            ; 0x9c4
	.long	10000                           ; 0x2710
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bcm_pwm_attach:                        ; @bcm_pwm_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_device_get_unit
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_device_printf
Lloh2:
	adrp	x8, _ENXIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x0, x19
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #40]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_devclass_find
	mov	w1, #0
	bl	_devclass_get_device
	str	x0, [x20, #32]
	cbz	x0, LBB0_7
; %bb.5:
	str	wzr, [sp, #12]
Lloh7:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	w0, [x20, #20]
	cbz	w0, LBB0_8
; %bb.6:
	bl	_rman_get_bustag
	str	w0, [x20, #28]
	ldr	w0, [x20, #20]
	bl	_rman_get_bushandle
	str	w0, [x20, #24]
	mov	x0, x20
	bl	_bcm_pwm_sysctl_init
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [x20]
	mov	w8, #2500
	str	w8, [x20, #16]
	mov	x0, x19
	bl	_bus_generic_attach
	b	LBB0_3
LBB0_7:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_8:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"only one PWM controller supported\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"bcm2835_clkman"

l_.str.2:                               ; @.str.2
	.asciz	"cannot find Clock Manager\n"

	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
l_.str.3:                               ; @.str.3
	.asciz	"cannot allocate memory window\n"

	.no_dead_strip	_bcm_pwm_attach
.subsections_via_symbols
