	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pg_detect
_pg_detect:                             ## @pg_detect
	.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
	movq	_devices@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_name@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_PG_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_major@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	xorl	%eax, %eax
	callq	_printk
	movq	_pg_drive_count@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movq	_PG_UNITS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_14
## %bb.2:
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r12), %edi
	callq	_pi_release
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	addq	$12, %r12
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_drives@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rax
	movq	_D_PRT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_D_MOD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	_D_UNI@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %r8d
	movq	_D_PRO@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %r9d
	movq	_D_DLY@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %r10d
	movq	_pg_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	movq	_PI_PG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_verbose@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r13d
	movl	4(%r12), %edi
	movl	8(%r12), %r14d
	subq	$8, %rsp
	xorl	%esi, %esi
	pushq	%r14
	pushq	%r13
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_pi_init
	addq	$48, %rsp
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_pg_probe
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, (%r12)
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_13:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	_name@GOTPCREL(%rip), %rbx
	jne	LBB0_15
	jmp	LBB0_14
LBB0_7:
	movq	_pg_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_PI_PG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	movq	_verbose@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movl	4(%r12), %edi
	movq	%rbx, %r14
	movl	8(%r12), %ebx
	subq	$8, %rsp
	movl	$1, %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	movl	$-1, %r8d
	movl	$-1, %r9d
	pushq	%rbx
	movq	%r14, %rbx
	pushq	%rax
	pushq	%r11
	pushq	%r10
	pushq	$-1
	callq	_pi_init
	addq	$48, %rsp
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	%r12, %rdi
	callq	_pg_probe
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	4(%r12), %edi
	callq	_pi_release
LBB0_14:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movl	$-1, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$1, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_devices,8,3                    ## @devices
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s version %s, major %d\n"

	.comm	_name,4,2                       ## @name
	.comm	_PG_VERSION,4,2                 ## @PG_VERSION
	.comm	_major,4,2                      ## @major
	.comm	_pg_drive_count,8,3             ## @pg_drive_count
	.comm	_pg_scratch,4,2                 ## @pg_scratch
	.comm	_PI_PG,4,2                      ## @PI_PG
	.comm	_verbose,4,2                    ## @verbose
	.comm	_PG_UNITS,4,2                   ## @PG_UNITS
	.comm	_drives,8,3                     ## @drives
	.comm	_D_PRT,8,3                      ## @D_PRT
	.comm	_D_MOD,8,3                      ## @D_MOD
	.comm	_D_UNI,8,3                      ## @D_UNI
	.comm	_D_PRO,8,3                      ## @D_PRO
	.comm	_D_DLY,8,3                      ## @D_DLY
L_.str.1:                               ## @.str.1
	.asciz	"%s: No ATAPI device detected\n"

	.no_dead_strip	_pg_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pg_detect
_pg_detect:                             ; @pg_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _devices@GOTPAGE
Lloh1:
	ldr	x8, [x8, _devices@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x20, _name@GOTPAGE
Lloh4:
	ldr	x20, [x20, _name@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _PG_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PG_VERSION@GOTPAGEOFF]
Lloh7:
	adrp	x9, _major@GOTPAGE
Lloh8:
	ldr	x9, [x9, _major@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	stp	x8, x9, [sp, #8]
	str	x1, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_printk
Lloh13:
	adrp	x8, _pg_drive_count@GOTPAGE
Lloh14:
	ldr	x8, [x8, _pg_drive_count@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.1:
Lloh16:
	adrp	x21, _PG_UNITS@GOTPAGE
Lloh17:
	ldr	x21, [x21, _PG_UNITS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	x23, #0
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
Lloh18:
	adrp	x24, _drives@GOTPAGE
Lloh19:
	ldr	x24, [x24, _drives@GOTPAGEOFF]
Lloh20:
	adrp	x25, _D_PRT@GOTPAGE
Lloh21:
	ldr	x25, [x25, _D_PRT@GOTPAGEOFF]
Lloh22:
	adrp	x28, _D_PRO@GOTPAGE
Lloh23:
	ldr	x28, [x28, _D_PRO@GOTPAGEOFF]
Lloh24:
	adrp	x20, _D_DLY@GOTPAGE
Lloh25:
	ldr	x20, [x20, _D_DLY@GOTPAGEOFF]
Lloh26:
	adrp	x26, _pg_scratch@GOTPAGE
Lloh27:
	ldr	x26, [x26, _pg_scratch@GOTPAGEOFF]
Lloh28:
	adrp	x27, _PI_PG@GOTPAGE
Lloh29:
	ldr	x27, [x27, _PI_PG@GOTPAGEOFF]
Lloh30:
	adrp	x22, _verbose@GOTPAGE
Lloh31:
	ldr	x22, [x22, _verbose@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #4]
	bl	_pi_release
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	add	x19, x19, #12
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x8, [x8]
	ldr	x9, [x25]
	ldr	w2, [x8, x9, lsl #2]
	cbz	w2, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh32:
	adrp	x9, _D_MOD@GOTPAGE
Lloh33:
	ldr	x9, [x9, _D_MOD@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
Lloh35:
	adrp	x9, _D_UNI@GOTPAGE
Lloh36:
	ldr	x9, [x9, _D_UNI@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	w4, [x8, x9, lsl #2]
	ldr	x9, [x28]
	ldr	w5, [x8, x9, lsl #2]
	ldr	x9, [x20]
	ldr	w6, [x8, x9, lsl #2]
	ldr	w7, [x26]
	ldr	w8, [x27]
	ldr	w9, [x22]
	ldp	w0, w10, [x19, #4]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
	mov	w1, #0
	bl	_pi_init
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_pg_probe
	cbnz	w0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	b	LBB0_4
LBB0_9:
Lloh38:
	adrp	x20, _name@GOTPAGE
Lloh39:
	ldr	x20, [x20, _name@GOTPAGEOFF]
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_14
; %bb.10:
	mov	w0, #0
	b	LBB0_15
LBB0_11:
Lloh40:
	adrp	x8, _pg_scratch@GOTPAGE
Lloh41:
	ldr	x8, [x8, _pg_scratch@GOTPAGEOFF]
Lloh42:
	ldr	w7, [x8]
Lloh43:
	adrp	x8, _PI_PG@GOTPAGE
Lloh44:
	ldr	x8, [x8, _PI_PG@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	adrp	x9, _verbose@GOTPAGE
Lloh47:
	ldr	x9, [x9, _verbose@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	ldp	w0, w10, [x19, #4]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
	mov	w1, #1
	mov	w2, #-1
	mov	w3, #-1
	mov	w4, #-1
	mov	w5, #-1
	mov	w6, #-1
	bl	_pi_init
	cbz	x0, LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_pg_probe
	cbz	w0, LBB0_16
; %bb.13:
	ldr	w0, [x19, #4]
	bl	_pi_release
LBB0_14:
	ldr	w1, [x20]
Lloh49:
	adrp	x0, l_.str.1@PAGE
Lloh50:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	mov	w0, #-1
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_16:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_devices,8,3                    ; @devices
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s version %s, major %d\n"

	.comm	_name,4,2                       ; @name
	.comm	_PG_VERSION,4,2                 ; @PG_VERSION
	.comm	_major,4,2                      ; @major
	.comm	_pg_drive_count,8,3             ; @pg_drive_count
	.comm	_pg_scratch,4,2                 ; @pg_scratch
	.comm	_PI_PG,4,2                      ; @PI_PG
	.comm	_verbose,4,2                    ; @verbose
	.comm	_PG_UNITS,4,2                   ; @PG_UNITS
	.comm	_drives,8,3                     ; @drives
	.comm	_D_PRT,8,3                      ; @D_PRT
	.comm	_D_MOD,8,3                      ; @D_MOD
	.comm	_D_UNI,8,3                      ; @D_UNI
	.comm	_D_PRO,8,3                      ; @D_PRO
	.comm	_D_DLY,8,3                      ; @D_DLY
l_.str.1:                               ; @.str.1
	.asciz	"%s: No ATAPI device detected\n"

	.no_dead_strip	_pg_detect
.subsections_via_symbols
