	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_panel_reset          ## -- Begin function mdfld_dsi_panel_reset
	.p2align	4, 0x90
_mdfld_dsi_panel_reset:                 ## @mdfld_dsi_panel_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	cmpl	$2, %edi
	jne	LBB0_12
## %bb.3:
	movl	$34, %r14d
	jmp	LBB0_4
LBB0_1:
	movl	$128, %r14d
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_gpio_request
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_12:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_gpio_direction_output
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_9
LBB0_8:
	movl	$128, %edi
	callq	_gpio_get_value
LBB0_9:
	movl	%r14d, %edi
	callq	_gpio_is_valid
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	%r14d, %edi
	callq	_gpio_free
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid output\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"gfx"

L_.str.2:                               ## @.str.2
	.asciz	"gpio_rqueset failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"gpio_direction_output failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_panel_reset          ; -- Begin function mdfld_dsi_panel_reset
	.p2align	2
_mdfld_dsi_panel_reset:                 ; @mdfld_dsi_panel_reset
	.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
	cbz	w0, LBB0_3
; %bb.1:
	cmp	w0, #2
	b.ne	LBB0_6
; %bb.2:
	mov	w19, #34
	b	LBB0_4
LBB0_3:
	mov	w19, #128
LBB0_4:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_gpio_request
	cbz	w0, LBB0_7
; %bb.5:
	mov	x20, x0
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_6:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_gpio_direction_output
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.8:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_10
LBB0_9:
	mov	w0, #128
	bl	_gpio_get_value
LBB0_10:
	mov	x0, x19
	bl	_gpio_is_valid
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_gpio_free
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid output\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"gfx"

l_.str.2:                               ; @.str.2
	.asciz	"gpio_rqueset failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"gpio_direction_output failed\n"

.subsections_via_symbols
