	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_ctrl_new
_v4l2_ctrl_new:                         ## @v4l2_ctrl_new
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_2:
	movq	%rdi, %rbx
	movq	16(%rbp), %rdi
	cmpq	%r9, %rdi
	jl	LBB0_12
## %bb.3:
	movq	%rdx, %r13
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.4:
	movq	%rcx, %r12
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.5:
	movq	_V4L2_CID_PRIVATE_BASE@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jle	LBB0_12
## %bb.6:
	movl	%r8d, %r15d
	movq	_V4L2_CTRL_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpq	$0, 24(%rbp)
	jne	LBB0_8
## %bb.7:
	cmpl	%r15d, %ecx
	je	LBB0_12
LBB0_8:
	movq	_V4L2_CTRL_TYPE_MENU@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpq	$0, 48(%rbp)
	jne	LBB0_10
## %bb.9:
	cmpl	%r15d, %edx
	je	LBB0_12
LBB0_10:
	movq	_V4L2_CTRL_TYPE_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rdi, %rdi
	jne	LBB0_15
## %bb.11:
	cmpl	%r15d, %eax
	jne	LBB0_15
LBB0_12:
	movq	_ERANGE@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_handler_set_err
LBB0_14:
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	32(%rbp), %r8
	cmpl	%r15d, %ecx
	je	LBB0_18
## %bb.16:
	cmpl	%r15d, %edx
	je	LBB0_18
## %bb.17:
	movq	_V4L2_CTRL_TYPE_BOOLEAN@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_20
LBB0_18:
	cmpq	%r9, %r8
	jl	LBB0_12
## %bb.19:
	cmpq	%rdi, %r8
	jg	LBB0_12
LBB0_20:
	movq	40(%rbp), %rdx
	movq	_V4L2_CTRL_TYPE_BUTTON@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_22
## %bb.21:
	movq	_V4L2_CTRL_FLAG_WRITE_ONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_22:
	movq	_V4L2_CTRL_TYPE_CTRL_CLASS@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_33
## %bb.23:
	movq	_V4L2_CTRL_FLAG_READ_ONLY@GOTPCREL(%rip), %rax
LBB0_24:
	orq	(%rax), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
LBB0_25:
	xorl	%eax, %eax
LBB0_26:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leal	136(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_32
## %bb.27:
	movq	%rax, %r14
	leaq	32(%rax), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_INIT_LIST_HEAD
	movq	%rbx, 128(%r14)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 120(%r14)
	movq	%r13, 112(%r14)
	movq	%r12, (%r14)
	movl	%r15d, 8(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 104(%r14)
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 40(%r14)
	movq	16(%rbp), %rax
	movq	%rax, 96(%r14)
	movq	24(%rbp), %rcx
	movq	%rcx, 88(%r14)
	movq	48(%rbp), %rcx
	movq	%rcx, 16(%r14)
	movq	56(%rbp), %rcx
	movq	%rcx, 80(%r14)
	movq	32(%rbp), %rcx
	movq	%rcx, 64(%r14)
	movq	%rcx, 72(%r14)
	movq	%rcx, 56(%r14)
	movq	_V4L2_CTRL_TYPE_STRING@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_30
## %bb.28:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r14,%rcx), %rdi
	addq	%r14, %rcx
	addq	$136, %rcx
	movq	%rax, %rsi
	notq	%rsi
	addq	%rsi, %rdi
	addq	$136, %rdi
	movq	%rdi, 48(%r14)
	addq	%rax, %rax
	subq	%rax, %rcx
	addq	$-2, %rcx
	movq	%rcx, 24(%r14)
	testq	%rdx, %rdx
	je	LBB0_30
## %bb.29:
	movl	$32, %esi
	callq	_memset
LBB0_30:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_handler_new_ref
	testq	%rax, %rax
	je	LBB0_35
## %bb.31:
	movq	%r14, %rdi
	callq	_kfree
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_32:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_33:
	cmpl	%r15d, %eax
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_25
## %bb.34:
	leal	(%rdi,%rdi), %eax
	addl	$2, %eax
	jmp	LBB0_26
LBB0_35:
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	4(%rbx), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CID_PRIVATE_BASE,8,3      ## @V4L2_CID_PRIVATE_BASE
	.comm	_V4L2_CTRL_TYPE_INTEGER,4,2     ## @V4L2_CTRL_TYPE_INTEGER
	.comm	_V4L2_CTRL_TYPE_MENU,4,2        ## @V4L2_CTRL_TYPE_MENU
	.comm	_V4L2_CTRL_TYPE_STRING,4,2      ## @V4L2_CTRL_TYPE_STRING
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_V4L2_CTRL_TYPE_BOOLEAN,4,2     ## @V4L2_CTRL_TYPE_BOOLEAN
	.comm	_V4L2_CTRL_TYPE_BUTTON,4,2      ## @V4L2_CTRL_TYPE_BUTTON
	.comm	_V4L2_CTRL_FLAG_WRITE_ONLY,8,3  ## @V4L2_CTRL_FLAG_WRITE_ONLY
	.comm	_V4L2_CTRL_TYPE_CTRL_CLASS,4,2  ## @V4L2_CTRL_TYPE_CTRL_CLASS
	.comm	_V4L2_CTRL_FLAG_READ_ONLY,8,3   ## @V4L2_CTRL_FLAG_READ_ONLY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_v4l2_ctrl_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_ctrl_new
_v4l2_ctrl_new:                         ; @v4l2_ctrl_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_12
; %bb.1:
	mov	x21, x6
	mov	x20, x5
	mov	x19, x0
	cmp	x6, x5
	b.lt	LBB0_11
; %bb.2:
	mov	x24, x2
	cbz	x2, LBB0_11
; %bb.3:
	mov	x25, x3
	cbz	x3, LBB0_11
; %bb.4:
Lloh0:
	adrp	x8, _V4L2_CID_PRIVATE_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_CID_PRIVATE_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x24
	b.le	LBB0_11
; %bb.5:
	mov	x23, x7
	mov	x22, x4
	mov	x26, x1
Lloh3:
	adrp	x8, _V4L2_CTRL_TYPE_INTEGER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_CTRL_TYPE_INTEGER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	cbnz	x7, LBB0_7
; %bb.6:
	cmp	w9, w22
	b.eq	LBB0_11
LBB0_7:
	ldr	x28, [x29, #32]
Lloh6:
	adrp	x8, _V4L2_CTRL_TYPE_MENU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_CTRL_TYPE_MENU@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x8]
	cbnz	x28, LBB0_9
; %bb.8:
	cmp	w10, w22
	b.eq	LBB0_11
LBB0_9:
Lloh9:
	adrp	x8, _V4L2_CTRL_TYPE_STRING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_CTRL_TYPE_STRING@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbnz	x21, LBB0_14
; %bb.10:
	cmp	w8, w22
	b.ne	LBB0_14
LBB0_11:
Lloh12:
	adrp	x8, _ERANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x19
	bl	_handler_set_err
LBB0_12:
	mov	x27, #0
LBB0_13:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_14:
	ldr	x12, [x29, #16]
Lloh15:
	adrp	x11, _V4L2_CTRL_TYPE_BOOLEAN@GOTPAGE
Lloh16:
	ldr	x11, [x11, _V4L2_CTRL_TYPE_BOOLEAN@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	cmp	w9, w22
	ccmp	w10, w22, #4, ne
	ccmp	w11, w22, #4, ne
	b.ne	LBB0_17
; %bb.15:
	cmp	x12, x20
	b.lt	LBB0_11
; %bb.16:
	cmp	x12, x21
	b.gt	LBB0_11
LBB0_17:
	ldr	x10, [x29, #24]
Lloh18:
	adrp	x9, _V4L2_CTRL_TYPE_BUTTON@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_CTRL_TYPE_BUTTON@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w9, w22
	str	x12, [sp, #40]                  ; 8-byte Folded Spill
	b.ne	LBB0_19
; %bb.18:
	mov	x9, #0
Lloh21:
	adrp	x8, _V4L2_CTRL_FLAG_WRITE_ONLY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V4L2_CTRL_FLAG_WRITE_ONLY@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh23:
	adrp	x9, _V4L2_CTRL_TYPE_CTRL_CLASS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_CTRL_TYPE_CTRL_CLASS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w9, w22
	b.ne	LBB0_22
; %bb.20:
	mov	x9, #0
Lloh26:
	adrp	x8, _V4L2_CTRL_FLAG_READ_ONLY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_CTRL_FLAG_READ_ONLY@GOTPAGEOFF]
LBB0_21:
	ldr	x8, [x8]
	orr	x10, x8, x10
	str	x10, [sp, #32]                  ; 8-byte Folded Spill
	b	LBB0_23
LBB0_22:
	str	x10, [sp, #32]                  ; 8-byte Folded Spill
	cmp	w8, w22
	lsl	w8, w21, #1
	add	w8, w8, #2
	csel	x9, xzr, x8, ne
LBB0_23:
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	add	w0, w9, #136
Lloh28:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x27, x0
	cbz	x0, LBB0_29
; %bb.24:
	ldr	x8, [x29, #40]
	add	x0, x27, #32
	stp	x0, x8, [sp, #8]                ; 16-byte Folded Spill
	bl	_INIT_LIST_HEAD
	stp	x26, x19, [x27, #120]
	str	x25, [x27]
	str	w22, [x27, #8]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	stp	x8, x24, [x27, #104]
	str	x20, [x27, #40]
	stp	x23, x21, [x27, #88]
	str	x28, [x27, #16]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	stp	x8, x9, [x27, #72]
	stp	x8, x8, [x27, #56]
Lloh31:
	adrp	x8, _V4L2_CTRL_TYPE_STRING@GOTPAGE
Lloh32:
	ldr	x8, [x8, _V4L2_CTRL_TYPE_STRING@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_27
; %bb.25:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x8, x27, x8
	add	x8, x8, #136
	mvn	x9, x21
	add	x0, x8, x9
	str	x0, [x27, #48]
	sub	x8, x8, x21, lsl #1
	sub	x8, x8, #2
	str	x8, [x27, #24]
	cbz	x20, LBB0_27
; %bb.26:
	mov	w1, #32
	mov	x2, x20
	bl	_memset
LBB0_27:
	mov	x0, x19
	mov	x1, x27
	bl	_handler_new_ref
	cbz	x0, LBB0_30
; %bb.28:
	mov	x0, x27
	bl	_kfree
	b	LBB0_12
LBB0_29:
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x19
	bl	_handler_set_err
	b	LBB0_13
LBB0_30:
	mov	x0, x19
	bl	_mutex_lock
	add	x1, x19, #4
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_list_add_tail
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CID_PRIVATE_BASE,8,3      ; @V4L2_CID_PRIVATE_BASE
	.comm	_V4L2_CTRL_TYPE_INTEGER,4,2     ; @V4L2_CTRL_TYPE_INTEGER
	.comm	_V4L2_CTRL_TYPE_MENU,4,2        ; @V4L2_CTRL_TYPE_MENU
	.comm	_V4L2_CTRL_TYPE_STRING,4,2      ; @V4L2_CTRL_TYPE_STRING
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_V4L2_CTRL_TYPE_BOOLEAN,4,2     ; @V4L2_CTRL_TYPE_BOOLEAN
	.comm	_V4L2_CTRL_TYPE_BUTTON,4,2      ; @V4L2_CTRL_TYPE_BUTTON
	.comm	_V4L2_CTRL_FLAG_WRITE_ONLY,8,3  ; @V4L2_CTRL_FLAG_WRITE_ONLY
	.comm	_V4L2_CTRL_TYPE_CTRL_CLASS,4,2  ; @V4L2_CTRL_TYPE_CTRL_CLASS
	.comm	_V4L2_CTRL_FLAG_READ_ONLY,8,3   ; @V4L2_CTRL_FLAG_READ_ONLY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_v4l2_ctrl_new
.subsections_via_symbols
