	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fpgamgr_attach
_fpgamgr_attach:                        ## @fpgamgr_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 8(%rax)
	movq	_fpgamgr_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_6
LBB0_3:
	movq	16(%rbx), %rax
	movl	4(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 28(%rbx)
	movq	16(%rbx), %rax
	movl	4(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 24(%rbx)
	movq	_UID_ROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_GID_WHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	8(%rbx), %edi
	callq	_device_get_unit
	movl	%eax, (%rsp)
	movq	_fpga_cdevsw@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %r9
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	$384, %r8d                      ## imm = 0x180
	callq	_make_dev
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, (%rax)
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_fpgamgr_spec,4,2               ## @fpgamgr_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_fpga_cdevsw,4,2                ## @fpga_cdevsw
	.comm	_UID_ROOT,4,2                   ## @UID_ROOT
	.comm	_GID_WHEEL,4,2                  ## @GID_WHEEL
L_.str.1:                               ## @.str.1
	.asciz	"fpga%d"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to create character device.\n"

	.no_dead_strip	_fpgamgr_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fpgamgr_attach
_fpgamgr_attach:                        ; @fpgamgr_attach
	.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, x0
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #8]
Lloh0:
	adrp	x8, _fpgamgr_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fpgamgr_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0, #16]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_device_printf
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #4]
	bl	_rman_get_bustag
	str	w0, [x20, #28]
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #4]
	bl	_rman_get_bushandle
Lloh8:
	adrp	x8, _UID_ROOT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _UID_ROOT@GOTPAGEOFF]
	str	w0, [x20, #24]
Lloh10:
	ldr	w21, [x8]
Lloh11:
	adrp	x8, _GID_WHEEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GID_WHEEL@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	ldr	w0, [x20, #8]
	bl	_device_get_unit
	mov	x6, x0
Lloh14:
	adrp	x0, _fpga_cdevsw@GOTPAGE
Lloh15:
	ldr	x0, [x0, _fpga_cdevsw@GOTPAGEOFF]
Lloh16:
	adrp	x5, l_.str.1@PAGE
Lloh17:
	add	x5, x5, l_.str.1@PAGEOFF
	mov	w1, #0
	mov	x2, x21
	mov	x3, x22
	mov	w4, #384
	bl	_make_dev
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x8, x0
	mov	w0, #0
	str	x20, [x8]
LBB0_5:
	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
LBB0_6:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_fpgamgr_spec,4,2               ; @fpgamgr_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_fpga_cdevsw,4,2                ; @fpga_cdevsw
	.comm	_UID_ROOT,4,2                   ; @UID_ROOT
	.comm	_GID_WHEEL,4,2                  ; @GID_WHEEL
l_.str.1:                               ; @.str.1
	.asciz	"fpga%d"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to create character device.\n"

	.no_dead_strip	_fpgamgr_attach
.subsections_via_symbols
