	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_sim_flags
_get_sim_flags:                         ## @get_sim_flags
	.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, %r14
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_bzero
	movq	_XPT_PATH_INQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_send_ccb
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-24(%rbp), %ebx
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_1
## %bb.2:
	movq	_PIT_PROCESSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	je	LBB0_3
## %bb.4:
	movl	-28(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_5
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_5
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_CAM_PATH_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XPT_PATH_INQ,4,2               ## @XPT_PATH_INQ
	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CPI failed, status %#x\n"

	.comm	_PIT_PROCESSOR,4,2              ## @PIT_PROCESSOR
L_.str.1:                               ## @.str.1
	.asciz	"HBA does not support target mode\n"

	.comm	_CAM_PATH_INVALID,4,2           ## @CAM_PATH_INVALID
	.no_dead_strip	_get_sim_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_sim_flags
_get_sim_flags:                         ; @get_sim_flags
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x0
	add	x0, sp, #16
	mov	w1, #16
	bl	_bzero
Lloh0:
	adrp	x8, _XPT_PATH_INQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XPT_PATH_INQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #28]
	add	x0, sp, #16
	mov	w1, #1
	bl	_send_ccb
	ldr	w8, [sp, #24]
Lloh3:
	adrp	x9, _CAM_STATUS_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w19, w9, w8
Lloh6:
	adrp	x8, _CAM_REQ_CMP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [sp, #16]
Lloh9:
	adrp	x9, _PIT_PROCESSOR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PIT_PROCESSOR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w8, [sp, #20]
	str	w8, [x20]
	b	LBB0_5
LBB0_3:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	b	LBB0_5
LBB0_4:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
Lloh22:
	adrp	x8, _CAM_PATH_INVALID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAM_PATH_INVALID@GOTPAGEOFF]
Lloh24:
	ldr	w19, [x8]
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_XPT_PATH_INQ,4,2               ; @XPT_PATH_INQ
	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CPI failed, status %#x\n"

	.comm	_PIT_PROCESSOR,4,2              ; @PIT_PROCESSOR
l_.str.1:                               ; @.str.1
	.asciz	"HBA does not support target mode\n"

	.comm	_CAM_PATH_INVALID,4,2           ; @CAM_PATH_INVALID
	.no_dead_strip	_get_sim_flags
.subsections_via_symbols
