	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gc_attach
_gc_attach:                             ## @gc_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_GC_MAX_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.5:
	movq	_gc_cfg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	$8, %rcx
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	addq	$16, %rcx
	cmpq	%rbx, %rax
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -8(%rcx)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rcx), %rdx
	movq	(%rdx), %rdx
	testq	%rdx, %rdx
	js	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	(%r12), %rdx
	jne	LBB0_9
## %bb.2:
	cmpl	%eax, %ebx
	jne	LBB0_3
LBB0_10:
	movq	(%r12), %rsi
	leaq	L_.str(%rip), %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	%eax, %ebx
	je	LBB0_10
LBB0_3:
	movq	_gc_cfg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %r15d
	movq	%r15, %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %r13
	movl	(%rax,%rcx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_PARPORT_FLAG_EXCL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_parport_register_dev_model
	testq	%rax, %rax
	je	LBB0_4
## %bb.11:
	movq	%rax, %r14
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r15
	leaq	32(%rax), %rdi
	callq	_mutex_init
	movq	%r14, 24(%r15)
	movq	(%r12), %rax
	movq	%rax, (%r15)
	movq	%r15, %rdi
	addq	$16, %rdi
	movq	_gc_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$2, %ecx
	jl	LBB0_29
## %bb.14:
	movq	_GC_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_29
## %bb.15:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	decl	%ecx
	movl	%ecx, %r14d
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r13,%rbx,4), %edx
	testl	%edx, %edx
	je	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gc_setup_pad
	testq	%rax, %rax
	jne	LBB0_18
## %bb.25:                              ##   in Loop: Header=BB0_16 Depth=1
	incl	%r12d
	movq	_GC_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_26:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rbx
	cmpq	%r14, %rbx
	jae	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_16 Depth=1
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_16
LBB0_28:
	testl	%r12d, %r12d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_29
## %bb.30:
	movq	_gc_base@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, (%rax,%rcx,8)
	jmp	LBB0_31
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_31
LBB0_29:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_err
LBB0_23:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_24
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
LBB0_24:
	movq	%r14, %rdi
	callq	_parport_unregister_device
LBB0_31:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	testl	%ebx, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_23
## %bb.19:
	incq	%rbx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	decq	%rbx
	cmpq	$1, %rbx
	jle	LBB0_23
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	-16(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	callq	_input_unregister_device
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_GC_MAX_PORTS,4,2               ## @GC_MAX_PORTS
	.comm	_gc_cfg,8,3                     ## @gc_cfg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not using parport%d.\n"

	.comm	_PARPORT_FLAG_EXCL,4,2          ## @PARPORT_FLAG_EXCL
L_.str.1:                               ## @.str.1
	.asciz	"gamecon"

L_.str.2:                               ## @.str.2
	.asciz	"parport busy already - lp.o loaded?\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"Not enough memory\n"

	.comm	_gc_timer,4,2                   ## @gc_timer
	.comm	_GC_MAX_DEVICES,4,2             ## @GC_MAX_DEVICES
L_.str.4:                               ## @.str.4
	.asciz	"No valid devices specified\n"

	.comm	_gc_base,8,3                    ## @gc_base
	.no_dead_strip	_gc_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gc_attach
_gc_attach:                             ; @gc_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x0
Lloh0:
	adrp	x8, _GC_MAX_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GC_MAX_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x21, #0
Lloh3:
	adrp	x9, _gc_cfg@GOTPAGE
Lloh4:
	ldr	x9, [x9, _gc_cfg@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x9, x9, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x9, x9, #16
	cmp	x8, x21
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w10, [x9, #-8]
	cbz	w10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x9]
	ldr	x10, [x10]
	tbnz	x10, #63, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x22]
	cmp	x10, x11
	b.ne	LBB0_2
; %bb.6:
	cmp	w21, w8
	b.ne	LBB0_9
LBB0_7:
	ldr	x1, [x22]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_pr_debug
LBB0_8:
	mov	w21, #0
	cmp	w21, w8
	b.eq	LBB0_7
LBB0_9:
Lloh8:
	adrp	x8, _gc_cfg@GOTPAGE
Lloh9:
	ldr	x8, [x8, _gc_cfg@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x8, x8, w21, uxtw #4
	ldr	x23, [x8, #8]
	ldr	w24, [x8]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh11:
	adrp	x8, _PARPORT_FLAG_EXCL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PARPORT_FLAG_EXCL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x0, x22
	mov	x3, x21
	bl	_parport_register_dev_model
	cbz	x0, LBB0_14
; %bb.10:
	mov	x19, x0
Lloh16:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_15
; %bb.11:
	mov	x20, x0
	add	x0, x0, #32
	bl	_mutex_init
	str	x19, [x20, #24]
	ldr	x8, [x22]
	str	x8, [x20]
	add	x0, x20, #16
Lloh19:
	adrp	x8, _gc_timer@GOTPAGE
Lloh20:
	ldr	x8, [x8, _gc_timer@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
Lloh22:
	adrp	x25, _GC_MAX_DEVICES@GOTPAGE
Lloh23:
	ldr	x25, [x25, _GC_MAX_DEVICES@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w24, #2
	ccmp	w8, #1, #8, ge
	b.ge	LBB0_18
LBB0_12:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
LBB0_13:
	mov	x0, x20
	bl	_kfree
	b	LBB0_16
LBB0_14:
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_17
LBB0_15:
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
LBB0_16:
	mov	x0, x19
	bl	_parport_unregister_device
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	mov	x22, #0
	mov	w26, #0
	add	x23, x23, #8
	sub	w24, w24, #1
	mov	w21, w21
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23, x22, lsl #2]
	cbz	w2, LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_gc_setup_pad
	cbnz	x0, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	add	w26, w26, #1
	ldr	w8, [x25]
LBB0_22:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x22, x22, #1
	cmp	x22, x24
	b.hs	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=1
	sxtw	x9, w8
	cmp	x22, x9
	b.lt	LBB0_19
LBB0_24:
	cbz	w26, LBB0_12
; %bb.25:
Lloh30:
	adrp	x8, _gc_base@GOTPAGE
Lloh31:
	ldr	x8, [x8, _gc_base@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	str	x20, [x8, x21, lsl #3]
	b	LBB0_17
LBB0_26:
	cbz	w22, LBB0_13
; %bb.27:
	sub	x21, x22, #1
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x8, x21, #1
	sub	x21, x21, #1
	cmp	x8, #1
	b.le	LBB0_13
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	bl	_input_unregister_device
	b	LBB0_28
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GC_MAX_PORTS,4,2               ; @GC_MAX_PORTS
	.comm	_gc_cfg,8,3                     ; @gc_cfg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not using parport%d.\n"

	.comm	_PARPORT_FLAG_EXCL,4,2          ; @PARPORT_FLAG_EXCL
l_.str.1:                               ; @.str.1
	.asciz	"gamecon"

l_.str.2:                               ; @.str.2
	.asciz	"parport busy already - lp.o loaded?\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"Not enough memory\n"

	.comm	_gc_timer,4,2                   ; @gc_timer
	.comm	_GC_MAX_DEVICES,4,2             ; @GC_MAX_DEVICES
l_.str.4:                               ; @.str.4
	.asciz	"No valid devices specified\n"

	.comm	_gc_base,8,3                    ; @gc_base
	.no_dead_strip	_gc_attach
.subsections_via_symbols
