	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_rng_attach
_bcm2835_rng_attach:                    ## @bcm2835_rng_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r15d, 28(%rax)
	movq	_RNG_STALL_COUNT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	4(%rbx), %r14
	movl	%eax, 4(%rbx)
	movq	_CALLOUT_MPSAFE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_callout_init
	leaq	24(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_TUNABLE_INT_FETCH
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_TUNABLE_INT_FETCH
	movl	$0, -52(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-52(%rbp), %rdx
	movl	%r15d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bcm2835_rng_start
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_SBUF_AUTOEXTEND@GOTPCREL(%rip), %rax
	movq	_SBUF_INCLUDENUL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_sbuf_new
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_bcm2835_rng_dump_registers
	movq	%r12, %rdi
	callq	_sbuf_trim
	movq	%r12, %rdi
	callq	_sbuf_finish
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	-48(%rbp), %rdi
	callq	_sbuf_data
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	callq	_device_printf
LBB0_5:
	leaq	-48(%rbp), %rdi
	callq	_sbuf_delete
LBB0_6:
	movl	%r15d, %edi
	callq	_device_get_sysctl_ctx
	movq	%rax, %r12
	movl	%r15d, %edi
	callq	_device_get_sysctl_tree
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rcx, %r14
	movq	_CTLFLAG_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%rbx, %r9
	addq	$8, %r9
	subq	$8, %rsp
	leaq	L_.str.4(%rip), %r10
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	pushq	%r10
	callq	_SYSCTL_ADD_LONG
	addq	$16, %rsp
	movq	%r15, %rdi
	callq	_SYSCTL_CHILDREN
	movl	(%r14), %edx
	movq	_CTLTYPE_INT@GOTPCREL(%rip), %rcx
	movq	_CTLFLAG_RW@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	orl	(%rcx), %r8d
	movq	_sysctl_bcm2835_rng_2xspeed@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	leaq	L_.str.7(%rip), %r11
	leaq	L_.str.6(%rip), %r13
	leaq	L_.str.5(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	%rbx, %r9
	pushq	%r11
	pushq	%r13
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_PROC
	addq	$32, %rsp
	movq	%r15, %rdi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r14), %r8d
	movq	_RNG_STALL_COUNT_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	leaq	L_.str.9(%rip), %r11
	leaq	L_.str.8(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	pushq	%r11
	pushq	%r10
	callq	_SYSCTL_ADD_INT
	addq	$16, %rsp
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_bcm2835_rng_harvest@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rcx
	callq	_callout_reset
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movl	%r15d, %edi
	callq	_bcm2835_rng_detach
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RNG_STALL_COUNT_DEFAULT,4,2    ## @RNG_STALL_COUNT_DEFAULT
	.comm	_CALLOUT_MPSAFE,4,2             ## @CALLOUT_MPSAFE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bcmrng.2xspeed"

L_.str.1:                               ## @.str.1
	.asciz	"bcmrng.stall_count"

	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_bootverbose,8,3                ## @bootverbose
	.comm	_SBUF_AUTOEXTEND,4,2            ## @SBUF_AUTOEXTEND
	.comm	_SBUF_INCLUDENUL,4,2            ## @SBUF_INCLUDENUL
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_OID_AUTO,4,2                   ## @OID_AUTO
L_.str.3:                               ## @.str.3
	.asciz	"underrun"

	.comm	_CTLFLAG_RD,4,2                 ## @CTLFLAG_RD
L_.str.4:                               ## @.str.4
	.asciz	"Number of FIFO underruns"

L_.str.5:                               ## @.str.5
	.asciz	"2xspeed"

	.comm	_CTLTYPE_INT,4,2                ## @CTLTYPE_INT
	.comm	_CTLFLAG_RW,4,2                 ## @CTLFLAG_RW
	.comm	_sysctl_bcm2835_rng_2xspeed,4,2 ## @sysctl_bcm2835_rng_2xspeed
L_.str.6:                               ## @.str.6
	.asciz	"I"

L_.str.7:                               ## @.str.7
	.asciz	"Enable RBG 2X SPEED"

L_.str.8:                               ## @.str.8
	.asciz	"stall_count"

L_.str.9:                               ## @.str.9
	.asciz	"Number of underruns to assume RNG stall"

	.comm	_hz,4,2                         ## @hz
	.comm	_bcm2835_rng_harvest,4,2        ## @bcm2835_rng_harvest
	.comm	_CTLTYPE_STRING,4,2             ## @CTLTYPE_STRING
	.comm	_sysctl_bcm2835_rng_dump,4,2    ## @sysctl_bcm2835_rng_dump
	.no_dead_strip	_bcm2835_rng_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_rng_attach
_bcm2835_rng_attach:                    ; @bcm2835_rng_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w21, [x0, #28]
Lloh0:
	adrp	x23, _RNG_STALL_COUNT_DEFAULT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RNG_STALL_COUNT_DEFAULT@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	x20, x0
	str	w8, [x20, #4]!
Lloh2:
	adrp	x8, _CALLOUT_MPSAFE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CALLOUT_MPSAFE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_callout_init
	add	x1, x19, #24
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TUNABLE_INT_FETCH
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TUNABLE_INT_FETCH
	str	wzr, [sp, #28]
Lloh9:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	add	x2, sp, #28
	mov	x0, x21
	bl	_bus_alloc_resource_any
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_bcm2835_rng_start
Lloh15:
	adrp	x8, _bootverbose@GOTPAGE
Lloh16:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.2:
Lloh18:
	adrp	x8, _SBUF_AUTOEXTEND@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SBUF_AUTOEXTEND@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _SBUF_INCLUDENUL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SBUF_INCLUDENUL@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x0, sp, #24
	mov	x1, #0
	mov	w2, #256
	bl	_sbuf_new
	add	x1, sp, #24
	mov	x0, x19
	bl	_bcm2835_rng_dump_registers
	add	x0, sp, #24
	bl	_sbuf_trim
	add	x0, sp, #24
	bl	_sbuf_finish
	cbnz	w0, LBB0_4
; %bb.3:
	add	x0, sp, #24
	bl	_sbuf_data
	mov	x2, x0
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_device_printf
LBB0_4:
	add	x0, sp, #24
	bl	_sbuf_delete
LBB0_5:
	mov	x0, x21
	bl	_device_get_sysctl_ctx
	mov	x22, x0
	mov	x0, x21
	bl	_device_get_sysctl_tree
	mov	x21, x0
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
Lloh26:
	adrp	x24, _OID_AUTO@GOTPAGE
Lloh27:
	ldr	x24, [x24, _OID_AUTO@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh28:
	adrp	x8, _CTLFLAG_RD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CTLFLAG_RD@GOTPAGEOFF]
Lloh30:
	ldr	w4, [x8]
	add	x5, x19, #8
Lloh31:
	adrp	x3, l_.str.3@PAGE
Lloh32:
	add	x3, x3, l_.str.3@PAGEOFF
Lloh33:
	adrp	x6, l_.str.4@PAGE
Lloh34:
	add	x6, x6, l_.str.4@PAGEOFF
	mov	x0, x22
	bl	_SYSCTL_ADD_LONG
	mov	x0, x21
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
	ldr	w2, [x24]
Lloh35:
	adrp	x8, _CTLTYPE_INT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CTLTYPE_INT@GOTPAGEOFF]
Lloh37:
	adrp	x25, _CTLFLAG_RW@GOTPAGE
Lloh38:
	ldr	x25, [x25, _CTLFLAG_RW@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	ldr	w9, [x25]
	orr	w4, w9, w8
Lloh40:
	adrp	x8, _sysctl_bcm2835_rng_2xspeed@GOTPAGE
Lloh41:
	ldr	x8, [x8, _sysctl_bcm2835_rng_2xspeed@GOTPAGEOFF]
Lloh42:
	ldr	w7, [x8]
Lloh43:
	adrp	x8, l_.str.7@PAGE
Lloh44:
	add	x8, x8, l_.str.7@PAGEOFF
Lloh45:
	adrp	x9, l_.str.6@PAGE
Lloh46:
	add	x9, x9, l_.str.6@PAGEOFF
	stp	x9, x8, [sp]
Lloh47:
	adrp	x3, l_.str.5@PAGE
Lloh48:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x22
	mov	x5, x19
	mov	w6, #0
	bl	_SYSCTL_ADD_PROC
	mov	x0, x21
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
	ldr	w2, [x24]
	ldr	w4, [x25]
	ldr	w6, [x23]
Lloh49:
	adrp	x3, l_.str.8@PAGE
Lloh50:
	add	x3, x3, l_.str.8@PAGEOFF
Lloh51:
	adrp	x7, l_.str.9@PAGE
Lloh52:
	add	x7, x7, l_.str.9@PAGEOFF
	mov	x0, x22
	mov	x5, x20
	bl	_SYSCTL_ADD_INT
Lloh53:
	adrp	x8, _hz@GOTPAGE
Lloh54:
	ldr	x8, [x8, _hz@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
Lloh56:
	adrp	x8, _bcm2835_rng_harvest@GOTPAGE
Lloh57:
	ldr	x8, [x8, _bcm2835_rng_harvest@GOTPAGEOFF]
Lloh58:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x19
	bl	_callout_reset
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_bcm2835_rng_detach
Lloh59:
	adrp	x8, _ENXIO@GOTPAGE
Lloh60:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh61:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh39
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_RNG_STALL_COUNT_DEFAULT,4,2    ; @RNG_STALL_COUNT_DEFAULT
	.comm	_CALLOUT_MPSAFE,4,2             ; @CALLOUT_MPSAFE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bcmrng.2xspeed"

l_.str.1:                               ; @.str.1
	.asciz	"bcmrng.stall_count"

	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_bootverbose,8,3                ; @bootverbose
	.comm	_SBUF_AUTOEXTEND,4,2            ; @SBUF_AUTOEXTEND
	.comm	_SBUF_INCLUDENUL,4,2            ; @SBUF_INCLUDENUL
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_OID_AUTO,4,2                   ; @OID_AUTO
l_.str.3:                               ; @.str.3
	.asciz	"underrun"

	.comm	_CTLFLAG_RD,4,2                 ; @CTLFLAG_RD
l_.str.4:                               ; @.str.4
	.asciz	"Number of FIFO underruns"

l_.str.5:                               ; @.str.5
	.asciz	"2xspeed"

	.comm	_CTLTYPE_INT,4,2                ; @CTLTYPE_INT
	.comm	_CTLFLAG_RW,4,2                 ; @CTLFLAG_RW
	.comm	_sysctl_bcm2835_rng_2xspeed,4,2 ; @sysctl_bcm2835_rng_2xspeed
l_.str.6:                               ; @.str.6
	.asciz	"I"

l_.str.7:                               ; @.str.7
	.asciz	"Enable RBG 2X SPEED"

l_.str.8:                               ; @.str.8
	.asciz	"stall_count"

l_.str.9:                               ; @.str.9
	.asciz	"Number of underruns to assume RNG stall"

	.comm	_hz,4,2                         ; @hz
	.comm	_bcm2835_rng_harvest,4,2        ; @bcm2835_rng_harvest
	.comm	_CTLTYPE_STRING,4,2             ; @CTLTYPE_STRING
	.comm	_sysctl_bcm2835_rng_dump,4,2    ; @sysctl_bcm2835_rng_dump
	.no_dead_strip	_bcm2835_rng_attach
.subsections_via_symbols
