	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function print_dev_mmcsd
_print_dev_mmcsd:                       ## @print_dev_mmcsd
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	8(%rdi), %eax
	movl	(%rdi), %edx
	movl	4(%rdi), %esi
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	xorl	%r8d, %r8d
	callq	_cam_open_btl
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_cam_getccb
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	movq	_CAM_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_XPT_DEV_ADVINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_CDAI_FLAG_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_CDAI_TYPE_MMC_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	$16, (%rbx)
	leaq	-48(%rbp), %rax
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_cam_send_ccb
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_strlen
	testq	%rax, %rax
	jle	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	jmp	LBB0_10
LBB0_1:
	movq	_cam_errbuf@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	movl	$1, %eax
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
	movq	%rbx, %rdi
	callq	_cam_freeccb
LBB0_4:
	movq	%r15, %rdi
	callq	_cam_close_device
	movl	$1, %eax
	jmp	LBB0_11
LBB0_9:
	movq	_CARD_FEATURE_SDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-40(%rbp), %eax
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
LBB0_10:
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_cam_freeccb
	movq	%r15, %rdi
	callq	_cam_close_device
	xorl	%eax, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_cam_errbuf,4,2                 ## @cam_errbuf
L_.str.1:                               ## @.str.1
	.asciz	"couldn't allocate CCB"

	.comm	_CAM_DIR_IN,4,2                 ## @CAM_DIR_IN
	.comm	_XPT_DEV_ADVINFO,4,2            ## @XPT_DEV_ADVINFO
	.comm	_CDAI_FLAG_NONE,4,2             ## @CDAI_FLAG_NONE
	.comm	_CDAI_TYPE_MMC_PARAMS,4,2       ## @CDAI_TYPE_MMC_PARAMS
L_.str.2:                               ## @.str.2
	.asciz	"error sending XPT_DEV_ADVINFO CCB"

L_.str.3:                               ## @.str.3
	.asciz	"<%s>"

L_.str.4:                               ## @.str.4
	.asciz	"<%s card>"

	.comm	_CARD_FEATURE_SDIO,4,2          ## @CARD_FEATURE_SDIO
L_.str.5:                               ## @.str.5
	.asciz	"SDIO"

L_.str.6:                               ## @.str.6
	.asciz	"unknown"

	.no_dead_strip	_print_dev_mmcsd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function print_dev_mmcsd
_print_dev_mmcsd:                       ; @print_dev_mmcsd
	.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
	mov	x20, x1
	ldp	w1, w8, [x0, #4]
	ldr	w2, [x0]
Lloh0:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x9]
	mov	x0, x8
	mov	x4, #0
	bl	_cam_open_btl
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_cam_getccb
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x8, _CAM_DIR_IN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAM_DIR_IN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _XPT_DEV_ADVINFO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XPT_DEV_ADVINFO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
Lloh9:
	adrp	x8, _CDAI_FLAG_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CDAI_FLAG_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CDAI_TYPE_MMC_PARAMS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CDAI_TYPE_MMC_PARAMS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	mov	w8, #16
	str	w8, [x0]
	add	x8, sp, #16
	str	x8, [x0, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_cam_send_ccb
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	x22, [sp, #16]
	mov	x0, x22
	bl	_strlen
	cmp	x0, #1
	b.lt	LBB0_9
; %bb.4:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	b	LBB0_10
LBB0_5:
Lloh17:
	adrp	x8, _cam_errbuf@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cam_errbuf@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	mov	w0, #1
	b	LBB0_11
LBB0_6:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	b	LBB0_8
LBB0_7:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	mov	x0, x21
	bl	_cam_freeccb
LBB0_8:
	mov	x0, x19
	bl	_cam_close_device
	mov	w0, #1
	b	LBB0_11
LBB0_9:
	ldr	w8, [sp, #24]
Lloh26:
	adrp	x9, _CARD_FEATURE_SDIO@GOTPAGE
Lloh27:
	ldr	x9, [x9, _CARD_FEATURE_SDIO@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, l_.str.5@PAGE
Lloh30:
	add	x10, x10, l_.str.5@PAGEOFF
Lloh31:
	adrp	x11, l_.str.6@PAGE
Lloh32:
	add	x11, x11, l_.str.6@PAGEOFF
	tst	w9, w8
	csel	x2, x11, x10, eq
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
LBB0_10:
	bl	_sprintf
	mov	x0, x21
	bl	_cam_freeccb
	mov	x0, x19
	bl	_cam_close_device
	mov	w0, #0
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_cam_errbuf,4,2                 ; @cam_errbuf
l_.str.1:                               ; @.str.1
	.asciz	"couldn't allocate CCB"

	.comm	_CAM_DIR_IN,4,2                 ; @CAM_DIR_IN
	.comm	_XPT_DEV_ADVINFO,4,2            ; @XPT_DEV_ADVINFO
	.comm	_CDAI_FLAG_NONE,4,2             ; @CDAI_FLAG_NONE
	.comm	_CDAI_TYPE_MMC_PARAMS,4,2       ; @CDAI_TYPE_MMC_PARAMS
l_.str.2:                               ; @.str.2
	.asciz	"error sending XPT_DEV_ADVINFO CCB"

l_.str.3:                               ; @.str.3
	.asciz	"<%s>"

l_.str.4:                               ; @.str.4
	.asciz	"<%s card>"

	.comm	_CARD_FEATURE_SDIO,4,2          ; @CARD_FEATURE_SDIO
l_.str.5:                               ; @.str.5
	.asciz	"SDIO"

l_.str.6:                               ; @.str.6
	.asciz	"unknown"

	.no_dead_strip	_print_dev_mmcsd
.subsections_via_symbols
