	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ena_set_queues_placement_policy
_ena_set_queues_placement_policy:       ## @ena_set_queues_placement_policy
	.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	%rcx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	_ENA_ADMIN_LLQ@GOTPCREL(%rip), %rax
	movl	(%rsi), %ecx
	movl	(%rax), %eax
	btl	%eax, %ecx
	jae	LBB0_1
## %bb.3:
	movq	%rdx, %rbx
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_select_bars
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ENA_MEM_BAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r12d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_ena_com_config_dev_mode
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENA_ADMIN_PLACEMENT_POLICY_HOST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%r12d, %edx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	_ENA_MEM_BAR@GOTPCREL(%rip), %rcx
	movq	8(%r13), %rax
	movq	_ENA_ADMIN_PLACEMENT_POLICY_HOST@GOTPCREL(%rip), %rbx
	xorl	%r15d, %r15d
	cmpq	(%rbx), %rax
	je	LBB0_10
## %bb.6:
	andl	%r12d, %edx
	je	LBB0_7
## %bb.8:
	movq	%rcx, %r12
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	_pci_resource_start
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_pci_resource_len
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devm_ioremap_wc
	movl	%eax, 16(%r13)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	(%rbx), %rax
	movq	%rax, 8(%r13)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENA_ADMIN_LLQ,4,2              ## @ENA_ADMIN_LLQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LLQ is not supported Fallback to host mode policy.\n"

	.comm	_ENA_ADMIN_PLACEMENT_POLICY_HOST,8,3 ## @ENA_ADMIN_PLACEMENT_POLICY_HOST
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENA_MEM_BAR,4,2                ## @ENA_MEM_BAR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to configure the device mode.  Fallback to host mode policy.\n"

L_.str.2:                               ## @.str.2
	.asciz	"ENA device does not expose LLQ bar. Fallback to host mode policy.\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_ena_set_queues_placement_policy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ena_set_queues_placement_policy
_ena_set_queues_placement_policy:       ; @ena_set_queues_placement_policy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ENA_ADMIN_LLQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENA_ADMIN_LLQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x1]
	lsr	w8, w9, w8
	tbz	w8, #0, LBB0_3
; %bb.1:
	mov	x21, x3
	mov	x22, x2
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_select_bars
	mov	x23, x0
Lloh6:
	adrp	x25, _ENA_MEM_BAR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ENA_MEM_BAR@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_BIT
	mov	x24, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_ena_com_config_dev_mode
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x20
	bl	_dev_err
	mov	w0, #0
Lloh12:
	adrp	x8, _ENA_ADMIN_PLACEMENT_POLICY_HOST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENA_ADMIN_PLACEMENT_POLICY_HOST@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
LBB0_5:
	str	x8, [x19, #8]
LBB0_6:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x21, _ENA_ADMIN_PLACEMENT_POLICY_HOST@GOTPAGE
Lloh16:
	ldr	x21, [x21, _ENA_ADMIN_PLACEMENT_POLICY_HOST@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.8:
	and	w8, w24, w23
	cbz	w8, LBB0_11
; %bb.9:
	ldr	w1, [x25]
	mov	x0, x20
	bl	_pci_resource_start
	mov	x21, x0
	ldr	w1, [x25]
	mov	x0, x20
	bl	_pci_resource_len
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_devm_ioremap_wc
	str	w0, [x19, #16]
	cbz	w0, LBB0_12
LBB0_10:
	mov	w0, #0
	b	LBB0_6
LBB0_11:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	w0, #0
	ldr	x8, [x21]
	b	LBB0_5
LBB0_12:
Lloh19:
	adrp	x8, _EFAULT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENA_ADMIN_LLQ,4,2              ; @ENA_ADMIN_LLQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LLQ is not supported Fallback to host mode policy.\n"

	.comm	_ENA_ADMIN_PLACEMENT_POLICY_HOST,8,3 ; @ENA_ADMIN_PLACEMENT_POLICY_HOST
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENA_MEM_BAR,4,2                ; @ENA_MEM_BAR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to configure the device mode.  Fallback to host mode policy.\n"

l_.str.2:                               ; @.str.2
	.asciz	"ENA device does not expose LLQ bar. Fallback to host mode policy.\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_ena_set_queues_placement_policy
.subsections_via_symbols
