	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bus_add_device                 ## -- Begin function bus_add_device
	.p2align	4, 0x90
_bus_add_device:                        ## @bus_add_device
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rdi
	callq	_bus_get
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r14
	movl	8(%rax), %ebx
	movq	%r13, %rdi
	callq	_dev_name
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_pr_debug
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_device_add_attrs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	(%r14), %rax
	movq	(%rax), %r12
	leaq	8(%r13), %rbx
	movq	%r13, %rdi
	callq	_dev_name
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_sysfs_create_link
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	(%r13), %rax
	movq	(%rax), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_sysfs_create_link
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r13, %rdi
	callq	_make_deprecated_bus_links
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_remove_link
LBB0_7:
	movq	(%r14), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_dev_name
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_sysfs_remove_link
LBB0_8:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_device_remove_attrs
LBB0_9:
	movq	(%r13), %rdi
	callq	_bus_put
	movl	%r12d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	16(%r13), %rdi
	movq	(%r14), %rsi
	addq	$8, %rsi
	callq	_klist_add_tail
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bus: '%s': add device %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"subsystem"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bus_add_device                 ; -- Begin function bus_add_device
	.p2align	2
_bus_add_device:                        ; @bus_add_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x0, [x0]
	bl	_bus_get
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	w21, [x0, #8]
	mov	x0, x19
	bl	_dev_name
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
	mov	x0, x20
	mov	x1, x19
	bl	_device_add_attrs
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	x8, [x20]
	ldr	x21, [x8]
	add	x22, x19, #8
	mov	x0, x19
	bl	_dev_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_sysfs_create_link
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	x8, [x19]
	ldr	x1, [x8]
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_sysfs_create_link
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_make_deprecated_bus_links
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.5:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_sysfs_remove_link
LBB0_6:
	ldr	x8, [x20]
	ldr	x22, [x8]
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
	mov	x0, x22
	bl	_sysfs_remove_link
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_device_remove_attrs
LBB0_8:
	ldr	x0, [x19]
	bl	_bus_put
	b	LBB0_10
LBB0_9:
	mov	w21, #0
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x0, [x19, #16]
	ldr	x8, [x20]
	add	x1, x8, #8
	bl	_klist_add_tail
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bus: '%s': add device %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"subsystem"

.subsections_via_symbols
