	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_connector_attach_scaling_mode_property ## -- Begin function drm_connector_attach_scaling_mode_property
	.p2align	4, 0x90
_drm_connector_attach_scaling_mode_property: ## @drm_connector_attach_scaling_mode_property
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	16(%rdi), %r12
	movq	_drm_scaling_mode_enum_list@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_hweight32
	movl	%r13d, %edx
	movl	%ebx, %ecx
	shrl	%cl, %edx
	testl	%edx, %edx
	setne	%cl
	cmpl	$2, %eax
	setl	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_DRM_MODE_PROP_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_hweight32
	leaq	L_.str(%rip), %rdx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_drm_property_create
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	movq	%rax, %r12
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT
	testl	%r13d, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,8), %edx
	movl	4(%rax,%rbx,8), %esi
	movq	%r12, %rdi
	callq	_drm_property_add_enum
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_drm_property_destroy
	jmp	LBB0_11
LBB0_10:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	8(%rbx), %rdi
	xorl	%r14d, %r14d
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_drm_object_attach_property
	movq	%r12, (%rbx)
	jmp	LBB0_11
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_drm_scaling_mode_enum_list,8,3 ## @drm_scaling_mode_enum_list
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_MODE_PROP_ENUM,4,2         ## @DRM_MODE_PROP_ENUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scaling mode"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_connector_attach_scaling_mode_property ; -- Begin function drm_connector_attach_scaling_mode_property
	.p2align	2
_drm_connector_attach_scaling_mode_property: ; @drm_connector_attach_scaling_mode_property
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x25, _drm_scaling_mode_enum_list@GOTPAGE
Lloh1:
	ldr	x25, [x25, _drm_scaling_mode_enum_list@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	mov	x22, x0
	mov	x0, x21
	bl	_hweight32
	lsr	w8, w21, w22
	cmp	w0, #2
	ccmp	w8, #0, #0, ge
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_3:
	mov	x0, x24
	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_4:
Lloh4:
	adrp	x8, _DRM_MODE_PROP_ENUM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DRM_MODE_PROP_ENUM@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_hweight32
	mov	x3, x0
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	bl	_drm_property_create
	cbz	x0, LBB0_12
; %bb.5:
	mov	x22, x0
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x26, #0
	mov	x23, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	add	x26, x26, #8
	cmp	x23, w0, sxtw
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_BIT
	tst	w0, w21
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x25]
	add	x8, x8, x26
	ldp	w2, w1, [x8]
	mov	x0, x22
	bl	_drm_property_add_enum
	cbz	w0, LBB0_7
; %bb.10:
	mov	x24, x0
	mov	x0, x20
	mov	x1, x22
	bl	_drm_property_destroy
	b	LBB0_3
LBB0_11:
	add	x0, x19, #8
	mov	x1, x22
	mov	w2, #0
	bl	_drm_object_attach_property
	mov	w24, #0
	str	x22, [x19]
	b	LBB0_3
LBB0_12:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_scaling_mode_enum_list,8,3 ; @drm_scaling_mode_enum_list
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_MODE_PROP_ENUM,4,2         ; @DRM_MODE_PROP_ENUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scaling mode"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
