// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/utils.c
// Function: moonglfw_pushgamepadbuttons
int pushgamepadbuttons(lua_State *L, const GLFWgamepadstate *state)
    {
    lua_newtable(L);
#define Setfield(x, name) do {  \
    lua_pushstring(L, state->buttons[GLFW_GAMEPAD_BUTTON_##x]==GLFW_PRESS ? "press" : "release"); \
    lua_setfield(L, -2, name);  \
} while(0)
    Setfield(A, "a");
    Setfield(A, "a");
    Setfield(B, "b");
    Setfield(X, "x");
    Setfield(Y, "y");
    Setfield(LEFT_BUMPER, "left_bumper");
    Setfield(RIGHT_BUMPER, "right_bumper");
    Setfield(BACK, "back");
    Setfield(START, "start");
    Setfield(GUIDE, "guide");
    Setfield(LEFT_THUMB, "left_thumb");
    Setfield(RIGHT_THUMB, "right_thumb");
    Setfield(DPAD_UP, "dpad_up");
    Setfield(DPAD_RIGHT, "dpad_right");
    Setfield(DPAD_DOWN, "dpad_down");
    Setfield(DPAD_LEFT, "dpad_left");
#undef Setfield
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
cmpb $0x1, (%r14)
leaq 0x2e62(%rip), %r13      # 0x123c5
leaq 0x2e68(%rip), %r15      # 0x123d2
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x40ae(%rip), %r12      # 0x1362e
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x52d0
cmpb $0x1, (%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x52d0
cmpb $0x1, 0x1(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x2ec6(%rip), %rdx      # 0x12491
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x2(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x326c(%rip), %rdx      # 0x1285c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x3(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x3252(%rip), %rdx      # 0x12867
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x4(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x573f(%rip), %rdx      # 0x14d79
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x5(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x5726(%rip), %rdx      # 0x14d85
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x6(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x40be(%rip), %rdx      # 0x13742
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x7(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x56e9(%rip), %rdx      # 0x14d92
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x8(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x56ca(%rip), %rdx      # 0x14d98
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0x9(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x56ab(%rip), %rdx      # 0x14d9e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0xa(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x5691(%rip), %rdx      # 0x14da9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0xb(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x5678(%rip), %rdx      # 0x14db5
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0xc(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x565b(%rip), %rdx      # 0x14dbd
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0xd(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
leaq 0x5641(%rip), %rdx      # 0x14dc8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
cmpb $0x1, 0xe(%r14)
cmoveq %r13, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5690
leaq 0x5626(%rip), %rdx      # 0x14dd2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq