	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_hog                      ## -- Begin function gpiod_hog
	.p2align	4, 0x90
_gpiod_hog:                             ## @gpiod_hog
	.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	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_gpiod_to_chip
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_gpio_chip_hwgpio
	movq	%r13, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdx
	movq	%r14, %rcx
	movl	%r12d, %r8d
	callq	_gpiochip_request_own_desc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	callq	_pr_err
	jmp	LBB0_3
LBB0_2:
	movq	_FLAG_IS_HOGGED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_desc_to_gpio
	movq	_GPIOD_FLAGS_BIT_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r12d, %ecx
	movq	_GPIOD_FLAGS_BIT_DIR_VAL@GOTPCREL(%rip), %rdx
	andl	(%rdx), %r12d
	leaq	L_.str.5(%rip), %rdx
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%rdx, %rsi
	testl	%ecx, %ecx
	leaq	L_.str.3(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rdx, %rcx
	leaq	L_.str.6(%rip), %r8
	cmovneq	%rsi, %r8
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_pr_info
	xorl	%ebx, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"requesting hog GPIO %s (chip %s, offset %d) failed, %d\n"

	.comm	_FLAG_IS_HOGGED,4,2             ## @FLAG_IS_HOGGED
L_.str.1:                               ## @.str.1
	.asciz	"GPIO line %d (%s) hogged as %s%s\n"

	.comm	_GPIOD_FLAGS_BIT_DIR_OUT,4,2    ## @GPIOD_FLAGS_BIT_DIR_OUT
L_.str.2:                               ## @.str.2
	.asciz	"output"

L_.str.3:                               ## @.str.3
	.asciz	"input"

	.comm	_GPIOD_FLAGS_BIT_DIR_VAL,4,2    ## @GPIOD_FLAGS_BIT_DIR_VAL
L_.str.4:                               ## @.str.4
	.asciz	"/high"

L_.str.5:                               ## @.str.5
	.asciz	"/low"

L_.str.6:                               ## @.str.6
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_hog                      ; -- Begin function gpiod_hog
	.p2align	2
_gpiod_hog:                             ; @gpiod_hog
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x24, x2
	mov	x19, x1
	mov	x21, x0
	bl	_gpiod_to_chip
	mov	x23, x0
	mov	x0, x21
	bl	_gpio_chip_hwgpio
	mov	x22, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	mov	x3, x24
	mov	x4, x20
	bl	_gpiochip_request_own_desc
	mov	x24, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_PTR_ERR
	mov	x20, x0
	ldr	w2, [x23]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x22
	mov	x4, x20
	bl	_pr_err
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _FLAG_IS_HOGGED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FLAG_IS_HOGGED@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
	mov	x0, x21
	bl	_desc_to_gpio
	mov	x1, x0
Lloh5:
	adrp	x8, _GPIOD_FLAGS_BIT_DIR_OUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_DIR_OUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh10:
	adrp	x10, l_.str.3@PAGE
Lloh11:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh12:
	adrp	x11, _GPIOD_FLAGS_BIT_DIR_VAL@GOTPAGE
Lloh13:
	ldr	x11, [x11, _GPIOD_FLAGS_BIT_DIR_VAL@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
Lloh15:
	adrp	x12, l_.str.4@PAGE
Lloh16:
	add	x12, x12, l_.str.4@PAGEOFF
Lloh17:
	adrp	x13, l_.str.5@PAGE
Lloh18:
	add	x13, x13, l_.str.5@PAGEOFF
	tst	w11, w20
	csel	x11, x13, x12, eq
	tst	w8, w20
	csel	x3, x10, x9, eq
Lloh19:
	adrp	x8, l_.str.6@PAGE
Lloh20:
	add	x8, x8, l_.str.6@PAGEOFF
	csel	x4, x8, x11, eq
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_pr_info
	mov	w20, #0
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"requesting hog GPIO %s (chip %s, offset %d) failed, %d\n"

	.comm	_FLAG_IS_HOGGED,4,2             ; @FLAG_IS_HOGGED
l_.str.1:                               ; @.str.1
	.asciz	"GPIO line %d (%s) hogged as %s%s\n"

	.comm	_GPIOD_FLAGS_BIT_DIR_OUT,4,2    ; @GPIOD_FLAGS_BIT_DIR_OUT
l_.str.2:                               ; @.str.2
	.asciz	"output"

l_.str.3:                               ; @.str.3
	.asciz	"input"

	.comm	_GPIOD_FLAGS_BIT_DIR_VAL,4,2    ; @GPIOD_FLAGS_BIT_DIR_VAL
l_.str.4:                               ; @.str.4
	.asciz	"/high"

l_.str.5:                               ; @.str.5
	.asciz	"/low"

l_.str.6:                               ; @.str.6
	.space	1

.subsections_via_symbols
