	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sysfs_connector_add        ## -- Begin function drm_sysfs_connector_add
	.p2align	4, 0x90
_drm_sysfs_connector_add:               ## @drm_sysfs_connector_add
	.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
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_device_is_registered
	movl	%eax, %edi
	callq	_BUG_ON
	movq	(%r14), %rax
	addq	$4, %rax
	movq	%rax, 24(%rbx)
	movq	_drm_class@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_drm_sysfs_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_drm_get_connector_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG
	movq	(%r14), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_drm_get_connector_name
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_set_name
	movq	%r15, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_1
## %bb.25:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_24
LBB0_1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_connector_attrs@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	movl	$0, %r14d
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	addq	%r12, %rsi
	movq	%r15, %rdi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_19
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r12
	cmpq	%rax, %r14
	jl	LBB0_3
## %bb.5:
	movq	%rbx, %r12
LBB0_6:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_12
## %bb.7:
	movq	_connector_attrs_opt1@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	addq	%r12, %rsi
	movq	%r15, %rdi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	incq	%r13
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r12
	movq	%r13, %rcx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r13
	jl	LBB0_9
## %bb.11:
	movq	_connector_attrs@GOTPCREL(%rip), %r12
LBB0_12:
	movq	_edid_attr@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_sysfs_create_bin_file
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_sysfs_hotplug_event
	xorl	%r13d, %r13d
	jmp	LBB0_24
LBB0_19:
	movl	%eax, %r13d
	movq	%rbx, %r12
	jmp	LBB0_20
LBB0_14:
	movl	%eax, %r13d
	movq	_connector_attrs@GOTPCREL(%rip), %r12
LBB0_15:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	jle	LBB0_20
## %bb.16:
	movl	%eax, %r12d
	shlq	$2, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	_connector_attrs_opt1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	%r15, %rdi
	callq	_device_remove_file
	addq	$4, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_17
## %bb.18:
	movq	_connector_attrs@GOTPCREL(%rip), %r12
LBB0_20:
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.21:
	movl	%r14d, %r14d
	shlq	$2, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	addq	%rbx, %rsi
	movq	%r15, %rdi
	callq	_device_remove_file
	addq	$4, %rbx
	cmpq	%rbx, %r14
	jne	LBB0_22
LBB0_23:
	movq	%r15, %rdi
	callq	_device_unregister
LBB0_24:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drm_class,4,2                  ## @drm_class
	.comm	_drm_sysfs_device_release,4,2   ## @drm_sysfs_device_release
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adding \"%s\" to sysfs\n"

L_.str.1:                               ## @.str.1
	.asciz	"card%d-%s"

L_.str.2:                               ## @.str.2
	.asciz	"failed to register connector device: %d\n"

	.comm	_connector_attrs,8,3            ## @connector_attrs
	.comm	_connector_attrs_opt1,8,3       ## @connector_attrs_opt1
	.comm	_edid_attr,4,2                  ## @edid_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sysfs_connector_add        ; -- Begin function drm_sysfs_connector_add
	.p2align	2
_drm_sysfs_connector_add:               ; @drm_sysfs_connector_add
	.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	x22, x0
	ldr	x20, [x0, #32]
	add	x19, x0, #8
	mov	x0, x19
	bl	_device_is_registered
	bl	_BUG_ON
	ldr	x8, [x20]
	add	x8, x8, #4
	str	x8, [x22, #24]
Lloh0:
	adrp	x8, _drm_class@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drm_class@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _drm_sysfs_device_release@GOTPAGE
Lloh4:
	ldr	x9, [x9, _drm_sysfs_device_release@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #12]
	mov	x0, x22
	bl	_drm_get_connector_name
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x8, [x20]
	ldr	w21, [x8]
	mov	x0, x22
	bl	_drm_get_connector_name
	mov	x3, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_set_name
	mov	x0, x19
	bl	_device_register
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
	b	LBB0_23
LBB0_2:
Lloh12:
	adrp	x23, _connector_attrs@GOTPAGE
Lloh13:
	ldr	x23, [x23, _connector_attrs@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x25, #0
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x8, x25
	mov	x0, x19
	bl	_device_create_file
	cbnz	w0, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x25, x25, #4
	cmp	x24, w0, sxtw
	b.lt	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w24, #0
LBB0_7:
	ldr	w8, [x22]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_12
; %bb.8:
Lloh14:
	adrp	x25, _connector_attrs_opt1@GOTPAGE
Lloh15:
	ldr	x25, [x25, _connector_attrs_opt1@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x26, #0
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x1, x8, x26
	mov	x0, x19
	bl	_device_create_file
	cbnz	w0, LBB0_24
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	add	x26, x26, #4
	cmp	x22, w0, sxtw
	b.lt	LBB0_10
	b	LBB0_13
LBB0_12:
	mov	w22, #0
LBB0_13:
Lloh16:
	adrp	x1, _edid_attr@GOTPAGE
Lloh17:
	ldr	x1, [x1, _edid_attr@GOTPAGEOFF]
	mov	x0, x19
	bl	_sysfs_create_bin_file
	mov	x21, x0
	cbz	w0, LBB0_22
; %bb.14:
	cmp	w22, #1
	b.lt	LBB0_18
LBB0_15:
	mov	x20, #0
	mov	w8, w22
	lsl	x22, x8, #2
Lloh18:
	adrp	x25, _connector_attrs_opt1@GOTPAGE
Lloh19:
	ldr	x25, [x25, _connector_attrs_opt1@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x1, x8, x20
	mov	x0, x19
	bl	_device_remove_file
	add	x20, x20, #4
	cmp	x22, x20
	b.ne	LBB0_16
	b	LBB0_18
LBB0_17:
	mov	x21, x0
LBB0_18:
	cbz	w24, LBB0_21
; %bb.19:
	mov	x20, #0
	mov	w8, w24
	lsl	x22, x8, #2
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_device_remove_file
	add	x20, x20, #4
	cmp	x22, x20
	b.ne	LBB0_20
LBB0_21:
	mov	x0, x19
	bl	_device_unregister
	b	LBB0_23
LBB0_22:
	mov	x0, x20
	bl	_drm_sysfs_hotplug_event
LBB0_23:
	mov	x0, x21
	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_24:
	mov	x21, x0
	cmp	w22, #1
	b.ge	LBB0_15
	b	LBB0_18
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_class,4,2                  ; @drm_class
	.comm	_drm_sysfs_device_release,4,2   ; @drm_sysfs_device_release
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adding \"%s\" to sysfs\n"

l_.str.1:                               ; @.str.1
	.asciz	"card%d-%s"

l_.str.2:                               ; @.str.2
	.asciz	"failed to register connector device: %d\n"

	.comm	_connector_attrs,8,3            ; @connector_attrs
	.comm	_connector_attrs_opt1,8,3       ; @connector_attrs_opt1
	.comm	_edid_attr,4,2                  ; @edid_attr
.subsections_via_symbols
