	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function it821x_read_id
_it821x_read_id:                        ## @it821x_read_id
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ATA_ID_PROD_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_ata_do_dev_read_id
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_ATA_ID_PROD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %ecx
	callq	_ata_id_c_string
	andb	$-49, 333(%r15)
	andb	$-65, 336(%r15)
	andb	$-5, 341(%r15)
	movl	$0, 304(%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	orb	$3, 197(%r15)
	movl	$15359, %eax                    ## imm = 0x3BFF
	andl	332(%r15), %eax
	orl	$17408, %eax                    ## imm = 0x4400
	movl	%eax, 332(%r15)
	orb	$4, 345(%r15)
	movq	_ATA_ID_MAJOR_VER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	$31, (%r15,%rax,4)
	movq	_ATA_ID_SERNO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r15,%rax,4), %rdi
	movq	_ATA_ID_SERNO_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_memset
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_ID_PROD_LEN,4,2            ## @ATA_ID_PROD_LEN
	.comm	_ATA_ID_PROD,4,2                ## @ATA_ID_PROD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Integrated Technology Express"

	.comm	_ATA_ID_MAJOR_VER,8,3           ## @ATA_ID_MAJOR_VER
	.comm	_ATA_ID_SERNO,8,3               ## @ATA_ID_SERNO
	.comm	_ATA_ID_SERNO_LEN,4,2           ## @ATA_ID_SERNO_LEN
	.no_dead_strip	_it821x_read_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function it821x_read_id
lCPI0_0:
	.long	4294955007                      ; 0xffffcfff
	.long	4294967231                      ; 0xffffffbf
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_it821x_read_id:                        ; @it821x_read_id
	.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
	sub	sp, sp, #16
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _ATA_ID_PROD_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_ID_PROD_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w22, w8, #1
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	bl	_ata_do_dev_read_id
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _ATA_ID_PROD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_ID_PROD@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_ata_id_c_string
	add	x8, x19, #332
	ldr	d0, [x8]
Lloh11:
	adrp	x9, lCPI0_0@PAGE
Lloh12:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	and.8b	v0, v0, v1
	str	d0, [x8]
	ldr	w8, [x19, #340]
	and	w8, w8, #0xfffffbff
	str	w8, [x19, #340]
	str	wzr, [x19, #304]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strstr
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x19, #196]
	orr	w8, w8, #0x300
	str	w8, [x19, #196]
	ldr	w8, [x19, #332]
	and	w8, w8, #0x7fff
	mov	w9, #17408
	orr	w8, w8, w9
	str	w8, [x19, #332]
	ldr	w8, [x19, #344]
	orr	w8, w8, #0x400
	str	w8, [x19, #344]
Lloh15:
	adrp	x8, _ATA_ID_MAJOR_VER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ATA_ID_MAJOR_VER@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	lsl	x8, x8, #2
	ldr	w9, [x19, x8]
	orr	w9, w9, #0x1f
	str	w9, [x19, x8]
Lloh18:
	adrp	x8, _ATA_ID_SERNO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATA_ID_SERNO@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x0, x19, x8, lsl #2
Lloh21:
	adrp	x8, _ATA_ID_SERNO_LEN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ATA_ID_SERNO_LEN@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_memset
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	sub	sp, x29, #32
	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_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_ID_PROD_LEN,4,2            ; @ATA_ID_PROD_LEN
	.comm	_ATA_ID_PROD,4,2                ; @ATA_ID_PROD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Integrated Technology Express"

	.comm	_ATA_ID_MAJOR_VER,8,3           ; @ATA_ID_MAJOR_VER
	.comm	_ATA_ID_SERNO,8,3               ; @ATA_ID_SERNO
	.comm	_ATA_ID_SERNO_LEN,4,2           ; @ATA_ID_SERNO_LEN
	.no_dead_strip	_it821x_read_id
.subsections_via_symbols
