	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sysfs_device_add           ## -- Begin function drm_sysfs_device_add
	.p2align	4, 0x90
_drm_sysfs_device_add:                  ## @drm_sysfs_device_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	40(%rdi), %rax
	movl	(%rax), %eax
	leaq	8(%rdi), %rbx
	movl	%eax, 28(%rdi)
	movq	_drm_class@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	_drm_sysfs_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movl	36(%rdi), %eax
	movl	%eax, 16(%rdi)
	movq	_drm_sysfs_device_minor@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rdi)
	movq	(%rdi), %rax
	movq	_DRM_MINOR_CONTROL@GOTPCREL(%rip), %rsi
	movq	_DRM_MINOR_RENDER@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rdx, %rcx
	cmpq	(%rsi), %rax
	leaq	L_.str(%rip), %rsi
	cmovneq	%rcx, %rsi
	movl	32(%rdi), %edx
	movq	%rbx, %rdi
	callq	_dev_set_name
	movq	%rbx, %rdi
	callq	_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	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
	.comm	_drm_sysfs_device_minor,4,2     ## @drm_sysfs_device_minor
	.comm	_DRM_MINOR_CONTROL,8,3          ## @DRM_MINOR_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"controlD%d"

	.comm	_DRM_MINOR_RENDER,8,3           ## @DRM_MINOR_RENDER
L_.str.1:                               ## @.str.1
	.asciz	"renderD%d"

L_.str.2:                               ## @.str.2
	.asciz	"card%d"

L_.str.3:                               ## @.str.3
	.asciz	"device add failed: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sysfs_device_add           ; -- Begin function drm_sysfs_device_add
	.p2align	2
_drm_sysfs_device_add:                  ; @drm_sysfs_device_add
	.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
	mov	x19, x0
	ldr	x8, [x0, #40]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _drm_class@GOTPAGE
Lloh1:
	ldr	x9, [x9, _drm_class@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
Lloh3:
	adrp	x8, _drm_sysfs_device_release@GOTPAGE
Lloh4:
	ldr	x8, [x8, _drm_sysfs_device_release@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w2, w9, [x0, #32]
	stp	w9, w8, [x0, #16]
Lloh6:
	adrp	x8, _drm_sysfs_device_minor@GOTPAGE
Lloh7:
	ldr	x8, [x8, _drm_sysfs_device_minor@GOTPAGEOFF]
	ldr	x9, [x0]
	str	x8, [x19, #8]!
Lloh8:
	adrp	x8, _DRM_MINOR_CONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRM_MINOR_CONTROL@GOTPAGEOFF]
Lloh10:
	adrp	x10, _DRM_MINOR_RENDER@GOTPAGE
Lloh11:
	ldr	x10, [x10, _DRM_MINOR_RENDER@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	adrp	x11, l_.str.2@PAGE
Lloh15:
	add	x11, x11, l_.str.2@PAGEOFF
Lloh16:
	adrp	x12, l_.str.1@PAGE
Lloh17:
	add	x12, x12, l_.str.1@PAGEOFF
	cmp	x9, x10
	csel	x10, x12, x11, eq
Lloh18:
	adrp	x11, l_.str@PAGE
Lloh19:
	add	x11, x11, l_.str@PAGEOFF
	cmp	x9, x8
	csel	x1, x11, x10, eq
	mov	x0, x19
	bl	_dev_set_name
	mov	x0, x19
	bl	_device_register
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_DRM_ERROR
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_class,4,2                  ; @drm_class
	.comm	_drm_sysfs_device_release,4,2   ; @drm_sysfs_device_release
	.comm	_drm_sysfs_device_minor,4,2     ; @drm_sysfs_device_minor
	.comm	_DRM_MINOR_CONTROL,8,3          ; @DRM_MINOR_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"controlD%d"

	.comm	_DRM_MINOR_RENDER,8,3           ; @DRM_MINOR_RENDER
l_.str.1:                               ; @.str.1
	.asciz	"renderD%d"

l_.str.2:                               ; @.str.2
	.asciz	"card%d"

l_.str.3:                               ; @.str.3
	.asciz	"device add failed: %d\n"

.subsections_via_symbols
