	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __card_setblocklen
___card_setblocklen:                    ## @__card_setblocklen
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -24(%rbp)
	movq	_MAX_DRIVE@GOTPCREL(%rip), %rcx
	cmpq	%rdi, (%rcx)
	jbe	LBB0_1
## %bb.2:
	movl	%esi, %eax
	movq	%rdi, %rbx
	movq	_PAGE_SIZE512@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%esi, %ecx
	cmovll	%ecx, %eax
	movl	$16, -48(%rbp)
	movl	%eax, %ecx
	shrl	$24, %ecx
	movl	%ecx, -44(%rbp)
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, -40(%rbp)
	movzbl	%ah, %ecx
	movl	%ecx, -36(%rbp)
	movzbl	%al, %eax
	movl	%eax, -32(%rbp)
	leaq	-48(%rbp), %rsi
	movl	$5, %edx
	callq	___card_writecmd
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	__ioResponse@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	___card_readresponse
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	___check_response
	jmp	LBB0_4
LBB0_1:
	movq	_CARDIO_ERROR_NOCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DRIVE,8,3                  ## @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ## @CARDIO_ERROR_NOCARD
	.comm	_PAGE_SIZE512,4,2               ## @PAGE_SIZE512
	.comm	__ioResponse,8,3                ## @_ioResponse
	.no_dead_strip	___card_setblocklen
.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 __card_setblocklen
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
___card_setblocklen:                    ; @__card_setblocklen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _MAX_DRIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_DRIVE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ls	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x8, _PAGE_SIZE512@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SIZE512@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w1
	csel	w8, w8, w1, lt
	mov	w9, #16
	lsr	w10, w8, #24
	stp	w9, w10, [sp, #4]
	dup.2s	v0, w8
Lloh9:
	adrp	x9, lCPI0_0@PAGE
Lloh10:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	stur	d0, [sp, #12]
	and	w8, w8, #0xff
	str	w8, [sp, #20]
	add	x1, sp, #4
	mov	w2, #5
	bl	___card_writecmd
	cbnz	x0, LBB0_4
; %bb.2:
Lloh11:
	adrp	x20, __ioResponse@GOTPAGE
Lloh12:
	ldr	x20, [x20, __ioResponse@GOTPAGEOFF]
	ldr	x8, [x20]
	lsl	x21, x19, #3
	ldr	x1, [x8, x21]
	mov	x0, x19
	mov	w2, #1
	bl	___card_readresponse
	ldr	x8, [x20]
	ldr	x8, [x8, x21]
	ldr	w1, [x8]
	mov	x0, x19
	bl	___check_response
	b	LBB0_4
LBB0_3:
Lloh13:
	adrp	x8, _CARDIO_ERROR_NOCARD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CARDIO_ERROR_NOCARD@GOTPAGEOFF]
Lloh15:
	ldr	x0, [x8]
LBB0_4:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DRIVE,8,3                  ; @MAX_DRIVE
	.comm	_CARDIO_ERROR_NOCARD,8,3        ; @CARDIO_ERROR_NOCARD
	.comm	_PAGE_SIZE512,4,2               ; @PAGE_SIZE512
	.comm	__ioResponse,8,3                ; @_ioResponse
	.no_dead_strip	___card_setblocklen
.subsections_via_symbols
