	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_disk_init_chs
_ide_disk_init_chs:                     ## @ide_disk_init_chs
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	cmpl	$0, 8(%rdi)
	je	LBB0_3
## %bb.1:
	cmpl	$0, 12(%rbx)
	je	LBB0_3
## %bb.2:
	cmpl	$0, 16(%rbx)
	jne	LBB0_4
LBB0_3:
	movq	_ATA_ID_CYLS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, 20(%rbx)
	movl	%eax, 8(%rbx)
	movq	_ATA_ID_HEADS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, 24(%rbx)
	movl	%eax, 12(%rbx)
	movq	_ATA_ID_SECTORS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, 28(%rbx)
	movl	%eax, 16(%rbx)
LBB0_4:
	movq	%r14, %rdi
	callq	_ata_id_current_chs_valid
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_ATA_ID_CUR_CYLS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, 8(%rbx)
	movq	_ATA_ID_CUR_HEADS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, 12(%rbx)
	movq	_ATA_ID_CUR_SECTORS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%r14,%rcx,4), %ecx
	movl	%ecx, 16(%rbx)
	cmpl	$17, %eax
	jge	LBB0_8
	jmp	LBB0_11
LBB0_5:
	movl	12(%rbx), %eax
	cmpl	$17, %eax
	jl	LBB0_11
LBB0_8:
	movq	_ATA_ID_HEADS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %ecx
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.9:
	cmpl	$16, %ecx
	jg	LBB0_11
## %bb.10:
	movq	_ATA_ID_CYLS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%r14,%rcx,4), %ecx
	movl	%ecx, 8(%rbx)
	movl	(%r14,%rax,4), %eax
	movl	%eax, 12(%rbx)
	movq	_ATA_ID_SECTORS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, 16(%rbx)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_ID_CYLS,8,3                ## @ATA_ID_CYLS
	.comm	_ATA_ID_HEADS,8,3               ## @ATA_ID_HEADS
	.comm	_ATA_ID_SECTORS,8,3             ## @ATA_ID_SECTORS
	.comm	_ATA_ID_CUR_CYLS,8,3            ## @ATA_ID_CUR_CYLS
	.comm	_ATA_ID_CUR_HEADS,8,3           ## @ATA_ID_CUR_HEADS
	.comm	_ATA_ID_CUR_SECTORS,8,3         ## @ATA_ID_CUR_SECTORS
	.no_dead_strip	_ide_disk_init_chs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_disk_init_chs
_ide_disk_init_chs:                     ; @ide_disk_init_chs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0]
	ldr	w8, [x0, #8]
Lloh0:
	adrp	x22, _ATA_ID_CYLS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ATA_ID_CYLS@GOTPAGEOFF]
Lloh2:
	adrp	x23, _ATA_ID_HEADS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ATA_ID_HEADS@GOTPAGEOFF]
Lloh4:
	adrp	x21, _ATA_ID_SECTORS@GOTPAGE
Lloh5:
	ldr	x21, [x21, _ATA_ID_SECTORS@GOTPAGEOFF]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_4
LBB0_3:
	ldr	x8, [x22]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #20]
	str	w8, [x19, #8]
	ldr	x8, [x23]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #24]
	str	w8, [x19, #12]
	ldr	x8, [x21]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #28]
	str	w8, [x19, #16]
LBB0_4:
	mov	x0, x20
	bl	_ata_id_current_chs_valid
	cbz	x0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _ATA_ID_CUR_CYLS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATA_ID_CUR_CYLS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #8]
Lloh9:
	adrp	x8, _ATA_ID_CUR_HEADS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATA_ID_CUR_HEADS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #12]
Lloh12:
	adrp	x9, _ATA_ID_CUR_SECTORS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATA_ID_CUR_SECTORS@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w9, [x20, x9, lsl #2]
	str	w9, [x19, #16]
	cmp	w8, #17
	b.ge	LBB0_7
	b	LBB0_10
LBB0_6:
	ldr	w8, [x19, #12]
	cmp	w8, #17
	b.lt	LBB0_10
LBB0_7:
	ldr	x8, [x23]
	ldr	w9, [x20, x8, lsl #2]
	cbz	w9, LBB0_10
; %bb.8:
	cmp	w9, #16
	b.gt	LBB0_10
; %bb.9:
	ldr	x9, [x22]
	ldr	w9, [x20, x9, lsl #2]
	str	w9, [x19, #8]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #12]
	ldr	x8, [x21]
	ldr	w8, [x20, x8, lsl #2]
	str	w8, [x19, #16]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_ID_CYLS,8,3                ; @ATA_ID_CYLS
	.comm	_ATA_ID_HEADS,8,3               ; @ATA_ID_HEADS
	.comm	_ATA_ID_SECTORS,8,3             ; @ATA_ID_SECTORS
	.comm	_ATA_ID_CUR_CYLS,8,3            ; @ATA_ID_CUR_CYLS
	.comm	_ATA_ID_CUR_HEADS,8,3           ; @ATA_ID_CUR_HEADS
	.comm	_ATA_ID_CUR_SECTORS,8,3         ; @ATA_ID_CUR_SECTORS
	.no_dead_strip	_ide_disk_init_chs
.subsections_via_symbols
