	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_enum_fmt
_ioctl_enum_fmt:                        ## @ioctl_enum_fmt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ebx
	cmpl	$2, %ebx
	jae	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	%ebx, (%r15)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_V4L2_FMT_FLAG_COMPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	cmpl	$1, %ebx
	je	LBB0_4
## %bb.2:
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.3:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_V4L2_PIX_FMT_MJPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_4:
	movl	8(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	movq	_V4L2_PIX_FMT_JPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FMT_FLAG_COMPRESSED,4,2   ## @V4L2_FMT_FLAG_COMPRESSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MJPEG"

	.comm	_V4L2_PIX_FMT_MJPEG,4,2         ## @V4L2_PIX_FMT_MJPEG
L_.str.1:                               ## @.str.1
	.asciz	"JPEG"

	.comm	_V4L2_PIX_FMT_JPEG,4,2          ## @V4L2_PIX_FMT_JPEG
	.no_dead_strip	_ioctl_enum_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_enum_fmt
_ioctl_enum_fmt:                        ; @ioctl_enum_fmt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w20, [x0]
	cmp	w20, #2
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	str	w20, [x19]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_FMT_FLAG_COMPRESSED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_FMT_FLAG_COMPRESSED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	cmp	w20, #1
	b.eq	LBB0_5
; %bb.2:
	cbnz	w20, LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	mov	w0, #0
Lloh8:
	adrp	x8, _V4L2_PIX_FMT_MJPEG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_PIX_FMT_MJPEG@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19, #8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
	mov	w0, #0
Lloh15:
	adrp	x8, _V4L2_PIX_FMT_JPEG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_PIX_FMT_JPEG@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_FMT_FLAG_COMPRESSED,4,2   ; @V4L2_FMT_FLAG_COMPRESSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MJPEG"

	.comm	_V4L2_PIX_FMT_MJPEG,4,2         ; @V4L2_PIX_FMT_MJPEG
l_.str.1:                               ; @.str.1
	.asciz	"JPEG"

	.comm	_V4L2_PIX_FMT_JPEG,4,2          ; @V4L2_PIX_FMT_JPEG
	.no_dead_strip	_ioctl_enum_fmt
.subsections_via_symbols
