Rather pertinent points raised by Rick. I took some time to search for the name in the lock, which postponed my additional post in that i was going to comment on the swivel sling hook and the stock profile, the first very much the European style (Spanish and Portuguese as i recall) and the second also Iberian style ... that not the typical 'boot shaped' often seen in Catalonian 'trabucos'. However the name J
OAN in the lock has a Catalonian spell; Castillian would be J
UAN. I can find no name or tanslation for BOP; it just sounds strange.
I am not enough within this subject but, my doubts would remain about the general decoration. Is it a crescent moon on the barrel band ? In all this band doesn't seem to me a typical Spanish addition; but i wouldn't stand to oppose Rick's impressions. However i tend to be influenced by a determined taste that Turkish/Ottoman (and not only) have to give an European touch to (imported) guns.
Back to the name in the lock, i have found a personality (born 1592 executed 1634) called
Joan Sala, later added
Serrallonga (after his wife's name), a famous Catalonian bandolero (burglar, highwayman, gang leader) who became a mythical figure, so that still in the XIX century a dramatic play of his life was staged.
Giving wings to imagination, if the name in that lock is not that of a smith but an allusion to a romanticized hero, here you have one

.
.