	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function h_memstick_read_dev_id
_h_memstick_read_dev_id:                ## @h_memstick_read_dev_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpl	$0, 4(%rax)
	jne	LBB0_4
## %bb.3:
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	_MEMSTICK_MATCH_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	-20(%rbp), %eax
	movl	%eax, 16(%rbx)
	movl	-24(%rbp), %eax
	movl	%eax, 12(%rbx)
	movl	-28(%rbp), %eax
	movl	%eax, 8(%rbx)
	leaq	4(%rbx), %rdi
	movl	-32(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_4:
	movq	%rbx, %rdi
	callq	_complete
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_1:
	movq	%rsi, %r14
	addq	$24, %rbx
	movq	_MS_TPC_READ_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$16, %ecx
	callq	_memstick_init_req
	movq	%rbx, (%r14)
	xorl	%eax, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MS_TPC_READ_REG,4,2            ## @MS_TPC_READ_REG
	.comm	_MEMSTICK_MATCH_ALL,4,2         ## @MEMSTICK_MATCH_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"if_mode = %02x\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_h_memstick_read_dev_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function h_memstick_read_dev_id
_h_memstick_read_dev_id:                ; @h_memstick_read_dev_id
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x1]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_3
; %bb.2:
	ldr	w1, [x8]
	mov	x0, sp
	mov	w2, #16
	bl	_memcpy
Lloh0:
	adrp	x8, _MEMSTICK_MATCH_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEMSTICK_MATCH_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	stp	w9, w8, [x19, #16]
	ldur	d0, [sp, #4]
	str	d0, [x19, #8]
	add	x0, x19, #4
	ldr	w2, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_3:
	mov	x0, x19
	bl	_complete
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	x20, x1
	add	x19, x19, #24
Lloh8:
	adrp	x8, _MS_TPC_READ_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MS_TPC_READ_REG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #16
	bl	_memstick_init_req
	mov	w0, #0
	str	x19, [x20]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MS_TPC_READ_REG,4,2            ; @MS_TPC_READ_REG
	.comm	_MEMSTICK_MATCH_ALL,4,2         ; @MEMSTICK_MATCH_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"if_mode = %02x\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_h_memstick_read_dev_id
.subsections_via_symbols
