	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adf_ctl_ioctl_dev_config
_adf_ctl_ioctl_dev_config:              ## @adf_ctl_ioctl_dev_config
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	leaq	-16(%rbp), %rdi
	movq	%rdx, %rsi
	callq	_adf_ctl_alloc_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	-16(%rbp), %rax
	movl	(%rax), %edi
	callq	_adf_devmgr_get_dev_by_id
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_adf_dev_started
	testq	%rax, %rax
	jne	LBB0_2
## %bb.4:
	movq	-16(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_adf_copy_key_value_data
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	-16(%rbp), %rdi
	callq	_kfree
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	_ADF_STATUS_CONFIGURED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ADF_STATUS_CONFIGURED,4,2      ## @ADF_STATUS_CONFIGURED
	.no_dead_strip	_adf_ctl_ioctl_dev_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adf_ctl_ioctl_dev_config
_adf_ctl_ioctl_dev_config:              ; @adf_ctl_ioctl_dev_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x1, x2
	add	x0, sp, #8
	bl	_adf_ctl_alloc_resources
	mov	x19, x0
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
	bl	_adf_devmgr_get_dev_by_id
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x0
	bl	_adf_dev_started
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_adf_copy_key_value_data
	cbz	x0, LBB0_7
LBB0_4:
Lloh0:
	adrp	x8, _EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_kfree
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
Lloh3:
	adrp	x8, _ADF_STATUS_CONFIGURED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADF_STATUS_CONFIGURED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	mov	w19, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ADF_STATUS_CONFIGURED,4,2      ; @ADF_STATUS_CONFIGURED
	.no_dead_strip	_adf_ctl_ioctl_dev_config
.subsections_via_symbols
