	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dr_action_create_modify_action
_dr_action_create_modify_action:        ## @dr_action_create_modify_action
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rax
	movq	%rdi, %r13
	movq	_DR_MODIFY_ACTION_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	%rsi, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r15d
LBB0_3:
	movq	_DR_CHUNK_SIZE_16@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_mlx5dr_icm_pool_chunk_size_to_entries
	movq	%rax, %r12
	cmpq	%rax, %r15
	jbe	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_mlx5dr_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movl	4(%r13), %edi
	movl	(%rbx), %esi
	callq	_mlx5dr_icm_alloc_chunk
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rsi
	imulq	%r12, %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r14
	leaq	-52(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-80(%rbp), %r9
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	callq	_dr_actions_convert_modify_header
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 32(%rsi)
	movl	-52(%rbp), %eax
	movl	%eax, (%rsi)
	movq	%r14, 24(%rsi)
	movq	-80(%rbp), %rax
	movq	%rax, 8(%rsi)
	movl	(%rcx), %eax
	subl	(%r13), %eax
	movq	_ACTION_CACHE_LINE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, 16(%rsi)
	movq	%r13, %rdi
	callq	_mlx5dr_send_postsend_action
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_12
LBB0_13:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_14
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mlx5dr_icm_free_chunk
LBB0_15:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DR_MODIFY_ACTION_SIZE,8,3      ## @DR_MODIFY_ACTION_SIZE
	.comm	_DR_CHUNK_SIZE_16,4,2           ## @DR_CHUNK_SIZE_16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Max number of actions %d exceeds limit %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ACTION_CACHE_LINE_SIZE,4,2     ## @ACTION_CACHE_LINE_SIZE
	.no_dead_strip	_dr_action_create_modify_action
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dr_action_create_modify_action
_dr_action_create_modify_action:        ; @dr_action_create_modify_action
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x22, x2
	mov	x20, x0
Lloh0:
	adrp	x25, _DR_MODIFY_ACTION_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DR_MODIFY_ACTION_SIZE@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh2:
	adrp	x21, _DR_CHUNK_SIZE_16@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DR_CHUNK_SIZE_16@GOTPAGEOFF]
	ldr	w0, [x21]
	udiv	x23, x1, x8
	bl	_mlx5dr_icm_pool_chunk_size_to_entries
	mov	x24, x0
	cmp	x23, x0
	b.ls	LBB0_2
; %bb.1:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	mov	x3, x24
	bl	_mlx5dr_dbg
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	bl	_mlx5dr_icm_alloc_chunk
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	ldr	x8, [x25]
	mul	x1, x8, x24
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w0, #1
	bl	_kcalloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x25, x0
	add	x5, sp, #8
	add	x6, sp, #4
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x25
	bl	_dr_actions_convert_modify_header
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w8, [sp, #4]
	str	w8, [x19]
	stp	x25, x21, [x19, #24]
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	ldr	w8, [x21]
	ldr	w9, [x20]
	sub	w8, w8, w9
Lloh11:
	adrp	x9, _ACTION_CACHE_LINE_SIZE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ACTION_CACHE_LINE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	str	w8, [x19, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_mlx5dr_send_postsend_action
	mov	x22, x0
	cbz	w0, LBB0_11
LBB0_6:
	mov	x0, x25
	bl	_kfree
	b	LBB0_10
LBB0_7:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_9:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x21
	bl	_mlx5dr_icm_free_chunk
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DR_MODIFY_ACTION_SIZE,8,3      ; @DR_MODIFY_ACTION_SIZE
	.comm	_DR_CHUNK_SIZE_16,4,2           ; @DR_CHUNK_SIZE_16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Max number of actions %d exceeds limit %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ACTION_CACHE_LINE_SIZE,4,2     ; @ACTION_CACHE_LINE_SIZE
	.no_dead_strip	_dr_action_create_modify_action
.subsections_via_symbols
